Skip to content

feat(macos): add the Life date of birth calendar with a year picker - #4662

Merged
tyler-dane merged 6 commits into
mainfrom
fix/macos-life-dob-picker
Oct 21, 2026
Merged

tyler-dane merged 6 commits into
mainfrom
fix/macos-life-dob-picker

Conversation

@tyler-dane

Copy link
Copy Markdown
Contributor

Refs #4215

Builds on #4656 (clickable month grid) and #4658 (LifeDateFormat), which are still open. This branch contains their commits, so the diff against main shrinks to this feature's changes once they merge.

What and why

Web's Life date of birth is a DatePicker with captionPicker: the caption opens a year grid, then a month grid, then returns to the days, limited to 1900 through today. macOS only had a text field.

  • Caption picker. SidebarMonthPicker gains an opt-in captionPicker: the title becomes a button ("Choose month and year") that opens a 12-year grid (3 columns, "Select year"), then a month grid (4 columns, "Select month, YYYY"), then the day grid. The chevrons step 12-year pages, single years, or months depending on the grid, and the Go to this month circle hides outside the day grid.
  • Range limits. Optional minimumDate and maximumDate dim and disable days, months, and years outside the range, like web's minDate and maxDate.
  • Life sidebar. A calendar button on the date of birth field opens the picker, limited to Jan 1, 1900 through the calendar's today. Picking a day saves it through updateBirthDate, so the existing validation still applies. Typing a date into the field is unchanged.
  • Logic in CompassKit. DatePickerCaption holds the view sequence (year, month, day), year paging, caption text, and range checks as pure functions with unit tests. LifeDateFormat.stored(from:) turns a picked day into yyyy-mm-dd in the calendar's effective zone.

Why a button: a text field consumes clicks, so opening on click (as web does) did not work in SwiftUI. The button is explicit and keeps typing working.

Verify

CompassKit has five new DatePickerCaptionTests. Two new UI tests (LifeBirthDatePickerTests) pass: one walks 1990, June, then the 15th and checks the field reads "Jun 15, 1990", and one checks 2027 is disabled. The existing Life snapshot UI test still passes.

bun run verify --strict: VERDICT: FAIL. Checks run: test:macos:packages, type-check, lint, knip, test:macos. The only failure is NativeLaunchTests.testEventClickShowsPointerHintWithoutOpening, which also fails on a clean origin/main checkout on this machine and passed in CI on the earlier merged parity PRs (local state, unrelated). All other macOS tests pass.

🤖 Generated with Claude Code

tyler-dane and others added 4 commits October 20, 2026 18:54
The event form date popover was the system graphical DatePicker. It now
reuses the sidebar month picker (Rubik, ink circle on the selection,
Go to this month, Sunday first), with clickable days, and picking a day
keeps the time of day. The time field drops its up/down caret, which
web's field does not have.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The Life sidebar shows one random quote from web's 50 quotes (it was
always the Franklin line), and the date of birth reads Jun 10, 2026
like web's picker. Typing accepts that or yyyy-mm-dd.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Web's date of birth opens a calendar whose caption walks year, then
month, then day, limited to 1900 through today. macOS only had the text
field. The month grid gains an opt-in caption picker (12-year pages, a
month grid, range limits that dim and disable days, months, and years),
and the Life field gets a calendar button that opens it. The caption
rules are pure functions in CompassKit with unit tests, and two UI tests
walk the picker and check future years are disabled.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@tyler-dane
tyler-dane marked this pull request as ready for review October 21, 2026 01:37
@tyler-dane tyler-dane added the agent-automerge Agent-loop finished; merge-guard may squash-merge label Oct 21, 2026
@tyler-dane
tyler-dane enabled auto-merge October 21, 2026 01:37
@tyler-dane
tyler-dane disabled auto-merge October 21, 2026 02:05
@tyler-dane

Copy link
Copy Markdown
Contributor Author

agent-loop: still conflicting after update-branch onto main. Closing so the issue can be relaunched.

@tyler-dane tyler-dane removed the agent-automerge Agent-loop finished; merge-guard may squash-merge label Oct 21, 2026
@tyler-dane tyler-dane closed this Oct 21, 2026
…cker

Resolves the SidebarMonthPicker conflict after #4656 merged: keeps this
branch's caption picker and range properties on top of that PR's
clickable days.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@tyler-dane tyler-dane reopened this Oct 21, 2026
@tyler-dane tyler-dane added the agent-automerge Agent-loop finished; merge-guard may squash-merge label Oct 21, 2026
@tyler-dane
tyler-dane enabled auto-merge October 21, 2026 02:59
@tyler-dane
tyler-dane added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 21, 2026
…cker

Resolves conflicts after #4658 merged: keeps the date of birth picker
state and the stored(from:) helper on top of that PR's date format.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@tyler-dane
tyler-dane enabled auto-merge October 21, 2026 03:50
@tyler-dane
tyler-dane added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit 6dd38c7 Oct 21, 2026
26 checks passed
@tyler-dane
tyler-dane deleted the fix/macos-life-dob-picker branch October 21, 2026 04:44
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.

1 participant