Repository navigation
refactor: share anonymous write-count helpers and drop prompt scaffolding - #4522
Merged
Merged
Conversation
…ding Give the local-mode connect prompt and save toast one write-count owner, fold the one-caller dismiss storage into the store, and reuse the rageclick class. Also share macOS description list rendering and give the schedule section a single scroll id. Co-authored-by: tyler <tyler@switchback.tech>
tyler-dane
marked this pull request as ready for review
October 17, 2026 01:16
tyler-dane
enabled auto-merge
October 17, 2026 01:16
Contributor
|
Boot bundle: 509.6 KB gzip (+0.0 KB vs main) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Nightly cleanup of merges after #4490, focused on #4501 (local-mode connect prompt), #4504 (timed start-date tab skip), #4495 (macOS description lists), and #4492 (event form scroll ids).
The save toast and connect prompt now share one write-count reader, incrementer, and nudge threshold instead of a mutation-runtime alias plus a one-caller storage file. Eligibility no longer takes a threshold parameter. The prompt reuses
PH_NO_RAGECLICK_CLASSand reads write count from the eligibility hook. Timed start-date tab skip is atabIndexprop. macOS description ordered/unordered lists share one renderer, and the schedule section keeps a single scroll id (end maps to start).Left alone: AuthStore success paths (trial vs reset-token stay distinct), Welcome Enter vs connect-prompt Enter (different delegation rules), first-event celebration, TimePicker commit-draft event, calendar notice stack (still two views), TimeGrid hit-test passes, ContactsAPI, ShiftHintOverlay.
Verify
VERDICT: PASSChecks run:
test:web,type-check,lint,knip,test:a11y65/65,test:e2e248/248.CI-only:
test:macos/test:macos:packages(no Xcode on this machine).Note
Low Risk
Refactor and UI polish only—shared constants and storage consolidation with no auth or write-path behavior changes beyond existing nudge thresholds.
Overview
Anonymous calendar nudges now share one module:
ANONYMOUS_CALENDAR_WRITE_NUDGE_COUNT(3),readAnonymousCalendarWriteCount, andincrementAnonymousCalendarWriteCountlive inanon-calendar-write-count.util.ts. The save toast and local-mode connect prompt both use that threshold; mutation-runtime aliases andlocal-mode-connect.storage.tsare removed, with dismiss state read/written inline in the connect-prompt store. Eligibility no longer takes a configurable threshold, anduseLocalModeConnectPromptEligiblereturns{ isLive, writeCount }for the banner.PostHog renames the shared rage-click opt-out class to
PH_NO_RAGECLICK_CLASS(grid components and the connect prompt).Web event form passes
tabIndex={excludeFromTabOrder ? -1 : undefined}on the dateDatePickerso timed start dates can be skipped in tab order without forcingtabIndex: -1when they should stay focusable.macOS collapses schedule scroll targets to a single
.id(EventFormField.start)and scrolls to that section when focus is.end. Description HTML list blocks share a privateappendListhelper for ordered and unordered rendering.Reviewed by Cursor Bugbot for commit b634e1a. Bugbot is set up for automated code reviews on this repo. Configure here.