Skip to content

fix(web): collapse expanded composer immediately on submit - #1728

Open
techotaku39 wants to merge 1 commit into
tiann:mainfrom
techotaku39:fix/web-fullscreen-submit-collapse
Open

fix(web): collapse expanded composer immediately on submit#1728
techotaku39 wants to merge 1 commit into
tiann:mainfrom
techotaku39:fix/web-fullscreen-submit-collapse

Conversation

@techotaku39

Copy link
Copy Markdown
Contributor

Summary

  • Collapse the expanded composer as soon as a send is dispatched.
  • Remove the settlement plumbing that made the layout wait for mutation success.
  • Preserve queued delivery, optimistic messages, and send-error/attachment recovery behavior.
  • Add regression coverage for immediate collapse and delayed failures.

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

  • Call setIsExpanded(false) immediately before composer.send().
  • Remove the obsolete sendAcceptance / sendSettlement presentation path.
  • Keep queued delivery and failed-send recovery behavior unchanged.
  • Update focused composer and send-hook tests.

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.
  • Isolated Full Live Playwright verification — 2 tests passed:
    • delayed real message POST response: the composer collapsed before the response was released;
    • real Claude Runner queue: the second queued message collapsed immediately and was executed once.

Scope and Risk

  • Web-only behavior change.
  • No API schema, database migration, dependency, or Runner behavior changes.
  • Failed sends now leave the composer collapsed while preserving the existing draft and error recovery flow.

Related Issues

Refs #1368

Refs #1580

AI Disclosure

Implementation, tests, and PR preparation were assisted by OpenAI Codex (GPT-5.6).

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 integration passed; test pending.

HAPI Bot

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.

1 participant