GRI-2108: dismissible, self-closing error notes in the panel #241

Merged
vivy merged 4 commits from fix/GRI-2108-panel-error-dismiss into dev 2026-11-15 20:41:56 +00:00
Member

Summary

  • Add a shared DismissibleError component (frontend-web/src/components/DismissibleError.tsx): close button, a 10s auto-dismiss timer (ERROR_AUTO_DISMISS_MS, one constant), pauses while the pointer is on it, text stays selectable.
  • Wire it into every transient action/save/delete error note in the panel, starting with MediaScreen's upload and add-by-URL errors (the ones named in the campus test report, GRI-2051).
  • Clearing on the next action was already handled by the existing setError(null) calls at the start of each handler; unmounting on navigation clears it too; nothing needed to change there.

Deliberately left unchanged, as a different kind of message than the one reported:

  • the full-page "could not load, Retry" states (load.kind === 'error') — there is nothing else on screen for a close button to reveal;
  • the delete-conflict confirm dialog in MediaScreen (role="alertdialog") — an interactive dialog, not a passive notice;
  • AddFromLibraryDialog's page-range error — live validation tied to the current input, not a lingering result of a past action;
  • DashboardScreen's "you don't have access to this page" notice — not an error, and already gone the moment navigation changes.

Test plan

  • frontend-web/src/components/DismissibleError.test.tsx: close button, auto-dismiss timer, hover pauses it and it resumes on leave, text stays selectable.
  • frontend-web/src/screens/MediaScreen.test.tsx: two new tests — closing an upload error with its button, and a new upload clearing a stale one ("new action" case).
  • scripts/local-gates.sh --frontend-only: prettier, oxlint, tsc, vitest (102 tests) and the production build all pass.
## Summary - Add a shared `DismissibleError` component (`frontend-web/src/components/DismissibleError.tsx`): close button, a 10s auto-dismiss timer (`ERROR_AUTO_DISMISS_MS`, one constant), pauses while the pointer is on it, text stays selectable. - Wire it into every transient action/save/delete error note in the panel, starting with MediaScreen's upload and add-by-URL errors (the ones named in the campus test report, GRI-2051). - Clearing on the next action was already handled by the existing `setError(null)` calls at the start of each handler; unmounting on navigation clears it too; nothing needed to change there. **Deliberately left unchanged**, as a different kind of message than the one reported: - the full-page "could not load, Retry" states (`load.kind === 'error'`) — there is nothing else on screen for a close button to reveal; - the delete-conflict confirm dialog in MediaScreen (`role="alertdialog"`) — an interactive dialog, not a passive notice; - `AddFromLibraryDialog`'s page-range error — live validation tied to the current input, not a lingering result of a past action; - `DashboardScreen`'s "you don't have access to this page" notice — not an error, and already gone the moment navigation changes. ## Test plan - `frontend-web/src/components/DismissibleError.test.tsx`: close button, auto-dismiss timer, hover pauses it and it resumes on leave, text stays selectable. - `frontend-web/src/screens/MediaScreen.test.tsx`: two new tests — closing an upload error with its button, and a new upload clearing a stale one ("new action" case). - `scripts/local-gates.sh --frontend-only`: prettier, oxlint, tsc, vitest (102 tests) and the production build all pass.
Add a shared DismissibleError component: a close button, a 10s
auto-dismiss timer that pauses while the pointer is on it, and
selectable text. Wire it into MediaScreen's upload and add-by-URL
errors, the ones named in the campus test report. Clearing on the
next action was already handled by the existing setError(null) calls
at the start of each handler; unmounting on navigation clears it too.
GRI-2108: adopt DismissibleError across the rest of the panel's transient error notes
All checks were successful
CI / the pre-push hook (pull_request) Successful in 5s
CI / install.sh client upgrade (pull_request) Successful in 11s
CI / cargo fmt (pull_request) Successful in 5s
CI / cargo deny (pull_request) Successful in 21s
CI / cargo deny advisories (pull_request) Successful in 23s
CI / cargo clippy (pull_request) Successful in 1m35s
CI / repository boundary (pull_request) Successful in 4s
CI / frontend-web (pull_request) Successful in 1m3s
CI / cargo test (pull_request) Successful in 2m44s
CI / CI (pull_request) Successful in 2s
CI / Notify gate failed (pull_request) Has been skipped
d1b91e134a
Every transient action/save/delete error note (not the full-page
load-failure states, which have no other controls to cover, and not
AddFromLibraryDialog's live range validation, which tracks the current
input) now closes by its button, its timer, or the next action, the
same as the media screen.
vivy approved these changes 2026-11-15 18:28:15 +00:00
Dismissed
vivy left a comment

