Skip to content

feat: surface inactive band profiles in the admin roster#621

Merged
BreakableHoodie merged 1 commit into
mainfrom
feat/619-admin-inactive-bands
Jul 17, 2026
Merged

feat: surface inactive band profiles in the admin roster#621
BreakableHoodie merged 1 commit into
mainfrom
feat/619-admin-inactive-bands

Conversation

@BreakableHoodie

Copy link
Copy Markdown
Owner

Summary

Deactivated band profiles (The Essential Letdowns, retired after their Jan 30 farewell show) were completely invisible in the admin roster — the all-bands query filtered is_active = 1, so the tool that manages profiles couldn't see or edit retired ones, while the public archive correctly kept them. The roster now returns all profiles: inactive bands render with an "Inactive" badge and an All/Active/Inactive filter (defaulting to All) sits next to the search box. Last member of the #618 visibility-drift bug class.

Closes #619

What changed

File Change
functions/api/admin/bands.js No-event_id branch: is_active = 1 filter dropped (rows already carry bp.is_active); #618 comment updated. event_id branch untouched
frontend/src/admin/RosterTab.jsx Inactive badge (reuses the Status column's existing pill styling) on desktop rows + mobile cards; status filter select (All/Active/Inactive, default All); filter applies before search/sort
frontend/src/admin/LineupTab.jsx Deliberate scope addition: the same API branch feeds the lineup builder's ArtistPicker — without this, retired bands would have become schedulable options (the regression the old server-side filter was protecting against, pinned by a pre-existing #395 test). An activeBands memo filters them out of the picker; origin/genre autocomplete suggestions intentionally keep the full set (reusing a retired band's origin string is harmless)
functions/api/admin/bands/__tests__/bands.test.js The two exclusion-asserting tests (from #620 and #395) now assert inclusion with is_active flags; the #395 test documents that the picker guarantee moved client-side
frontend/src/admin/__tests__/RosterTab.test.jsx New (first admin-tab component test): badge renders, All shows inactive, Active hides, Inactive isolates

Edit-modal round-trip for is_active verified pre-existing and correct (BandForm's Active/Inactive select + the archived-event PUT test).

Security / correctness notes

Admin-only endpoint behind checkPermission("viewer"), unchanged. The one correctness risk (retired bands becoming schedulable) is handled and called out above — reviewers, that LineupTab memo is the line to scrutinize.

Verification

  • Tests: backend 755 pass | 6 todo (74 files), bands suite 136 pass; frontend 522 pass (51 files) incl. 3 new RosterTab tests
  • ESLint: 0 errors both stacks
  • Format check: clean both stacks
  • Build: green
  • validate:openapi: n/a — admin endpoint, response field-compatible
  • Manual smoke: covered by component tests (badge/filter render paths) + existing PUT round-trip test; visual check on next admin session — Essential Letdowns should appear with an Inactive badge

Built by Sonny · Reviewed by Theo · 🤖 Claude Code

Deactivated profiles (e.g. a band retired after a farewell show) were
invisible in the very tool that manages them — the admin all-bands
query filtered is_active = 1 while the public archive kept showing
them. The roster now returns all profiles; RosterTab renders an
Inactive badge and gains an All/Active/Inactive filter (default All).
The lineup builder's artist picker filters retired bands back out
client-side so they never become schedulable options.

Closes #619

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@BreakableHoodie BreakableHoodie added the enhancement New feature or request label Jul 17, 2026
Copilot AI review requested due to automatic review settings July 17, 2026 14:24
@BreakableHoodie BreakableHoodie added priority:p3 Lower priority enhancement New feature or request labels Jul 17, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@BreakableHoodie
BreakableHoodie enabled auto-merge (squash) July 17, 2026 14:24
@BreakableHoodie
BreakableHoodie merged commit 5316df4 into main Jul 17, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority:p3 Lower priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(admin): surface inactive band profiles in the roster (badge + filter) instead of hiding them

2 participants