Skip to content

Release prep: hardened webview fixes, launcher routing scrub, README quick start#8

Merged
phase3dev merged 7 commits into
mainfrom
fix/md-copy-redesign
Jun 11, 2026
Merged

Release prep: hardened webview fixes, launcher routing scrub, README quick start#8
phase3dev merged 7 commits into
mainfrom
fix/md-copy-redesign

Conversation

@phase3dev

Copy link
Copy Markdown
Owner

Release-prep batch on top of the md-copy redesign.

Fixes (hardened)

  • context-icon: match the guard pair by shape with variable-name captures and store the matched names in the ownership marker, so patch/undo survive minified renames (t/c, Z/U) across bundles 2.1.108-2.1.172. The old hardcoded t/c anchor silently skipped every Z/U bundle.
  • md-copy: keep visible thinking summaries copyable, gate tool-only turns so no stale/misplaced copy icon appears, and handle DETAILS/SUMMARY in the converter.

Launcher

  • Add CC_SCRUB_ROUTING (default off) to clear third-party model-routing env vars before launch, plus a ccwa-local-env injection anchor for personal builds. Documented in both launcher headers; covered by new bash + Windows tests.

Docs

  • README Quick start (two downloads + three screenshots).
  • Demote the unmaintained extension.js patch and local proxy to short TECHNICAL.md links (scripts kept, still test-covered); the launcher is the supported thinking fix.
  • Compatibility refreshed through 2.1.172.

Verification

  • 108 tests pass (python3 -m unittest discover -s tests).
  • gen-embeds --check --strict, bash -n, node --check, git diff --check clean.

🤖 Generated with Claude Code

phase3dev and others added 3 commits June 10, 2026 02:15
When appended after a bundle whose final statement is an expression with no
trailing semicolon, the IIFE would parse as a call on that expression and throw
before the webview app initializes. Prefix the payload with ';' so the patch is
safe regardless of the bundle's final token. Regenerated the three embeds; adds a
node-exec test on a no-semicolon bundle.

Not triggered by the current 2.1.170 bundle (it ends with '}'); this hardens
against future builds. Codex PR review, P2.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ext + --open

Fix the "says Copied but nothing copied" bug and redesign the injected controls:
- copyText now reports REAL success: synchronous execCommand("copy") first
  (gesture-safe, secure-context-independent), Clipboard API fallback; the icon
  flips to a checkmark only on a genuine copy, and empty text is never success
- replace the "Copy" text + caret + "Copy as plain text" menu with a single
  clipboard icon (Markdown only); checkmark for ~2s, no "Copied" label
- decorate is idempotent (prunes duplicates) -> fixes the double rows of buttons
- whole-conversation control is one gated icon (conversation view only), pinned
  top-right (top:26px right:4px)
- cc-export.py: drop the --open flag (open raw .jsonl) per product decision
- regenerate embeds into launcher/claudemax, claudemax.win.js, add-md-copy.py
- tests: add tests/test_md_clipboard.py (copyText honesty: empty/exec/api/no-false
  -success); replace the export --open test with a rejection test; 91 tests green
…demote unmaintained thinking options

Release-prep batch landing the hardened webview fixes plus launcher and docs work.

- context-icon: match the guard pair by shape (variable-name captures) and store
  the matched names in the ownership marker, so patch and undo survive minified
  renames (t/c, Z/U) across bundles 2.1.108-2.1.172.
- md-copy: keep visible thinking summaries copyable, gate tool-only turns so no
  stale/misplaced copy icon appears, and handle DETAILS/SUMMARY in the converter.
- launcher: add CC_SCRUB_ROUTING (default off) to clear third-party model routing
  before launch, plus a `ccwa-local-env` injection anchor for personal builds;
  documented in the header toggle list. Covered by new bash + Windows tests.
- docs: README Quick start with two downloads and three screenshots; demote the
  unmaintained extension.js patch and local proxy to short TECHNICAL.md links
  (kept as test-covered scripts); Compatibility refreshed through 2.1.172.

108 tests pass; gen-embeds --check --strict, bash -n, node --check, git diff --check clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 13be700dd5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread launcher/claudemax Outdated
-e 's#if(c>=101)return null}/\*ccwa-context-icon\*/#if(t===0)return null;if(c>=50)return null}#g' \
-e 's#if(t===0)return null;if(c>=101)return null}#if(t===0)return null;if(c>=50)return null}#g' \
-e 's#if(c>=101)return null}#if(t===0)return null;if(c>=50)return null}#g' \
-e 's#>=101)return null}#>=50)return null}#g' "$f" > "$tmp" 2>/dev/null \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Handle renamed legacy context-icon markers

When upgrading a bundle that an older launcher already patched on a build with non-t/c minified names (the docs call out Z/U), this fallback rewrites if(U>=101)return null}/*ccwa-context-icon*/ back to >=50 but leaves the legacy marker in place. The subsequent _cc_apply_context_icon exits early on any /*ccwa-context-icon marker, so reconcile commits a file with the original 50% gate and the context icon disappears again. Please either strip the marker in this fallback or add a legacy regex that captures arbitrary guard names before the broad replacement.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7495f82. Undo now recognizes the both-guards bare marker by shape (variable-name captures), restoring pristine on any guard names, and a final pass strips any leftover bare /*ccwa-context-icon*/ marker so apply is never wedged. Applied to all three implementations: the bash launcher, the Windows launcher (claudemax.win.js, which had the same gap — no >=101→>=50 fallback, so it left the bare form and reported a spurious "anchor not found"), and the standalone fix-context-icon.py.

