63 lines
2.9 KiB
Markdown
63 lines
2.9 KiB
Markdown
---
|
|
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>
|