GRI-2108: dismissible, self-closing error notes in the panel #241
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!241
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/GRI-2108-panel-error-dismiss"
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
DismissibleErrorcomponent (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.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:
load.kind === 'error') — there is nothing else on screen for a close button to reveal;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.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.
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.
New commits pushed, approval review dismissed automatically according to repository settings
Re-approved on the live head
9f48a71. The only change since my approval ond1b91e1is 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.Ready to merge, but the forge needs the branch current: 4 commits behind dev. Merge origin/dev, push, and it merges on green CI.