diff --git a/documentation/CLIENT__IDAA_and_customized_mods.md b/documentation/CLIENT__IDAA_and_customized_mods.md index 6153e33a..9bf5729e 100644 --- a/documentation/CLIENT__IDAA_and_customized_mods.md +++ b/documentation/CLIENT__IDAA_and_customized_mods.md @@ -540,9 +540,12 @@ The page now reads cached `activity_log` rows from IndexedDB first, renders that then refreshes from the API in the background. That keeps the report usable even when the network round-trip is slow. -Both the cache path and the API refresh now page through the full matching activity-log set in -`created_on DESC` order before building the report. That avoids the old "first 500 rows" behavior -that could hide newer sessions if the log table grew large. +Both the cache path and the API refresh now page through the matching activity-log set in +`created_on DESC` order with a 1000-row page size before building the report. That avoids the old +"first 500 rows" behavior that could hide newer sessions if the log table grew large. + +The report page keeps the newest session first in both the flat list and the grouped-by-room view; +grouped room rows are also sorted newest session first within each room. ### Jitsi URL Builder diff --git a/src/lib/ae_reports/reports_functions.ts b/src/lib/ae_reports/reports_functions.ts index db90f48c..7f9e04e8 100644 --- a/src/lib/ae_reports/reports_functions.ts +++ b/src/lib/ae_reports/reports_functions.ts @@ -29,7 +29,7 @@ interface MeetingReport { events: MeetingEvent[]; } -const JITSI_REPORT_PAGE_SIZE = 500; +const JITSI_REPORT_PAGE_SIZE = 1000; // MariaDB TEXT columns come back as JSON strings from the API — parse safely. function safe_parse_meta(raw: unknown): Record { diff --git a/src/routes/idaa/(idaa)/jitsi_reports/+page.svelte b/src/routes/idaa/(idaa)/jitsi_reports/+page.svelte index 283a368c..59ebcccc 100644 --- a/src/routes/idaa/(idaa)/jitsi_reports/+page.svelte +++ b/src/routes/idaa/(idaa)/jitsi_reports/+page.svelte @@ -280,7 +280,7 @@ let meetings_filtered = $derived.by(() => { }); // --- Derived: grouped by room --- -// Rooms sorted by most-recent session desc; sessions within each room sorted asc. +// Rooms sorted by most-recent session desc; sessions within each room sorted desc. let meetings_grouped = $derived.by>(() => { const groups = new Map(); for (const m of meetings_filtered) { @@ -291,8 +291,8 @@ let meetings_grouped = $derived.by>(() => { for (const sessions of groups.values()) { sessions.sort( (a, b) => - new Date(a.start_time).getTime() - - new Date(b.start_time).getTime() + new Date(b.start_time).getTime() - + new Date(a.start_time).getTime() ); } return new Map(