refactor(launcher): unify the three launchers into one env-toggled launcher per platform#5
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ship marker Replaces the single hard-coded context-icon sed with a generic registry whose bundle-patch features register idempotent, ownership-marked apply/undo pairs. Per-file reconcile undoes all known features (reverse) then re-applies enabled ones (forward), writing only on change. Adds CC_WORKAROUNDS master switch and CC_RECONCILE emergency bypass. New tests/test_reconcile.py covers the matrix. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Ports the bash reconcile engine into claudemax.win.js with the same ownership marker, master switch (CC_WORKAROUNDS), and emergency bypass (CC_RECONCILE), preserving the Windows .cmd/.bat shim resolution and discovery hardening. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… form Keeps fix-context-icon.py byte-consistent with the launcher, so the launcher's reconcile recognizes a standalone-patched bundle (no spurious anchor warning). --revert stays backup-based in this PR. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…x template Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…d launcher Retargets all launcher names/paths/toggles to launcher/claudemax and the fixes/<name>/ layout, adds the toggle table and clean-break migration note, documents the per-file reconcile model, ownership marker, and the .bak-cc- workarounds emergency snapshot. Updates the launcher header comments to match. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ise walk-up Codex audit follow-ups, folded into the reconcile mechanism so md-copy builds on a clean base. Finding 1 (legacy bare-101): the old launcher/standalone wrote a bare, unmarked `>=101)return null}`. The marker-only undo treated that as foreign, so every default launch warned "context-icon anchor not found (extension changed?)" and `CC_PATCH_CONTEXT_ICON=0` could not revert it (breaking the migration table). undo now recognizes the bare form as a second ownership fingerprint (`>=101` is dead upstream code, so it only ever appears as our own output). A legacy bundle now self-heals: a default launch reverts bare -> `>=50` then re-applies the marked form, capturing the correct pristine snapshot, with no warning; a disabled launch reverts cleanly. The genuine "extension changed" warning still fires for an unrecognized bundle. Finding 2 (Windows precise discovery): reconcile was called with only wrapperBin, ignoring the resolved `claude` (CLAUDE_REAL_BIN / autodetected). An extension whose root sits outside the HOME fallback scan was left unpatched on a terminal launch, contradicting the documented discovery model and bash's walk from REAL_CLAUDE. Now reconcile(wrapperBin || claude), at parity with bash. Tests: replace the obsolete "bare-101 is upstream" assertion with legacy adoption + stderr-quiet coverage (upgrade-when-enabled, revert-when-disabled, revert-by-master-switch, unrecognized-still-warns) across bash and node, plus a precise-walk-up test with an extension root outside the fallback scan on both platforms. 24 -> 32 tests, all green; bash -n / shellcheck --severity=warning / node --check / py_compile clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Consolidates the three separate launchers (
claudemax,claude-think,claude-context) into a single env-toggled launcher per platform (launcher/claudemax+launcher/claudemax.win.js), and generalizes the hard-coded context-icon patch into a feature registry + per-file reconcile engine (undo-all-reverse -> apply-enabled-forward -> write-if-changed).CC_WORKAROUNDS(master),CC_RECONCILE(bypass),CC_THINKING_DISPLAY,CC_PATCH_CONTEXT_ICON- all on by default.launcher/+fixes/<name>/(+fixes/_template/); the single-fix launchers are removed..bak-context-icon->.bak-cc-workarounds.Breaking change (see migration below). This is PR 1 of 2 in a coordinated breaking release; the markdown copy/export feature follows in PR 2.
Migration (clean break)
claudemax(both fixes)launcher/claudemax(same name, now carries every fix)claude-think(thinking only)launcher/claudemaxwithCC_PATCH_CONTEXT_ICON=0claude-context(context icon only)launcher/claudemaxwithCC_THINKING_DISPLAY=omittedRepoint
claudeCode.claudeProcessWrapper(VS Code) at the newlauncher/claudemaxpath and reload.Test plan
python3 -m unittest discover -s tests(32 cases: reconcile matrix + bash/node parity)bash -n/ ShellCheck (--severity=warning) /node --check/py_compile🤖 Generated with Claude Code