Approved. One shared component, timer pause/resume is correct (cleanup subtracts elapsed time before the reset effect runs on a new message), and the close button is not a red button, so it does not conflict with the #235 rule. Note: #237 touches DevicesScreen and PlaylistsScreen too, so whichever lands second has a small rebase.

Approved. One shared component, timer pause/resume is correct (cleanup subtracts elapsed time before the reset effect runs on a new message), and the close button is not a red button, so it does not conflict with the #235 rule. Note: #237 touches DevicesScreen and PlaylistsScreen too, so whichever lands second has a small rebase.
Owner

My approval stands, but the forge cannot update this branch: it now conflicts with dev in frontend-web/src/screens/DevicesScreen.tsx (the campus assignment from #238 is in dev now). Please merge origin/dev, resolve that file, run npm test, and push. I merge it when CI is green.

My approval stands, but the forge cannot update this branch: it now conflicts with dev in frontend-web/src/screens/DevicesScreen.tsx (the campus assignment from #238 is in dev now). Please merge origin/dev, resolve that file, run npm test, and push. I merge it when CI is green.
Merge remote-tracking branch 'origin/dev' into fix/GRI-2108-panel-error-dismiss
All checks were successful
CI / the pre-push hook (pull_request) Successful in 5s
CI / install.sh client upgrade (pull_request) Successful in 11s
CI / cargo fmt (pull_request) Successful in 6s
CI / cargo deny (pull_request) Successful in 20s
CI / cargo deny advisories (pull_request) Successful in 22s
CI / cargo clippy (pull_request) Successful in 1m40s
CI / repository boundary (pull_request) Successful in 5s
CI / frontend-web (pull_request) Successful in 1m20s
CI / cargo test (pull_request) Successful in 4m17s
CI / CI (pull_request) Successful in 1s
CI / Notify gate failed (pull_request) Has been skipped
9f48a718b7
# Conflicts:
#	frontend-web/src/screens/DevicesScreen.tsx
prismancer dismissed vivy's review 2026-11-15 19:21:05 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

vivy approved these changes 2026-11-15 19:57:26 +00:00
vivy left a comment

Re-approved on the live head 9f48a71. The only change since my approval on d1b91e1 is the merge of dev. CI is green. Note for #237 (also yours): it conflicts with this branch in DevicesScreen.tsx (the action error note). Merge dev into #237 after this one lands.

Re-approved on the live head 9f48a71. The only change since my approval on d1b91e1 is the merge of dev. CI is green. Note for #237 (also yours): it conflicts with this branch in DevicesScreen.tsx (the action error note). Merge dev into #237 after this one lands.
Owner

Ready to merge, but the forge needs the branch current: 4 commits behind dev. Merge origin/dev, push, and it merges on green CI.

Ready to merge, but the forge needs the branch current: 4 commits behind dev. Merge origin/dev, push, and it merges on green CI.
Merge branch 'dev' into fix/GRI-2108-panel-error-dismiss
All checks were successful
CI / the pre-push hook (pull_request) Successful in 6s
CI / cargo fmt (pull_request) Successful in 4s
CI / install.sh client upgrade (pull_request) Successful in 8s
CI / cargo deny (pull_request) Successful in 35s
CI / cargo deny advisories (pull_request) Successful in 38s
CI / repository boundary (pull_request) Successful in 6s
CI / cargo clippy (pull_request) Successful in 1m28s
CI / frontend-web (pull_request) Successful in 1m3s
CI / cargo test (pull_request) Successful in 2m31s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 1s
f61571415e
vivy merged commit df90ccf66f into dev 2026-11-15 20:41:56 +00:00
vivy deleted branch fix/GRI-2108-panel-error-dismiss 2026-11-15 20:41:57 +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!241
No description provided.