Schedule day panel scrolls back to the current time every 5 minutes, overriding the user's scroll position
The schedule day panel re-scrolls itself to "now" every 5 minutes, with no check for whether the user has scrolled somewhere else. If you open the panel to look at your evening, you get yanked back to the current time on a timer for as long as the panel stays open.
Steps to reproduce
- Open the schedule day panel (right panel on desktop, bottom sheet on mobile).
- Scroll away from the current time — e.g. down to the evening, or up to the morning.
- Do nothing and wait.
What happens: within ~5 minutes the panel scrolls itself back to the current time. It keeps doing this every 5 minutes.
What should happen: the auto-scroll should fire on open and then leave the user's scroll position alone (the usual pattern is to stop re-scrolling once the user has scrolled manually, or to only re-scroll while the viewport is still near "now").
Why
src/app/features/schedule/schedule-day-panel/schedule-day-panel.component.ts:150-154:
constructor() {
effect(() => {
// Track current time row changes to trigger auto-scroll
this.currentTimeRow();
this._scheduleScrollToCurrentTime();
});
}The effect tracks currentTimeRow() and re-runs the scroll on every change, unconditionally.
currentTimeRow(:137-146) readsthis._scheduleService.scheduleRefreshTick()and returnsMath.round(hoursToday * FH).scheduleRefreshTickisinterval(2 * 60 * 1000)(schedule.service.ts:49), so the computed re-evaluates every 2 minutes.FH = 12(schedule.const.ts:58), i.e. 12 rows per hour, so the value changes once every 5 minutes — which is how often the effect actually re-runs and the scroll fires.
ngAfterViewInit() (:164) already does the initial scroll, so the effect's only job is the periodic re-scroll.
Version
Shipped in v16.0.0 (51ae6d97, "feat(scheduleRightPanel): add first draft for schedule panel"), which is the same commit that introduced the effect. Still present in v18.21.2 / current master (af33898).
Note
Found during an automated PR review sweep; pre-existing on master.
Source: super-productivity/super-productivity