From f20e54a068c9a463e4273e217e758309af470811 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Mon, 27 Apr 2026 21:55:01 -0400 Subject: [PATCH] fix(journal): widen events window to match prep's framing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The right rail's loadEvents was using "now → now + 14 days", which filtered out events earlier today that had already passed. The prep uses "today 00:00 → today 23:59" so it includes those events and explicitly notes they're "in the past". The two surfaces talked about different sets of events. Widen the right rail to "today 00:00 → today + 14 days 23:59" so events from earlier today still surface and group under "Today". The prep and the right rail now reference the same set within today. Events further out (next 14 days) keep working as before. Co-Authored-By: Claude Opus 4.7 --- frontend/src/views/JournalView.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/JournalView.vue b/frontend/src/views/JournalView.vue index d776336..15446d3 100644 --- a/frontend/src/views/JournalView.vue +++ b/frontend/src/views/JournalView.vue @@ -130,10 +130,15 @@ function formatEventTime(ev: EventEntry): string { async function loadEvents() { try { - const now = new Date() - const end = new Date(now) + // Window: today 00:00 → 14 days out. Matches the prep's framing — events + // earlier today (already past) still surface here, grouped under "Today", + // so the right rail aligns with what the prep references. + const start = new Date() + start.setHours(0, 0, 0, 0) + const end = new Date(start) end.setDate(end.getDate() + 14) - upcomingEvents.value = await listEvents(now.toISOString(), end.toISOString()) + end.setHours(23, 59, 59, 999) + upcomingEvents.value = await listEvents(start.toISOString(), end.toISOString()) } catch { /* silent */ } }