wip: phase 04-01 paused at task 3/3 (RED done, GREEN pending)

This commit is contained in:
2026-06-23 08:19:04 +02:00
parent 0b7cf66abb
commit 2c526fccf6
3 changed files with 88 additions and 50 deletions
+17 -41
View File
@@ -1,51 +1,27 @@
{ {
"version": "1.0", "version": "1.0",
"timestamp": "2026-06-19T12:50:32.516Z", "timestamp": "2026-06-23T06:18:22.001Z",
"phase": "03", "phase": "04",
"phase_name": "module-system-domaincheck", "phase_name": "marketplace-portal-navigation",
"phase_dir": ".planning/phases/03-module-system-domaincheck", "phase_dir": ".planning/phases/04-marketplace-portal-navigation",
"plan": 4, "plan": 1,
"task": 1, "task": 3,
"total_tasks": 1, "total_tasks": 3,
"status": "paused", "status": "paused",
"completed_tasks": [ "completed_tasks": [
{"id": 1, "name": "Module SDK + Registry (03-01)", "status": "done", "commit": "fa15d35"}, {"id": 1, "name": "Install and configure Vitest test infrastructure for apps/web", "status": "done", "commit": "e50b3c7"},
{"id": 2, "name": "Domaincheck Module Backend+Frontend (03-02)", "status": "done", "commit": "1d9fd22"}, {"id": 2, "name": "Add marketplace i18n namespace and build MarketplaceCard component", "status": "done", "commit": "1e494b3"},
{"id": 3, "name": "Module UI Lazy Loading + Category Pages (03-03)", "status": "done", "commit": "de63b10"}, {"id": 3, "name": "Build /marketplace page and marketplace-store", "status": "in_progress", "progress": "RED phase complete — 4 failing tests written (marketplace.test.tsx). GREEN phase not started: page.tsx and marketplace-store.ts do not exist yet."}
{"id": 4, "name": "Bugfix: Module Settings Page + Sidebar Categories", "status": "done", "commit": "dad9a77"},
{"id": 5, "name": "Bugfix: Tenant Context fuer Module Activation", "status": "done", "commit": "b8ef870"},
{"id": 6, "name": "Bugfix: Fehlermeldung in Domaincheck-Seite", "status": "done", "commit": "9b2b1ea"}
], ],
"remaining_tasks": [ "remaining_tasks": [
{"id": 7, "name": "Plan 03-04: Human Verification End-to-End", "status": "not_started"} {"id": 3, "name": "Build /marketplace page and marketplace-store — implement page.tsx + marketplace-store.ts to make 4 tests pass", "status": "in_progress"}
],
"blockers": [
{
"description": "API /modules Endpoint gab 401 trotz erfolgreicher Authentifizierung — wurde durch fehlenden Tenant-Kontext im JWT verursacht und gefixt (b8ef870)",
"type": "technical",
"workaround": "Geloest"
}
],
"human_actions_pending": [
{
"action": "Plan 03-04 ausfuehren: Manueller End-to-End-Test des Modulsystems (11 Schritte)",
"context": "Docker Stack starten, als Admin einloggen, Modul aktivieren/deaktivieren testen, Domaincheck pruefen",
"blocking": true
}
], ],
"blockers": [],
"human_actions_pending": [],
"decisions": [ "decisions": [
{"decision": "Framework-agnostisches ComponentType im SDK statt React-Abhaengigkeit", "rationale": "SDK soll Backend-kompatibel bleiben", "phase": "03-01"}, {"decision": "TDD red-green workflow for all tasks with tdd=true", "rationale": "Plan specifies TDD; tests written first, then implementation", "phase": "04"}
{"decision": "MODULE_REGISTRY Whitelist-Pattern: nur explizit gelistete Slugs koennen dynamic imports triggern", "rationale": "Sicherheit gegen Arbitrary Code Loading (T-03-09)", "phase": "03-03"},
{"decision": "Login redirect via window.location.href statt router.push", "rationale": "Vollstaendiger Page-Reload stellt sicher, dass Auth-State korrekt geladen wird", "phase": "03-bugfix"},
{"decision": "API_INTERNAL_URL fuer Server-Side API-Calls im Docker-Netzwerk", "rationale": "SSR-Requests laufen Container-intern, nicht ueber Host-Port", "phase": "03-bugfix"}
], ],
"uncommitted_files": [ "uncommitted_files": [],
".planning/STATE.md", "next_action": "Create apps/web/src/lib/stores/marketplace-store.ts and apps/web/src/app/(portal)/marketplace/page.tsx following 04-01-PLAN Task 3 action spec, then run vitest to make all 4 marketplace.test.tsx tests pass (GREEN phase).",
".planning/config.json", "context_notes": "Plan 04-01 Task 3 uses TDD. The 4 failing tests in marketplace.test.tsx define the expected behavior. The page.tsx should follow admin/modules/page.tsx pattern (parallel fetch, activation Map, role gate). marketplace-store needs bumpSidebarRefresh + selectedTenantId. After Task 3 passes, Plan 04-01 SUMMARY needs writing, then Plan 04-02 starts."
"apps/web/src/app/(auth)/login/page.tsx",
"apps/web/src/lib/auth-actions.ts",
"docker-compose.yml"
],
"next_action": "Uncommitted Changes committen, dann Plan 03-04 starten: Docker Stack hochfahren und manuellen End-to-End-Test der 11 Verifikationsschritte durchfuehren",
"context_notes": "Phase 03 Plans 01-03 vollstaendig ausgefuehrt. Drei Bugfixes fuer Auth/Tenant-Kontext-Probleme committed. Noch 5 Dateien mit uncommitted Changes (Login-Fix, API_INTERNAL_URL, State-Updates). Plan 04 ist ein reiner Human-Verification-Plan — kein neuer Code, nur manuelles Testen."
} }
+9 -9
View File
@@ -2,14 +2,14 @@
gsd_state_version: 1.0 gsd_state_version: 1.0
milestone: v1.0 milestone: v1.0
milestone_name: milestone milestone_name: milestone
status: verifying status: executing
stopped_at: Phase 4 UI-SPEC approved stopped_at: Phase 4 UI-SPEC approved
last_updated: "2026-06-22T12:19:54.125Z" last_updated: "2026-06-22T12:42:52.447Z"
last_activity: 2026-06-20 -- Phase 03 human verification passed last_activity: 2026-06-22 -- Phase 04 execution started
progress: progress:
total_phases: 6 total_phases: 6
completed_phases: 2 completed_phases: 2
total_plans: 12 total_plans: 16
completed_plans: 11 completed_plans: 11
percent: 33 percent: 33
--- ---
@@ -21,14 +21,14 @@ progress:
See: .planning/PROJECT.md (updated 2026-06-18) See: .planning/PROJECT.md (updated 2026-06-18)
**Core value:** Eine zentrale Plattform, in der beliebige Workflow-Tools als Module lizenziert, aktiviert und genutzt werden koennen -- ohne zwischen verschiedenen Anwendungen wechseln zu muessen. **Core value:** Eine zentrale Plattform, in der beliebige Workflow-Tools als Module lizenziert, aktiviert und genutzt werden koennen -- ohne zwischen verschiedenen Anwendungen wechseln zu muessen.
**Current focus:** Phase 03 complete — ready for Phase 04 **Current focus:** Phase 04 — marketplace-portal-navigation
## Current Position ## Current Position
Phase: 03 (module-system-domaincheck) — COMPLETE Phase: 04 (marketplace-portal-navigation) — EXECUTING
Plan: 4 of 4 Plan: 1 of 4
Status: Phase 03 verified and complete Status: Executing Phase 04
Last activity: 2026-06-20 -- Phase 03 human verification passed Last activity: 2026-06-22 -- Phase 04 execution started
Progress: [██▓░░░░░░░] 25% Progress: [██▓░░░░░░░] 25%
@@ -0,0 +1,62 @@
---
context: phase
phase: 04-marketplace-portal-navigation
task: 3
total_tasks: 3
status: in_progress
last_updated: 2026-06-23T06:18:22.001Z
---
<current_state>
Phase 04, Plan 01 (marketplace browse + activate), Task 3 of 3.
TDD RED phase done — 4 failing tests in marketplace.test.tsx committed (0b7cf66).
GREEN phase not started: `page.tsx` and `marketplace-store.ts` do not exist yet.
Tasks 1 (Vitest infra) and 2 (MarketplaceCard + i18n) fully done and committed.
</current_state>
<completed_work>
Completed Tasks:
- Task 1: Vitest infrastructure — Done (e50b3c7). vitest.config.ts, setup.ts, test scripts.
- Task 2: MarketplaceCard + i18n — Done (1e494b3). Component, 5 passing tests, marketplace namespace in de.json/en.json.
- Task 3: marketplace page + store — In progress. 4 failing tests written (0b7cf66). Implementation not started.
</completed_work>
<remaining_work>
- Task 3 GREEN phase: Create `apps/web/src/lib/stores/marketplace-store.ts` (Zustand store with bumpSidebarRefresh + selectedTenantId) and `apps/web/src/app/(portal)/marketplace/page.tsx` (client component with parallel fetch, activation Map, role gate, card grid). Make all 4 tests in marketplace.test.tsx pass.
- Task 3 verification: `pnpm vitest run` all green + `pnpm type-check` clean.
- 04-01-SUMMARY.md: Write after Task 3 done.
- Plans 04-02, 04-03, 04-04: Not started.
</remaining_work>
<decisions_made>
- TDD red-green for all tdd=true tasks — tests first, then implementation
- Parallel fetch pattern (Promise.all for /modules + /modules/active) per admin/modules/page.tsx analog
- Activation state as client-side Map, not per-card fetch
</decisions_made>
<blockers>
None.
</blockers>
## Required Reading (in order)
1. `.planning/phases/04-marketplace-portal-navigation/04-01-PLAN.md` — Task 3 action spec has exact implementation details
2. `apps/web/src/app/(portal)/marketplace/marketplace.test.tsx` — The 4 tests that must pass (defines expected behavior)
3. `apps/web/src/app/(portal)/admin/modules/page.tsx` — Analog for parallel fetch + activation Map pattern
4. `apps/web/src/lib/stores/sidebar-store.ts` — Zustand store pattern reference
5. `.planning/phases/04-marketplace-portal-navigation/04-UI-SPEC.md` — Layout specs, grid breakpoints
## Infrastructure State
- Docker services running: PostgreSQL, Redis, API (NestJS), Web (Next.js), Traefik
- API has /modules and /modules/active endpoints working (verified Phase 03)
- Vitest configured and operational in apps/web
<context>
Straightforward TDD GREEN phase. Tests define behavior, Task 3 action block has exact implementation. Follow admin/modules/page.tsx pattern closely. No blockers or complications expected.
</context>
<next_action>
Start with: Create `apps/web/src/lib/stores/marketplace-store.ts` following Task 3 action spec, then create `apps/web/src/app/(portal)/marketplace/page.tsx`, then run `cd apps/web && pnpm vitest run` to verify all tests pass.
</next_action>