Skip to content

fix(prompt): link a Claude command's question beside its diff panel to the send (#2050) - #2199

Merged
devswha merged 3 commits into
mainfrom
fix/claude-panel-cut-followups
Oct 28, 2026
Merged

devswha merged 3 commits into
mainfrom
fix/claude-panel-cut-followups

Conversation

@devswha

@devswha devswha commented Oct 28, 2026

Copy link
Copy Markdown
Owner

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.

…o the send (#2050)

outcome.ts now reads a Claude screen on the session's side of the fullscreen side panel, as parsePrompt does, so a skill sent from Chat whose question appears beside /diff is linked to its receipt. withoutClaudeSidePanel computes each row's edges once, and its comment no longer states the 110-column width as checked.
…and keep the top-row early exit

Review follow-ups on #2050: a table's divider can pass for the panel's edge on a send's screen and not the next, and cutting one side alone lost the send's anchor (Codex). Screens read against each other are now cut only when each shows the panel. withoutClaudeSidePanel again turns away a screen whose top row has no edge before measuring every row (omo).
… across the panel cut

Review follow-up on #2050 (Codex): a reservation counted on screens read as drawn and an ownership read on screens cut at the panel could number echoes differently and hand a terminal command's question to a Chat send. A reservation now reads every same-command screen alike and records how; ownership read the other way owns nothing.
@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 16 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 7bda8c3 and b0756b2.

Files selected for processing: 4
  • changelog.d/claude-command-beside-diff-panel.md
  • server/dialogs/claude.ts
  • server/outcome.test.ts
  • server/outcome.ts
  • 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 28, 2026

Copy link
Copy Markdown
Owner Author

Merging b0756b2: omo-native-code-reviewer and Codex both pass this head. The new test fails on main, and five extra scenarios show no wrong link and no regression; the common case without the panel is unchanged. Prompt answers still go only through POST /api/pane/prompt/answer, and other agents are unaffected. The required checks are green, and CodeRabbit did not review this head. Codex's MEDIUM, an inherited reservation counted in the wrong mode after an older one expires, needs a narrow sequence of sends. It goes to a follow-up issue with the LOW notes.

@devswha
devswha merged commit 7dc187a into main Oct 28, 2026
19 checks passed
@devswha
devswha deleted the fix/claude-panel-cut-followups branch October 28, 2026 06:14
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.

Claude side panel cut: follow-ups from #1984

1 participant