Repository navigation
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7c7fe582db
ℹ️ 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".
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".
| jest.mock('../Message', () => ({ | ||
| __esModule: true, | ||
| default: (props: ThreadMessageProps) => mockThreadRow(props), | ||
| })); |
There was a problem hiding this comment.
Exercise the real thread message component in thread tests
The thread tests now replace the newly internal ThreadMessage component with a fabricated row, so sibling navigation and editing assertions exercise the stub's buttons rather than the message components users interact with. This bypasses the integration boundary changed by this refactor and violates AGENTS.md's explicit restriction to mocking external HTTP APIs or uncontrollable services. Render the real message component with the host providers and spy on callbacks instead; the same newly introduced mock in MultiMessage.spec.tsx should be removed as well.
AGENTS.md reference: AGENTS.md:L211-L214
Useful? React with 👍 / 👎.
|
Lighthouse CI failed. The last 80 log lines contain the measured budgets and assertion failures. |
b36fdb1 to
500fc55
Compare
MessageRender, Message, MessageContent, ContentRender, MessageParts and the thread's ThreadMessage now live in the package, and the thread renders them directly, retiring MessagesHost.renderMessageRow. Pieces owned elsewhere reach the rows through new host slots.
The thread specs replaced ThreadMessage with a fabricated row, so sibling paging and edit assertions drove the stub. They now render the real row chain with fake hosts and page and edit through its real controls.
The thread specs now render real rows, so their large-chain case was cut to 60 messages. The 12,000-message chain, which guards the iterative branch walk and row reuse on a long conversation, moves to the resolver spec where it does not mount every row.
… Mock The child-thread spec relied on the test host's renderMessageRow slot to draw nothing. The thread now mounts the package rows directly, so the spec's agents map and client package mocks have to cover them.
500fc55 to
aa52b17
Compare
Pull Request
Summary
Next link of the message-list extraction, following #17802. The rows that draw one message of the thread (
MessageRender,Message,MessageContent,ContentRender,MessageParts) and the thread'sThreadMessageswitch lived in the client, so the package's message list could only render rows by asking the app to render them through therenderMessageRowslot.They now live in
@librechat/chatand are exported from@librechat/chat/components, and the thread renders them directly.MessagesHost.renderMessageRowis retired. The pieces of a row that stay in the app reach it through new host members the app fills inMessagesHostContext:useMaximizeChatSpace,useAgentsMap,renderMessageBody,renderWakeup,renderPrivateText,renderToolCallLimitNoticeandrenderAuthorHeader.PrivateTextand its owner-text provider stay in the app. Rendering and behavior are unchanged.Type of change
Testing
Automated tests:
packages/chat: typecheck clean (src and test); jest for messages, react/messages and the consumer spec: 35 suites, 441 tests pass.ContentRenderandHoverActions.streamingspecs moved into the package against a fake host with their assertions unchanged.client:tsc --noEmitclean; jest for Chat/Messages, Messages, Share, hooks/Files, routes and Providers: 135 suites, 2,466 tests pass.static-checks --against origin/devpasses. ESLint with suppressions off on the 24 touched files exits 0, andpackages/chathas no suppression entries.Screenshots / recordings
No user-facing change.
Risk / compatibility
None: markup and memo comparators are unchanged. The one behavior-adjacent change is that the thread now mounts the row components directly instead of calling a host function, so row identity and memoization are the same as before.
Checklist