Feature: admin UI to mark players as public for /teams page #111

Open
opened 2026-03-27 06:36:32 +00:00 by forgejo_admin · 4 comments

Type

Feature

Lineage

Standalone — discovered after basketball-api migration fix. /public/teams returns empty because no players have is_public=True.

Repo

forgejo_admin/westside-app

User Story

As an admin (Marcus)
I want to toggle which players appear on the public teams page
So that I control who is visible to prospects and the public

Context

Migration 024 added is_public boolean to players (defaults to False). The /public/teams endpoint filters by is_public=True and excludes teams with zero public players. Currently 78 players, 0 marked public. The /teams page on the landing site shows "No Kings teams available yet."

Marcus needs an admin UI to bulk-toggle player visibility. Until then, the /teams page is empty.

File Targets

Files the agent should modify:

  • src/routes/(app)/admin/players/+page.svelte — add is_public toggle column
  • basketball-api/src/basketball_api/routes/admin.py — add PATCH endpoint for is_public

Files the agent should NOT touch:

  • /public/teams endpoint — already works correctly with is_public filter
  • Player registration flow — is_public defaults to false, which is correct

Acceptance Criteria

  • Admin players page shows is_public toggle per player
  • Toggling updates the player's is_public status via API
  • /public/teams returns teams with public players after toggling
  • Bulk toggle option (mark all players on a team as public)

Test Expectations

  • Manual: toggle a player public, verify /public/teams includes them
  • Manual: toggle a player private, verify they disappear from /public/teams
  • Run command: curl -s https://basketball-api.tail5b443a.ts.net/public/teams | python3 -m json.tool

Constraints

  • Admin-only — requires authentication
  • Default is_public=False is correct (privacy by default)
  • Playground design first — this is an (app) route, needs westside-app-playground prototype

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • project-westside-basketball
  • basketball-api#183 — migration that added is_public field
### Type Feature ### Lineage Standalone — discovered after basketball-api migration fix. /public/teams returns empty because no players have `is_public=True`. ### Repo `forgejo_admin/westside-app` ### User Story As an admin (Marcus) I want to toggle which players appear on the public teams page So that I control who is visible to prospects and the public ### Context Migration 024 added `is_public` boolean to players (defaults to False). The `/public/teams` endpoint filters by `is_public=True` and excludes teams with zero public players. Currently 78 players, 0 marked public. The /teams page on the landing site shows "No Kings teams available yet." Marcus needs an admin UI to bulk-toggle player visibility. Until then, the /teams page is empty. ### File Targets Files the agent should modify: - `src/routes/(app)/admin/players/+page.svelte` — add is_public toggle column - `basketball-api/src/basketball_api/routes/admin.py` — add PATCH endpoint for is_public Files the agent should NOT touch: - `/public/teams` endpoint — already works correctly with is_public filter - Player registration flow — is_public defaults to false, which is correct ### Acceptance Criteria - [ ] Admin players page shows is_public toggle per player - [ ] Toggling updates the player's is_public status via API - [ ] /public/teams returns teams with public players after toggling - [ ] Bulk toggle option (mark all players on a team as public) ### Test Expectations - [ ] Manual: toggle a player public, verify /public/teams includes them - [ ] Manual: toggle a player private, verify they disappear from /public/teams - Run command: `curl -s https://basketball-api.tail5b443a.ts.net/public/teams | python3 -m json.tool` ### Constraints - Admin-only — requires authentication - Default is_public=False is correct (privacy by default) - Playground design first — this is an (app) route, needs `westside-app-playground` prototype ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `project-westside-basketball` - `basketball-api#183` — migration that added is_public field
Author
Owner

Scope Review: NEEDS_REFINEMENT

