AP1.12a: Plan-Outline-Shell ersetzt Untertabs im Planen-Modus.
Deploy Development / deploy (push) Successful in 45s
Test Suite / pytest-backend (push) Successful in 2m4s
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 13s

Linke Outline mit Profil, Struktur, Zielzuständen und Eingang; Portfolio-Einstieg ohne Scope; Vorhabens-Profil als Read-only-Vorschau.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-07-09 11:16:42 +02:00
1 parent aa7e1626ea
commit bbadf22d39
12 files changed
+389 -16

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
/**
* Top-level Plan-Outline-Knoten (AP1.12a).
* Unterknoten (Projekt-Baum, Gate-Graph) folgen in AP1.12b+.
*
* @typedef {{ key: string, to: string, label: string, requiresInitiative?: boolean, disabled?: boolean, hint?: string }} PlanOutlineNode
*/
/** @type {PlanOutlineNode[]} */
export const PLAN_OUTLINE_NODES = [
{ key: 'profile', to: '/plan/profile', label: 'Profil', requiresInitiative: true },
{ key: 'structure', to: '/plan/structure', label: 'Struktur', requiresInitiative: true },
{ key: 'gates', to: '/plan/gates', label: 'Zielzustände', requiresInitiative: true },
{ key: 'inbox', to: '/plan/inbox', label: 'Eingang', requiresInitiative: true },
{
key: 'work',
to: '/plan/work',
label: 'Arbeit',
requiresInitiative: true,
disabled: true,
hint: 'AP1.12 — Actions im Plan-Kontext',
},
]
/**
* @param {string} pathname
* @returns {string | null}
*/
export function resolvePlanOutlineActiveKey(pathname) {
const path = pathname.replace(/\/$/, '') || pathname
const match = PLAN_OUTLINE_NODES.find(
(node) => path === node.to || path.startsWith(`${node.to}/`),
)
return match?.key ?? null
}
@@ -0,0 +1,22 @@
import { describe, expect, it } from 'vitest'
import { PLAN_OUTLINE_NODES, resolvePlanOutlineActiveKey } from './planOutlineNodes.js'
describe('planOutlineNodes', () => {
it('lists plan sections in product order', () => {
expect(PLAN_OUTLINE_NODES.map((n) => n.key)).toEqual([
'profile',
'structure',
'gates',
'inbox',
'work',
])
})
it('resolves active outline key from pathname', () => {
expect(resolvePlanOutlineActiveKey('/plan/profile')).toBe('profile')
expect(resolvePlanOutlineActiveKey('/plan/structure')).toBe('structure')
expect(resolvePlanOutlineActiveKey('/plan/gates')).toBe('gates')
expect(resolvePlanOutlineActiveKey('/plan/inbox')).toBe('inbox')
expect(resolvePlanOutlineActiveKey('/plan/portfolio')).toBe(null)
})
})