Use 1000-row Jitsi pages

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Scott Idem
2026-05-06 14:21:08 -04:00
parent cd868460fe
commit 74bc3b3625
3 changed files with 10 additions and 7 deletions

View File

@@ -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

View File

@@ -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<string, unknown> {

View File

@@ -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<Map<string, MeetingReportEnriched[]>>(() => {
const groups = new Map<string, MeetingReportEnriched[]>();
for (const m of meetings_filtered) {
@@ -291,8 +291,8 @@ let meetings_grouped = $derived.by<Map<string, MeetingReportEnriched[]>>(() => {
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(