GRI-2072: left sub-menu per section; playlist tabs for Media/Devices/Settings #218
No reviewers
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!218
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/GRI-2072-panel-left-submenu-nav"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closes #210.
/settings), Campuses (/settings/campuses, read-only list — adding/editing one is #207), and Network / IP rules (/settings/network, merging in the old/ip-rulespage). A campus-scopedsettings_manageholder still sees just their own campus's playback default, with no menu to split it from./ip-rulesredirects into Settings. Eithersettings_manageordevices_approvenow reaches the Settings tab (each section inside still checks its own permission), where beforedevices_approvealone had no way back to IP rules once it stopped being a top-level tab./playlists/{id}, unchanged items/order/duration/page-override behaviour), Devices (/playlists/{id}/devices, the existing assignment form — unassigning is #209, live rollout status is a separate follow-up not wired into the UI yet), and Settings (/playlists/{id}/settings: rename via the existingupdate_playlistendpoint, campus shown read-only since the server has no route to move a playlist afterwards, and delete via the existingdelete_playlistendpoint).SectionNav/SectionLayout(src/SectionNav.tsx) is the one left-menu implementation both Settings and the playlist editor use — anavwitharia-current="page"on the active entry.Test plan
npm run check(prettier, oxlint, tsc, vitest) — all green, 66/66 tests.scripts/local-gates.sh --frontend-only— every gate passes, including the frontend production build.role="status"/role="alert"+ retry)./settings/campuses,/settings/network,/playlists/{id}/devices,/playlists/{id}/settingsin tests — each renders directly from the URL, matching the acceptance criterion that a reload keeps the tab.gx-sectionnav before merge.One regression; the rest is good (merges clean with dev after #212, no old product name left, PATCH /playlists/{id} exists on the server, New playlist is a dialog as agreed).
Campus-scoped users lose IP rules. On dev,
/ip-rulesneeds onlydevices_approveand has no campus check, and the server serves campus users too:list_ip_rulesfiltersauto_approvebycurrent.may_access(rule.campus_id)(crates/server/src/devices/handlers.rs:381). InSettingsSectionScreen.tsx:if (canManagePlayback && user.campusId) return <CampusSettingsScreen …/>returns before any menu, so a campus user withsettings_manageanddevices_approvecan no longer reach IP rules at all.isGlobal, so a campus user with onlydevices_approvegets the Settings tab in the top bar (DashboardScreen allows it) and an empty page with an empty menu./ip-rulesredirects them there too.Fix: for campus users, show a menu with Playback defaults (CampusSettingsScreen, if
settings_manage) and IP rules (ifdevices_approve). Global-only network config can stay global-only. Add a test for each of the two cases above, and one asserting that the Settings tab never renders an empty menu.Fixed:
SettingsSectionScreenno longer returnsCampusSettingsScreenearly when the user also holdsdevices_approve— that case now gets a menu (Playback defaults + IP rules). A campus user with onlydevices_approvenow gets a menu with just IP rules instead of an empty page gated onisGlobal;NetworkSettingsTabgetscanManageNetwork={canManagePlayback && isGlobal}so the network-config fields stay global-only. Added the two requested tests plus one asserting the menu is never empty for a campus devices_approve holder (all three pass).Merged
origin/dev(brings in #212 and #215) — clean, no conflicts.Verified:
npm run check(68/68 tests) andscripts/local-gates.sh --frontend-onlyboth pass. Pushed as350247f.57ee74bfixes both cases: a campus user with settings_manage + devices_approve keeps IP rules, and a campus approver-only user gets an IP rules menu instead of an empty page. The network fields stay global-only. Both have tests. Approved on350247fe.