Repository navigation
fix(native-chat): read a queued message in full - #26004
Conversation
… hiding it behind a prompt A queued card showed one clipped line, so a long message (often another agent's, never typed by the reader) could not be read before Steer or Delete. A clipped card now opens in place to its whole text; the phone's two-line card opens on tap. Edit moved the card's text into the composer and deleted the card even while a question or approval card stood in the composer's slot, so the text vanished from the page. Edit now waits, saying why, until the prompt is answered; the pane and the queue read one check for whether a prompt holds the composer's slot.
…ser-slot check The phone card measured nothing and made every card a button; it now lays the text out unseen at its width and offers Show more only past two lines. The Edit reason is no longer dimmed twice, and the shared composer-slot check and the desktop toggle's keyboard reach have their own tests.
…e card's width In a narrow chat the opened text sat beside the card's actions and wrapped a few characters per line. It now opens under the row, indented to the text, the way the transcript's awaiting-input row opens its question.
…g the session hook under its line cap
…ard-full-text-and-edit # Conflicts: # src/renderer/src/components/native-chat/use-structured-agent-session-queued-messages.resume.test.tsx
Review summaryHead:
Three read-only review rounds ran on this branch. None found a P0, P1 or P2 issue. Round 1 covered the whole change: correctness, styling rules, tests, remote/version compatibility, and the merge with the queue rework in #24586.
Round 2 covered the phone measurement: a hidden copy of the text laid out at the card's width, with
Round 3 covered the layout change after live QA. At a narrow chat width, the opened text had been squeezed into a narrow column beside the buttons. It now opens below the row, across the card's width.
Merge with main.
Merge with #24586 (main at
Not verified: the phone change on a real device (unit tests only), and Linux, Windows and SSH. The live QA ran on macOS only. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (13)
🚧 Files skipped from review as they are similar to previous changes (6)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughQueued-message cards on mobile and desktop can expand clipped text and collapse it again. Pending questions or approvals that occupy the composer slot now prevent queued-message editing and display a translated reason. The changes also add a shared clipping hook and tests for text disclosure and edit holds. Priority: ➖ Normal Merge Risk: 🔵 Low · up to When an unanswerable prompt precedes an answerable one, the composer may be hidden while the answerable prompt is not shown. This narrow case warrants owner awareness before merging. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (4 passed)Full details: Docstring CoverageExplanation Docstring coverage is 52.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 25 functions across 17 files. (6 skipped: 6 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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 |
…ard-full-text-and-edit # Conflicts: # src/renderer/src/components/native-chat/NativeChatQueuedMessageList.test.tsx # src/renderer/src/components/native-chat/native-chat-submission-navigation.test.tsx # src/renderer/src/components/native-chat/use-structured-agent-session-queued-messages.resume.test.tsx # src/renderer/src/components/native-chat/use-structured-agent-session-queued-messages.test.tsx # src/renderer/src/components/native-chat/use-structured-agent-session-queued-messages.ts # src/renderer/src/components/native-chat/use-structured-agent-session.ts # src/renderer/src/components/native-chat/use-structured-native-chat-submit-reveal.test.ts
…ard-full-text-and-edit # Conflicts: # src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
e252a464-80f1-42dd-852d-58f0969e9067
📒 Files selected for processing (7)
src/renderer/src/components/native-chat/NativeChatStructuredSession.tsxsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.json
🚧 Files skipped from review as they are similar to previous changes (6)
- src/renderer/src/i18n/locales/ja.json
- src/renderer/src/i18n/locales/zh.json
- src/renderer/src/i18n/locales/ko.json
- src/renderer/src/i18n/locales/fr.json
- src/renderer/src/i18n/locales/en.json
- src/renderer/src/i18n/locales/es.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
| const promptsUnanswerable = pendingPromptsAllUnanswerableHere(controller.prompts) | ||
| const composerShown = (prompt === null || promptsUnanswerable) && !readFailedFinally | ||
| // A prompt this build cannot answer holds no slot: the composer stays, and its card takes no focus. | ||
| const promptInSlot = promptHoldingComposerSlot(controller.prompts) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 5 'promptHoldingComposerSlot|pendingPromptsAllUnanswerableHere' src/renderer/src/components/native-chat
rg -n -C 5 'controller\.prompts|prompts\s*=' src/renderer/src/components/native-chat
rg -n -C 5 'unanswerable|composer slot|promptHoldingComposerSlot' src/renderer/src/components/native-chat --glob '*test*'Repository: stablyai/orca
Length of output: 27461
🏁 Script executed:
set -eu
rg -n -F -- 'function pendingStructuredSessionPrompts' src
rg -n -F -- 'pendingStructuredSessionPrompts(' src/renderer/src/components/native-chat
rg -n -F -- 'controller.prompts' src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
sed -n '1,120p' src/renderer/src/components/native-chat/structured-agent-session-message-projection.ts
sed -n '155,230p' src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
sed -n '340,390p' src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
sed -n '1,90p' src/renderer/src/components/native-chat/native-chat-composer-slot.tsRepository: stablyai/orca
Length of output: 8555
🏁 Script executed:
set -eu
sed -n '1,175p' src/renderer/src/components/native-chat/use-structured-agent-session.ts
rg -n -F -- 'journalItems:' src
rg -n -F -- 'pendingPromptsAllUnanswerableHere' shared src/renderer/src/components/native-chat
rg -n -F -- 'AgentJournalRenderItem' shared/agent-session-journal-types.ts
sed -n '1,180p' shared/agent-session-approval-subject.ts
sed -n '1,180p' shared/agent-session-journal-types.tsRepository: stablyai/orca
Length of output: 21013
🏁 Script executed:
set -eu
sed -n '1,180p' src/shared/agent-session-approval-subject.ts
sed -n '1,220p' src/shared/agent-session-journal-types.ts
sed -n '1,220p' src/renderer/src/components/native-chat/use-structured-agent-session-transport-state.ts
sed -n '1,130p' src/main/native-chat/agent-session-wire/structured-agent-session-transition.ts
rg -n -C 4 -F -- 'journalItems' src/main/native-chat/agent-session-wire src/main/native-chat/agent-session-timeline | head -200Repository: stablyai/orca
Length of output: 28970
🏁 Script executed:
set -eu
rg -n -F -- 'function chatApprovalFromJournal' src
rg -n -F -- 'chatApprovalFromJournal' src/renderer/src/components/native-chat
rg -n -C 8 -F -- 'const approval = prompt?.body.kind' src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
rg -n -C 8 -F -- 'NativeChatApprovalCard' src/renderer/src/components/native-chat/NativeChatStructuredSession.tsxRepository: stablyai/orca
Length of output: 3848
🏁 Script executed:
set -eu
sed -n '35,72p' src/renderer/src/components/native-chat/native-chat-interactive-prompt.ts
sed -n '330,410p' src/renderer/src/components/native-chat/NativeChatStructuredSession.tsxRepository: stablyai/orca
Length of output: 5395
Render the first answerable prompt consistently.
pendingStructuredSessionPrompts preserves journal order, while promptHoldingComposerSlot hides the composer when any prompt is answerable but still classifies the first prompt. If an unanswerable approval precedes a question, the session renders only the approval card and the question cannot be answered until the approval is resolved or cancelled. Select the first answerable prompt for both slot state and rendering, while preserving the existing first-prompt fallback when all prompts are unanswerable.
…ard-full-text-and-edit # Conflicts: # src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
…ard-full-text-and-edit
Status: re-synced with main, CI greenHead:
No behaviour change since the earlier review summary. |
…ard-full-text-and-edit # Conflicts: # src/renderer/src/components/native-chat/NativeChatQueuedMessageCard.tsx # src/renderer/src/components/native-chat/use-structured-agent-session-queued-messages.ts
Status: main merged in again after #25704, CI greenHead: #25704 (
Checks
|
…ll; Edit moves to in-place editing
…ard-full-text-and-edit # Conflicts: # src/renderer/src/components/native-chat/NativeChatQueuedMessageCard.tsx
…'s controller takes
Status: narrowed to the full-message expander, CI greenHead: At the author's request this PR now only adds reading a queued message in full: the desktop chevron, and the phone's Show more. The Edit change is removed (greyed-out Edit while a prompt is open, Checks
|
ELI5
When the agent is busy, messages for it (yours, or orchestration mail from another agent) wait as small cards above the chat box. A card showed only one cut-off line. A teammate got an orchestration card she had never seen before and wrote: "I can't see the entire steer message, so I dare not submit it."
Now a cut-off card has a small arrow that opens the whole message in place.
A second bug from the same report is not fixed here: "Edit message" on a card makes the message vanish while a question is open, because Edit moves the text into the hidden chat box and deletes the card. That is being fixed separately by editing the queued message in place, in its own pull request.
What Changed
Reading a long queued message (desktop and phone)
The clip measurement used by the transcript's "Awaiting user input" row moved into a small shared hook,
useNativeChatClippedLine, which the queued card now reuses.Why
Linked Issue
N/A (reported directly by a teammate)
Visual Proof
Before and after are the same scenario, run in an isolated dev build. A Codex chat is running a turn, and orchestration mail arrives, so it waits as a queued card.
Reading the card
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
New desktop tests:
New phone tests: a clipped card opens on tap and folds back, and a card that fits is plain text.
Ablation: with the old card, list and phone component restored, the new expander tests fail (no "Show full message" button); with this change they pass.
Live QA (macOS, isolated dev builds of main and this branch, driven through the Chrome DevTools Protocol). Orchestration mail arrived while a stand-in Codex turn ran, and waited as a queued card. The screenshots above come from that run (taken before this PR was narrowed to the expander; the expander code is unchanged since). Also confirmed: a keyboard Enter on "Show full message" opens it, and the opened text's parent is the card itself, spanning its width. Not tested: the phone app on a device (covered by unit tests only), Linux, Windows and SSH.
Ran, after merging current main (
ff4a51c872e): the queue list, queue hook (incl. resume/clear) tests (91) and the phone queue tests (23), all passing; web typecheck clean.Also ran: web and mobile typecheck, the mobile tests-typecheck ratchet, the changed-code quality gate, React Doctor, and the localization checks. All pass. New strings are in all six locale catalogs.
AI Disclosure
Author: @BrennanKB5
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)