AP1.9a: Arbeitsmodi-Shell mit Scope, Objekt-Routen und Legacy-Redirects.
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Failing after 1m46s
Test Suite / k6 /api/health Baseline (push) Has been skipped
Test Suite / playwright-smoke (push) Has been skipped
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped

Ersetzt die Vorhaben-Tab-Navigation durch Cockpit/Ausführen/Planen/Kontrolle/Team, Deep Links für APs/Projekte/Gates und Programm-Scope im Header.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-07-08 12:55:37 +02:00
1 parent 33831a8c2c
commit e42edd86fa
54 files changed
+2489 -150

No files matched your search

+17 -10
View File
@@ -32,16 +32,19 @@ describe('widgetRegistry', () => {
})
describe('viewRegistry', () => {
it('contains workspace, initiatives and my actions views', () => {
it('contains cockpit, work modes and initiatives catalog', () => {
const keys = VIEWS.map((v) => v.key)
expect(keys).toContain('kairo.workspace')
expect(keys).toContain('kairo.cockpit')
expect(keys).toContain('kairo.work')
expect(keys).toContain('kairo.plan')
expect(keys).toContain('kairo.control')
expect(keys).toContain('kairo.team')
expect(keys).toContain('kairo.initiatives')
expect(keys).toContain('kairo.my_actions')
})
it('filters nav views by capability', () => {
const nav = getNavViews(['kairo.initiative.read'])
expect(nav.some((v) => v.key === 'kairo.workspace')).toBe(false)
expect(nav.some((v) => v.key === 'kairo.cockpit')).toBe(false)
expect(nav.some((v) => v.key === 'kairo.initiatives')).toBe(true)
})
})
@@ -52,15 +55,19 @@ describe('appNav', () => {
'kairo.action.read',
'kairo.initiative.read',
])
expect(items.length).toBe(3)
expect(items.length).toBeGreaterThanOrEqual(5)
expect(items[0].Icon).toBeTruthy()
})
it('highlights initiatives for detail route', () => {
it('highlights plan mode for project object route', () => {
const items = getAppNavItems(['kairo.action.read', 'kairo.initiative.read'])
const initiatives = items.find((i) => i.key === 'kairo.initiatives')
expect(
isNavItemActive('/initiatives/abc-123', initiatives, false),
).toBe(true)
const plan = items.find((i) => i.key === 'kairo.plan')
expect(isNavItemActive('/projects/abc-123', plan, false)).toBe(true)
})
it('highlights work mode for action object route', () => {
const items = getAppNavItems(['kairo.action.read', 'kairo.initiative.read'])
const work = items.find((i) => i.key === 'kairo.work')
expect(isNavItemActive('/actions/abc-123', work, false)).toBe(true)
})
})
+94 -13
View File
@@ -1,17 +1,74 @@
import { WorkspacePage } from '../pages/WorkspacePage.jsx'
import { CockpitPage } from '../pages/modes/CockpitPage.jsx'
import { WorkLayout, WorkIndexRedirect } from '../pages/modes/WorkLayout.jsx'
import { WorkTodayPage } from '../pages/modes/WorkTodayPage.jsx'
import { WorkMinePage } from '../pages/modes/WorkMinePage.jsx'
import { PlanLayout, PlanIndexRedirect } from '../pages/modes/PlanLayout.jsx'
import { PlanStructurePage } from '../pages/modes/PlanStructurePage.jsx'
import { PlanGatesPage } from '../pages/modes/PlanGatesPage.jsx'
import { PlanInboxPage } from '../pages/modes/PlanInboxPage.jsx'
import { ControlLayout, ControlIndexRedirect } from '../pages/modes/ControlLayout.jsx'
import { ControlStatusPage } from '../pages/modes/ControlStatusPage.jsx'
import { ControlJourneyPage } from '../pages/modes/ControlJourneyPage.jsx'
import { TeamPage } from '../pages/modes/TeamPage.jsx'
import { InitiativesPage } from '../pages/InitiativesPage.jsx'
import { MyActionsPage } from '../pages/MyActionsPage.jsx'
/** @type {import('./viewRegistry.js').ViewDefinition[]} */
export const VIEWS = [
{
key: 'kairo.workspace',
path: '/workspace',
title: 'Workspace',
navLabel: 'Workspace',
shortLabel: 'Start',
key: 'kairo.cockpit',
path: '/cockpit',
title: 'Cockpit',
navLabel: 'Cockpit',
shortLabel: 'Cockpit',
matchPrefix: '/cockpit',
requiredCapability: 'kairo.action.read',
component: WorkspacePage,
component: CockpitPage,
showInNav: true,
},
{
key: 'kairo.work',
path: '/work',
title: 'Ausführen',
navLabel: 'Ausführen',
shortLabel: 'Arbeit',
matchPrefix: '/work',
objectPrefixes: ['/actions'],
requiredCapability: 'kairo.action.read',
component: WorkLayout,
showInNav: true,
},
{
key: 'kairo.plan',
path: '/plan',
title: 'Planen',
navLabel: 'Planen',
shortLabel: 'Plan',
matchPrefix: '/plan',
objectPrefixes: ['/projects', '/gates'],
requiredCapability: 'kairo.initiative.read',
component: PlanLayout,
showInNav: true,
},
{
key: 'kairo.control',
path: '/control',
title: 'Kontrolle',
navLabel: 'Kontrolle',
shortLabel: 'Kontrolle',
matchPrefix: '/control',
requiredCapability: 'kairo.initiative.read',
component: ControlLayout,
showInNav: true,
},
{
key: 'kairo.team',
path: '/team',
title: 'Team',
navLabel: 'Team',
shortLabel: 'Team',
matchPrefix: '/team',
requiredCapability: 'kairo.action.read',
component: TeamPage,
showInNav: true,
},
{
@@ -25,15 +82,19 @@ export const VIEWS = [
component: InitiativesPage,
showInNav: true,
},
{
key: 'kairo.workspace',
path: '/workspace',
title: 'Workspace',
component: CockpitPage,
showInNav: false,
},
{
key: 'kairo.my_actions',
path: '/my-actions',
title: 'Meine Maßnahmen',
navLabel: 'Meine Maßnahmen',
shortLabel: 'Maßnahmen',
requiredCapability: 'kairo.action.read',
component: MyActionsPage,
showInNav: true,
component: WorkMinePage,
showInNav: false,
},
]
@@ -45,6 +106,7 @@ export const VIEWS = [
* @property {string} [navLabel]
* @property {string} [shortLabel]
* @property {string} [matchPrefix]
* @property {string[]} [objectPrefixes]
* @property {string} [requiredCapability]
* @property {import('react').ComponentType<any>} component
* @property {boolean} [showInNav]
@@ -59,3 +121,22 @@ export function getNavViews(capabilities) {
export function getViewByKey(key) {
return VIEWS.find((v) => v.key === key)
}
export const MODE_ROUTE_COMPONENTS = {
workToday: WorkTodayPage,
workMine: WorkMinePage,
planStructure: PlanStructurePage,
planGates: PlanGatesPage,
planInbox: PlanInboxPage,
controlStatus: ControlStatusPage,
controlJourney: ControlJourneyPage,
}
export {
WorkLayout,
WorkIndexRedirect,
PlanLayout,
PlanIndexRedirect,
ControlLayout,
ControlIndexRedirect,
}