Build step 4 of 5 — Phase K (umbrella #215)
Build doc: documentation/plans/phase-k-build-plan.md §4 Step K.4
What to build
GET /api/pool/metadata endpoint returning the merged registry+ladder+metadata view. Decide tab-vs-extend during this step (read LadderTab; if extension is clean, extend; otherwise new Pool tab as 11th dashboard tab). Frontend hook usePoolMetadata.ts with cacheKey: 'pool-v1'.
Existing context
- Backend FastAPI app:
bots/v0/api/ (or wherever the API lives currently). Existing endpoints follow /api/<resource> pattern.
- Existing Ladder tab:
frontend/src/components/dashboard/LadderTab.tsx (10th tab). Already shows cross-version WR matrix. Pool view extends this with themes + notable_moments + build-order signature.
- Cache-key rule:
feedback_useapi_cache_schema_break.md — bump cacheKey whenever response shape changes. New endpoint = new key; new fields on existing endpoint = bump key.
Files to modify/create
- Backend: new endpoint handler in API module.
frontend/src/hooks/usePoolMetadata.ts — NEW.
- Either extend
LadderTab.tsx OR add frontend/src/components/dashboard/PoolTab.tsx — decision documented in PR.
frontend/src/hooks/usePoolMetadata.test.ts — NEW.
Done when
- Endpoint returns valid JSON for
v0-only pool (smoke test against running backend).
- Frontend renders without console errors.
npm --prefix frontend run test passes (vitest).
npm --prefix frontend run build passes (catches TypeScript drift).
Flags
--reviewers code --isolation worktree
Depends on
K.3.
Produces
Backend endpoint + frontend hook + dashboard surface (tab or extension).
Synced from build doc by /repo-sync
Build step 4 of 5 — Phase K (umbrella #215)
Build doc: documentation/plans/phase-k-build-plan.md §4 Step K.4
What to build
GET /api/pool/metadataendpoint returning the merged registry+ladder+metadata view. Decide tab-vs-extend during this step (read LadderTab; if extension is clean, extend; otherwise new Pool tab as 11th dashboard tab). Frontend hookusePoolMetadata.tswithcacheKey: 'pool-v1'.Existing context
bots/v0/api/(or wherever the API lives currently). Existing endpoints follow/api/<resource>pattern.frontend/src/components/dashboard/LadderTab.tsx(10th tab). Already shows cross-version WR matrix. Pool view extends this with themes + notable_moments + build-order signature.feedback_useapi_cache_schema_break.md— bump cacheKey whenever response shape changes. New endpoint = new key; new fields on existing endpoint = bump key.Files to modify/create
frontend/src/hooks/usePoolMetadata.ts— NEW.LadderTab.tsxOR addfrontend/src/components/dashboard/PoolTab.tsx— decision documented in PR.frontend/src/hooks/usePoolMetadata.test.ts— NEW.Done when
v0-only pool (smoke test against running backend).npm --prefix frontend run testpasses (vitest).npm --prefix frontend run buildpasses (catches TypeScript drift).Flags
--reviewers code --isolation worktreeDepends on
K.3.
Produces
Backend endpoint + frontend hook + dashboard surface (tab or extension).
Synced from build doc by /repo-sync