Skip to content

fix(site/src/pages/AgentsPage): defer completion focus until the composer is editable - #30631

Closed
DanielleMaywood wants to merge 1 commit into
mainfrom
refactor/agents-composer-focus-when-editable
Closed

DanielleMaywood wants to merge 1 commit into
mainfrom
refactor/agents-composer-focus-when-editable

Conversation

@DanielleMaywood

Copy link
Copy Markdown
Collaborator

Part 3 of the stack splitting #30545.

Completion focus in the agent chat composer ran before React committed the state that re-enabled the editor, so the focus call hit a disabled editor and did nothing.

  • ChatMessageInputRef gains focusWhenEditable(). It focuses at the end of the content once the editor is initialized and editable, survives an inner remount, and is consumed by the first successful focus.
  • focus() is now immediate only: it does nothing when the editor is not ready or not editable.
  • Completion sites call focusWhenEditable() on desktop: composer send completion in AgentChatInput, interrupt onSettled, ask-user-question responses, and "Implement the plan." in AgentChatPage.
  • Removes the isLoading transition effect in AgentChatInput and the focus call in finalizeSuccessfulSend, since the composer now owns send completion focus.
  • Git, diff, prompt history, and voice input keep immediate focus().

Generated by Coder Agents on behalf of @DanielleMaywood.

@linear-code

linear-code Bot commented Oct 13, 2026

Copy link
Copy Markdown

CODAGT-1405

@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

Closing stack until can be re-prioritized

@DanielleMaywood
DanielleMaywood temporarily deployed to main November 10, 2026 15:45 — with GitHub Actions Inactive
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 10, 2026

This branch was previously deployed

1 inactive deployment
main — 437c05d7 Deployed Nov 10, 2026 by DanielleMaywood via cla #253389
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant