Skip to content

feat(events): per-track event logistics, per-track roles, and the rebuilt assignments board - #102

Merged
ethnjs merged 87 commits into
mainfrom
feat/event-logistics
Oct 5, 2026
Merged

ethnjs merged 87 commits into
mainfrom
feat/event-logistics

Conversation

@ethnjs

@ethnjs ethnjs commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

  1. Event location and staffing are per track: each event records its building, floor, rooms and per-role staffing needs separately for every track (day) it runs on.
  2. Tournaments get a buildings catalog and zones (backend only; the buildings page is split out to feat/buildings-and-zones).
  3. Roles are held per track: a member can hold a role tournament-wide or only on specific tracks, and staffing assignments sit on the same table.
  4. The assignments board is rebuilt around per-track tabs and per-track event sections with staffing progress.
  5. The events table gains per-track columns, chained sorting shared with the board, and click-a-row to open the panel.

What changed

Backend

Models and migrations

alembic upgrade head required — 3 revisions plus 2 empty merges.

  • New tournament_buildings and tournament_building_tracks; each building is tagged with the tracks it is used on. (6a3b32e96e8c)
  • tournament_event_tracks gains building_id, floor and rooms; existing free-text building names are backfilled into the catalog and copied onto every track of the event.
  • Destroys data: tournament_events.volunteers_needed is dropped, not migrated, because it names no role. TDs re-enter staffing as per-role needs. The downgrade cannot restore it.
  • tournament_events.building, room and floor are dropped after the backfill above.
  • New tournament_event_staffing_needs (per event, track and role) and tournament_zones, tournament_zone_members.
  • New tournament_track_assignments replaces tournament_membership_roles, tournament_event_assignments and tournament_zone_assignments. (9beadc61ad5a)
  • The migration moves every existing role and assignment across, verifies with RAISE EXCEPTION that no member lost a role or permission, and only then drops the three old tables.
  • It first repairs events that hold a shift or staffing on a track they aren't linked to, which the new composite FKs would otherwise reject.
  • Shift labels must be unique per track; existing duplicates are renamed Label (2), (3)… oldest first. (5b5c2f46ad06)
  • 5aac03cebf88 and 90c29492df5b are empty merges with main's heads. They exist so preview databases already at 5aac upgrade without manual stamping.

Schemas and routes

  • New /tournaments/{id}/buildings/ (list, create, patch, delete) and /tournaments/{id}/zones/ (coverage list, create, patch, delete).
  • Event create/update take track_details (per-track building_id, floor, rooms, needs) instead of building, room, floor, volunteers_needed and track_ids.
  • Event reads return track_details with building_name and each need's role_label.
  • Roster roles become MemberRoleRead, adding is_tournament_wide and track_ids.
  • Building schema requires every building to be on at least one track.

Logic

  • Roles and permissions are derived from track assignments; every route that read the old tables is repointed.
  • Zones store rules (building, floor or event) and resolve to events; partial unique indexes keep at most one zone per track claiming the same thing.
  • Simple vs advanced mode is derived from track count.

Seeding

  • seed_members creates the accounts it needs (--create N, a target count) instead of requiring them first.
  • Breaking CLI: --seed is renamed --rng-seed.

Frontend

Events

  • Per-track time, location and staffing columns, chosen per track as chips.
  • Inline editing for name, division, type, tracks, shifts, building/rooms and staffing needs, with keyboard navigation between cells.
  • Sorting by a chain of keys, shared with the assignments board.
  • Clicking a row opens the event panel; the edit/expand buttons are gone.
  • The event panel and mass editor edit location and staffing per track; buildings can be created inline from the picker.

Assignments board

  • Per-track tabs, each with its own default filters.
  • Event rows broken out by track with staffing progress and editable default roles.
  • Drag fixes: per-track bar identity, cursor-pinned drag chip, scrolling whatever is under the cursor.
  • An event's panel opens from its name, stacked over the member panel.
  • Split into components under components/tournament/assignments/.

Members and roles

  • Role chips show where a role is held and set its scope through a pill menu.
  • Mass role changes are staged as badges with the scope pill.

Shared UI

  • Breaking for imports: Toggle is renamed Switch.
  • New CheckboxRow owns checklist row geometry; CheckboxList is compact by default and passes badge through.
  • FilterModal backs the member filter; Filter becomes a split button with clear-filters.
  • Tables scroll sideways when columns don't fit; tab strips scroll to keep the active tab visible.
  • Page headers fold into the topbar on events and assignments.

Not in this PR

  • The buildings and zones page: feat/buildings-and-zones.
  • Event, shifts, member table upgrades.

ethnjs added 30 commits October 4, 2026 19:51
ethnjs added 23 commits October 4, 2026 19:54
… and building on board rows and in the event panel
@ethnjs ethnjs linked an issue Oct 5, 2026 that may be closed by this pull request
@vercel

vercel Bot commented Oct 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nexus Ready Ready Preview Oct 5, 2026 7:03am UTC

@ethnjs ethnjs linked an issue Oct 5, 2026 that may be closed by this pull request
@railway-app

railway-app Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the nexus-pr-102 environment in nexus

Service Status Web Updated
nexus ✅ Success (View Logs) Oct 5, 2026 at 7:04 am UTC

@railway-app
railway-app Bot temporarily deployed to nexus / nexus-pr-102 October 5, 2026 07:03 Destroyed
@ethnjs
ethnjs merged commit 576b01d into main Oct 5, 2026
3 of 4 checks passed

This branch was successfully deployed

1 active deployment
nexus / nexus-pr-102 — 4b8a997f Deployed Oct 5, 2026 by railway-app[bot]
Preview — 4b8a997f Deployed Oct 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: per-track role assignment and a unified track assignment table feat: per-track event logistics, buildings, and zones

1 participant