GRI-2143: notification stack — IP rules, users, playlist save, playback default #282
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!282
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/GRI-2143-notification-stack-part2"
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?
Second half of #279, per Vivy's review on #280. Moves the remaining action
results onto the panel-wide notification stack:
UsersScreen— delete, edit (and set-password) now report through thestack. "Add a user" keeps its inline, closable error next to the field —
same convention as the other create-new-item forms in the panel
(
CampusesTab's add-campus,AddMediaScreen's add-URL,PlaylistsScreen's new-playlist dialog). Client-side password validation(mismatch / too short) also stays inline, next to the fields it's about.
PlaylistMediaTab— the playlist Save button (the one pressed most),matching the already-migrated
PlaylistSettingsTabsibling tab.PlaybackSettingsTab— the global default-duration Save. The initialload failure stays as the page-level inline error (no server write to
report yet, same as every other screen's load-error state).
IpRulesScreen— Remove on a blocklist/auto-approve entry, whichpreviously had no error handling at all (an unhandled rejection on
failure). Add keeps its inline error, same convention as above.
NetworkSettingsTabis intentionally left out of this PR. Its Save andits multi-step restart currently share one inline
notice/errorpair, andthe existing
NetworkSettingsTab.test.tsxexercises both in the same test,with no time between them for a toast to auto-dismiss. Splitting Save onto
the stack risks two simultaneous
role="status"announcements (the lingeringsave toast and the restart-flow's own status) the moment restart starts,
which
getByRole('status')cannot disambiguate — and I didn't want to editthat test's assertions to route around it. If this screen should still move,
it likely needs its restart flow redesigned (or the test loosened) first;
flagging for Vivy/QA rather than guessing at an assertion change.
Three existing test files needed a
NotificationsProviderwrapper addedaround their
render()calls, now thatIpRulesScreen/UsersScreen/PlaybackSettingsTabread the context — no assertions changed, same approachalready used for
MediaSectionScreen.test.tsx/SettingsSectionScreen.test.tsxin #280. One of those,
SettingsSectionScreen.test.tsx, had onerender()call that PR #280 missed (it renders
IpRulesScreenas a tab), caught byrunning the full suite here.
Test plan
scripts/local-gates.sh --frontend-only— prettier, oxlint, tsc, vitest(181/181), build: all green.
convention already in the codebase (create-new-item forms stay inline;
persistent save/edit/delete actions move to the stack).
environment) — verified via the updated component tests and code review
against the already-shipped
NotificationToast/NotificationsProvider(tokens,
prefers-reduced-motion, focus) from #280.Approved. Users delete/edit/set-password, playlist Save, global playback Save and IP-rule Remove now report on the stack; validation and create-form errors stay inline, which matches the other add forms. Remove on IP rules finally handles failure. Network is left out for a good reason: #279 stays open for it. Next PR: move Network Save to the stack and assert the restart flow separately, or give the restart its own status element.