Role-prioritized navigation redesignVolleyball Elite Academy — Development Update • May 9, 2026
--- title: Role-prioritized navigation redesign ---
Role-prioritized navigation redesign
What & Why
Today the sidebar is driven by a single bucket (superadmin / coordinator / coach / athlete / referee / boardmember / public) chosen by in . That bucket is too coarse for what the academy actually needs:
- Coaches at every academy level ( through ) see the same menu, even though an Intern shouldn't be running Coach Reports or Skill Evaluations.
- A coach assigned to a specific event ("session coach" — before, during, or after) gets no event-aware shortcuts; they navigate the same way as an unassigned coach.
- ~13 fully-built pages (academy coach levels, coach getting started, coach evaluation, development profile/report, analytics dashboard, launch readiness, season calendar, lesson invite response, alumni wall, newsroom, community sub-pages, sof-admin direct entry, tryout flow) exist but are not in any sidebar — users only reach them by deep-link.
- "Volleyball community (not academy)" has no distinct navigation persona; non-academy community members fall into the generic bucket.
- SuperAdmin has no UI to grant a specific coach access to a higher-tier nav item ahead of their level — important right now because effectively only the SuperAdmin is a "ready" coach and exceptions need to be easy.
This task redesigns the navigation so it is prioritized by persona (Academy Member first → SuperAdmin → Coaches → Parents/Athletes → Volleyball Community), progressive by coach level with per-coach SuperAdmin overrides, and event-aware when a coach has an active assignment.
Done looks like
- The sidebar's persona/bucket decision is driven by a new hook that returns the highest-priority persona for the current user (SuperAdmin → Coordinator → Coach[level] → Parent → Athlete → Referee → BoardMember/Bookkeeper → CommunityMember → Public).
- Coach navigation items are gated by academy coach level, not just "is coach":
- : Coach Portal, My Teams, Coach Getting Started, Coach Directory, Penny Coach, Development Profile. - : adds Skill Evaluations / Evaluate Athletes, Coach Evaluation (own), Athlete Summary access for their assigned athletes. - : adds SOF coach session entry points, Coach Reports ( filtered to own), Tryout Evaluation, Session Plan tools. - / : adds full Coach Reports cross-coach view, Academy Coach Levels (review/approve other coaches' applications), Development Reports for mentees, Communication Hub coach-scoped surfaces.
- A SuperAdmin-only "Nav overrides" panel under (or a sibling tab) lets a SuperAdmin grant a specific coach access to one or more nav items above their default level. Overrides are stored per-(personId, navItemKey) and read by .
- A coach assigned to an active event (any role with whose event window covers ) sees an additional "Active event" sidebar group with the event-day tools (Check-in, SOF Session, Athlete Ratings, Homework, Session Summary, Parent Feedback Inbox, Penny in-event). Outside that window the group hides automatically.
- All previously-orphaned pages from §3 of the audit are slotted into the right persona's sidebar:
- Coach: Coach Getting Started, Coach Evaluation, Development Profile/Report, Academy Coach Levels (own application; admin review variant for Head Coaches+), Tryout Dashboard. - SuperAdmin: Analytics Dashboard, Launch Readiness, Season Calendar (top-level, not just Command Center deep-link). - Athlete: Lesson Invite Response (when invites pending), Alumni Wall. - Community persona: Newsroom, Alumni Wall, Community Directory, Community Connections, Marketplace, Coach Directory, Academy Store, Public Events.
- A new CommunityMember persona is introduced for authenticated users with no Academy role (Volunteer, Supporter, claimed-only community profile). Their sidebar focuses on Community Portal, Directory, Connections, Marketplace, Newsroom, Alumni Wall, Bulletin Board, Store, public Events, Penny Coach (limited), and Help Center — and excludes academy-internal items.
- The existing continues to work: a SuperAdmin previewing as Intern_L1 sees the Intern_L1 sidebar exactly, including any nav overrides simulated for a sample coach.
- Every nav item is registered in one declarative array (key, label, route, icon, personas, minCoachLevel, requiresActiveEvent, requiresOverrideKey) so the sidebar render is a pure filter over the registry — no more per-bucket arrays drifting apart.
- Navigation behaves identically on the Academy domain and the League domain (each entry declares which domains it shows on, replacing today's / per-item flags).
Out of scope
- Building the Categories management UI (separate gap; will be its own task if you want it).
- Building a dedicated Session Plan authoring tool (separate gap).
- Embedding Penny inside the live event console as a chat surface (the nav entry is added; the in-event embed is separate).
- Adding "Session Coach" as a new role in — per your direction, session-coach is derived from existing event-scoped , not a new role.
- Changing the actual permission checks inside each page; this task only changes what shows up in the sidebar. Page-level guards stay where they are.
- Migrating the Command Center tab structure; only its sidebar shortcuts change.
Steps
1. Nav registry + persona hook — Introduce a single declarative array and a hook that resolves the highest-priority persona for the current user. Replace the per-bucket arrays in with one filter pass over the registry. Existing routes and pages are unchanged. 2. Coach-level gating — Extend (or add a sibling hook) to expose the user's . Gate coach nav items in the registry with a field that ladders Intern → Assistant → Head Coach → Assistant Head Coach → Academy Head Coach. 3. SuperAdmin nav overrides — Add a new table (personId, navItemKey, grantedByPersonId, grantedAt, note) plus storage CRUD, a SuperAdmin-only API, and a "Nav overrides" UI section inside the Staffing tab of Command Center. Wire to honor the overrides. 4. Event-aware "Active event" group — Compute the current user's active event assignments (scopeType=EVENT, event window ±24h) and conditionally render an "Active event" sidebar group with event-day tool shortcuts. Hide automatically outside the window. 5. Slot orphaned pages into the right personas — Add the ~13 orphaned pages to the registry under the correct persona (coach, superadmin, athlete, or community), so they stop being deep-link-only. 6. CommunityMember persona — Introduce a new persona for authenticated non-academy users (Volunteer, Supporter, claimed-only community profile) with a community-focused sidebar; exclude academy-internal items. 7. Role-preview parity — Ensure honors the new persona/level/override resolution end-to-end so SuperAdmin "preview as Intern" matches what an Intern actually sees, including a way to preview as a coach with sample overrides applied. 8. Tests — Unit tests for (each persona resolves correctly, overrides apply, level laddering works), component tests for (renders the right items per persona/level), and one e2e spec that walks SuperAdmin → grant override to a sample Intern → preview as that Intern → confirm the higher-tier item appears.
Relevant files
- - - - - - - - - - - -
|
No comments:
Post a Comment