Repository navigation
🎚️ refactor: Move Pane Preset and Option Settings to Jotai in the Chat Package - #17179
Merged
Merged
Conversation
Codex Review SummaryThis 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. |
berry-13
force-pushed
the
refactor/chat-pane-atoms
branch
from
October 16, 2026 19:42
d3c34bc to
f433e34
Compare
1 task done
berry-13
added this pull request to stack #17195
October 16, 2026 21:03
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
Each chat pane's applied preset and its option toggles (show examples, code chat) were Recoil atom families in
client/src/store/families.ts, souseChatHelpersstill had to reach into~/storefor state only the chat pane owns. A third family,showPopoverFamily, was written into the chat contract but never read by any component.This moves
presetByIndexandoptionSettingsFamilyto Jotai families underpackages/chat/src/react/pane/(presetFamily,optionSettingsFamily, exported from@librechat/chat/react) together with every consumer:useChatHelpers,usePresets,PresetsMenuand the sign-out reset inuseClearStates.showPopoverFamilyis removed along with theshowPopover/setShowPopoverfields of the chat contract.TOptionSettingsnow aliases the package'sPaneOptionSettings. Behavior is unchanged: both families keep their defaults (nulland{}) per pane index, and sign-out still resets every pane except the kept first one.This is one step of moving feature-owned chat state onto Jotai inside the chat package and cutting the chat hooks' reads of
~/store.Type of change
Testing
Tested environments/configuration:
Automated tests:
packages/chat/src/react/pane/__tests__/pane.spec.ts(defaults and per-pane isolation).useClearStatescase asserting that sign-out resets the preset and option settings of every pane, and keeps pane 0 whenskipFirstis set.submitting.spec.tsxusedpresetByIndexas its stand-in Recoil atom; it now usesactivePromptByIndex, which stays on Recoil.npx jestoverChatForm,hooks/Chat/__tests__,useClearStates,Chat/Menusandhooks/Conversations: 51 suites, 916 tests passed.npm run typecheckinclientandpackages/chat: no errors. ESLint, Prettier and import sorting clean on the changed files.Screenshots / recordings
No user-facing change.