Repository navigation
fix(prompt): read Claude's question beside its fullscreen diff panel - #1984
Conversation
Claude Code's fullscreen layout ("tui": "fullscreen") shows the /diff side
panel on a pane of 110+ columns. Every row then ends in the panel's left
edge and its text ("1 file changed +2 ... source: Current ▾"), so the
option rows, the Chat-about-this row and the hint no longer matched, and
a blocked AskUserQuestion fell to the "Input screen" fallback card.
Claude screens are now cut at that edge before the readers run. Adds
fixtures captured live from 2.1.303, the session's text reworded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Filter the side panel before parsing prompts server/dialogs/claude.ts, server/dialogs/live.ts, server/dialogs/claude.test.ts, server/fixtures/claude-diff-panel-2.1.303-*.txt, changelog.d/claude-question-beside-diff-panel.md |
withoutClaudeSidePanel detects and removes qualifying side-panel content. parsePrompt applies the filter only to Claude. Tests and fixtures cover English and Korean questions, multiple questions, answer review, and panel detection. The changelog describes the question-card display change. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Low
Possibly related PRs
- devswha/ovis#1890: Changes the Claude dialog pipeline and live reader selection, which share the prompt-recognition path.
- devswha/ovis#1761: Introduced
parsePrompt, which this change updates to process the complete screen before parsing Claude prompts.
Suggested reviewers: devswha
Merge Risk: 
Minimal · up to 84c5e
-
Claude panel filtering has no established merge-blocking issue.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 3 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
|
Thanks, @bonecool999. The captures are careful work, and the fix works on them: rebased onto current main it passes One change is needed before merge: the panel detection also fires when there is no panel. On main the card's body keeps Please require something only the fullscreen panel has before cutting, for example the divider running all the way down through the prompt and footer rows, or the panel's own header text ( |
# Conflicts: # server/dialogs/live.ts
…hrough the footer
|
@coderabbitai review |
✅ Action performed
|
|
Merging at 84c5e23. The merge pass merged main into this branch (the only conflict was
Both merge-pass reviewers (omo-native-code-reviewer and Codex, external-PR strict review) passed this head with no CRITICAL/HIGH/MEDIUM; Thank you for the careful captures, @bonecool999. |
## Release 0.4.19 The release PR, made by the steps in [docs/development.md#releasing](docs/development.md#releasing), on main 9d76cca (#2078): - **Version:** `version` is 0.4.19 in `package.json` and `herdr-plugin.toml`. - **Changelog:** `bun scripts/changelog-fold.ts 0.4.19` moved the `changelog.d` fragments of 54 PRs into CHANGELOG.md, with PR links, and deleted them. - Outside contributors are credited: #1955 @YuuuXie, #1957 @Noobear, #1984 @bonecool999, #2003 @philipprass-prog, #2016 @kyop21, #2024 @YuuuXie, #2025 @YuuuXie, #2027 @jpcarranza94, #2030 @phlips5437, #2031 @yaaayaaa, #2034 @jpcarranza94, #2035 @nahwan-kim, #2041 @odfalik, #2045 @mattmarcin, #2052 @jpcarranza94, #2057 @kyop21, #2061 @YuuuXie. - **Release summaries:** `release-summaries.json` has the 0.4.19 entry in en, ko, ja and zh, with the same lists in each: 5 new, 5 improved, 5 fixed. Every English line is at most 70 characters. - **Remote bundle:** `REMOTE_BUNDLE_VERSION` goes from 37 to 38 in `shared/machines.ts`, because the remote bundle's inputs changed since `remote-v37`. Once this merges, `remote-v38` is pushed on the merge commit, and the Remote PC bundles workflow has to finish before the Release run. `bun scripts/release-guards.ts` reports: "Release 0.4.19: remote bundle, telemetry Worker and release metadata are in order." No telemetry Worker deploy is needed. `bun run check fast` passes locally. **Not checked on a real Windows PC:** #1989 (Git for Windows' OpenSSH for remote PCs) and #2016 (Antigravity chat on Windows through the Restart Manager) ship without their real-device Windows checks, because the maintainer's Windows test PC is off. The owner accepted releasing without them. Both will be checked on the real PC when it is back. The owner approved this release.
…o the send (#2050) (#2199) Fixes #2050 (follow-ups from #1984). ## What was wrong With Claude Code's fullscreen diff panel open (`/diff` on a wide pane), `parsePrompt` reads a question by cutting each row at the panel's edge (#1984), but the command-outcome code in `server/outcome.ts` still read the uncut screen. The echo of a Chat send (`❯ /review` followed by the panel's text) then never matched, so a skill sent from Chat that asks a question beside the panel got its card, but the send was not linked to it. Its receipt stayed `accepted` instead of `interaction-required`. ## What changes - `server/outcome.ts`: a Claude screen is read on the session's side of the panel (`withoutClaudeSidePanel`, the same cut `parsePrompt` uses) when the screens being compared are read. Two guards keep ownership from being misassigned: - Screens compared with each other are cut only when **every** one of them shows the panel (`readAlike`). A table's divider can pass for the panel's edge on one screen and not on the next, and cutting only one side lost the anchor between them. - A reservation reads the send's screen and every earlier same-command send's screen together, and records how (`countedCut`). Ownership read the other way owns nothing: echoes counted on uncut screens and then read on cut ones can number differently, and that handed a question from a command typed in the terminal to a Chat send. - `server/dialogs/claude.ts` (`withoutClaudeSidePanel`): each row's edges are measured once instead of for every candidate column. The early exit for a screen whose top row has no edge is kept, so screens without the panel cost what they did before (about 0.03 ms on a 60x180 screen). The comment no longer presents 110 columns as a width the code checks. `dialogSettlingScreen` reads screens as main does. ## Left on #2050 - An emoji drawn at a different width than `Bun.stringWidth` measures: the screen is left uncut, so the old behaviour holds (no card), never a wrong cut. - Panel layouts beyond the five 2.1.303 captures (a toast under the panel, a border on its first row): no capture yet, and they fall back safely (no cut). ## Tests (`server/outcome.test.ts`, integrated dialog readers) - `links a skill's question beside Claude's fullscreen diff panel to its send`: before the fix the receipt stays `accepted`; it passes after. - `keeps a skill's question linked when only its send's screen looks like a side panel`: Codex's first review finding, fails on the first commit. - `gives no send a terminal command's question when its echoes were counted without the panel's cut`: Codex's second review finding, fails on the second commit. Each test was run failing before its fix and passing after. `bun run check fast` passes: typecheck, build, and 7958 unit tests with 0 failures. ## Review - omo-native-code-reviewer: PASS. Its two LOWs (the lost early exit, a long comment line) are fixed. - Codex Sol 6.1 Fast xhigh: two MEDIUMs, each reproduced as a failing test above and fixed. The final round on b0756b2 passed with no findings (no common, reproducible wrong ownership compared with main). Server-only change; no HTTP/WS contract, auth or workflow change. Changelog: `changelog.d/claude-command-beside-diff-panel.md`.
Change
Claude Code 2.1.303's fullscreen layout (
"tui": "fullscreen") shows the/diffside panel beside the session on a pane of 110 or more columns. Every row then ends in the panel's left edge│and the panel's own text (1 file changed +2 … source: Current ▾), so AskUserQuestion's option rows, the "Chat about this" row and the key hint no longer matched. A blocked question fell back to the generic "Input screen" card.parsePrompt(server/dialogs/live.ts) now cuts a Claude screen at that edge before the readers and the tail check run (withoutClaudeSidePanelinserver/dialogs/claude.ts). The cut happens only when the same│column, at column 40 or beyond, runs down at least 8 rows starting from the first row. Other screens and other agents are left as they are.Fixtures are real 180x52 captures from Claude Code 2.1.303 with the diff panel open. I reworded the session's free text (test prompts, an unrelated usage-limit notice, the project path) in neutral English. Every row keeps its
│in column 99, its panel text byte for byte, and its total display width. One fixture keeps a Korean question with wrapped long descriptions to cover wide characters next to the edge.Validation
bun test server/dialogs/claude.test.ts: the 4 new tests. With only the source change reverted, 3 fail (one Korean question, two questions with their review, English options). The 4th test checks that an answered question beside the panel is not read as open, and it passes either way. With the fix, all 17 tests in the file pass.bun test server/prompt.test.ts server/dialogs/ server/outcome.test.ts: 704 pass, 0 fail.bun run check fast: typecheck, build and generated files pass. Unit tests show 12 failures in 9 files (claude-store, check, session-history, install-star, self-hosted-runner, remote-entry, agy, ci-browser, composer-framing). Those 12 fail identically on unmodifiedmainon this machine and are unrelated to this change.🤖 Generated with Claude Code