Skip to content

refactor: collapse event-form visibility and oauth-callback leftovers - #4711

Merged
tyler-dane merged 3 commits into
mainfrom
cursor/code-simplification-728a
Oct 22, 2026
Merged

tyler-dane merged 3 commits into
mainfrom
cursor/code-simplification-728a

Conversation

@cursor

@cursor cursor Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

No issue: found by the nightly tech-debt sweep over merges after #4659/#4669 (#4673 through #4702).

What and why

Three behavior-preserving cleanups of repetition this week's event-form and OAuth work grew. None changes a public contract.

refactor(web): share event-form visibility calendar lookup and flags
#4678 added eventFormFieldVisibilityInputFromDraft, then EventForm kept a second nested calendar lookup and recomputed busy / read-only / schedule-locked / conference kind beside it. One calendarFromDraft helper now feeds both, and the form reads those flags from the input. The grid hook also stopped memoizing unused digit/letter tables and resolves visibility once per key handler.

refactor(core): drop dead jump-field row from event-form palette list
#4679 listed edit-jump-field-digit as a command-palette action, then the palette always filtered it out. macOS never included it. The list is now only invocable rows. The cmd store from the same PR is registered in the test reset registry so handlers cannot leak across files.

refactor(web): parse oauth callback search in one helper
#4673 parsed the same callback query string in strip-oauth-callback-url and resolve-stale-provider-oauth-replay. One oauthCallbackSearchParams helper owns the leading-? strip.

Verify

bun run verify --strict selected core, web.

Checks run: test:core, test:web, type-check, lint, knip, test:a11y, test:e2e.

VERDICT: PASS
  • test:a11y 65 passed
  • test:e2e 276 passed
  • macOS Swift/AppKit checks are CI-only
Open in Web View Automation 

Note

Low Risk
Refactors duplicate logic and test isolation without changing auth or save flows; palette list only drops an entry that was never shown.

Overview
Behavior-preserving refactors that dedupe recent event-form and OAuth callback code.

Event form visibility: Adds shared helpers (calendarFromDraft, calendarFields, peopleFromDetails) so draft→visibility input and EventForm use one calendar lookup and the same busy/read-only/schedule-locked/conference flags from fieldVisibilityInput instead of recomputing them. useActiveEventFormFieldVisibility now only exposes resolveVisibilityInput; grid edit-sequence shortcuts resolve letter fields on demand via activeEditSequence().

Command palette: Removes non-invocable edit-jump-field-digit from listEventFormActions (palette had been filtering it anyway) and drops the palette-side filter. Exports initialEventFormCmdState and resets useEventFormCmdStore in the test store registry so handlers do not leak across tests.

OAuth: Centralizes callback query parsing in oauthCallbackSearchParams (leading-? handling) for stale-replay resolution and param detection tests.

Reviewed by Cursor Bugbot for commit 30bbe89. Bugbot is set up for automated code reviews on this repo. Configure here.

cursoragent and others added 3 commits October 22, 2026 01:30
#4678 added a visibility input, then EventForm kept recomputing the same
calendar, busy, and read-only flags beside it. One draft calendar helper
feeds both, and the form reads those flags from the input.

Co-authored-by: tyler <tyler@switchback.tech>
#4679 listed edit-jump-field-digit as a palette action, then the palette
always filtered it out. macOS never included it. The list is now only
invocable rows, and the cmd store resets between tests.

Co-authored-by: tyler <tyler@switchback.tech>
#4673 parsed the same callback query string in two modules. One
oauthCallbackSearchParams helper now owns the leading-? strip.

Co-authored-by: tyler <tyler@switchback.tech>
@tyler-dane
tyler-dane marked this pull request as ready for review October 22, 2026 01:31
@tyler-dane tyler-dane added the agent-automerge Agent-loop finished; merge-guard may squash-merge label Oct 22, 2026
@tyler-dane
tyler-dane enabled auto-merge October 22, 2026 01:31
@github-actions

Copy link
Copy Markdown
Contributor

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

@tyler-dane
tyler-dane added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit 3557f35 Oct 22, 2026
37 checks passed
@tyler-dane
tyler-dane deleted the cursor/code-simplification-728a branch October 22, 2026 02:15
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