From 1e115b86a43f07278c0c0ef7e3682c63dcbfa977 Mon Sep 17 00:00:00 2001 From: bryan Date: Mon, 22 Jun 2026 12:04:32 +0100 Subject: [PATCH] Implement session-first dashboard foundation --- components/dashboard/dashboard-group-zone.tsx | 209 ++++++++++++++++-- lib/supabase/types.ts | 15 ++ ...260622120000_session_first_foundations.sql | 51 +++++ 3 files changed, 254 insertions(+), 21 deletions(-) create mode 100644 supabase/migrations/20260622120000_session_first_foundations.sql diff --git a/components/dashboard/dashboard-group-zone.tsx b/components/dashboard/dashboard-group-zone.tsx index 2d885e6..c09ce25 100644 --- a/components/dashboard/dashboard-group-zone.tsx +++ b/components/dashboard/dashboard-group-zone.tsx @@ -54,6 +54,7 @@ export type DashboardGroupZoneSession = { name: string | null; scheduled_at: string; started_at?: string | null; + status?: 'scheduled' | 'active' | 'incomplete' | 'completed' | 'cancelled'; share_code: string; timer_seconds: number; question_goal: number; @@ -369,7 +370,7 @@ export const DashboardGroupZone = memo(function DashboardGroupZone({
{selectedGroup ? ( -
-
+
+
- +
@@ -523,13 +524,9 @@ export const DashboardGroupZone = memo(function DashboardGroupZone({ {selectedActiveSession - ? formatSessionDate( - selectedActiveSession.started_at ?? - selectedActiveSession.scheduled_at, - locale, - ) + ? getCompactSessionMeta(selectedActiveSession) : selectedNextSession - ? formatSessionDate(selectedNextSession.scheduled_at, locale) + ? getCompactSessionMeta(selectedNextSession) : `${selectedGroup.memberCount} ${labels.members}`} @@ -538,20 +535,23 @@ export const DashboardGroupZone = memo(function DashboardGroupZone({ event.stopPropagation()} - className="relative inline-flex h-8 max-w-[68px] shrink-0 items-center justify-center rounded-[9px] border border-white/[0.08] px-1.5 text-[11px] font-semibold text-[#e8f4f0]" + className="relative inline-flex h-8 max-w-[64px] shrink-0 items-center justify-center rounded-[9px] border border-white/[0.08] px-2 text-[11px] font-semibold text-[#e8f4f0]" > {mobileJoinLabel} + ) : selectedNextSession && sessionHref ? ( + event.stopPropagation()} + className="inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-[#20D9A3] text-[#062b22] shadow-[0_0_22px_rgba(32,217,163,0.22)]" + aria-label={labels.openSession} + > + ) : null} -