Repository navigation
feat(ui): toasts with undo for destructive actions (WI-1721) - #248
Merged
Merged
Conversation
Destructive history deletes now go through a 10 s server-side undo window
instead of vanishing, and every UI message goes through one ToastService so
the app speaks with a single voice.
Backend
- Migration v20 adds `history.trash` / `history.trash_deadline` and mirrors
both into the list-metadata table, which keeps the history page query off
the NZB blobs. Every read path, the duplicate detector and retention all
filter on the meta row.
- `history_trash`, `history_restore` and `history_purge_expired`, with a 30 s
purge sweep next to the disk guard. Trashed rows keep their work
directories until the window closes.
- `DELETE /api/history/{id}?trash=true` returns the trashed entries and their
deadline; `POST /api/history/restore` restores per id and reports the ones
whose window has closed. `POST /api/history/bulk` accepts `trash` and
returns the same envelope.
- The default delete is still a hard delete, so SABnzbd/*arr clients and
`clear all` keep their existing semantics.
Frontend
- New `ToastService` (success/info/error/undo) replaces direct MatSnackBar
use across the app, so durations and dismiss affordances are consistent.
- History delete, bulk delete and clear-by-status offer Undo; the toast never
outlives the server's deadline.
- e2e locator fixes for queue.spec.ts bulk count and downloads-mock upload:
both matched the always-mounted sr-only live region as well as the visible
element. New journey 5.5a covers delete-then-undo.
Collaborator
Author
|
Review of 968a58c: no blockers (CI pending), with 4 should-fix data-safety items. GitHub Checks run locally:
Data safety: what's right
Should fix
Nits
|
thedancingdeveloper
enabled auto-merge
October 20, 2026 16:24
This was referenced Oct 20, 2026
thedancingdeveloper
added a commit
that referenced
this pull request
Oct 20, 2026
… toast service Two re-review blockers on #249. A manual Resume inside a window did not survive a real restart: the window lists were only loaded when `globally_paused` was true, so after a resume the first tick read the still-open occurrence as newly opened and paused again. The lists (`open_windows`, `triggered_windows`, `resumed_windows`, `user_paused_over`) are now always restored; only the live holds are gated on `was_paused`. The restart tests built their "restarted" manager by cloning the `Arc`, so the in-memory holds and an in-memory database were shared and no persisted state was ever read. They now use a file-backed database and a fresh `QueueManager`, which is what makes the blocker reproducible; the manual-resume test fails on the previous restore logic and passes now. The schedule settings form still called `this.snack`, which #248 replaced with `this.toast` (`ToastService`). The bundle failed on the merged tree; the three calls now go through `this.toast` and the spec asserts on it. Also guards `expire_user_hold` against pausing an already-paused queue, as `apply_schedule_hold` does.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WI-1721: toasts with undo for destructive actions (including a backend soft-delete). Written by a DeepSeek worker.
🤖 Generated with Claude Code