Files
HealthLog/src/components/admin/section-slugs.ts
T
Marc-André Bombeck 0e2a99f8e7 v1.4.36 — perf, charts, AI payload trim, UX punch
Heavy-aggregate skip on the rollup-fresh + fully-covered path,
daily chart fetches opt into rollup buckets via source=rollup,
Insights extractFeatures swap drops the prompt payload from
double-digit MB to the low hundreds of kB on power-user accounts,
page-level isLoading gate replaced with per-section early-skeleton
paint, trends-row chart slot pinned for CLS, IntakeHistoryListV2
restored on the medication detail page, About card folded into the
Admin Console with an auto-checking update badge, cumulative metric
tiles read the day's running sum, IP-whois fallback surfaces city
+ country when the ASN lookup misses. Migration 0068 adds an
additive users.insights_exclude_metrics column. Unit suite 4354
passing; typecheck + lint clean.
2026-05-17 13:22:51 +02:00

43 lines
1.4 KiB
TypeScript

/**
* Server-safe constants for the v1.5 admin split. Mirrors the pattern in
* `src/components/settings/section-slugs.ts` so server-rendered code paths
* (`generateStaticParams()`, the page guard, route-existence tests) can
* import the slug list without dragging the `<AdminShell>` client bundle
* into the server graph.
*
* Order is the in-app navigation order — sidebar nav, mobile strip, and
* `generateStaticParams()` all consume it directly.
*/
export const ADMIN_SECTION_SLUGS = [
"system-status",
"general",
"services",
"integrations",
"ai-quality",
// v1.4.31 — operator-side assistant feature-flag toggles. Sits
// between `ai-quality` (provider config) and `coach-feedback`
// (in-app feedback inbox) per
// `.planning/research/v15-assistant-optional.md` Part B.
"assistant",
"coach-feedback",
"feedback",
"reminders",
"users",
"api-tokens",
"login-overview",
"app-logs",
"backups",
"danger-zone",
// v1.4.36 W4e — About / version / update check folded into Admin
// Console. Lives at /admin/about; the legacy /settings/about route
// is unlinked from the user-card dropdown.
"about",
] as const;
export type AdminSectionSlug = (typeof ADMIN_SECTION_SLUGS)[number];
export function isAdminSectionSlug(value: string): value is AdminSectionSlug {
return (ADMIN_SECTION_SLUGS as readonly string[]).includes(value);
}