refactor(app): extract session message comments#672
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request refactors the message comment parsing and rendering logic by extracting it from the MessageTimeline component into a new dedicated helper file, session-message-comments.tsx. The changes introduce the SessionMessageComments component, utility functions for comment extraction and equality checks, and a new test suite. A review comment identifies the use of an unregistered Tailwind color token, bg-bg-base, and suggests replacing it with bg-surface-base to ensure consistent styling across the repository.
14265e0 to
1692f00
Compare
Perf delta summaryComparator: fail
|
12cf62d to
f86a126
Compare
1692f00 to
1b6320d
Compare
f86a126 to
e1d2673
Compare
e1d2673 to
d8088f8
Compare
There was a problem hiding this comment.
Suggested priority: P2 (includes user-path files (packages/app/src/pages/session/message-timeline.tsx, packages/app/src/pages/session/session-message-comments.test.ts, packages/app/src/pages/session/session-message-comments.tsx)).
P1/P0 are reserved for maintainer confirmation. Please relabel manually if this is a release blocker, security issue, data-loss risk, or updater/runtime failure.
Topology Update (2026-05-16)
Final base:
devafter #671 was squash merged.Dependency status: true stack dependency on the message-timeline extraction context from #670/#671; this PR has been restacked to the latest
dev.Review order: review and merge after #671, before #674.
Latest head after restack and review follow-up:
4ec5e4cee.Summary
Extracted the per-message comment parsing and comment strip rendering from
MessageTimelineintosession-message-comments.tsx, with focused tests for metadata parsing, fallback note parsing, filtering, and equality.Why
This is a #601 message-flow slice in the frontend architecture governance stack. It reduces
MessageTimelineownership by moving the comment strip into a named helper boundary without changing turn rendering, scroll behavior, controller state, styling, or public package contracts.Related Issue
Refs #601
Depends on #667, #669, #670, and #671, all now merged into
dev.Stack child: #674.
Human Review Status
Pending. A human should make the final merge decision after reviewing the final diff and verification evidence.
Review Focus
SessionMessageCommentspreserves the previous comment strip DOM/content contract.extractMessageCommentskeeps the same synthetic metadata and formatted-note fallback behavior.Risk Notes
Low. This is a behavior-preserving extraction from
MessageTimeline. It touches a visible message-flow surface but does not intentionally change UI copy, layout, scroll behavior, persistence, IPC, platform behavior, or public exports. Review follow-ups only swap the comment strip card background to the registeredbg-surface-basetoken and replace oldtext-13-*utilities with role typography.e2e/app/session.spec.tspartially passed in earlier validation: the first two session smoke tests passed, and the width-contract test failed on an existing selector drift looking for[data-dock-surface="shell"], which is not present in the current composer source. The page snapshot still showed the timeline and composer loading surface rendered.Review Follow-up
795a236e0and resolved. The comment strip card now usesbg-surface-baseinstead ofbg-bg-base.4ec5e4cee; comment strip now uses role typography (text-body,font-emphasis) instead of oldtext-13-*utilities.How To Verify
Screenshots or Recordings
Not applicable. This is a behavior-preserving extraction; no intentional visual change.
Checklist
devafter the merged stack base, and my PR title and commit messages use Conventional Commits in English