1.7 KiB
1.7 KiB
title, status, type, priority, created_at, updated_at, parent, blocked_by
| title | status | type | priority | created_at | updated_at | parent | blocked_by | |||
|---|---|---|---|---|---|---|---|---|---|---|
| Run ownership assignment and visibility toggle | completed | feature | normal | 2026-03-20T15:28:27Z | 2026-03-20T20:21:01Z | nuzlocke-tracker-d98o |
|
Wire up run ownership in the UI. New runs created by logged-in users are automatically assigned to them. Add a visibility toggle (public/private) to run settings. Update run list to show owned runs and public runs separately.
Checklist
- Auto-assign owner_id when creating a new run (if authenticated)
- Add visibility toggle to run settings/edit page
- Update run list view: show 'My Runs' section for authenticated users
- Show public/private badge on run cards
- Enforce visibility on frontend (don't show edit controls for non-owned runs)
- Admin script/endpoint to assign existing unowned runs to a user by ID
Summary of Changes
Frontend
- Updated
NuzlockeRuntype to includevisibility(public/private) andownerfields - Updated
CreateRunInputandUpdateRunInputto support visibility setting - RunList.tsx: Added "My Runs" and "Public Runs" sections for authenticated users, with private badge on owned runs
- RunDashboard.tsx: Added visibility toggle dropdown in settings, restricted edit controls to run owners
- NewRun.tsx: Added visibility selector during run creation
Backend
- Created
scripts/assign_unowned_runs.pyadmin script to migrate existing unowned runs to a user
Notes
- The backend already supported auto-assigning
owner_idon run creation (from blocking bean) - Unowned runs (legacy) remain editable by anyone for backwards compatibility