Repository navigation
Clean dead code and finish work-context migration to /shared - #84
Merged
Merged
Conversation
Salvages the high-signal portion of the parked `cleanup/dead-code-sweep` branch, re-derived on top of post-rename main so it does not resurrect "cc-shell" strings anywhere. Four cleanups land here: 1. Delete src/main/tmux/verify-tmux.ts — zero importers, was never wired into the tmux registry or any test. 2. Inline toggleDangerousAgents into dangerousCommands.ts. The old dangerousActions.ts exported three runners (enable/disable/toggle) plus a shared helper but only the toggle was ever registered as a CommandDef; the other two were dead. WHY-comment captures the non-obvious sequencing constraint (set flag, close palette, await reload — in that exact order, or the new flag value races the reload and never reaches the next-spawned agent). 3. Finish the work-context migration to @shared/work-context. The renderer-side directory was 8 one-line re-export shims left behind when the real implementation was moved to src/shared/work-context. Switches the 9 consumers to import directly from @shared/* and deletes the shim folder. No behavior change — the shims were `export * from '@shared/work-context/<x>'`. 4. Relocate work-context/colors.ts (now misnamed — it has nothing to do with work-context, it's a worktree-badge palette) to tile-tree/TileLeaf/worktreeBadgeColor.ts, next to its only UI consumer (SessionBadges). The other importer is the test script; updated. Net: 20 files changed, +30/-205. Build passes, test:work-context and test:review-fixes pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 13, 2026
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.
Summary
Salvages the high-signal portion of the parked
cleanup/dead-code-sweepbranch (commitea7ce0e, May 11), re-derived on top of post-renamemainso the cc-shell → agent-code rename is not regressed.Four focused cleanups:
Delete
src/main/tmux/verify-tmux.ts— zero importers, was never wired into the tmux registry or any test.Inline
toggleDangerousAgentsintodangerousCommands.ts, deletedangerousActions.ts. The old module exported three runners (enable/disable/toggle) plus a shared helper but only the toggle was ever registered as a CommandDef. WHY-comment captures the non-obvious sequencing invariant.Finish the work-context migration to
@shared/work-context. The renderer-sidesrc/renderer/src/workspace/work-context/directory was 8 one-line re-export shims left behind when the real implementation was moved tosrc/shared/work-context/(the move had landed but never had its callers migrated). Switches the 9 consumers to import directly from@shared/*and deletes the shim folder. No behavior change — the shims were literallyexport * from '@shared/work-context/<x>'.Relocate
work-context/colors.ts→tile-tree/TileLeaf/worktreeBadgeColor.ts. The file is misnamed: it's a worktree-badge palette helper, unrelated to the work-context machinery (matching/scoring/tracking). Moving it next to its only UI consumer (SessionBadges) makes future palette tweaks discoverable. Other importer (test script) updated.Why these branches were salvaged, not rebased
The original parked branch was authored before the cc-shell → agent-code rename and would reintroduce "cc-shell" strings in README, package.json, CLAUDE.md, AGENTS.md, etc. across ~100 files. Rebasing was not safe. The intent was extracted and re-applied carefully.
Test plan
npm run test:work-contextpasses (covers the worktreeBadgeColor relocation)npm run test:review-fixespasses (settings, prompt-templates, session-ownership)npm run build:appsucceedscc-shell/ccshell/cc_shellstrings introduced (git diff main | grep -icreturns 0)Stats
20 files changed, +30/-205.
🤖 Generated with Claude Code