T-4L45-dashboard-modules
Status: closed/done · Impact: high · Complexity: medium
Replace the dashboard’s static nav array with registerModule/defineModule contributions so its
nav flows through the frame’s registry (as determined experiences do), with each area declaring a
baseRoute so activeModuleId() resolves — the dashboard’s routes aren’t /apps/<id>, so explicit
base routes are mandatory.
| Location | Role today |
|---|---|
apps/sdlc/desktop/src-nuxt/app/layouts/default.vue | static groups = [{label:'Operational', items:[/work, /control-plane]}, {label:'Model', items:[/model/..., ...BROWSABLE_ENTITY_TYPES]}] + ProjectSwitcher. |
apps/sdlc/desktop/src-nuxt/app/utils/entityRegistry.ts | BROWSABLE_ENTITY_TYPES + entityListRoute/entityDetailRoute (framework-free, no icons). |
packages/ts/app-frame/app/composables/useContributions.ts | registerModule(defineModule({...})); ModuleManifest with baseRoute + contributes.nav[]; activeModuleId(path) derives from base routes. |
Proposed
Section titled “Proposed”A register.ts boot plugin in sdf-nuxt registers the dashboard’s areas as module(s) via
registerModule(defineModule({ id, baseRoute, contributes: { nav } })), translating groups +
BROWSABLE_ENTITY_TYPES into NavContribution[] (label / to / icon / order) and setting
baseRoute per area (/work, /control-plane, /model/...). The frame’s useNav() then drives
the sidebar and activeModuleId() resolves the current area.
Approach
Section titled “Approach”- Add
sdf-nuxt/app/plugins/register.tsregistering the dashboard’s areas as module(s) with explicitbaseRoutes. - Map
groups+BROWSABLE_ENTITY_TYPES(app/utils/entityRegistry.ts) intoNavContribution[]; addi-lucide-*icons. - Confirm
useNav()/activeModuleId()reflect the dashboard’s routes.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
apps/sdlc/desktop/src-nuxt/app/plugins/register.ts | new | register dashboard areas as frame modules |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1: The dashboard’s nav is contributed via
registerModule/defineModule, not the staticgroupsarray. - AC-2: Each area declares a
baseRoute, andactiveModuleId()resolves the current dashboard route.
Out of scope
Section titled “Out of scope”- Rendering the nav through
DAppShell— T-W0HA-dashboard-layout-swap.
Depends on T-IKI3-dashboard-frame-prep.