AP0.6b: Jinkendo UX/PWA Remediation — App Shell, Design-Tokens, responsive Nav, PWA-Manifest
Deploy Development / deploy (push) Successful in 43s
Test Suite / pytest-backend (push) Successful in 29s
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 19s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-07-05 06:58:48 +02:00
1 parent 0e7184a59e
commit 48a599e76c
34 files changed
+1895 -681

No files matched your search

+22 -1
View File
@@ -1,6 +1,7 @@
import { describe, expect, it } from 'vitest'
import { WIDGETS, getWidgetsForArea } from '../registry/widgetRegistry.js'
import { VIEWS, getNavViews } from '../registry/viewRegistry.js'
import { getAppNavItems, isNavItemActive } from '../config/appNav.js'
describe('widgetRegistry', () => {
it('contains expected AP0.6 widgets', () => {
@@ -25,10 +26,11 @@ describe('widgetRegistry', () => {
})
describe('viewRegistry', () => {
it('contains workspace and initiatives views', () => {
it('contains workspace, initiatives and my actions views', () => {
const keys = VIEWS.map((v) => v.key)
expect(keys).toContain('kairo.workspace')
expect(keys).toContain('kairo.initiatives')
expect(keys).toContain('kairo.my_actions')
})
it('filters nav views by capability', () => {
@@ -37,3 +39,22 @@ describe('viewRegistry', () => {
expect(nav.some((v) => v.key === 'kairo.initiatives')).toBe(true)
})
})
describe('appNav', () => {
it('maps views to nav items with icons', () => {
const items = getAppNavItems([
'kairo.action.read',
'kairo.initiative.read',
])
expect(items.length).toBe(3)
expect(items[0].Icon).toBeTruthy()
})
it('highlights initiatives for detail 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)
})
})
+31 -11
View File
@@ -1,23 +1,16 @@
import { WorkspacePage } from '../pages/WorkspacePage.jsx'
import { InitiativesPage } from '../pages/InitiativesPage.jsx'
import { InitiativeDetailPage } from '../pages/InitiativeDetailPage.jsx'
import { MyActionsPage } from '../pages/MyActionsPage.jsx'
/**
* @typedef {Object} ViewDefinition
* @property {string} key
* @property {string} path
* @property {string} title
* @property {string} [requiredCapability]
* @property {import('react').ComponentType<any>} component
* @property {boolean} [showInNav]
*/
/** @type {ViewDefinition[]} */
/** @type {import('./viewRegistry.js').ViewDefinition[]} */
export const VIEWS = [
{
key: 'kairo.workspace',
path: '/workspace',
title: 'Workspace',
navLabel: 'Workspace',
shortLabel: 'Start',
requiredCapability: 'kairo.action.read',
component: WorkspacePage,
showInNav: true,
@@ -26,10 +19,23 @@ export const VIEWS = [
key: 'kairo.initiatives',
path: '/initiatives',
title: 'Vorhaben',
navLabel: 'Vorhaben',
shortLabel: 'Vorhaben',
matchPrefix: '/initiatives',
requiredCapability: 'kairo.initiative.read',
component: InitiativesPage,
showInNav: true,
},
{
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,
},
{
key: 'kairo.initiative_detail',
path: '/initiatives/:id',
@@ -37,9 +43,23 @@ export const VIEWS = [
requiredCapability: 'kairo.initiative.read',
component: InitiativeDetailPage,
showInNav: false,
matchPrefix: '/initiatives',
},
]
/**
* @typedef {Object} ViewDefinition
* @property {string} key
* @property {string} path
* @property {string} title
* @property {string} [navLabel]
* @property {string} [shortLabel]
* @property {string} [matchPrefix]
* @property {string} [requiredCapability]
* @property {import('react').ComponentType<any>} component
* @property {boolean} [showInNav]
*/
export function getNavViews(capabilities) {
const capSet = capabilities instanceof Set ? capabilities : new Set(capabilities)
return VIEWS.filter((v) => v.showInNav !== false)