Skip to content

refactor: collapse leftover graph timezone and series helpers - #4823

Closed
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/code-simplification-2c49
Closed

cursor[bot] wants to merge 1 commit into
mainfrom
cursor/code-simplification-2c49

Conversation

@cursor

@cursor cursor Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #

What and why

Nightly simplification of merges after #4795. Graph IANA fallback and fractional-second stripping live in one helper; Prefer UTC headers share one constant with the normalizer timezone. The duplicate exception-recurrence branch is gone, toRRule inlines the one-line wrapper, seriesWriteKey reuses seriesIdOf, and remainder-series stripRuleBounds sits next to truncateSeriesRulesBefore. No product behavior change.

Verify

Selected local checks passed: test:sync:fast, test:web, type-check, lint, knip, test:a11y.

test:e2e ran 294 passed, 3 failed under parallel load. Isolated retry:

  • e2e/billing/signup-trial-step.spec.ts (awaiting checkout can explore...) passed
  • e2e/calendars/calendar-experience.spec.ts (holiday all-day dedupe) and e2e/calendars/cross-provider-duplicates.spec.ts still fail because the fixtures stamp UTC today (2026-10-25) while the Denver week grid is still Sat 2026-10-24 (visible week Oct 18-24). The diff does not touch week windowing, holiday dedupe, or duplicate merge. Sandbox date-boundary flake; CI decides.

VERDICT: FAIL
Failed: test:e2e

Open in Web View Automation 

Note

Low Risk
Refactor and deduplication across Microsoft sync and optimistic recurrence helpers; intended no product behavior change, with narrow recurrence-mapping guard removal as the only subtle touchpoint.

Overview
Consolidates Microsoft Graph timezone and HTTP concerns: graphTimeZoneToIana and stripGraphDateTimeFraction move into microsoft-graph-timezone, Graph Prefer: outlook.timezone strings centralize in microsoft-http.constants, and readers/writers/normalizers/cancelled-occurrence mapping call those shared pieces instead of duplicating logic.

On calendar-web, seriesWriteKey derives the master id via seriesIdOf, stripRuleBounds lives beside truncateSeriesRulesBefore (with a unit test), and several optimistic-mutation helpers are module-private only. mapRecurrence drops the redundant type === "exception" guard before the seriesMasterId / originalStart instance path, and toRRule inlines a one-line pattern normalizer wrapper.

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

Share Graph IANA fallback and Prefer UTC headers, drop the duplicate
exception recurrence branch, and reuse seriesIdOf plus stripRuleBounds.

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

Copy link
Copy Markdown
Contributor

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

@tyler-dane
tyler-dane disabled auto-merge October 25, 2026 05:02
@tyler-dane

Copy link
Copy Markdown
Contributor

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 25, 2026
@tyler-dane tyler-dane closed this Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants