Skip to content

feat(uninstall): preserve config.json after uninstall#35

Merged
jgmontoya merged 1 commit into
masterfrom
feat/persist-uninstall-config
May 25, 2026
Merged

feat(uninstall): preserve config.json after uninstall#35
jgmontoya merged 1 commit into
masterfrom
feat/persist-uninstall-config

Conversation

@jgmontoya

@jgmontoya jgmontoya commented May 25, 2026

Copy link
Copy Markdown
Owner

delete it with --delete-data flag

Summary by CodeRabbit

  • New Features

    • Configuration data is now treated as user data and preserved by default when running uninstall --keep-data.
  • Bug Fixes

    • Configuration data is now removed only when explicitly using the --delete-data flag.
  • Documentation

    • Updated uninstall command descriptions and prompts to clarify what data persists vs. what is removed.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b47c97ca-d21d-4c94-9a05-e00ef0ed22cc

📥 Commits

Reviewing files that changed from the base of the PR and between e7c3726 and a09c3c8.

📒 Files selected for processing (8)
  • README.md
  • src/commands/uninstall.ts
  • src/services/uninstall-service.ts
  • test/e2e/claudecode.sh
  • test/e2e/codex.sh
  • test/e2e/opencode.sh
  • test/unit/commands/uninstall-cli.test.ts
  • test/unit/services/uninstall-service.test.ts

📝 Walkthrough

Walkthrough

This PR reclassifies config.json from framework-owned files to user-owned data in the shaka uninstall command. By default, uninstall now removes provider hooks and framework files but preserves user data (including config.json); explicit deletion of user data occurs only with the --delete-data flag. All messaging, implementation, tests, and documentation are updated to reflect this new behavior classification.

Changes

config.json as user data

Layer / File(s) Summary
Uninstall service logic
src/services/uninstall-service.ts
removeFrameworkFiles() removes only commands-manifest.json (no longer removes config.json); removeUserData() now deletes config.json alongside user directories; JSDoc and comments updated to clarify ownership model and scoped uninstall behavior.
CLI and documentation messaging
src/commands/uninstall.ts, README.md
Prompts, help text, and README updated to describe removal of "provider hooks and framework links" while keeping user data; config.json explicitly listed in --keep-data and --delete-data option descriptions.
Service layer unit tests
test/unit/services/uninstall-service.test.ts
Tests updated to verify removeFrameworkFiles() preserves config.json, removeUserData() includes it, and default uninstall keeps all user data intact. New integration test confirms custom hooks, skills, and memory artifacts survive uninstall and re-initialize correctly. Scoped and failure-case tests align with new classification.
CLI unit tests
test/unit/commands/uninstall-cli.test.ts
New test verifies unscoped uninstall output includes config.json path and "data remains at" location message.
End-to-end test assertions
test/e2e/claudecode.sh, test/e2e/codex.sh, test/e2e/opencode.sh
All E2E scripts now assert $SHAKA_HOME/config.json exists after shaka uninstall --keep-data, inverting prior expectations of removal.

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the main change: preserving config.json after uninstall, which aligns with the PR's primary objective and all file modifications.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/persist-uninstall-config

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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.

@jgmontoya
jgmontoya merged commit d4b11f1 into master May 25, 2026
3 checks passed
@jgmontoya
jgmontoya deleted the feat/persist-uninstall-config branch May 25, 2026 13:04
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.

1 participant