Review note: review-455-2026-03-26
Cross-repo scope needs splitting; Related section references wrong issue.

  • Split cross-repo scope: basketball-api PATCH endpoint needs its own Forgejo issue on forgejo_admin/basketball-api. This issue (#111) should be frontend-only with a depends: reference.
  • Fix Related reference: basketball-api#183 is cited as the is_public migration but is actually "Bug: CrashLoopBackOff." The actual migration is revision 024 (024_add_is_public_to_players.py).
  • Add automated test expectations: The basketball-api issue should include pytest command for the new PATCH endpoint.
## Scope Review: NEEDS_REFINEMENT Review note: `review-455-2026-03-26` Cross-repo scope needs splitting; Related section references wrong issue. - **Split cross-repo scope**: basketball-api PATCH endpoint needs its own Forgejo issue on `forgejo_admin/basketball-api`. This issue (#111) should be frontend-only with a `depends:` reference. - **Fix Related reference**: `basketball-api#183` is cited as the is_public migration but is actually "Bug: CrashLoopBackOff." The actual migration is revision 024 (`024_add_is_public_to_players.py`). - **Add automated test expectations**: The basketball-api issue should include pytest command for the new PATCH endpoint.
Author
Owner

Refinement (post review-455)

Addressed findings:

  1. Cross-repo split. Creating separate basketball-api issue for the PATCH endpoint. This ticket (#111) is frontend-only — scoped to westside-app admin players page. Depends on the API ticket.

  2. Wrong Related reference fixed. Was: basketball-api#183 (CrashLoopBackOff). Should reference: migration 024 (024_add_is_public_to_players.py) which added the is_public column.

  3. Playground-first constraint. This is an (app) route — needs westside-app-playground prototype before code. Labeled scope:playground-first.

Updated scope (frontend only)

  • src/routes/(app)/admin/players/+page.svelte — add is_public toggle per player
  • Depends on: basketball-api PATCH endpoint (separate ticket, TBD)
  • Playground design must be approved before implementation

Status: READY (but depends on API ticket + playground design)

## Refinement (post review-455) ### Addressed findings: 1. **Cross-repo split.** Creating separate `basketball-api` issue for the PATCH endpoint. This ticket (#111) is frontend-only — scoped to `westside-app` admin players page. Depends on the API ticket. 2. **Wrong Related reference fixed.** Was: `basketball-api#183` (CrashLoopBackOff). Should reference: migration 024 (`024_add_is_public_to_players.py`) which added the `is_public` column. 3. **Playground-first constraint.** This is an `(app)` route — needs `westside-app-playground` prototype before code. Labeled `scope:playground-first`. ### Updated scope (frontend only) - `src/routes/(app)/admin/players/+page.svelte` — add is_public toggle per player - Depends on: basketball-api PATCH endpoint (separate ticket, TBD) - Playground design must be approved before implementation ### Status: READY (but depends on API ticket + playground design)
Author
Owner

Scope Review: NEEDS_REFINEMENT

Review note: review-455-2026-03-27
Board item #455 is stale — this issue has been superseded by the refined split.

  • Issue #111 superseded: The cross-repo split produced westside-app#122 (frontend, board #467, in_progress) and basketball-api#189 (backend, closed/merged). This ticket (#111) is no longer the active spec.
  • Recommend closing #111 as superseded by #122. Board item #455 should be removed — active work is on #467.
  • Prior findings still open on #111 body: Related section still references basketball-api#183 (CrashLoopBackOff) instead of migration 024. Moot if #111 is closed.
## Scope Review: NEEDS_REFINEMENT Review note: `review-455-2026-03-27` Board item #455 is stale — this issue has been superseded by the refined split. - **Issue #111 superseded**: The cross-repo split produced `westside-app#122` (frontend, board #467, in_progress) and `basketball-api#189` (backend, closed/merged). This ticket (#111) is no longer the active spec. - **Recommend closing #111** as superseded by #122. Board item #455 should be removed — active work is on #467. - **Prior findings still open on #111 body**: Related section still references `basketball-api#183` (CrashLoopBackOff) instead of migration 024. Moot if #111 is closed.
Author
Owner

Closing — Superseded

Scope review (review-455-2026-03-27) found this ticket has been superseded:

  • westside-app#122 — frontend is_public toggle (board item #467, in_progress)
  • basketball-api#189 — PATCH visibility endpoint (already closed/merged)

The refined split covers all scope from this ticket. Closing as superseded.

## Closing — Superseded Scope review (`review-455-2026-03-27`) found this ticket has been superseded: - `westside-app#122` — frontend is_public toggle (board item #467, in_progress) - `basketball-api#189` — PATCH visibility endpoint (already closed/merged) The refined split covers all scope from this ticket. Closing as superseded.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/westside-landing#111
No description provided.