Skip to content

refactor: share anonymous write-count helpers and drop prompt scaffolding - #4522

Merged
tyler-dane merged 1 commit into
mainfrom
cursor/code-simplification-9dd9
Oct 17, 2026
Merged

tyler-dane merged 1 commit into
mainfrom
cursor/code-simplification-9dd9

Conversation

@cursor

@cursor cursor Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

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_CLASS and reads write count from the eligibility hook. Timed start-date tab skip is a tabIndex prop. 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: PASS

Checks run: test:web, type-check, lint, knip, test:a11y 65/65, test:e2e 248/248.

CI-only: test:macos / test:macos:packages (no Xcode on this machine).

Open in Web View Automation 

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, and incrementAnonymousCalendarWriteCount live in anon-calendar-write-count.util.ts. The save toast and local-mode connect prompt both use that threshold; mutation-runtime aliases and local-mode-connect.storage.ts are removed, with dismiss state read/written inline in the connect-prompt store. Eligibility no longer takes a configurable threshold, and useLocalModeConnectPromptEligible returns { 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 date DatePicker so timed start dates can be skipped in tab order without forcing tabIndex: -1 when 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 private appendList helper 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.

…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
tyler-dane marked this pull request as ready for review October 17, 2026 01:16
@tyler-dane tyler-dane added the agent-automerge Agent-loop finished; merge-guard may squash-merge label Oct 17, 2026
@tyler-dane
tyler-dane enabled auto-merge October 17, 2026 01:16
@github-actions

Copy link
Copy Markdown
Contributor

Boot bundle: 509.6 KB gzip (+0.0 KB vs main)

@tyler-dane
tyler-dane added this pull request to the merge queue Oct 17, 2026
Merged via the queue into main with commit 749e31e Oct 17, 2026
31 checks passed
@tyler-dane
tyler-dane deleted the cursor/code-simplification-9dd9 branch October 17, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-automerge Agent-loop finished; merge-guard may squash-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants