Skip to content

fix(agents): say the Claude continuation is a draft, not sent - #21966

Closed
kana001-bit wants to merge 1 commit into
stablyai:mainfrom
kana001-bit:fix/continuation-draft-toast-wording
Closed

kana001-bit wants to merge 1 commit into
stablyai:mainfrom
kana001-bit:fix/continuation-draft-toast-wording

Conversation

@kana001-bit

@kana001-bit kana001-bit commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

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: launchAgentSessionContinuation already chooses promptDelivery: 'draft' for Claude. That same value now selects the toast text through a small notifyPromptDelivered helper. One new English catalog key, components.agentSessionContinuation.draftLoaded; the other locales fall back to English per the catalog policy in config/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 promptDelivery rather than off agent === '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 sent string 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:
orca_

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:
toast-after

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:changed pass on Windows 11

  • Manually 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 onPromptDelivered callback, so the wording is consistent across hosts.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and 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

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

🤖 Generated with Claude Code

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>
@kana001-bit
kana001-bit marked this pull request as ready for review September 21, 2026 10:32
@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 3f041317-e9f6-454e-81cd-63c53c3f5252

📥 Commits

Reviewing files that changed from the base of the PR and between e6de7a4 and d0a83b8.

📒 Files selected for processing (3)
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/launch-agent-session-continuation.test.ts
  • src/renderer/src/lib/launch-agent-session-continuation.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The continuation flow now uses draft delivery for Claude and submit-after-ready for other agents. The notification helper displays a draft-specific or sent confirmation toast. English localization adds the draft message. Tests cover both Claude and Codex behavior.

Priority: ⬇️ Low

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning 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 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: Claude continuation messaging now identifies the context as a draft instead of sent.
Description check ✅ Passed The description is complete and directly addresses the template. It explains the user impact, implementation, rationale, linked issue, visual proof, testing, AI disclosure, compatibility consideration…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

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.)

  • Fix all pre-merge checks with AI

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.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 — promptDelivery is hoisted so the value that drives Claude's --prefill draft delivery also selects the toast text via the new notifyPromptDelivered helper; Claude now shows the draft wording, other agents keep "sent".
  • New English catalog key — components.agentSessionContinuation.draftLoaded added to en.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.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@nwparker

nwparker commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

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.

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.

2 participants