Repository navigation
fix(uninstall): remove Qoder per-project mode files - #1282
Open
danieldutu wants to merge 1 commit into
Open
danieldutu wants to merge 1 commit into
danieldutu wants to merge 1 commit into
Conversation
With Qoder detection on (QODER_SESSION_ID set), the mode tracker writes per-project flags under $QODER_CONFIG_DIR/ponytail-modes (hooks/ponytail-runtime.js:40). scripts/uninstall.js:30 removed ponytail-modes under the Claude, Cursor and CodeBuddy directories only, so the Qoder directory survived every uninstall. A leftover flag starts a reinstall with the project's previous mode instead of the configured default, the same effect DietrichGebert#676 fixed for the shared Qoder flag. Repro (scratch dirs, detection emulated with QODER_SESSION_ID): before uninstall: qoder/.ponytail-active and qoder/ponytail-modes/5be02fc2...b6fd28 after uninstall: qoder/ponytail-modes/5be02fc2...b6fd28 remained The fix adds getQoderDir() to the directory list, so the Qoder ponytail-modes directory is removed like the other three. After the fix the same repro leaves 0 files. Not covered: Windows untested; Qoder itself is not installed, detection was emulated. Open PR DietrichGebert#1202 makes this Qoder path the default via QODER_PROJECT_DIR, so the leak becomes the default case once it merges; this change is independent of it and of DietrichGebert#1196, which edits other parts of uninstall.js.
caioniehues
pushed a commit
to caioniehues/ponytail
that referenced
this pull request
Nov 18, 2026
) With Qoder detection on (QODER_SESSION_ID set), the mode tracker writes per-project flags under $QODER_CONFIG_DIR/ponytail-modes (hooks/ponytail-runtime.js:40). scripts/uninstall.js:30 removed ponytail-modes under the Claude, Cursor and CodeBuddy directories only, so the Qoder directory survived every uninstall. A leftover flag starts a reinstall with the project's previous mode instead of the configured default, the same effect DietrichGebert#676 fixed for the shared Qoder flag. Repro (scratch dirs, detection emulated with QODER_SESSION_ID): before uninstall: qoder/.ponytail-active and qoder/ponytail-modes/5be02fc2...b6fd28 after uninstall: qoder/ponytail-modes/5be02fc2...b6fd28 remained The fix adds getQoderDir() to the directory list, so the Qoder ponytail-modes directory is removed like the other three. After the fix the same repro leaves 0 files. Not covered: Windows untested; Qoder itself is not installed, detection was emulated. Open PR DietrichGebert#1202 makes this Qoder path the default via QODER_PROJECT_DIR, so the leak becomes the default case once it merges; this change is independent of it and of DietrichGebert#1196, which edits other parts of uninstall.js. (cherry picked from commit 1b43cab)
caioniehues
added a commit
to caioniehues/ponytail
that referenced
this pull request
Nov 18, 2026
The fork's per-session levels (ponytail-sessions/ beside each host's flag) survived an uninstall, so a resumed session after a reinstall came back at its old level, the leftover DietrichGebert#1282 fixed for ponytail-modes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
scripts/uninstall.jsleaves the Qoder per-project mode file behind.With Qoder detection on (
QODER_SESSION_IDset), the mode tracker writes per-project flags under$QODER_CONFIG_DIR/ponytail-modes/<sha256>(hooks/ponytail-runtime.js:40, project keying at :51-57).scripts/uninstall.js:30removesponytail-modesunder the Claude, Cursor and CodeBuddy directories only, so the Qoder directory survived every uninstall. A leftover flag starts a reinstall with the project's previous mode instead of the configured default, the same effect #676 fixed for the shared Qoder flag.Repro (scratch dirs, detection emulated with
QODER_SESSION_ID, hook run then uninstall): before uninstall the Qoder dir holds.ponytail-activeandponytail-modes/5be02fc2…b6fd28; after uninstallponytail-modes/5be02fc2…b6fd28remained. The control (detection off) left 0 files both before and after this change.Fix: I added
getQoderDir()to the directory list atscripts/uninstall.js:30, so the Qoderponytail-modesdirectory is removed like the other three. After the fix the same repro leaves 0 files, andnode tests/uninstall.test.jspasses with a new assertion that the per-project flag is removed.Boundaries: Windows not tested. Qoder is not installed here; detection was emulated with
QODER_SESSION_ID, and the code path is the same onceisQoderis set. The precondition that Qoder hook processes carryCLAUDE_PROJECT_DIRcomes from closed #1092's report of a real Qoder hook process; I did not verify it. Open PR #1202 makes this path the default for Qoder viaQODER_PROJECT_DIR, so this leak becomes the default case once it merges; this change is independent of #1202 and touches only line 30 and the test, so it also applies alongside #1196 and #1264, which edit other parts ofuninstall.js.Checks:
npm test(only the known pandas csv env gap fails),npm test --prefix pi-extension30 pass,node scripts/check-rule-copies.jsandnode scripts/check-versions.jspass.Fixes #1279