fix(chat): kill fake user bubble + stuck thinking state after /compact#102
Merged
Conversation
Both reported bugs collapse to one parser bug. After /compact, CC writes two consecutive JSONL lines: (1) an isCompactSummary line carrying the actual summary, and (2) a user-type line whose content is <local-command-stdout>[2mCompacted (ctrl+o to see full summary)[22m </local-command-stdout> — CC's dimmed status echo of the local /compact command. The parser's stripSystemTags was UNWRAPPING that tag (keeping inner text), so the second line became user-typed text "Compacted (ctrl+o to see full summary)" that the reducer's TRANSCRIPT_USER_MESSAGE handler dropped into the "no pending match" branch — appending a fake user bubble AND setting isThinking:true with no transcript turn to ever clear it. Fix: move <local-command-stdout> and <local-command-stderr> from the unwrap regex to the strip-entirely regex in both the TS and Kotlin parsers. Locked down by three new regression tests against the exact CC v2.1.119 JSONL fixture line. UX add (requested in the same report): the compact-summary transcript event now carries the summary text from the isCompactSummary line, the reducer attaches it to the SystemMarker, and SystemMarker.tsx offers a chevron + "view summary" toggle that reveals the full CC-produced summary inline. Replaces CC's terminal "ctrl+o to see full summary" affordance, which never worked inside YouCoded. Documented as a CC-coupling in docs/cc-dependencies.md so the review-cc-changes release agent can map future CC changes to this code. Co-Authored-By: Claude Opus 4.7 (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.
Re-opens #100 — same branch, rebased onto green master now that PR #101 unblocked CI.
Summary
Root-cause trace
Verified against `~/.claude/projects/.../056880ed-...jsonl:1414`.
Test plan
🤖 Generated with Claude Code