GRI-2143: notification stack — IP rules, users, playlist save, playback default #282

Merged
vivy merged 2 commits from feature/GRI-2143-notification-stack-part2 into dev 2026-11-16 11:28:55 +00:00
Member

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 the
    stack. "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 PlaylistSettingsTab sibling tab.
  • PlaybackSettingsTab — the global default-duration Save. The initial
    load 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, which
    previously had no error handling at all (an unhandled rejection on
    failure). Add keeps its inline error, same convention as above.

NetworkSettingsTab is intentionally left out of this PR. Its Save and
its multi-step restart currently share one inline notice/error pair, and
the existing NetworkSettingsTab.test.tsx exercises 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 lingering
save toast and the restart-flow's own status) the moment restart starts,
which getByRole('status') cannot disambiguate — and I didn't want to edit
that 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 NotificationsProvider wrapper added
around their render() calls, now that IpRulesScreen/UsersScreen/
PlaybackSettingsTab read the context — no assertions changed, same approach
already used for MediaSectionScreen.test.tsx/SettingsSectionScreen.test.tsx
in #280. One of those, SettingsSectionScreen.test.tsx, had one render()
call that PR #280 missed (it renders IpRulesScreen as a tab), caught by
running the full suite here.

Test plan

  • scripts/local-gates.sh --frontend-only — prettier, oxlint, tsc, vitest
    (181/181), build: all green.
  • Reviewed each migrated action against the established inline-vs-toast
    convention already in the codebase (create-new-item forms stay inline;
    persistent save/edit/delete actions move to the stack).
  • Not visually verified in a browser (no browser tooling in this
    environment) — verified via the updated component tests and code review
    against the already-shipped NotificationToast/NotificationsProvider
    (tokens, prefers-reduced-motion, focus) from #280.
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 the stack. "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 `PlaylistSettingsTab` sibling tab. - `PlaybackSettingsTab` — the global default-duration **Save**. The initial load 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, which previously had no error handling at all (an unhandled rejection on failure). **Add** keeps its inline error, same convention as above. **`NetworkSettingsTab` is intentionally left out of this PR.** Its Save and its multi-step restart currently share one inline `notice`/`error` pair, and the existing `NetworkSettingsTab.test.tsx` exercises 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 lingering save toast and the restart-flow's own status) the moment restart starts, which `getByRole('status')` cannot disambiguate — and I didn't want to edit that 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 `NotificationsProvider` wrapper added around their `render()` calls, now that `IpRulesScreen`/`UsersScreen`/ `PlaybackSettingsTab` read the context — no assertions changed, same approach already used for `MediaSectionScreen.test.tsx`/`SettingsSectionScreen.test.tsx` in #280. One of those, `SettingsSectionScreen.test.tsx`, had one `render()` call that PR #280 missed (it renders `IpRulesScreen` as a tab), caught by running the full suite here. ## Test plan - [x] `scripts/local-gates.sh --frontend-only` — prettier, oxlint, tsc, vitest (181/181), build: all green. - [x] Reviewed each migrated action against the established inline-vs-toast convention already in the codebase (create-new-item forms stay inline; persistent save/edit/delete actions move to the stack). - Not visually verified in a browser (no browser tooling in this environment) — verified via the updated component tests and code review against the already-shipped `NotificationToast`/`NotificationsProvider` (tokens, `prefers-reduced-motion`, focus) from #280.
GRI-2143: move IP rules, users, playlist Save and playback default onto the notification stack
All checks were successful
CI / the pre-push hook (pull_request) Successful in 4s
CI / cargo fmt (pull_request) Successful in 4s
CI / install.sh client upgrade (pull_request) Successful in 13s
CI / cargo deny (pull_request) Successful in 21s
CI / cargo deny advisories (pull_request) Successful in 17s
CI / cargo clippy (pull_request) Successful in 1m6s
CI / repository boundary (pull_request) Successful in 4s
CI / frontend-web (pull_request) Successful in 56s
CI / cargo test (pull_request) Successful in 3m36s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 3s
c8f21bedc3
Delete and edit/password-set on UsersScreen, Save on PlaylistMediaTab
and PlaybackSettingsTab, and remove on IpRulesScreen now report through
the panel-wide notification stack (#279) instead of a local inline
error/notice, matching the pattern already used for devices and media.
Create-new-item forms (add user, add IP rule) keep their inline,
closable error next to the field, matching the existing convention for
that case elsewhere in the panel.

NetworkSettingsTab is left as is: its Save and its multi-step restart
share one inline status/error pair by design, and splitting the first
into a toast risks two simultaneous status announcements once a
restart follows closely behind a save.
vivy approved these changes 2026-11-16 11:08:18 +00:00
vivy left a comment

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.

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.
Merge branch 'dev' into feature/GRI-2143-notification-stack-part2
All checks were successful
CI / the pre-push hook (pull_request) Successful in 3s
CI / install.sh client upgrade (pull_request) Successful in 16s
CI / cargo fmt (pull_request) Successful in 5s
CI / cargo clippy (pull_request) Successful in 1m33s
CI / cargo deny (pull_request) Successful in 18s
CI / cargo deny advisories (pull_request) Successful in 23s
CI / repository boundary (pull_request) Successful in 5s
CI / frontend-web (pull_request) Successful in 1m10s
CI / cargo test (pull_request) Successful in 3m53s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 1s
1d94ba24b0
vivy merged commit d640444830 into dev 2026-11-16 11:28:55 +00:00
vivy deleted branch feature/GRI-2143-notification-stack-part2 2026-11-16 11:28:56 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grimoirix/grimoire-of-digital-signage!282
No description provided.