Repository navigation
fix(native-chat): preserve queued Claude prompts - #16121
brennanb2025 wants to merge 3 commits into
Conversation
Co-authored-by: Dalton Haksu Lee <lulumeya@gmail.com>
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (22)
🚧 Files skipped from review as they are similar to previous changes (19)
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughClaude attachment records can now decode into queued user messages. Transcript reads and subscriptions can include or suppress queued prompts through propagated request options. Native chat transcript windows now apply bounded, client-aware sanitization. Shared ordering utilities coordinate session assembly, grouping, and incremental updates so queued prompts retain their transcript positions. Tests cover decoding, filtering, RPC propagation, window behavior, rendering, and incremental ordering. Merge Risk: 🔵 Low · up to The PR preserves queued Claude prompts across desktop, web, and mobile while retaining ordering and compatibility behavior. Merge is reasonable with explicit owner awareness that client-specific transcript limits should be confirmed to use trusted, server-controlled client classification. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The implementation addresses issue Full details: Out of Scope Changes checkExplanation The changes remain related to issue Full details: Description checkExplanation The description is detailed and relevant. It explains the user impact, implementation, compatibility behavior, linked issue, and verification results. It omits several template headings and checkboxes, but the required information is mostly covered.
✨ 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 |
|
Ran this branch against a real reproduction of the bug it fixes, and it works — with one gap on prompts that carried images. It fixes the strandingI hit #14308 as a user and traced it in a live transcript. The trigger is Claude enqueueing the prompt and then absorbing it into the turn already running: In this reproduction no standalone Decode + prune, same test both sides:
Same result for a 1-image and a 2-image queued prompt, and against a real Gap: images on a queued prompt are droppedThe restored turn is text-only. Decoding the real record gives:
const url = extractString(source?.url) ?? extractString(record.url)
const path = extractString(record.path)
const alt = extractString(record.alt) ?? undefined
if (!url && !path) {
return null
}The queued prompt I inspected carried neither. Its image source held only In the non-queued shape I compared against, the image instead arrives as a separate Not rare in my sample: of 170
Happy to take the base64 branch as a follow-up if you'd like it separate from this PR. (Adjacent but distinct: I filed #16972 / #16977 for the non-queued path, where a send with two or more images loses its attachments because the |
Ports preservesTranscriptOrder into main's split web preload API (#16181 moved createNativeChatApi to preload-api/web-native-chat-api.ts) and unions it with main's new capabilities.transcriptPending wire field.
Merging main's capabilities.transcriptPending with this branch's preservesTranscriptOrder put native-chat.ts at 303/300 lines. Extract the client windowing and sanitization helpers to a sibling module instead of bumping the cap.
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Closing this stale implementation; missing queued Claude prompts remain tracked in #14308. Rebuild transcript intake and ordering on the current chat code. |
ELI5
Claude is in the middle of answering and you type another prompt. Claude Code accepts it, queues it,
and answers it — you can watch that happen in the terminal. But Orca's chat view never showed the
prompt you typed. You were left reading a reply with no question above it, or (worse) the prompt
turned up in the wrong place, above a reply it actually came after. Same conversation, two different
stories depending on which pane you looked at.
This makes Orca record a queued prompt as a real turn in the conversation, in the position the
terminal actually put it.
User-facing before / after
When it bites
Anyone using Claude in Orca's chat view who sends a follow-up while it is still working — which is
one of the most ordinary things there is to do.
Summary
queued_commandprompt attachments as persisted user turns instead of dropping them.Supersedes #14309
+1ms.Verification
queued promptwas absent, then passed after implementation.queued promptrendered beforefirst reply.pnpm vitest run --config config/vitest.config.ts <10 affected files>— 190 tests passed.pnpm typecheck.node config/scripts/check-changed-code-quality.mjs— 0 findings.node config/scripts/check-react-doctor-changed.mjs— 0 issues.mobile/pnpm-lock.yamlis unchanged.first prompt → first reply → queued prompt → final reply, each exactly once.Fixes #14308
Linear: STA-4146
Author: @BrennanKB5