fix: honor weak upward timeline scroll intent#630
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughReclassifies upward scrolls to ChangesTimeline scroll behavior after submit
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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.
Suggested priority: P2 (includes user-path files (packages/app/src/pages/session/session-timeline-scroll-controller.test.ts, packages/app/src/pages/session/session-timeline-scroll-controller.ts, packages/app/src/pages/session/use-session-timeline-interaction.ts)).
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.
There was a problem hiding this comment.
Code Review
This pull request updates the session timeline scroll controller to ensure that all upward navigation intents, including weak wheel and touch scrolls, transition the UI into reading history mode. This prevents the view from automatically snapping back to the latest message after a user has manually scrolled up. The changes include new E2E and unit tests, as well as a guard in the interaction hook. Feedback from the review suggests adding ArrowUp to the explicit top intent logic for consistency and removing the now-redundant strong_upward_navigation diagnostic reason.
Perf delta summaryComparator: pass
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Summary
user_upward_navigationdiagnostics so weak upward reading no longer logs asweak_scroll_observedorstrong_upward_navigation.restore_latestrecovery so a stale RAF cannot pull the viewport back after the controller has moved out offollowing_latest.Why
#595 RCA showed real upward wheel input staying in
following_latestbecause it was classified as weak. The later near-top sample then hitsubmit_restore_latest_after_top_reset, and the recovery path restored latest/bottom.This is the Phase 1 fix only: it addresses the current wheel/touch RCA path without doing the full three-owner consolidation.
Related Issue
Related to #595. This PR does not close the full consolidation issue because
createAutoScrollandbottomFollowLockare still deferred Phase 2 work.Human Review Status
Pending. A human should make the final merge decision after reviewing the final diff and verification evidence.
Review Focus
restore_latestmode guard is the right minimal protection.Risk Notes
strong_upward_navigation/weak_scroll_observedtouser_upward_navigation.bottomFollowLockorcreateAutoScroll; those remain [Task] Consolidate session timeline scroll owners into single state machine #595 Phase 2 scope.keeps long timeline stable across worktree exit follow-upE2E still fails in this worktree after a single-test rerun at the pre-existing long-session render-count checkpoint: expected at least 80 rendered messages after entering a worktree, received 10. The new weak-wheel E2E and the earlier diagnostics/scrollbar cases passed.How To Verify
Screenshots or Recordings
Not applicable. This is a scroll behavior/controller fix with E2E coverage, not a visual styling change.
Checklist
dev, and my PR title and commit messages use Conventional Commits in EnglishSummary by CodeRabbit
Bug Fixes
Tests