feat(chat): animate first-message send handoff - #1301
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: arul28/ADE/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (9)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughForeground chat launches capture and transfer composer and first-message state to the destination pane. The pane selectively reconciles submitted text and attachments with persisted drafts. The launch flow animates the composer, first message, and departing draft elements. ChangesChat launch flow
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~60 minutes Change: Feature Suggested labels: Merge Risk: ⚪ Minimal · up to This change animates the first message sent to a new chat and preserves unsent draft edits made while a launch is in progress. No concrete defects remain, and motion turns off under reduced-motion, hidden-window, or high resource-pressure conditions. The final header morph has not been visually confirmed against the real header. That is a polish check, not a merge blocker. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 43.10% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 58 functions across 13 files. (1 skipped: 1 too large.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_41968113-0fb0-4383-846a-24316d4dd024) |
There was a problem hiding this comment.
Devin Review found 1 new potential issue.
🐛 1 issue in files not directly in the diff
🐛 Sent prompt remains after chip insertion
When a user inserts a chip after a pending foreground prompt, updateComposerDraft records a replacement instead of an append. Chip insertion omits edit intent, so the sent prompt remains in the unsent draft.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
…review-and-live-stream AgentChatPane: this lane moved the session reset effect above the show handler, and main changed its body to keep the pending bubble of the chat just selected. Main's body now lives in the moved effect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1299 (the Apple device tool, this lane's former parent) was squash-merged into main as ed21a34. Its content equals the parent tip 02c8cf8 that this lane already contains, plus a merge of #1301 (send-handoff animation). 27 files conflicted only because the squash commit and this lane's history carry the same parent changes: for the 26 files main did not change after the parent tip, this lane's version is kept; for AgentChatPane.tsx, #1301's change is applied on top. The merge adds exactly main's diff since the parent tip (checked file by file). Type-checks clean; chat, terminals, apple, RPC, work-tools and CLI mac-desktop suites pass. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>


Problem
On the first send to a new chat, the prompt and composer switch to the chat pane without a coordinated transition. In an existing-lane foreground launch, the composer also used to clear before the create/send round trips finished.
Cause
The Work draft composer and new chat pane mounted independently, while renderer-owned launch state did not hand the first message and composer origin to the new pane as one visual transition. Footer clipping also blocked the composer glide.
Change and boundary
The first user bubble flies from the draft textbox while the composer docks, the Work Chat/CLI switcher becomes the chat header, and the remaining draft chrome fades. The animation is limited to the first message of a new chat and gives up for reduced motion, hidden windows, or resource pressure level 3 and above. Path A (new lane), Path B (existing lane), and Path C (in-place create) are covered. The prompt remains in the composer through renderer-owned launch waits, and remount reconciliation preserves later unsent content. No IPC, CLI, TUI, hosted web, iOS, or provider contract changes.
Verification
npx vitest run src/renderer/components/chat/AgentChatPane.test.tsx src/renderer/components/chat/launch/chatLaunchDock.test.ts src/renderer/components/chat/composerChipDom.test.tsfromapps/desktop— 339 passed across 3 files.npm --prefix apps/desktop run typecheck— passed.git diff --check— clean.Before/after screenshots and a 3.1-second motion clip are attached in the first PR comment. They were captured in Browser Preview with a mocked session-creation API and the checked-in renderer; the final header morph against the real ADE header remains unverified on screen.
Model and harness: GPT-6 / Codex.
Summary by CodeRabbit
Note
Medium Risk
Touches draft persistence, launch timing, and optimistic message display across remounts; animation is gated but launch/composer state logic is easy to get wrong on edge cases.
Overview
Adds a first-send visual handoff from the Work draft to a new chat: the composer docks from the draft position, the first user bubble morphs up from the prompt text, and draft chrome (mode switcher, usage, etc.) departs—including morphing the Chat/CLI switcher into the chat header. Motion is skipped for reduced motion, hidden windows, and high resource pressure.
Draft lifecycle during slow foreground launches is reworked so the sent prompt stays visible until the chat opens, then only submitted text/attachments/context are cleared while later edits (append, replace, reattach, sidebar insert) survive pane remounts and delayed
sendcompletion. The composer reportsComposerDraftEditIntentviabeforeinput; drafts persistattachmentDraftIdsandsubmittedDraftTextEditin local storage.Renderer-owned foreground chat launches capture and stash composer handoff (with optional first-message envelope for optimistic UI), block duplicate foreground sends, and reconcile storage when a ready job opens after remount. DOM hooks (
data-chat-composer-text,data-chat-user-message-card,data-chat-composer-dock,data-draft-depart) support measurement and tests.Reviewed by Cursor Bugbot for commit a37267f. Configure here.