Repository navigation
refactor(web): drop the expired month-picker locale clone - #5338
Merged
Merged
Conversation
`monthPickerLocale` cloned en-US with `weekStartsOn` overridden to the view's start day. #5279 extracted that workaround on 2026-11-17 for react-datepicker 4.x, which passed `calendarStartDay` to its Month and Week components but not to Day, so in `showWeekPicker` mode each day decided "am I the start of my week" from the locale alone. #5305 upgraded to react-datepicker 9.x four days later. There, `Week` spreads its props into `Day`, so `Day` receives `calendarStartDay`, and `getStartOfWeek` hands it to date-fns as `weekStartsOn`, which outranks `locale.options.weekStartsOn`. The clone no longer decides anything. #5305 also replaced the comment recording that condition with a generic one-liner, leaving a second, now-inert week-start source of truth beside the `calendarStartDay` prop that actually governs it. The picker keeps `calendarStartDay={weekStartDay}` and takes plain en-US for formatting. "anchors the cursor week on Monday when the view starts Monday" already pins the behavior the workaround protected. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HmwVQFkX42gVYDoms2HYwB
tyler-dane
enabled auto-merge
November 22, 2026 11:30
Contributor
|
Boot bundle: 602.3 KB gzip (+0.0 KB vs main) |
This was referenced Nov 23, 2026
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
Tech-debt sweep of the merges that landed after the 2026-11-21 ledger (#5278, #5305, #5331, #5332, #5333, #5335, #5336, #5337). One finding.
monthPickerLocalecloned en-US withweekStartsOnoverridden to the view's start day. #5279 extracted that workaround on 2026-11-17 for react-datepicker 4.x, which passedcalendarStartDayto its Month and Week components but not to Day, so inshowWeekPickermode each day decided "am I the start of my week" from the locale alone; a Monday-start view would otherwise have left no day as a tab stop. #5305 upgraded to react-datepicker 9.x four days later, whereWeekspreads its props intoDay(src/week.tsx), soDayreceivescalendarStartDay, andgetStartOfWeek(date, locale, calendarStartDay)hands it to date-fns asweekStartsOn, which outrankslocale.options.weekStartsOn. The condition expired, so the clone no longer decides anything.The divergence this prevents: #5305 also replaced the comment recording that condition with a generic one-liner, so the clone read as deliberate design rather than a workaround. That left two sources of truth for the picker's week start, a cloned locale and the
calendarStartDayprop beside it, with only the prop actually in force. Anyone changing week-start behavior would have had to change one of them and could not tell which. The picker keepscalendarStartDay={weekStartDay}and takes plain en-US for formatting, which is what the clone already resolved to for every other purpose.Behavior preserving, and already pinned:
MonthPicker.test.tsx's "anchors the cursor week on Monday when the view starts Monday" asserts the Monday-start tab stop the workaround protected, and passes unchanged.Examined and deliberately left alone, so the next sweep does not redo it (recorded in full in
judged-fine.md): theShortcutKeycapconsolidation and the two key-token normalizers (#5278); the paste-placement store rework, which left no residue (#5332);GRID_POPPER_MODIFIERSand thereact-datepicker-popperselectors, which still name a class react-datepicker 9 emits, with@popperjs/coreand@types/react-datepickerboth removed cleanly (#5305);captureBootShell's module state anduseResetLoadingOnPageRestore(#5333);c-not-found, still used bySomethingBrokeView(#5335); the context-menudetailsarray (#5337); and #5331 and #5336, a scoped CSS override and CI workflow plus docs config.Verify
VERDICT: PASSChecks run:
test:web,type-check,lint,knip,test:a11y(baseline: no new failures),test:e2e(baseline: no new failures).PRE-EXISTING (0): none.
FLAKY, passed on rerun (3):
test:a11y: [chromium-desktop] › e2e/accessibility/narrow-sidebar-layout.spec.ts › week sidebar fits a 360px viewport without horizontal overflowtest:e2e: [chromium-desktop] › e2e/accessibility/narrow-sidebar-layout.spec.ts › week sidebar fits a 360px viewport without horizontal overflowtest:e2e: [chromium-desktop] › e2e/timed/event-form-fast-typing.spec.ts › title keeps every character when typed quickly in day viewGenerated by Claude Code