fix(agenda): stop yesterday's all-day event surfacing under today (#65) #85

Merged
makiolaj merged 1 commits from fix/agenda-allday-today into release/v2.16.0 2026-07-19 14:14:50 +00:00
Owner

Fixes an all-day event (e.g. a birthday) set for one day also appearing under the next day's "today" heading in the Agenda and the agenda widget, in time zones east of UTC. Reported as Codeberg #65 and verified on-device.

Cause

The agenda window starts at the anchor's local midnight, which east of UTC is the previous day's 22:00 UTC. All-day events live at UTC midnights with an exclusive next-midnight end, so yesterday's all-day event still overlaps today's window start and is returned by the provider. groupAgendaDays clamped its first day up to the anchor and — via a trailing coerceAtLeast(firstDay) on the last day — pulled it onto the anchor's "today" section. The earlier multi-day fix (!83) only stopped the forward leak on interior days; this is the backward pull at the anchor, which is why it showed up only in the today section.

Fix

Drop instances whose true last day (resolved in UTC for all-day events) falls before the anchor, or whose first day falls past the window end — they occupy no visible day and must not be clamped onto an edge.

Tests

Adds two eastern-zone (Europe/Berlin) regression tests to GroupAgendaDaysTest. Full agenda + unit suites green; assembleDebug built and installed on-device for verification.

Closes #65 (Codeberg).

🤖 Generated with Claude Code

Fixes an all-day event (e.g. a birthday) set for one day also appearing under the *next* day's "today" heading in the Agenda and the agenda widget, in time zones east of UTC. Reported as Codeberg #65 and verified on-device. ### Cause The agenda window starts at the anchor's **local** midnight, which east of UTC is the previous day's 22:00 UTC. All-day events live at UTC midnights with an exclusive next-midnight end, so yesterday's all-day event still overlaps today's window start and is returned by the provider. `groupAgendaDays` clamped its first day up to the anchor and — via a trailing `coerceAtLeast(firstDay)` on the last day — pulled it onto the anchor's "today" section. The earlier multi-day fix (!83) only stopped the forward leak on interior days; this is the backward pull at the anchor, which is why it showed up *only* in the today section. ### Fix Drop instances whose true last day (resolved in UTC for all-day events) falls before the anchor, or whose first day falls past the window end — they occupy no visible day and must not be clamped onto an edge. ### Tests Adds two eastern-zone (Europe/Berlin) regression tests to GroupAgendaDaysTest. Full agenda + unit suites green; assembleDebug built and installed on-device for verification. Closes #65 (Codeberg). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
makiolaj added 1 commit 2026-07-19 14:06:40 +00:00
fix(agenda): stop yesterday's all-day event surfacing under today (#65)
All checks were successful
Translations / check (pull_request) Successful in 5s
CI / ci (pull_request) Successful in 5m53s
4148196a36
The agenda window starts at the anchor's local midnight, which east of UTC
is the previous day's 22:00 UTC. All-day events live at UTC midnights with an
exclusive next-midnight end, so yesterday's all-day event (a birthday, say)
still overlaps today's window start and is returned by the provider.
groupAgendaDays then clamped its first day up to the anchor and, via a trailing
coerceAtLeast(firstDay) on the last day, pulled it onto the anchor's "today"
section — the multi-day fix only stopped the forward leak on interior days.

Drop instances whose true last day (resolved in UTC for all-day events) falls
before the anchor, or whose first day falls past the window end: they occupy no
visible day and must not be clamped onto an edge. Adds eastern-zone regression
tests for both edges.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
makiolaj merged commit 426ddf27ee into release/v2.16.0 2026-07-19 14:14:50 +00:00
makiolaj deleted branch fix/agenda-allday-today 2026-07-19 14:14:50 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: makiolaj/calendula#85