refactor(app): extract session turn changes#674
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 MessageTimeline component by extracting turn-change management logic—including fetching, caching, retries, and conflict dialogs—into a new createSessionTurnChanges controller. This change reduces the complexity of the timeline component, updates the frontend architecture manifest, and introduces unit tests for the extracted logic. Feedback identifies a missing separator in the blockedTurnChangeDescription function that results in poorly formatted file lists, and suggests updating the associated test expectations to reflect the corrected string concatenation.
Perf delta summaryComparator: pass
|
f86a126 to
e1d2673
Compare
ac9bea9 to
db3cbf5
Compare
e1d2673 to
d8088f8
Compare
db3cbf5 to
7a78f36
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-turn-changes.test.ts, packages/app/src/pages/session/session-turn-changes.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 #672 was squash merged.Dependency status: true stack dependency on the message-timeline owner context from #670/#671/#672; this PR has been restacked to latest
dev.Review order: review and merge after #672, before #675.
Latest head after restack and review follow-up:
8981175f0.Summary
Extracted
MessageTimelineturn-change ownership intopackages/app/src/pages/session/session-turn-changes.tsxand added focused tests for the extracted pure helpers.Why
This continues the #601 message-flow architecture stack after #672.
MessageTimelinewas still carrying turn-change fetch/cache/retry/dialog state inside the render component, which made the launch-path timeline harder for another agent to read or safely split before virtualization work.Related Issue
Human Review Status
Fresh-eyes review clean. The follow-up review after
8981175f0found no P0-P3 issues and confirmed the restack diff only contains this PR's turn-change extraction changes.Review Focus
MessageTimelineand keepsSessionTurnprops/behavior unchanged.session-turn-changes.tsxboundary, especially conflict dialog retry flow and blocked toast descriptions.Risk Notes
Behavior is intended unchanged. Main risk is wiring regression in undo/redo turn-change fetch or conflict-confirm retry because that logic moved modules. No platform, dependency, persistence, or migration change.
Architecture Boundary
Owner lane: #601 message flow.
Base/depends on:
dev. #667, #669, #670, #671, and #672 are merged intodev; #675 depends on this PR.Touched files:
packages/app/src/pages/session/message-timeline.tsxpackages/app/src/pages/session/session-turn-changes.tsxpackages/app/src/pages/session/session-turn-changes.test.tsArchitecture effect:
message-timeline.tsxremains large but sheds turn-change ownership in this sliceReview Follow-up
730de8916added the missing separator in the focused fake translator path.8981175f0; real locales continue to own their separator prefix, avoiding duplicate punctuation in English and Chinese.How To Verify
Screenshots or Recordings
Not included. This PR is a behavior-preserving controller extraction with no intended visible UI or copy change, so Electron manual visual verification was not run.
Checklist
devafter the merged stack base, and my PR title and commit messages use Conventional Commits in English