- Add Owner column to AdminRuns.tsx and AdminGenlockes.tsx - Add owner filter dropdown to both admin pages - Add owner field to GenlockeListItem schema (resolved from first leg's run) - Update frontend types for GenlockeListItem Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1.7 KiB
1.7 KiB
title, status, type, priority, created_at, updated_at, parent
| title | status | type | priority | created_at | updated_at | parent |
|---|---|---|---|---|---|---|
| Show owner info in admin pages | in-progress | feature | normal | 2026-03-21T12:18:51Z | 2026-03-21T12:37:36Z | nuzlocke-tracker-wwnu |
Problem
Admin pages (AdminRuns.tsx, AdminGenlockes.tsx) don't show which user owns each run or genlocke. This makes it hard for admins to manage content.
Approach
Backend
- The
/api/runslist endpoint already returns run data — verify it includesowner(id + email). If not, add it to the response schema. - For genlockes, ownership is inferred from the first leg's run owner. Add an
ownerfield to the genlocke list response that resolves from the first leg's run.
Frontend
AdminRuns.tsx: Add an "Owner" column showing the owner's email (or "No owner" for legacy runs)AdminGenlockes.tsx: Add an "Owner" column showing the inferred owner from the first leg's run- Add owner filter dropdown to both pages
Files to modify
backend/src/app/api/runs.py— verify owner is included in list responsebackend/src/app/api/genlockes.py— add owner resolution to list endpointbackend/src/app/schemas/genlocke.py— add owner field toGenlockeListItemfrontend/src/pages/admin/AdminRuns.tsx— add Owner column + filterfrontend/src/pages/admin/AdminGenlockes.tsx— add Owner column + filterfrontend/src/types/game.ts— update types if needed
Checklist
- Verify runs list API includes owner info; add if missing
- Add owner resolution to genlocke list endpoint (from first leg's run)
- Update
GenlockeListItemschema to include owner - Add Owner column to
AdminRuns.tsx - Add Owner column to
AdminGenlockes.tsx - Add owner filter to both admin pages