Repository navigation
Conversation
Move the composer's text subscription into DraftField and DraftHints so a keystroke no longer re-renders the whole ChatForm. Also merge the identical interrupt and preempt branches and drop a pass-through pasted-text callback.
…Mounted Typing, dictation and sending derived the same four blocking conditions in three places; they now read one draftBlocked value, with sending adding its own gates on top. The URL and code-workspace notices live in a status region that stays mounted so screen readers announce them when they appear, and the target Retry action uses the shared Button.
ChatForm read six app-wide preferences straight from the Recoil store. They now join enterToSend and the others in ComposerPreferencesContext, which the chat view fills once for every composer under it, main chat's and a side chat's, so the composer no longer reaches into the app store. Outside a chat view each falls back to its stored default.
Collaborator
|
@codex review the latest head, final review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
This branch has not been deployed
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.
Pull Request
Summary
Every keystroke in the composer re-rendered the whole
ChatForm, because the draft text was subscribed at the top of the component and read for only four small things: the field's value and direction, the dictation listening state, and the hints' "has text" flag. Those reads now live in two leaf components,DraftFieldandDraftHints, so typing re-renders the field and the hint line and leaves the form body, its hooks and its memoized children alone.The same pass tidies three things in the form. Typing, dictation and sending each listed the same four blocking conditions; they now share one
draftBlockedvalue, with sending adding its own gates on top. The URL-prompt and code-workspace notices sit in a status region that stays mounted, so screen readers announce them when they appear, and the target-failed Retry action uses the sharedButton. Six app preferences ChatForm read from the Recoil store (speech, playback, maximize chat space,/and@commands) now come throughComposerPreferencesContext, which the chat view already fills for main chat's composer and a side chat's.Type of change
Testing
Tested environments/configuration:
/@+popovers, attachments and uploads, pasted-text chip, run in flight with steer and queue, question batch, tool approval, URL prompt with a missing agent, maximize chat space, RTL, mobileAutomated tests:
npx jest --findRelatedTestson the changed files: 14 suites, 155 tests passChatForm.barRenders.spec.tsx: the form body does not re-run while the draft is typed, in a new chat and with a run in flight; it fails when the text subscription is put back in the formChatForm.queryParams.spec.tsxnow finds its notices inside the status regionnpx tsc --noEmit -p client/tsconfig.json: cleanScreenshots / recordings
The only visible change is the Retry action in the target-failed notice: an underlined secondary-color link before, the theme's hyperlink color with a hover underline after. Before is
devat 858e237, after is this branch, same scenario.Risk / compatibility
Low. Preferences keep their stored defaults when a composer renders outside a chat view. The new
role="status"wrapper is always mounted, so a test that expects no status region in the composer would now find an empty one.Checklist