Repository navigation
refactor: collapse billing intent gate and microsoft recurrence helpers - #4804
Merged
Merged
Conversation
Fold the `awaiting-checkout-explore.util` alias into billing-write-lock as `isWriteLockedAtIntent`, so the four sites that spelled out "locked and not deferring to commit" share one named predicate instead of a repeated three-part condition. The deleted module wrapped `isAwaitingCheckoutWriteLocked` with nothing else, and its test duplicated the one already in billing-write-lock.test.ts. In sync, both Microsoft RRULE BYDAY builders repeated the same ordinal prefixing, where the negative-ordinal branch returned exactly what the fallthrough did; they now share `ordinalDayToken`. The Graph request passed an `isRetryable` identical to withRetryableProviderHttp's own default, and the four passive sweeps each repeated register-then-start wiring. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AJ9cgZRKijHXqSgWHPSD7T
tyler-dane
marked this pull request as ready for review
October 24, 2026 10:32
tyler-dane
enabled auto-merge
October 24, 2026 10:32
Contributor
|
Boot bundle: 527.4 KB gzip (+0.0 KB vs main) |
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.
Fixes #
What and why
Debt sweep over the last seven days of merges, after #4795. Four collapses, no product behavior change.
web/billing — one named predicate for the intent-time gate.
awaiting-checkout-explore.util.tsexisted only to re-exportisAwaitingCheckoutWriteLockedunder a second name, and its test duplicated the one already inbilling-write-lock.test.tscase for case. The four callers each spelled outisBillingWriteLocked() && !defersAwaitingCheckoutGateToCommit(), a compound that reduces to "locked, and not the explore-first status". That is nowisWriteLockedAtIntent()inbilling-write-lock.ts, carrying the explore-first rationale as its doc comment, souseAppShortcut,useEditSequenceShortcut(twice) andpromptShortcutUpgraderead the rule rather than reassemble it.useShortcutWriteLockedAtIntentkeeps its own composition because itslockedcomes from React state, not the module flag; it now callsisAwaitingCheckoutWriteLockeddirectly. Same leftover-alias shape #4762 removed forbilling-write-guard.ts.sync/microsoft-recurrence — one ordinal BYDAY builder.
relativeByDayandbyweekdayToTokenseach carried the same three-branch ordinal prefixing, in which theordinal < 0branch returned exactly what the fallthrough returned. Both now callordinalDayToken, which states the actual rule (1MOisMO; everything else prefixes). The repeatedday.n === 0 ? 1 : (day.n ?? 1)isweekdayOrdinal, and the weekday token list moves up beside the other two day maps instead of being rebuilt on eachweekdayTokencall.sync/microsoft-graph-request — drop a re-implemented default. #4785 passed
withRetryableProviderHttpanisRetryableidentical to that helper's own default, down to the cast. Dropped, with a comment saying why onlyreadRetryAfterMsis Graph-specific.sync/app.ts — one sweep-wiring helper. The four passive sweeps each repeated build,
shutdown.register,start.startSweepdoes that once; registration still precedes start, and the callers stay in start order, so teardown order is unchanged.Verify
VERDICT: FAILon the second strict run, from a single Playwright flake that the same run contradicts.Checks passed:
test:sync:fast,test:web,type-check,lint,knip,test:a11y.test:e2ereported 296 passed, 3 skipped, 1 failed:e2e/accessibility/datepicker-a11y.spec.ts:17(dark theme meets baseline accessibility and contrast checks),hover date 29 contrast 1.00:1 for rgb(255, 255, 255) on rgb(255, 255, 255).That spec is also what
test:a11yruns, andtest:a11ypassed in this same verify invocation; it passes 4/4 on this branch with--repeat-each=2in isolation. White-on-white at 1.00:1 is the not-yet-painted hover state, and axe logged "background color could not be determined because it is overlapped by another element" across unrelated specs in the same run. The diff changes no CSS, no theme token, and nothing under the sidebar datepicker. Sandbox render-timing flake under full-suite parallel load, not a local blocker; CI decides.First strict run was
VERDICT: INCOMPLETE(Playwright Chromium missing); Chromium was installed and verify rerun, which is the run above.Generated by Claude Code