Skip to content

fix(prompt): read Claude's question beside its fullscreen diff panel - #1984

Merged
devswha merged 4 commits into
devswha:mainfrom
bonecool999:fix/claude-question-beside-diff-panel
Oct 27, 2026
Merged

devswha merged 4 commits into
devswha:mainfrom
bonecool999:fix/claude-question-beside-diff-panel

Conversation

@bonecool999

Copy link
Copy Markdown
Contributor

Change

Claude Code 2.1.303's fullscreen layout ("tui": "fullscreen") shows the /diff side 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 (withoutClaudeSidePanel in server/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 unmodified main on this machine and are unrelated to this change.

🤖 Generated with Claude Code

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>
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: devswha/ovis
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 88ce174
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: de7858f0-54d4-4c32-9d4d-97f011554f33
Commits

Reviewing files that changed from the base of the PR and between bec50ac and 84c5e23.

Files selected for processing: 3
  • server/dialogs/claude.test.ts
  • server/dialogs/claude.ts
  • server/dialogs/live.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Claude Code questions now appear as question cards when the fullscreen diff panel is displayed beside the session, instead of showing a generic input screen.
    • Question prompts and answer reviews are now recognized in this layout, including prompts with multiple questions, longer descriptions, and English or Korean options.
    • Text in the diff panel is excluded from question prompts, and answered questions are not mistakenly shown as still open.

Claude prompt parsing now removes a detected fullscreen diff side panel before parsing Claude questions. Tests and fixtures cover English and Korean questions, multiple-question answer review, and panel detection.

Changes: Claude prompt parsing

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: Normal

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: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning 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 survi… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: reading Claude questions beside the fullscreen diff panel.
Description check Passed The description includes the required Change and Validation sections. It explains the failure, the implementation, affected fixtures, test coverage, and known baseline failures.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devswha

devswha commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Thanks, @bonecool999. The captures are careful work, and the fix works on them: rebased onto current main it passes bun run check fast (7,433 pass / 0 fail) and 718 prompt/dialog tests, and disabling the cut makes 3 of the 4 new tests fail.

One change is needed before merge: the panel detection also fires when there is no panel. withoutClaudeSidePanel (server/dialogs/claude.ts) cuts any screen whose first 8 rows have a │ in the same column at 40 or beyond, and parsePrompt applies it to every Claude screen. A plan whose markdown table has scrolled above its top border matches that, and the plan approval card then loses the table's right-hand column. Reproduced through parseInteractivePrompt("claude", screen) with this screen:

Task 0                                  │ preserve requirement 0
… (8 such rows, `│` at column 40)
Claude has written up a plan and is ready to execute. Would you like to proceed?
❯ 1. Yes
  2. No
  3. Tell Claude what to change
ctrl+g to edit

On main the card's body keeps preserve requirement 0..7; on this branch it is only Task 0..7. The user would approve a plan without seeing part of it.

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 (files changed, source: Current) to the right of it, and add a negative test that keeps a no-panel table's right-hand column.

@devswha

devswha commented Oct 27, 2026

Copy link
Copy Markdown
Owner

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@devswha

devswha commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Merging at 84c5e23. The merge pass merged main into this branch (the only conflict was parsePrompt's signature next to main's Pi questionnaire early return; both kept) and made the change requested in review itself:

  • a0cfc69: the panel cut now also requires the panel's edge to run down through the footer, so a plan whose markdown table has scrolled above its top border keeps its right-hand column (test: "keeps a plan's table whole when no panel is beside it").
  • 84c5e23: that check moved into the column search, so a table divider that stops above the question no longer hides the real panel edge (test: "finds the panel's edge past a table divider that stops above the question"; both reviewers found this case on a0cfc69).

Both merge-pass reviewers (omo-native-code-reviewer and Codex, external-PR strict review) passed this head with no CRITICAL/HIGH/MEDIUM; bun run check fast passed (7530 / 0); CodeRabbit reviewed it; required checks are green. Remaining LOW notes go to a follow-up issue.

Thank you for the careful captures, @bonecool999.

@devswha
devswha merged commit 0ed9790 into devswha:main Oct 27, 2026
19 checks passed
devswha added a commit that referenced this pull request Oct 27, 2026
## 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.
devswha added a commit that referenced this pull request Oct 28, 2026
…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`.
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.

2 participants