From 6887c5d25410b982ffb4541882900c436b62dbb9 Mon Sep 17 00:00:00 2001 From: Brian O'Kelley Date: Fri, 16 Jan 2026 06:09:49 -0500 Subject: [PATCH 1/3] fix: Parse API response correctly in admin meetings page The admin meetings page was treating API responses as raw arrays instead of extracting data from the response object structure. The APIs return { meetings: [...] }, { series: [...] }, and { meeting, attendees } but the frontend was assigning the entire response object directly. - Fix loadMeetings() to extract data.meetings from response - Fix loadSeries() to extract data.series and handle missing group filter - Fix viewMeeting() to properly merge meeting and attendees from response Co-Authored-By: Claude Opus 4.5 --- .changeset/silly-paws-lick.md | 4 ++++ server/public/admin-meetings.html | 19 +++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 .changeset/silly-paws-lick.md diff --git a/.changeset/silly-paws-lick.md b/.changeset/silly-paws-lick.md new file mode 100644 index 0000000000..7572fa4a1a --- /dev/null +++ b/.changeset/silly-paws-lick.md @@ -0,0 +1,4 @@ +--- +--- + +Fix admin meetings page crash when loading meetings and series diff --git a/server/public/admin-meetings.html b/server/public/admin-meetings.html index 88c10ad2f3..c424537ec9 100644 --- a/server/public/admin-meetings.html +++ b/server/public/admin-meetings.html @@ -463,7 +463,8 @@

Meeting Details

const response = await fetch(url); if (!response.ok) throw new Error('Failed to load meetings'); - meetings = await response.json(); + const data = await response.json(); + meetings = data.meetings || []; renderMeetings(); document.getElementById('loading').style.display = 'none'; @@ -479,15 +480,20 @@

Meeting Details

async function loadSeries() { try { const groupId = document.getElementById('groupFilter').value; - let url = '/api/admin/meetings/series'; - if (groupId) { - url += `?working_group_id=${groupId}`; + + // Series endpoint requires a working group filter + if (!groupId) { + series = []; + renderSeries(); + return; } + const url = `/api/admin/meetings/series?working_group_id=${groupId}`; const response = await fetch(url); if (!response.ok) throw new Error('Failed to load series'); - series = await response.json(); + const data = await response.json(); + series = data.series || []; renderSeries(); } catch (error) { console.error('Error loading series:', error); @@ -748,7 +754,8 @@

${escapeHtml(s.title)}

const response = await fetch(`/api/admin/meetings/${id}`); if (!response.ok) throw new Error('Failed to load meeting'); - viewingMeeting = await response.json(); + const data = await response.json(); + viewingMeeting = { ...data.meeting, attendees: data.attendees }; const m = viewingMeeting; const group = workingGroups.find(g => g.id === m.working_group_id); const date = new Date(m.start_time); From daee13401e18142d9d992a83a94733a551d1977d Mon Sep 17 00:00:00 2001 From: Brian O'Kelley Date: Fri, 16 Jan 2026 06:17:56 -0500 Subject: [PATCH 2/3] feat: Add Schedule button to admin working groups page Allows admins to schedule a meeting directly from the committee list without having to navigate to the meetings page first. - Added Schedule button on each committee row - Auto-opens scheduling modal via URL parameter (?action=schedule) - Working group is pre-selected in the modal Co-Authored-By: Claude Opus 4.5 --- server/public/admin-meetings.html | 6 ++++++ server/public/admin-working-groups.html | 1 + 2 files changed, 7 insertions(+) diff --git a/server/public/admin-meetings.html b/server/public/admin-meetings.html index c424537ec9..1b9b5fc53b 100644 --- a/server/public/admin-meetings.html +++ b/server/public/admin-meetings.html @@ -852,6 +852,12 @@

${escapeHtml(s.title)}

async function init() { await loadWorkingGroups(); await loadMeetings(); + + // Auto-open schedule modal if requested via URL + const params = new URLSearchParams(window.location.search); + if (params.get('action') === 'schedule') { + showCreateModal(); + } } init(); diff --git a/server/public/admin-working-groups.html b/server/public/admin-working-groups.html index 31e81ad277..cbc53404da 100644 --- a/server/public/admin-working-groups.html +++ b/server/public/admin-working-groups.html @@ -788,6 +788,7 @@

${escapeHtml(group.name)}

+
From 51c8e211ffc55d6e2b84ea40b1fd87d6549eb70f Mon Sep 17 00:00:00 2001 From: Brian O'Kelley Date: Fri, 16 Jan 2026 07:14:34 -0500 Subject: [PATCH 3/3] chore: Clear action param from URL after opening schedule modal Prevents the modal from re-opening if the user refreshes the page or bookmarks it while the modal is open. Co-Authored-By: Claude Opus 4.5 --- .changeset/shy-kings-crash.md | 4 ++++ server/public/admin-meetings.html | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 .changeset/shy-kings-crash.md diff --git a/.changeset/shy-kings-crash.md b/.changeset/shy-kings-crash.md new file mode 100644 index 0000000000..d21d7fc8c3 --- /dev/null +++ b/.changeset/shy-kings-crash.md @@ -0,0 +1,4 @@ +--- +--- + +Add Schedule button to admin working groups page diff --git a/server/public/admin-meetings.html b/server/public/admin-meetings.html index 1b9b5fc53b..3460bbd0f7 100644 --- a/server/public/admin-meetings.html +++ b/server/public/admin-meetings.html @@ -857,6 +857,12 @@

${escapeHtml(s.title)}

const params = new URLSearchParams(window.location.search); if (params.get('action') === 'schedule') { showCreateModal(); + // Clear the action param to prevent re-triggering on refresh + params.delete('action'); + const newUrl = params.toString() + ? `${window.location.pathname}?${params.toString()}` + : window.location.pathname; + window.history.replaceState({}, '', newUrl); } }