Dashboard overview (home screen)
The operator landing page at /[lang]/dashboard/overview — the first screen
every owner, admin, and coach sees after sign-in (role-router sends members
to the member home instead).
One layout, unconditional
The revamp shipped behind the PostHog flag dashboard-overview-revamp, which
was merged permanently ON on 2026-08-22: the flag, the switch component,
and the legacy widget-stack layout (overview-content.tsx, InsightsWidget,
the CoachOverview panel) were deleted. Every org now gets:
| Surface | Behavior |
|---|---|
| Web layout | Header → Action Center → Pulse strip → Today panel |
GET /organizations/:orgId/insights | Role-aware staff feed, 14-rule catalog |
GET /organizations/:orgId/sessions/upcoming-today | Owner, admin, and coach (matrix already grants coach manage on classSessions) |
The layout
Three zones in priority order, composed per role and per the org’s program
delivery modes (schedule vs coaching — derived from active programs, the
axis that distinguishes a studio from a 1:1 coaching book; organization_type
is deliberately not used):
- Action Center (
components/overview/v2/action-center.tsx) — the insights feed rendered as a severity-railed triage list. Empty state is an explicit “all clear”, not a hidden widget. Theengagement.checkins_to_reviewrow expands in place to the review-queue table. Every row has an Ask Spotter button that opens the agent with a localized prompt plus{insightId, insightCount}in the page-context selection channel (useAgent().openWith). - Pulse strip (
v2/pulse-strip.tsx) — actionable tiles, not vanity stats: collected MTD with its MoM delta (payments/stats/kpis,paymentAnalyticsroles only), tasks due now (overdue + due today,tasks/summary, all staff), new leads (leads/analytics,leadsroles only), plus active members (schedule orgs) or active clients (coaching orgs, scoped count). No “today’s classes” tile — the Today panel below owns that — and no active-subscriptions tile. Tiles a role can’t act on don’t render at all. - Today panel (
v2/today-panel.tsx) — the single place today’s classes render (the old screen showed the same list twice). Fetches the WHOLE org-local day (upcoming-today?scope=day): classes already held render dimmed with an “ended” label, upcoming ones normally, and a session missing a workout carries an amber “no workout yet” chip (hasWorkout). Coaching-mode orgs get the roster (components/overview/coach-roster.tsx) with no duplicate header/KPI row — and the roster is scoped server-side to members actively enrolled in a coaching program.
Insights rule catalog
Contract in libs/shared/src/lib/types/insights.types.ts (data-only payload;
copy resolves client-side from insights.items.<id> dictionary keys — en/he/ru).
Rules and role scoping live in apps/api/src/insights/insights.service.ts
(RULE_ROLES): finance/members rules are owner+admin; operations/engagement
rules run for all staff. See behavior.md for the rule-by-rule reference.
Docs
- behavior.md — rule catalog, severities, role composition
- code-map.md — file inventory
- qa-plan.md — manual QA matrix