diff --git a/frontend/src/lib/modules.ts b/frontend/src/lib/modules.ts index 7097735..ef4f43a 100644 --- a/frontend/src/lib/modules.ts +++ b/frontend/src/lib/modules.ts @@ -65,6 +65,10 @@ const SETTINGS_MODULE: ModuleDef = { icon: Settings, }; +// Registering a NEW Page means adding it to MODULES (or SETTINGS_MODULE) above — that's the single +// place. If a Page is left unregistered, moduleDef()/moduleLabelKey[] return undefined and NavSidebar +// throws on `.icon`; the coverage isn't compiler-enforced here because the ordered array can't also +// be an exhaustive Page map, so treat the array as the checklist when the Page union grows. const BY_ID = Object.fromEntries( [...MODULES, SETTINGS_MODULE].map((m) => [m.id, m]), ) as Record;