New tests cover a Z/U bare-marked bundle upgrading to the metadata form — enabled and disabled, on both launchers and the patcher (113 tests pass).

One boundary: the ===0-removed bare form on non-t/c vars (if(U>=101)return null}/*marker*/) is irrecoverable — the original guard variable was deleted with no metadata to record it — and was never produced in practice (bare markers were t/c-only; var-agnostic patching shipped together with the metadata marker that stores the removed var). The orphan-marker strip keeps even that hypothetical from wedging apply.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 13be700dd5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread launcher/claudemax Outdated
-e 's#if(c>=101)return null}/\*ccwa-context-icon\*/#if(t===0)return null;if(c>=50)return null}#g' \
-e 's#if(t===0)return null;if(c>=101)return null}#if(t===0)return null;if(c>=50)return null}#g' \
-e 's#if(c>=101)return null}#if(t===0)return null;if(c>=50)return null}#g' \
-e 's#>=101)return null}#>=50)return null}#g' "$f" > "$tmp" 2>/dev/null \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Handle renamed legacy context-icon markers

When upgrading a bundle that an older launcher already patched on a build with non-t/c minified names (the docs call out Z/U), this fallback rewrites if(U>=101)return null}/*ccwa-context-icon*/ back to >=50 but leaves the legacy marker in place. The subsequent _cc_apply_context_icon exits early on any /*ccwa-context-icon marker, so reconcile commits a file with the original 50% gate and the context icon disappears again. Please either strip the marker in this fallback or add a legacy regex that captures arbitrary guard names before the broad replacement.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7495f82. Undo now recognizes the both-guards bare marker by shape (variable-name captures), restoring pristine on any guard names, and a final pass strips any leftover bare /*ccwa-context-icon*/ marker so apply is never wedged. Applied to all three implementations: the bash launcher, the Windows launcher (claudemax.win.js, which had the same gap — no >=101→>=50 fallback, so it left the bare form and reported a spurious "anchor not found"), and the standalone fix-context-icon.py.

New tests cover a Z/U bare-marked bundle upgrading to the metadata form — enabled and disabled, on both launchers and the patcher (113 tests pass).

One boundary: the ===0-removed bare form on non-t/c vars (if(U>=101)return null}/*marker*/) is irrecoverable — the original guard variable was deleted with no metadata to record it — and was never produced in practice (bare markers were t/c-only; var-agnostic patching shipped together with the metadata marker that stores the removed var). The orphan-marker strip keeps even that hypothetical from wedging apply.

phase3dev and others added 4 commits June 11, 2026 05:09
… 100%

- Bump all three workaround entries to [updated 2026-06-10].
- Render the screenshots via <img style="max-width:100%;height:auto"> so they
  never overflow the container (GitHub already caps; this also covers the site).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codex review on #8: a bundle an older var-agnostic launcher patched on a non-t/c
build (the docs call out Z/U) carries a BARE /*ccwa-context-icon*/ marker on
renamed guard vars. undo matched bare forms with literal t/c, so a Z/U bare form
fell through to the broad >=101->>=50 fallback (bash), which reverted the gate
but LEFT the marker; apply then exits early on the marker and commits the
original 50% gate, hiding the icon. The Windows launcher and standalone patcher
had the same gap (no fallback, so they left the bare form and warned).

- bash + win.js + fix-context-icon.py: recognize the both-guards bare marker by
  shape (variable-name captures) and restore pristine, plus a final pass that
  strips any leftover bare marker so apply is never wedged by an unrecognized form.
- Tests: a legacy Z/U bare marker upgrades to the metadata form on both launchers
  (enabled + disabled) and the standalone patcher. 113 tests pass.

The ===0-removed bare form on non-t/c vars (if(U>=101)...}/*marker*/) is
irrecoverable by construction - the original guard var was deleted with no
metadata - and was never produced (bare markers were t/c-only; var-agnostic
patching shipped with the metadata marker that records the removed var). The
orphan-marker strip keeps even that hypothetical from wedging apply.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codex audit follow-up to 7495f82. Two bash-only gaps vs the Windows
launcher and fix-context-icon.py, both of which already handled these:

P1 - already-wedged state not recovered. _cc_undo_context_icon returned
early unless it saw `>=101)return null}`, so a file an older buggy undo left
as `if(Z===0)return null;if(U>=50)return null}/*ccwa-context-icon*/` (gate
already reverted to >=50, bare marker still appended) skipped the
orphan-marker strip. apply then early-exits on the leftover marker and the
icon stays hidden. The early-out now also fires on a leftover marker, so the
strip runs and heals it (pristine -> re-patch). As a side effect the
emergency backup now captures the true pristine form, not the wedged
intermediate.

P2 - over-broad unowned rewrite. The generic `>=101)return null}` ->
`>=50)return null}` fallback rewrote upstream code that merely resembled a
patched value (e.g. an unowned `if(U>=101)return null}`), violating the
ownership invariant. Removed it; every form we actually write is covered by
the scoped substitutions above, so nothing real is lost.

Tests: add the Z/U `>=50 + bare marker` wedged-heal regression (enabled and
disabled) and an unowned `>=101` no-rewrite guard, across bash, Windows, and
the standalone patcher. 113 -> 121 tests, all green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the context-usage screenshot and correct the alt text to match: the
new capture shows the icon and tooltip at 51 percent context used (49 percent
remaining until auto-compact).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@phase3dev phase3dev merged commit 0b60a2b into main Jun 11, 2026
1 check passed
@phase3dev phase3dev deleted the fix/md-copy-redesign branch June 15, 2026 20:45
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