The implementation was already complete and merged - just needed the beans marked as done after agent crash. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2.3 KiB
2.3 KiB
title, status, type, priority, tags, created_at, updated_at, parent
| title | status | type | priority | tags | created_at | updated_at | parent | ||
|---|---|---|---|---|---|---|---|---|---|
| Show owner info in admin pages | completed | feature | normal |
|
2026-03-21T12:18:51Z | 2026-03-22T09:08:07Z | 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
Summary of Changes
The "show owner info in admin pages" feature was fully implemented:
Backend:
- Genlocke list API now includes owner info resolved from the first leg's run
- Added
GenlockeOwnerResponseschema withidanddisplay_namefields
Frontend:
AdminRuns.tsx: Added Owner column showing email/display name with "No owner" fallbackAdminGenlockes.tsx: Added Owner column with same pattern- Both pages include owner filter dropdown with "All owners", "No owner", and per-user options
Commit: a3f332f feat: show owner info in admin pages