Repository navigation
✏️ refactor: Read the Inline Editors' Messages View Through the Parts Host - #17172
Merged
Merged
Conversation
berry-13
marked this pull request as ready for review
October 15, 2026 17:58
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. |
5 tasks done
berry-13
added this pull request to stack #17183
October 16, 2026 13:03
berry-13
force-pushed
the
refactor/chat-parts-editing
branch
from
October 16, 2026 20:05
759e31f to
2e57e58
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
EditContentPartsandUIResourceCarouselwere two moreMessages/Contentsiblings reading the app directly: the editor took the chat direction from Recoil and the conversation and operations from the messages view providers, and the carousel tookaskfrom the optional operations context.This adds
useChatDirectiontoMessagePartsHost, and two app-owned members to the augmentation inhooks/Chat/contract.ts, the same wayuseArtifactPanelis declared:useMessagesEditing(conversation,ask,getMessages,setMessages) anduseMessagesAsk, which keeps the no-op outside a messages view. Their type is aPickof the messages view's own value, so nothing is duplicated. The app host backs each with the provider or atom the component read before.Stacked on #17171.
EditMessagefollows in the next link because it overlaps open contributor PRs.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/MCPUIResource src/Providers src/components/Share src/components/Chat/Subagents: 141 suites, 2,577 tests pass, including the existingEditContentParts,UIResourceCarouselandMCPUIResourceCarouselspecs, which now reach the app through the host.cd packages/chat && npx jest: 36 suites, 388 tests pass; every host fixture carries the new members.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 5 of 115 files (7 on 🧱 refactor: Read Message Content Siblings Through the Parts Host #17171).Screenshots / recordings
No user-facing change.
Risk / compatibility
Low. Each member returns what the component read before;
useChatDirectionnormalizes the storedLTR/RTLto the lowercase value the editor already compared against.Checklist