Repository navigation
refactor: share oauth callback analytics and civil hour-line walk - #4474
Conversation
Fold the duplicated GET/Apple callback captures, unused oauth-signup exports, and DST hour-label walks into shared helpers. TimedGrid sets geometry CSS vars once on the scroll region. Co-authored-by: tyler <tyler@switchback.tech>
|
Boot bundle: 507.6 KB gzip (-0.0 KB vs main) |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort 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 38e3cd5. Configure here.
| (minutesFromCivilMidnight(now, timeZone) / | ||
| civilDayLengthMinutes(now, timeZone)) * | ||
| 100 | ||
| ); |
There was a problem hiding this comment.
Now-line uses host calendar date
Medium Severity
getCurrentPercentOfDay now passes an unzoned dayjs() into civilDayLengthMinutes. That helper reads the calendar date from its input without converting, so when the host timezone and timeZone fall on different dates the now-line uses the wrong day length, most visibly on a DST transition.
Reviewed by Cursor Bugbot for commit 38e3cd5. Configure here.


Behavior-preserving cleanup of merges after #4456/#4457 (#4459 OAuth signup analytics, #4460 DST grid alignment, #4466/#4472 boot-size deploy docs).
What and why
The OAuth callback GET and Apple form-post paths were capturing the same received/failed pair twice, and the DST grid added a second hour-line walk next to
getHourLabels. This folds those into shared helpers, drops unusedoauth-signup.eventsexports, records Apple/Provider SPA landings through one function, and sets TimedGrid geometry CSS variables once on the scroll region. Deploy docs now match Dockerfile.web: image builds do not runrun-boot-size-check.sh.No public behavior or analytics event names change.
Verify
VERDICT: FAILon one e2e spec the diff does not change:e2e/timed/shift-hold-event-hints.spec.ts:70toBeFocusedunder the full suite (18.9s). The same spec passed standalone (8.8s, 5/5). Sandbox flake documented on #4456; CI is the gate.Checks run:
test:core,test:web(658/658),test:backend:fast,type-check,lint,knip,test:a11y(65/65). Related specs this change can reach passed:keyboard-grid-parityArrowDown opens the date picker;event-sidebar-stagingdescription-link copy.test:e2e245/246 under the full suite.Note
Low Risk
Refactor with tests and explicit behavior-preserving intent; OAuth telemetry query removal is a minor API surface change on an internal callback route.
Overview
Consolidates OAuth signup analytics and DST-aware hour-line logic without changing event names or user-visible behavior.
OAuth: Apple and provider SPA callbacks now call
recordOAuthSignInCallbackLanding(server relay, thenoauth_callback_returned+oauth_callback_received). Backend GET and Apple form-post paths sharecaptureOAuthCallbackQueryAnalytics; PostHog capture is deduplicated viacaptureOAuthSignupEvent. Telemetry-only callbacks accept only theX-Compass-OAuth-Telemetryheader (thetelemetry=1query flag is removed). Unusedoauth-signup.eventsexports are dropped; web/backend use shared event constants.Calendar grid: New
civilHourLineInstantsdrivesgetHourLabels,mappedHourLabels, and related grid math (minutesFromCivilMidnightingetYByDate).TimedGridsets geometry CSS variables once on the scroll region instead of on nested layers.Docs:
performance-baselines.mdnow states deploy images runbuild.tswith production config and that boot gzip is enforced in PR CI, not at deploy.Reviewed by Cursor Bugbot for commit 38e3cd5. Bugbot is set up for automated code reviews on this repo. Configure here.