diff --git a/src/modules/activities/composables/useActivityFilters.ts b/src/modules/activities/composables/useActivityFilters.ts index 6585faa..8f9914b 100644 --- a/src/modules/activities/composables/useActivityFilters.ts +++ b/src/modules/activities/composables/useActivityFilters.ts @@ -50,8 +50,8 @@ export function useActivityFilters() { let result = activities // Specific date filter (from DatePickerStrip) takes priority over - // temporal. Picking a date also bypasses the past-events hide so - // the user can browse activities for any day they choose. + // temporal. Picking a date also bypasses the past/upcoming split + // so the user can browse activities for any day they choose. if (selectedDate.value) { const dayStart = startOfDay(selectedDate.value) const dayEnd = endOfDay(selectedDate.value) @@ -62,15 +62,16 @@ export function useActivityFilters() { } else { // Temporal filter result = applyTemporalFilter(result, temporal.value) - // Past-events hide (default ON). Composes with temporal pills: - // e.g. "This Week" + showPast=false drops days already passed. - if (!showPast.value) { - const now = new Date() - result = result.filter(a => { - const activityEnd = a.endDate ?? a.startDate - return activityEnd >= now - }) - } + // Past/upcoming split — the chip narrows to one side of "now", + // mirroring the "My tickets" / "Hosting" mental model. Default + // (showPast=false) is upcoming-only; toggling on flips to + // past-only. Composes with temporal pills: "This Week" + + // showPast=true shows only the days already passed this week. + const now = new Date() + result = result.filter(a => { + const activityEnd = a.endDate ?? a.startDate + return showPast.value ? activityEnd < now : activityEnd >= now + }) } // Category filter