feat(ui): chat input refocus after model responses#2570
Conversation
|
✅ No security or compliance issues detected. Reviewed everything up to ea8960f. Security OverviewDetected Code Changes| Change Type | Relevant files ... (code changes summary truncated to fit VCS comment limits.) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c5f8a03f24
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
eb3d815 to
2f2fdd1
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2f2fdd1f4d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Motivation
Description
promptInputContainerRefto the prompt area and attached it to the prompt container element.isInputDisabledandwasInputDisabledRefand auseEffectthat detects the disabled->enabled transition and focuses the scoped textarea viaquerySelectorwhen the composer becomes enabled.isInputDisabledon thePromptInputTextareaand thePromptInputSubmitso the textarea and submit button remain in sync.frontend/src/components/chat/chat-session-pane.tsxto implement the changes.Testing
pnpm -C frontend exec biome check src/components/chat/chat-session-pane.tsxwhich initially reported formatting differences and failed.pnpm -C frontend exec biome check --write src/components/chat/chat-session-pane.tsxwhich applied formatter fixes successfully.pnpm -C frontend exec biome check src/components/chat/chat-session-pane.tsxwhich completed with no errors.Codex Task
Summary by cubic
Restores focus to the chat input after the model finishes responding, so users can immediately type follow-ups. Also unifies the composer’s disabled state across the textarea and submit button.
promptInputContainerRefand an effect to focus the textarea on a disabled→enabled transition.isInputDisabledto keep the textarea and submit button in sync.Written for commit c5f8a03. Summary will update on new commits.