Skip to content

🧱 refactor: Move Message Row Leaves into @librechat/chat - #17523

Merged
berry-13 merged 5 commits into
devfrom
berry-13/chat-ui-messages-leaves
Oct 28, 2026
Merged

berry-13 merged 5 commits into
devfrom
berry-13/chat-ui-messages-leaves

Conversation

@berry-13

Copy link
Copy Markdown
Collaborator

Pull Request

Summary

The message list UI still lives in client/src/components/Chat/Messages, so @librechat/chat cannot render a message row on its own. This is the first link of the message-list extraction: it moves the leaf pieces every row uses into packages/chat/src/components/messages and exports them from @librechat/chat/components, with the client importing them from there. Rendering is unchanged.

Moved: the hover and footer style helpers, SubRow, SiblingSwitch, Elapsed/ElapsedTimer with the duration label helpers, HeaderLabel with its model-name helpers, and the system event header. ~/utils keeps serving the duration helpers through a re-export, so the tool cards that use them are untouched.

Supporting changes: @librechat/client gains useLanguage() so package components can read the active i18next language without depending on react-i18next; packages/chat/src/theme.css is a lint-only Tailwind entry (mirroring the library's theme/theme.css) so the design rules resolve theme utilities such as duration-theme-normal in chat sources; shimmer and tool-status-text join the allow list of app stylesheet markers; and the package locale check accepts keys that resolve through _one/_other plural forms.

Type of change

  • Refactor

Testing

Tested environments/configuration:

  • Local jest and typecheck only; no rendered output changes, so no browser pass for this link.

Automated tests:

  • packages/chat: npx tsc --noEmit clean; npx jest 55 suites, 584 tests pass (moved styles, HeaderLabel and duration specs run there now).
  • client: npx tsc --noEmit clean; npx jest src/components src/routes src/Providers 522 suites, 6942 tests pass.
  • npx eslint on every touched file clean; design-lint suppressions re-recorded for the three moved files and pruned.

Screenshots / recordings

No user-facing change

Risk / compatibility

Client specs that mocked a moved module now mock the @librechat/chat/components export instead, and specs that stubbed ~/hooks useLocalize also stub the library's useLocalize where a moved component renders text.

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 added the 🔨 refactor Code cleanup without new features label Oct 28, 2026
Copilot AI balanced review requested due to automatic review settings October 28, 2026 10:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@codegraph-librechat codegraph-librechat Bot added the 🗺️ Chat Experience codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) label Oct 28, 2026
@berry-13
berry-13 marked this pull request as ready for review October 28, 2026 12:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 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-28T18:33:22.074561Z f378f4f Manual request
🔒 Security Review ✅ Completed 2026-10-28T12:27:06.514668Z 0da842a 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.

Give packages/chat a lint-only Tailwind entry so the design rules resolve the
library's theme utilities, allow the app status selectors its components carry,
expose the active language from @librechat/client, and let the locale check
accept keys that resolve through plural forms.
Move the hover style helpers, SubRow, SiblingSwitch, the elapsed timer with its
duration labels, HeaderLabel and the system event header into
packages/chat/src/components/messages, export them from
@librechat/chat/components, and point the client at the package.
@berry-13

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current PR head f378f4f. State the exact reviewed commit and ignore findings that apply only to earlier heads.

Purpose supplied by the requester: retry: Codex round on f378f4f stuck running over 2.5h with no result; head is the conflict-only rebase of the thumbs-up 0da842a

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: f378f4f459

ℹ️ 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".

@berry-13
berry-13 added this pull request to stack #17563 October 28, 2026 21:54
@berry-13
berry-13 merged commit c1b977e into dev Oct 28, 2026
48 checks passed
@berry-13
berry-13 deleted the berry-13/chat-ui-messages-leaves branch October 28, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🗺️ Chat Experience codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) 🔨 refactor Code cleanup without new features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants