Repository navigation
fix(native-chat): identify the owner when resume creation is refused - #29119
Conversation
|
Resuming a saved conversation could report an unknown connection even when the host had refused before creating anything. This foundation returns the owning chat's identifiers from host records and lets a proved first-attempt refusal settle as a failed start. An earlier lost create reply stays uncertain. Two source-review rounds completed at Integrated A+B+C Electron QA is complete on the Mac, under the coordinator's explicit machine authorization. The main comparison used main The owned-conversation History guard was rendered. The stale-row race, where History shows the action before another chat claims the conversation, is covered by refusal-contract tests, not rendered QA, as accepted by the coordinator. Twenty-two focused source-admission/direct-resume contract tests passed on C A preserves the existing successful launch path; History-independent dispatch and deferred destination publication belong to C (#29150, stacked on #29124 on this PR). All observed integrated differences were intended. Test copies and recorded processes, checkouts and throwaway homes were cleaned; real settings/hooks hashes matched. Nothing was merged. Final stack readiness remains the coordinator's responsibility. For Brennan's review: main-versus-branch whole-window proof from the integrated run follows. Timestamped DOM/request observations, rather than screenshots alone, establish overlap during pending History/create requests. Earlier mismatched-settings and late-close attempts were excluded.
|
…ner-refusal # Conflicts: # src/main/native-chat/agent-session-journal/journal-legacy-import.ts
…ner-refusal # Conflicts: # src/renderer/src/lib/structured-agent-session-launch-admission.ts
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
















ELI5
“Resume in New Native Chat” still waits for Session History to find a conversation. This draft is the first part of removing that delay: the execution host now identifies a chat that already owns the conversation and proves when a new chat was refused before creation. It does not yet remove the History wait.
The first version of this draft also opened a failed chat tab when the host could not support a resume, and it called some unreadable saved history “empty.” This revision leaves the source tab selected for that support refusal and gives distinct, truthful feedback for empty and unreadable history.
What Changed
The host derives an optional existing-chat pointer from its own records before account and transcript work. Its final create transaction refuses a competing owner as well. Only a refusal proved to precede this attempt's commit settles as a failed start; a prior unanswered attempt remains uncertain.
The renderer again checks host support before opening a History resume. A declined resume creates no destination. During import, zero bytes or no raw OpenCode message rows prove an empty source; nonempty history that cannot be decoded remains unreadable. The existing History action says the conversation has not been saved only for a proven missing or empty source; a read, parse, or size failure retains its load-error message.
The follow-up renderer change will remove History as the action's gate, use the owner pointer to open the existing chat from the pane header, and defer visible destination publication for ordinary refusals. Until then, admitted History resumes retain the existing provisional-tab behavior. These are temporary stack boundaries, not completed user-facing claims for this draft.
Why
The host already owns the decision about conversation identity, and the create transaction is the place that prevents two chats from claiming it. Reusing that decision avoids a second discovery authority. The existing missing-transcript reason also lets older clients understand a proved empty refusal; a new reason made those clients treat it as an unknown create outcome. No saved field or new request or wire operation was added.
Linked Issue
This is part of the approved Resume action redesign following the October 15 report that Session History can delay the action for minutes. Earlier attempt-proof work is tracked in #28261.
Visual Proof
Remote Electron comparison and screenshots are pending. This draft is still under review.
Testing
The tests cover a declined resume leaving no destination, a successful supported launch, zero-byte and malformed nonempty imports, OpenCode raw-row evidence, and the History action's distinct refusal messages. The required pre-commit checks passed. PR workflow run 38735767027 completed successfully on
876c72ce9ab1c563a21cbd2b1b4b6daae8215002: static analysis and typecheck, all five test shards, cross-version wire compatibility, relay integration, and the package jobs passed. ItsPR checks passedaggregate job was skipped; the coordinator is checking that gate. Separate transcript-reader jobs passed on macOS, Ubuntu, and Windows, and Mobile verification passed. No local test, typecheck, build, or app launch was run.Review
Round-one source findings were corrected. Independent follow-up review and remote Electron QA are in progress; this PR remains a draft.
Agent skill upstream boundary
Notes
Authored for @BrennanKB5. The owner pointer belongs to the initiating execution host. Lost contact is never treated as process exit. Folder workspace identity and SSH/WSL route limits are unchanged. An intended difference from the common pattern is that Orca must import an external provider transcript into its own chat journal before founding a new chat.
Checklist