Skip to content

fix(web): keep earlier recurrence instances when opening an occurrence - #2739

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/fix-recurring-click-vanish-d8f4
Aug 10, 2026
Merged

fix(web): keep earlier recurrence instances when opening an occurrence#2739
cursor[bot] merged 2 commits into
mainfrom
cursor/fix-recurring-click-vanish-d8f4

Conversation

@tyler-dane

@tyler-dane tyler-dane commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Opening a later weekday occurrence of a recurring series (e.g. Mon–Fri standup → click Thursday) made earlier instances disappear, even though the form still showed M–F selected.

Cause: useRecurrence rebuilds the RRULE on open and re-emits default INTERVAL=1. Google-style rules omit that default, so the mount effect treated serialization drift as a real edit, flipped the draft from preserveseries, suppressed sibling occurrences, and only showed forward draft previews from the clicked day.

Fix: Extend normalizeRecurrenceRule to treat default INTERVAL=1 as equivalent to an omitted interval (alongside the existing WKST strip), so open-for-edit stays preserve.

All five weekday standup instances visible
After clicking Thursday, earlier instances remain

Simplicity

No separate simplify commit. The change is a one-line-class normalize extension plus a focused regression test. Sibling suppression and forward-only draft previews are left as-is — they are correct once a real recurrence edit exists.

Automated validation

Browser at http://localhost:9080 (anonymous IndexedDB):

  1. Created Mon–Fri Daily standup at 9 AM for Aug 10–14, 2026 — all five instances visible
  2. Clicked Thursday instance — Mon/Tue/Wed/Fri remained visible; form still showed M–F selected
  3. No console errors

Independent review

Fresh diff-first review: CLEAN after follow-ups.

  • Fixed: regression test now applies a real setDraft updater so suppressedSeriesIdForDraft asserts are meaningful
  • Fixed: INTERVAL=1 stripped in either RRULE position (;INTERVAL=1 or :INTERVAL=1;)

Residual risk: other RRULE serialization drift beyond INTERVAL/WKST could still false-trigger a rewrite; not observed for the reported path.

Test plan

  • bun test:web useRecurrence.test.ts — 12 pass
  • bun run lint — pass (pre-existing unrelated warnings only)
  • CI on HEAD fa36955: lint, type-check, knip, unit (core/web/backend/sync/scripts), e2e, CodeQL — all green
  • Browser golden path above — PASS
Open in Web Open in Cursor 

cursoragent and others added 2 commits August 10, 2026 19:34
Opening a later weekday occurrence rebuilt the RRULE with default
INTERVAL=1, which falsely flipped preserve→series and hid earlier
siblings. Treat INTERVAL=1 as equivalent to an omitted interval.

Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Apply draft updates in the regression so suppression stays null after
mount, and strip INTERVAL=1 in either RRULE position.

Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
@tyler-dane
tyler-dane marked this pull request as ready for review August 10, 2026 19:47
@cursor
cursor Bot merged commit ea2fa61 into main Aug 10, 2026
20 checks passed
@cursor
cursor Bot deleted the cursor/fix-recurring-click-vanish-d8f4 branch August 10, 2026 19:48
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