Skip to content

Conversation

@Anshgrover23
Copy link
Collaborator

@Anshgrover23 Anshgrover23 commented Dec 27, 2025

Summary

Removes the deprecated check-pref and edit-pref CLI commands along with the underlying user_preferences module, tests, and documentation.

Related Issue

Closes #365

Type of Change

  • Bug fix
  • Breaking change
  • New feature
  • Documentation update

Checklist

  • Tests pass locally
  • Code follows style guide
  • Documentation updated

Summary by CodeRabbit

Release Notes

  • Documentation

    • Removed preferences command documentation and implementation guides
  • Tests

    • Removed user preferences test suite
  • Chores

    • Removed cortex check-pref and cortex edit-pref CLI commands
    • Removed user preferences management system

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 27, 2025

📝 Walkthrough

Walkthrough

This PR removes the deprecated user preferences subsystem from Cortex, including CLI commands (check-pref, edit-pref), the PreferencesManager class and related data structures, CLI integration code, documentation, and comprehensive test coverage. No new functionality is added.

Changes

Cohort / File(s) Summary
Documentation updates
README.md, TESTING.md, docs/COMMANDS.md, docs/POST_MVP_AUDIT.md
Removed references to cortex check-pref and cortex edit-pref commands, preferences testing checklist, command documentation, and code review notes about PreferencesManager integration.
Implementation guide deletion
docs/USER_PREFERENCES_IMPLEMENTATION.md
Deleted comprehensive implementation documentation covering architecture, storage, CLI integration, API reference, testing structure, and migration guidance.
CLI module
cortex/cli.py
Removed _get_prefs_manager method, check_pref and edit_pref methods, lazy initialization of prefs_manager attribute, preferences subcommand definitions (check-pref and edit-pref), and related argument parsing and error handling.
Core module deletion
cortex/user_preferences.py
Deleted entire module containing PreferencesManager class, UserPreferences and related dataclasses (ConfirmationSettings, AutoUpdateSettings, AISettings, PackageSettings), VerbosityLevel and AICreativity enums, PreferencesError exception, and formatting utilities.
Test suite deletion
tests/test_user_preferences.py
Deleted comprehensive unittest suite with 8 test classes covering PreferencesManager lifecycle, persistence, type coercion, validation, JSON import/export, and formatting helpers.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • mikejmorgan-ai
  • dhvll

Poem

🐰 Preferences were nice, but now they're gone,
CLI commands dismissed at dawn,
PreferencesManager bids adieu,
A cleaner cortex, fresh and new! 🌟

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title '[cli] Remove deprecated user-preferences command' accurately and concisely summarizes the main change: removing deprecated CLI commands.
Description check ✅ Passed The PR description provides a clear summary, references the related issue (#365), specifies breaking/documentation changes, and confirms checklist items, but uses a custom format rather than the template structure.
Linked Issues check ✅ Passed All code changes fully implement the requirements of issue #365: the check-pref and edit-pref commands are removed, the user_preferences module is deleted, and all related tests and documentation are removed.
Out of Scope Changes check ✅ Passed All changes are directly related to removing the deprecated user-preferences functionality as specified in issue #365; no extraneous modifications detected.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4916766 and f7d9680.

📒 Files selected for processing (8)
  • README.md
  • TESTING.md
  • cortex/cli.py
  • cortex/user_preferences.py
  • docs/COMMANDS.md
  • docs/POST_MVP_AUDIT.md
  • docs/USER_PREFERENCES_IMPLEMENTATION.md
  • tests/test_user_preferences.py
💤 Files with no reviewable changes (7)
  • docs/COMMANDS.md
  • TESTING.md
  • docs/POST_MVP_AUDIT.md
  • docs/USER_PREFERENCES_IMPLEMENTATION.md
  • cortex/user_preferences.py
  • tests/test_user_preferences.py
  • README.md
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Follow PEP 8 style guide
Type hints required in Python code
Docstrings required for all public APIs

Files:

  • cortex/cli.py
🔇 Additional comments (1)
cortex/cli.py (1)

19-19: Clean removal of preferences functionality verified across codebase.

The consolidation of validator imports on line 19 is correct. Both validate_api_key and validate_install_request are properly used in the code, and the removal of preferences-related code (PreferencesManager, check-pref, edit-pref) is complete with no dangling references remaining in the codebase.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

@Anshgrover23
Copy link
Collaborator Author

@Suyashd999 @mikejmorgan-ai Can i get a review on this one ?

@Suyashd999 Suyashd999 merged commit 2f01549 into cortexlinux:main Dec 27, 2025
13 checks passed
@Suyashd999
Copy link
Collaborator

@Anshgrover23 Thanks

@Anshgrover23
Copy link
Collaborator Author

@mikejmorgan-ai Can u tell me how to claim the bounty of 50 dollars for this one ? Thanks.

@Anshgrover23 Anshgrover23 deleted the remove/deprecated-user-preferences-command branch December 27, 2025 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove deprecated user-preferences command

2 participants