Skip to content

fix(recurring): skip records the occurrence date, not the view's "today"#2146

Open
renatomen wants to merge 3 commits into
callumalpass:mainfrom
renatomen:feat/completion-occurrence-context-skip-fix
Open

fix(recurring): skip records the occurrence date, not the view's "today"#2146
renatomen wants to merge 3 commits into
callumalpass:mainfrom
renatomen:feat/completion-occurrence-context-skip-fix

Conversation

@renatomen

@renatomen renatomen commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

For recurring tasks, "Skip this instance" (and the completion-status resolution it shares code with) recorded the action against the view's ambient targetDate — which on list and board views is the view-wide "today", not the occurrence the user acted on. That records the skip/completion on the wrong date for scheduled-anchored recurrences.

This makes the occurrence explicit instead of inferring it from the overloaded targetDate:

  • Adds a distinct optional occurrenceDate to the task context-menu options. Occurrence-addressed producers (Calendar) set it to the clicked date; list/board producers omit it.
  • "Skip this instance" passes occurrenceDate when present (Calendar), otherwise passes no explicit date so the service's existing anchor-aware default resolves it — the scheduled date for scheduled-anchored recurrences (fixing the List/Kanban "records today" bug), and today for completion-anchored recurrences (unchanged).

Occurrence-aware logic reads occurrenceDate and never infers occurrence-ness from targetDate.

Testing

New unit suites taskContextMenu.occurrenceContext.test.ts and taskContextMenu.skip.test.ts cover List/Kanban (records the scheduled occurrence, not today), Calendar (records the clicked occurrence), completion-anchored (still today), unskip, due-only, and showTaskContextMenu forwarding — red-before-green verified on the skip fix. npm test, typecheck, and lint are green.


Follow-up: #2147 (explicit completion-date control menu) builds directly on this bugfix.

renatomen added 3 commits July 4, 2026 15:27
Add a distinct optional occurrenceDate to the task context menu options,
set by occurrence-addressed views (Calendar) and omitted by list/board
producers, so occurrence-aware logic never infers occurrence-ness from the
overloaded targetDate.

Skip now passes the occurrenceDate when present (Calendar), otherwise no
explicit date so the service's anchor-aware default resolves it - scheduled for
scheduled-anchored recurrences (fixing the List/Kanban 'records today' bug) and
today for completion-anchored recurrences (unchanged).
Adds the List/Kanban unskip-label path (occurrenceDate absent + resolved
scheduled date already skipped), a due-only recurring case, and a
showTaskContextMenu occurrenceDate-forwarding test; makes the completion-anchored
assertion timezone-deterministic via getTodayString().
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.

1 participant