Repository navigation
refactor: pay down date picker branches, timezone label, and welcome step math - #4403
Conversation
…step math Debt from the last week of merged work: - DatePickers: the start/end branch was spelled out in five places (arrow open, both Enter commits, Escape, Tab) and the Mod+Enter case from #4395 duplicated the plain-Enter commit. One record per side plus openOnly / closeOpenPickers / commitTypedDate says each rule once; drops the dead `val !== undefined` guards and the single-use getDateFromInput and formatDate wrappers. - GridTimezoneLabel (#4376): the two abbreviation buttons were the same markup twice, gated on `isTraveling && travelAbbreviation !== null && timeTravelZone`, where any one of the three implies the others. One GridTimezoneAbbrevButton, one null check. It forwards its ref and remaining props, since the exit-hint tooltip clones its child to anchor on it; a new test pins that the cloned reference props reach the button. - SecondaryTimezoneExitHint: the mount effect re-set state it was already initialized with; the component is keyed on the zone, so remounting is what restarts the pulse. - WelcomeModal (#4397): WelcomeSteps moved to its own file (one component per file), and the step clamp arithmetic with its casts and bare 1/3 moved into welcome-steps.ts with a unit test. - welcome-sequence: content and templates both hand-rolled the same "narrow stepKey, else undefined" map read; now welcomeStepValue. Preview loop drops hasQueuedRows, which a queued row already makes false through isComplete, and stops re-normalizing an address its caller normalized. No behavior change intended. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BtTkXVHELU5KLWjvJ5fNWG
#4391 rebuilt the event form footer on `Btn` with the shared `c-button-primary` / `c-button-elevated` classes, which left `SaveButton` with no production caller: its own test file was the only importer, so knip could not see it as unused. The component and that test go, and with them the `saveButtonBg` / `saveButtonShadow` fields on `EventPalette`, which nothing else read (every other consumer destructures `base`). `--elevated-shadow-color` falls back to `--color-accent-strong` in CSS, which is what the footer button has been using since #4391. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BtTkXVHELU5KLWjvJ5fNWG
|
Dequeued on The queue run's aggregate That duration is the anomaly, not the code:
The other three shards in the same queue run finished in about 4 minutes, so this was one stalled runner rather than a slow batch. The shard's specs (booking, oauth, auth, billing) are also untouched by this diff, which changes the all-day date pickers, the grid timezone label, the welcome modal's step dots, the welcome email step maps, and a dead button component. Every required check is green on the PR head Generated by Claude Code |
Fixes #
What and why
Nightly simplification of merges from the last seven days (#4376-#4402). Six debt items, no behavior change intended:
DatePickers. ArrowDown, both Enter commits, Escape and Tab each re-derived "which picker am I?" from a pair of props, and the Mod+Enter case added by fix(web): restore Cmd+Enter and Esc in event time pickers #4395 duplicated the plain-Enter commit path. One record per side plusopenOnly/closeOpenPickers/commitTypedDatestates each rule once. Also gone: theval !== undefinedguards (an input'svalueis always a string, and theundefinedarm silently built anInvalid Date), the single-usegetDateFromInputandformatDatewrappers, and the two one-lineclose*DatePickerclosures.GridTimezoneLabelcarried the same button twice (feat(web): improve second timezone discoverability #4376), gated onisTraveling && travelAbbreviation !== null && timeTravelZone, where each of the three conditions implies the other two. OneGridTimezoneAbbrevButton, one null check. The button forwards its ref and remaining props, becauseSecondaryTimezoneExitHintclones its child to anchor the tooltip on it; a wrapper that swallowed them would have left the hint with nothing to hover, focus or position against, soGridTimezoneLabel.test.tsxnow pins that the cloned reference props reach the button element.SecondaryTimezoneExitHint's mount effect re-set state it was already initialized with (feat(web): improve second timezone discoverability #4376). The component is keyed on the zone, so a remount is what restarts the pulse; the effect only needs the timeout.WelcomeStepslived insideWelcomeModal.tsx(one component per file), and the step clamp was inline arithmetic withas WelcomeStepcasts and bare1/3bounds in two places (fix(web): advance welcome modal on Enter when dialog has focus #4397 touched this file). Both move towelcome-steps.tswith a unit test.welcome-sequencecontent and templates hand-rolled the same map read (feat(email): daily welcome tip drip (day 0-4) mapped to new Resend templates #4399): "narrow the row'sstepKey, else undefined", once per file. NowwelcomeStepValue. In the preview loop,hasQueuedRowswas redundant withisComplete(a queued row is neither sent nor skipped, so it already makesisCompletefalse), and two private helpers re-normalized an address their only caller had already normalized.settingsHref(page: "billing")loses a single-member union parameter.SaveButtonwas dead code with a live test. fix(web): full-width primary Save in sidebar event form #4391 rebuilt the event form footer onBtnplus the sharedc-button-primary/c-button-elevatedclasses, leavingSaveButton's only importer its own test file, which is why knip could not see it as unused. The component and that test go, and with them thesaveButtonBg/saveButtonShadowfields onEventPalettethat nothing else read.--elevated-shadow-colorfalls back to--color-accent-strongin CSS, which is what the footer button has used since fix(web): full-width primary Save in sidebar event form #4391.Left alone on purpose: the
TIME_PICKER_COMMIT_DRAFT_EVENTcustom DOM event and its.c-time-pickerclass lookup (#4395) still bridge the form's save shortcut to the picker's uncommitted draft, which would need the draft lifted into the form rather than a local cleanup; prior sweeps (#4402) left it for the same reason.WELCOME_STEP_TEMPLATE_ALIAS["shortcut-list"] = "14-"reads truncated, but #4399 names that alias deliberately, so it is Resend's to rename.Verify
Passing here:
test:web4122/4122 (atWEB_TEST_SHARDS=28; the default 6 shards OOM-kill one shard in the untouchedcomponents/specs, which reproduces on a cleanmaincheckout in this sandbox, same as #4385 and #4393 recorded),test:a11y65/65,type-check,lint,knip, andtest:e2e237/238.Both failures reproduce on unmodified
mainhere and neither lands in a file this diff touches:test:backend:fast- 597 pass, 13 fail, allGET /api/configandSSE Serverspecs timing out on socket binds. This container cannot listen on::, which is also why the Mongo-backed*.db.test.tssuites (including the preview-loop ones covering thewelcomeStepValueand generation-state changes) cannot run here. Verified by stashing the diff and rerunning: identical failures.test:e2e- 1 failed, 237 passed:e2e/calendars/calendar-experience.spec.ts:735toBeVisible()timeout on the hidden read-only card. refactor: drop leftover calendar skipIf and flash-jump residue #4402 listed the same spec at the same line as a sandbox failure on an untouched spec.CI is the gate and it agrees: on the first commit of this branch (66f3e28) every required check was green, including
e2e-shard (1, e2e/accessibility e2e/allday),e2e-shard (4, ... e2e/calendars ...), all sixunit-legjobs,staticandmacos.Focused suites covering the diff, all green: timezone + WelcomeModal 117/117, EventForm + TimePicker 86/86, Button + SaveSection + styles + EventCard + MobileGate 86/86, non-Mongo
packages/backend/src/email40/40.🤖 Generated with Claude Code
https://claude.ai/code/session_01BtTkXVHELU5KLWjvJ5fNWG
Generated by Claude Code