fix(web): collapse expanded composer immediately on submit - #1728
Open
techotaku39 wants to merge 1 commit into
Open
fix(web): collapse expanded composer immediately on submit#1728techotaku39 wants to merge 1 commit into
techotaku39 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Findings
- None.
Summary
Review mode: initial
No Blocker, Major, Minor, or Nit findings in the added or modified lines. Residual risk: the focused composer tests mock assistant-ui’s synchronous send path; the full test check was still pending at review time.
Testing
- Not run (automation). GitHub
integrationpassed;testpending.
HAPI Bot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Problem / Motivation
The full-screen composer stayed expanded until the message POST completed successfully. When the network was slow or a message waited behind a running Agent turn, the user could see the send action happen while the full-screen editor remained open.
The composer is a transient editing surface, so its layout should respond immediately to the submit action. Message delivery can continue asynchronously after the editor collapses.
Implementation
setIsExpanded(false)immediately beforecomposer.send().sendAcceptance/sendSettlementpresentation path.Validation
bun typecheck— passed.bun run --cwd web test src/components/AssistantChat/HappyComposer.sendError.test.tsx src/components/AssistantChat/HappyComposer.expandSelection.test.tsx src/hooks/mutations/useSendMessage.test.tsx— 57 tests passed.bun run build— passed.Scope and Risk
Related Issues
Refs #1368
Refs #1580
AI Disclosure
Implementation, tests, and PR preparation were assisted by OpenAI Codex (GPT-5.6).