Files
nuzlocke-tracker/.beans/archive/nuzlocke-tracker-k1l1--run-ownership-assignment-and-visibility-toggle.md
Julian Tabel a6cb309b8b
All checks were successful
CI / backend-tests (push) Successful in 28s
CI / frontend-tests (push) Successful in 28s
chore: archive 42 completed/scrapped beans
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 21:31:23 +01:00

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
nuzlocke-tracker-b311
nuzlocke-tracker-bnhh
nuzlocke-tracker-l9xh

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 NuzlockeRun type to include visibility (public/private) and owner fields
  • Updated CreateRunInput and UpdateRunInput to 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.py admin script to migrate existing unowned runs to a user

Notes

  • The backend already supported auto-assigning owner_id on run creation (from blocking bean)
  • Unowned runs (legacy) remain editable by anyone for backwards compatibility