Repository navigation
🗂️ refactor: Read the Search, File and Message Editor Siblings Through the Parts Host - #17173
Merged
Merged
Conversation
berry-13
marked this pull request as ready for review
October 15, 2026 18:02
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
added this pull request to stack #17183
October 16, 2026 13:03
berry-13
force-pushed
the
refactor/chat-parts-overlap
branch
from
October 16, 2026 20:05
bcc0f8d to
81cfece
Compare
berry-13
force-pushed
the
refactor/chat-parts-overlap
branch
from
October 16, 2026 20:48
81cfece to
e665669
Compare
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.
Summary
Four
Messages/Contentsiblings still read the app directly:SearchContent(the user markdown preference from Recoil, and the message context it re-provides to error parts),FilesandFilePreviewDialog(the file map context, and the user atom), andEditMessage(chat direction from Recoil, the messages view providers).This routes them through the parts host members the two earlier links added or already had:
useUserTextPreferences,useFileMap,useUser,useChatDirectionanduseMessagesEditing. ForSearchContent, the package gainsMessagePartIndex, which provides the surrounding message to one part at its position, so the sibling no longer reads and respreadsMessageContextitself.This link is kept separate because each file overlaps an open contributor PR:
SearchContentwith #16496 and #16518,Fileswith #17017,FilePreviewDialogwith #16282, andEditMessagewith #16204 and #17017. Every change here is a few lines at the top of the component, so those branches rebase trivially; it can merge now or wait for them. Stacked on #17172.Type of change
Testing
Tested environments/configuration:
Local jest and typecheck; no runtime configuration matters for this change.
Automated tests:
cd client && npx jest src/components/Chat/Messages src/components/Share src/components/Files src/Providers src/components/Chat/Subagents: 136 suites, 2,513 tests pass, including the existingSearchContent,EditMessage,Filesand file preview specs.cd packages/chat && npx jest: 37 suites, 390 tests pass; newreact/__tests__/message.spec.tsxcoversMessagePartIndexinside and outside a message.npx tsc --noEmitforclientandpackages/chat, and the package build, are clean. ESLint, Prettier and import sorting are clean on every changed file.parts-context.shoverMessages/Contentreports 1 of 115 files (5 on ✏️ refactor: Read the Inline Editors' Messages View Through the Parts Host #17172); the remaining one isActivityPhaseGroup, which waits for ⚛️ refactor: Move Run Display, Live Attachment and PTC Trace Atoms to Jotai #17138.Screenshots / recordings
No user-facing change.
Risk / compatibility
Low. Each read returns what the component read before through the app's host, and
MessagePartIndexprovides the same value the inline spread did.Checklist