Skip to content

Phase K Step 4: /api/pool/metadata endpoint + dashboard surface #226

Description

@aberson

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bot-versioningBot ring-fence, versioning, and self-play workenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions