fix(desktop): add compact calendar horizontal scroll#5378
Conversation
4fe1be4 to
82774ac
Compare
9f2a87c to
7a04f5d
Compare
82774ac to
fc0698b
Compare
fc0698b to
69be584
Compare
✅ Deploy Preview for old-char canceled.
|
69be584 to
ba9f5eb
Compare
Render a snapping horizontal day strip for compact calendar widths while preserving the full month grid.
ba9f5eb to
6db7b38
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6db7b38. Configure here.
| } | ||
| compactBaseRef.current = nextStart; | ||
| return nextStart; | ||
| }); |
There was a problem hiding this comment.
Side effect in React state updater risks ref desync
Low Severity
The handleCompactScroll callback mutates compactBaseRef.current inside the setCompactVisibleStart updater function. React updater functions are expected to be pure — they may be called multiple times (e.g., in Strict Mode) or their resulting state update could be discarded in concurrent rendering. If the state update is discarded but the ref mutation already happened, compactBaseRef.current diverges from compactVisibleStart. Since advanceCompact reads compactBaseRef.current to determine the next navigation position, this desynchronization could cause prev/next to jump to an unexpected date.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 6db7b38. Configure here.


Render a snapping horizontal day strip for compact calendar widths while preserving the full month grid.
This is part 3 of 3 in a stack made with GitButler:
Note
Low Risk
UI-only calendar layout and scroll/navigation logic in one component, with no auth, sync, or data-layer changes.
Overview
For narrow calendar layouts (fewer than seven columns), the desktop calendar no longer shows only a fixed
cols-wide slice. It now renders a horizontally scrollable day strip with CSS scroll snapping, a hidden scrollbar, and roughly 42 days of history and future around the anchor date so users can swipe through time.Navigation and header behavior in compact mode are wired to that strip: prev/next advance by
colsdays via a shared base ref, Today resets scroll state, the title month follows scroll position (compactVisibleStart), and scroll handlers keep the visible start index in sync with snap positions. Full month view (cols === 7) is unchanged—a static weekday header row and month grid withisCurrentMonthdimming.Reviewed by Cursor Bugbot for commit 6db7b38. Bugbot is set up for automated code reviews on this repo. Configure here.