Skip to content

✏️ refactor: Read the Inline Editors' Messages View Through the Parts Host - #17172

Merged
berry-13 merged 1 commit into
devfrom
refactor/chat-parts-editing
Oct 16, 2026
Merged

berry-13 merged 1 commit into
devfrom
refactor/chat-parts-editing

Conversation

@berry-13

Copy link
Copy Markdown
Collaborator

Summary

EditContentParts and UIResourceCarousel were two more Messages/Content siblings 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 took ask from the optional operations context.

This adds useChatDirection to MessagePartsHost, and two app-owned members to the augmentation in hooks/Chat/contract.ts, the same way useArtifactPanel is declared: useMessagesEditing (conversation, ask, getMessages, setMessages) and useMessagesAsk, which keeps the no-op outside a messages view. Their type is a Pick of 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. EditMessage follows in the next link because it overlaps open contributor PRs.

Type of change

  • Refactor

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 existing EditContentParts, UIResourceCarousel and MCPUIResourceCarousel specs, 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 --noEmit for client and packages/chat, and the package build, are clean. ESLint, Prettier and import sorting are clean on every changed file.
  • The audit's parts-context.sh over Messages/Content reports 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; useChatDirection normalizes the stored LTR/RTL to the lowercase value the editor already compared against.

Checklist

  • I reviewed my own changes
  • Relevant tests have been added or updated
  • Existing relevant tests pass
  • The change does not introduce new warnings or errors

@berry-13
berry-13 marked this pull request as ready for review October 15, 2026 17:58
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T20:07:12.513161Z 2e57e58 New commits
🔒 Security Review ✅ Completed 2026-10-15T18:01:47.145329Z 759e31f Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codegraph-librechat codegraph-librechat Bot added the 🗺️ Client UI Foundation codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) label Oct 15, 2026
@berry-13
berry-13 added this pull request to stack #17183 October 16, 2026 13:03
Base automatically changed from refactor/chat-parts-siblings to dev October 16, 2026 20:05
@berry-13
berry-13 force-pushed the refactor/chat-parts-editing branch from 759e31f to 2e57e58 Compare October 16, 2026 20:05
@berry-13
berry-13 merged commit dd57026 into dev Oct 16, 2026
43 checks passed
@berry-13
berry-13 deleted the refactor/chat-parts-editing branch October 16, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🗺️ Client UI Foundation codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant