Repository navigation
fix(agents): say the Claude continuation is a draft, not sent - #21966
kana001-bit wants to merge 1 commit into
Conversation
Continue in New Session loads Claude's context as an unsubmitted --prefill draft since stablyai#21912, but the success toast still said the context was sent. Pick the toast text from promptDelivery so Claude reports a draft that needs Enter while submit-after-ready agents keep the sent wording. Addresses stablyai#21896 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe continuation flow now uses Priority: ⬇️ Low 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (1 skipped: 1 unsupported.)
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 |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the single commit d0a83b8 — a toast-wording fix for the session-continuation flow.
- Draft-vs-sent toast selection —
promptDeliveryis hoisted so the value that drives Claude's--prefilldraft delivery also selects the toast text via the newnotifyPromptDeliveredhelper; Claude now shows the draft wording, other agents keep "sent". - New English catalog key —
components.agentSessionContinuation.draftLoadedadded toen.json; other locales fall back to English, which the catalog policy permits (missing target entries are logged, not failed). - Tests — two cases pin the exact rendered strings for Claude and Codex.
I verified the Claude test fails against the pre-change behavior (forcing promptDelivery to submit-after-ready yields "Session context sent to Claude…"), so it is a genuine regression guard rather than theatre. The mechanism matches launch-agent-in-new-tab.ts:291-330, where a native-prefill draft fires onPromptDelivered() without submitting.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Closing in favor of #25989, with your contribution credited as co-author. The misleading sent toast in #21896 was reproduced. The replacement preserves current delivery-warning behavior and accurately labels Claude continuation as a draft. Nine tests, renderer typecheck, localization and quality checks pass; actual Claude continuation was verified in hidden Electron with before/after screenshots. A requested navigation button is now being added to the replacement PR. |

ELI5
After #21912, "Continue in New Session" no longer sends the context to Claude by itself: it loads the text into Claude's input box and the user presses Enter. The green toast still said "Session context sent to Claude in a new session", which is no longer true. It now says the context was loaded as a draft and needs Enter.
What Changed
Before: Continue in New Session with Claude shows the toast "Session context sent to Claude in a new session." while the draft is still sitting unsubmitted in Claude's composer.
After: the toast reads "Session context loaded as a draft in the new Claude session. Review it and press Enter to continue." Other agents (Codex etc.), which still submit the prompt after readiness, keep the "sent" wording.
Mechanism:
launchAgentSessionContinuationalready choosespromptDelivery: 'draft'for Claude. That same value now selects the toast text through a smallnotifyPromptDeliveredhelper. One new English catalog key,components.agentSessionContinuation.draftLoaded; the other locales fall back to English per the catalog policy inconfig/scripts/verify-localization-catalog.mjs. No behaviour change.Why
CodeRabbit flagged this wording on #21912 and it was deferred there. A toast that says "sent" when nothing was submitted invites the user to walk away from a session that is actually waiting for Enter.
The text is keyed off
promptDeliveryrather than offagent === 'claude'a second time, so the message stays tied to what actually happened: if another agent moves to draft delivery later, its toast follows without a separate edit.Alternative considered: rewording the shared
sentstring for every agent. Rejected because Codex and the other submit-after-ready agents really do submit.Linked Issue
Addresses #21896 — follow-up to #21912, which fixed the exit itself and deferred this wording.
Visual Proof
Windows 11, Orca dev build, Claude Code 2.1.278. Continue in New Session → Claude → Start New Session.
Before (main) — the toast says the context was sent:

After (this branch) — the toast says it is a draft waiting for Enter. The new key has no Japanese translation yet, so it falls back to English under the Japanese UI, per the catalog policy:

Testing
pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/launch-agent-session-continuation.test.ts— 7 passed, including 2 new tests (Claude gets the draft wording; Codex keeps the sent wording)pnpm tc:web,pnpm run verify:localization-catalog,pnpm run check:code-quality:changedpass on Windows 11Manually verified on Windows 11 in the dev build (screenshots above)
I manually tested these changes locally (Windows 11, dev build)
Automated tests added/updated, or explained why not below
AI Disclosure
Claude Code (Claude Opus 5) drafted the change and the tests with me. I reviewed the diff and ran the checks above locally on Windows 11.
Review
Renderer-only text selection; no IPC, wire, or platform-specific code touched. Local, SSH, and paired-host launches all go through the same
onPromptDeliveredcallback, so the wording is consistent across hosts.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
No security, cross-platform, SSH, mobile, or performance impact.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)🤖 Generated with Claude Code