Code map — dashboard overview
Shared
| Path | What |
|---|---|
libs/shared/src/lib/types/insights.types.ts | Insight / InsightId / severity / category contract |
libs/shared/src/lib/i18n/dictionaries/{en,he,ru}.json | insights.items.<id>, insights.allClear/askSpotter/spotterPrompt, dashboard.greetings/todayPanel/stats.* |
API
| Path | What |
|---|---|
apps/api/src/insights/insights.service.ts | Rule catalog, RULE_ROLES, getOrgInsights(orgId, { role }) |
apps/api/src/insights/insights.controller.ts | Staff-role gate, passes the caller’s role through |
apps/api/src/class-sessions/class-sessions.service.ts (findUpcomingToday) | Staff-only (owner/admin/coach) + hasWorkout per session |
| Specs | insights.service.unit.spec.ts (+ driver), insights.controller.unit.spec.ts, class-sessions.service.unit.spec.ts (“findUpcomingToday RBAC”) |
Web
| Path | What |
|---|---|
apps/web/src/app/[lang]/(protected)/dashboard/overview/page.tsx | Server prefetches (analytics, members role=member, programs), renders OverviewV2 |
apps/web/src/components/overview/v2/overview-v2.tsx | Revamped page composition |
apps/web/src/components/overview/v2/action-center.tsx | Feed, expandable review-queue row, Ask Spotter |
apps/web/src/components/overview/v2/pulse-strip.tsx | Role/mode-composed KPI tiles (pulse-tile-* testids, data-tour-id="stat-cards") |
apps/web/src/components/overview/v2/today-panel.tsx | TodaySchedulePanel (+ no-workout chip), TodayCoachingPanel |
apps/web/src/components/overview/coach-roster.tsx | Roster table, used by the v2 Today panel |
apps/web/src/components/overview/coach-overview.tsx | CoachOverviewData contract for GET /assignments/coach-overview (types only since 2026-08-22) |
apps/web/src/components/overview/check-ins/check-in-review-queue.tsx | embedded prop hides the heading inside the feed |
apps/web/src/providers/agent-provider.tsx | openWith(text, context) + useAgentOptional |
| Specs | v2/action-center.int.spec.tsx, v2/pulse-strip.int.spec.tsx (+ drivers) |