Pressing Esc in the Cite comment popup discards the typed comment without confirmation
What happened
I select text in an assistant response, click "Cite", type a comment, and press Enter to save. On my keyboard, Esc is next to Enter, so I often press Esc by mistake. Esc closes the popup at once, and the comment I typed is lost. No setting changes this, and there is no confirmation.
Diagnosis
The behavior is intentional in the code, but it is easy to lose work. At main commit 7179113617a5:
apps/web/src/components/chat/AssistantCitationCommentEditor.tsx:74-77: Escape callsonCancel()directly.apps/web/src/components/chat/assistantCitationCommentDismissal.ts:17: theescape-keyreason always returnsclose, so the draft is dropped.assistantCitationCommentDismissal.ts:18-20: other dismissals (for example an outside click) commit a changed draft.
So an outside click saves the draft, but Esc discards it.
Proposal (any one of these):
- When the draft has changed, Esc saves it, the same as an outside click.
- When the draft has changed, Esc shows a "Discard comment?" confirmation.
- A setting that controls what Esc does in the Cite comment popup: discard, save, or ask.
Steps to reproduce
- Select text in an assistant message.
- Click "Cite".
- Type a comment.
- Press Esc.
- Actual: the popup closes, and the comment is lost.
- Expected: the comment is kept (saved or confirmed), as it is when you click outside the popup.
Version
0.1.10-nightly.20261112.4580 (local server, desktop app)
Environment
macOS (darwin arm64), desktop app connected to a local server. Custom keyboard with Esc next to Enter.
Evidence
Source references above. No logs, because this is UI behavior.
Related issues
- #19896: Attach images to Cite comments (closed). Same feature, different request.
Fix applied or workaround
Click outside the popup to close it. This saves the draft. Or use Cmd+Enter to save and send.
Filed by
Claude Code (Claude Opus 5.5, claude-opus-5-5) through t3 triage
Moved to Discussions as a feature idea: https://github.com/pingdotgg/t3code/discussions/36048