Repository navigation
Show AI-assist messages immediately, with Cancel and Retry, in a shared assist thread #1552
Copy link
Copy link
Open
Labels
P1Priority 1: urgent, address before P2 workPriority 1: urgent, address before P2 workenhancementNew feature or requestNew feature or request
Description
Summary
Part of #1543 (Track A1). Fix the input experience in the V2 AI-assist side channels: the diagram, chart, image and orchestration plan editors. Your message should appear in the thread and the input should clear as soon as you send, with a pending AI turn you can cancel or retry. One shared component replaces the four copies.
User Value
Today, after you send in an assist editor, your text stays in the input and nothing appears in the thread until the AI answers, so it looks like nothing happened. A failed request has no clear retry. The editors also disagree on which key sends, and long instructions are silently cut off.
Proposed Behavior
- The bug, confirmed in all four editors:
DiagramEditor.tsx:162-172andChartEditor.tsx:211-221awaitaskBlockRevision, which merges stored turns only after the response (chatStore.ts:3376-3406), and clear the input only on success.ImageEditor.tsx:161-181behaves the same way and has no transcript.- The plan editor's
submitPlanRevisiononly setssubmitting(orchestrationController.ts:1364-1420). - The plan editor sends on Ctrl/⌘+Enter; the others send on Enter.
blockRevisions.asksilently truncates toMAX_INSTRUCTION_LENGTH.
- The fix: one
AssistThreadcomponent anduseAssistThreadhook, following Score'suseAssistConversation:- on submit, clear the input and append your turn plus a pending AI turn ("Working… 12 s · Cancel")
- on failure, the AI turn shows the error with Retry and Edit and resend
- only completed exchanges are replayed to the model
- Enter sends, Shift+Enter adds a newline, and Ctrl/⌘+Enter stays as an alias
role="log"witharia-live="polite"- a character counter instead of silent truncation
- optimistic turns reconcile with server-stored turns by a client
submission_id, including on the shared-chat collaboration path
- Built on
ComposerEditorwith a new restricted mode:#documents and tags plus Add context, with no uploads or/prompts. It's off by default and stays off in the diagram, chart and image editors. A2 and Phase 3 turn it on. - Migrate
DiagramEditor,ChartEditor,ImageEditor(which gains a small transcript) andOrchestrationPlanEditor.
Acceptance Criteria
- In all four editors, your message moves into the thread immediately and the input clears.
- Cancel, Retry and Edit and resend work, and a failed request never leaves an orphaned or duplicated turn in stored history.
- Existing revision behavior is unchanged, including in shared chats.
- Over-limit input shows a counter and is rejected instead of truncated.
- Playwright covers all four editors, plus a regression check of the orchestration question card, which also uses
ComposerEditor. - Release notes and
config.pyversion.
Notes
- Roadmap: §6, Track A, A1. Related gotchas in §8: 19 (optimistic vs. stored turns), 20 (silent truncation), 21 (keyboard inconsistency), 22 (
ComposerEditoris shared). - Open decisions (§9), with recommendations: hide
/prompts in assist inputs, and keep the image editor's transcript local to the editor. - Depends on: nothing, so it can ship first. A2 (Support # document references in the plan editor's Ask AI #1556) and Phase 3 (Add an AI workflow assistant to the V2 workflow editor #1548) depend on this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1Priority 1: urgent, address before P2 workPriority 1: urgent, address before P2 workenhancementNew feature or requestNew feature or request
Type
Projects
- StatusShow more project fieldsIn review
Activity
Test the shared image replay against the real URL builder
Renumber A1 to 0.261.200 and A2 to 0.261.201 after N2 took 0.261.199