From 409e597e91f5b7f868851a8f8e7001bcffb92495 Mon Sep 17 00:00:00 2001 From: caviri <45425937+caviri@users.noreply.github.com> Date: Wed, 19 Aug 2026 02:10:46 +0200 Subject: [PATCH] fix(frontend): count only confirmed participants in the hero total MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The event header derived participantCount from hackathon.members.length, which includes waitlisted members. A waitlisted person has not joined yet, so the headline "N participants" over-counted for every viewer, admins included (issue #184). Filter out is_waiting; the roster still lists them — this is the count, not the list. --- .../src/routes/(app)/my/hackathon/[id]/+layout.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/frontend/src/routes/(app)/my/hackathon/[id]/+layout.svelte b/components/frontend/src/routes/(app)/my/hackathon/[id]/+layout.svelte index 4f6c73ba..b71d5c76 100644 --- a/components/frontend/src/routes/(app)/my/hackathon/[id]/+layout.svelte +++ b/components/frontend/src/routes/(app)/my/hackathon/[id]/+layout.svelte @@ -36,7 +36,12 @@ const hackathon = $derived(data.hackathon); const title = $derived(hackathon.name); const dates = $derived(formatDates(hackathon.startsAt, hackathon.endsAt)); - const participantCount = $derived(hackathon.members.length); + // Confirmed participants only: a waitlisted person has not joined yet, so + // counting them inflates the headline number the hero shows to everyone + // (issue #184). The roster still lists them — this is the count, not the list. + const participantCount = $derived( + hackathon.members.filter((m) => !m.isWaiting).length + ); // Same resolution the timeline page uses, so the header bar and the page never // disagree about which phase is the live one. const phases = $derived(