feat(toast): action-confirmation toasts with undo & change-list - #2995
Open
ElMagnea wants to merge 5 commits into
Open
feat(toast): action-confirmation toasts with undo & change-list#2995ElMagnea wants to merge 5 commits into
ElMagnea wants to merge 5 commits into
Conversation
Collaborator
|
Marius-TV
force-pushed
the
main
branch
3 times, most recently
from
August 2, 2026 05:08
d6ed106 to
637bdc2
Compare
seferturan
force-pushed
the
feat/action-confirmation-toasts
branch
from
August 14, 2026 15:43
1fecc66 to
50f6171
Compare
|
|
Overall Grade |
Security Reliability Complexity Hygiene Coverage |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| JavaScript | Aug 24, 2026 5:18p.m. | Review ↗ | |
| Code coverage | Aug 24, 2026 5:18p.m. | Review ↗ |
Code Coverage Summary
| Language | Line Coverage (Overall) |
|---|---|
| Aggregate | 69.6% [▲ up 0.3% from main] |
| Javascript | 69.6% [▲ up 0.3% from main] |
➟ Additional coverage metrics may have been reported. See full coverage report ↗
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
seferturan
force-pushed
the
feat/action-confirmation-toasts
branch
2 times, most recently
from
August 21, 2026 12:21
c52e02b to
414c519
Compare
Contributor
|
Yeah, I'm removing it from the rating prompt, since that's not really a snackbar that's shown as the result of a direct action. |
seferturan
force-pushed
the
feat/action-confirmation-toasts
branch
2 times, most recently
from
August 24, 2026 15:52
2cebc42 to
51835c2
Compare
Adds a global action-confirmation toast engine, gated behind a new `ActionConfirmations` preview flag (off by default; directors on). The shared media mutation hooks fire a confirmation toast: - watchlist add -> "change list" opens the manage-lists drawer - watchlist/favorites/history removals -> "Undo", which reverses via the sibling hook (routes through executeOrEnqueue, so it stays offline-aware and cache-invalidating - not the raw request) Removing a single play from history confirms too, restoring the play at its original date plus any rating the removal orphaned - it was the one history mutation still silent, so the same user-facing action confirmed from one component and not from another. Toasts only fire where the trigger disappears on use: dropdown/popup items (isToastEnabledForStyle) and swipe gestures. Inline buttons stay silent, since the control is still on screen and a toast offering "Undo" is just noise. Ratings never confirm for the same reason - the stars stay put. The manage-lists drawer opts out explicitly, despite rendering its watchlist toggle as a dropdown item. Engine lives in lib/features/action-toast (module-store singleton + ActionToastHost), reusing the Snackbar primitive. The store starts disabled, so nothing can surface before the flag resolves. Also promotes the lists drawer to a global provider, so the toast can open it from anywhere. The four components that each kept their own `isListsDrawerOpen` state now go through the same store, leaving ManageListsDrawerProvider as the only place that renders ListsDrawer. Snackbar polish (shared): bold inline title via MessageWithBold, a theme-aware outline "pill" action (stroke token in modes.scss for both light/dark), a hairline border, and a bottom fly-in/out animation (|global so it plays on parent-mounted toasts; respects prefers-reduced-motion). The host keys the snackbar on the toast id so a replacement restarts its own dismiss countdown.
seferturan
force-pushed
the
feat/action-confirmation-toasts
branch
from
August 24, 2026 17:18
3a88bf5 to
ae7f675
Compare
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.
Visuals
Marking something as watched by mistake

Accidentally removing an item from a watchlist

When adding an item to your watchlist, you can pick another list right after (if need be)

What
Adds a global action-confirmation toast engine, gated behind a new
ActionConfirmationspreview flag (off by default; on for directors). The shared media mutation hooks fire a confirmation toast after each action, with an inline undo / "change list" affordance.How
lib/features/action-toast/— a module-store singleton (mirrorsuseDismissals/markAsWatchedDrawerStore) +ActionToastHostmounted once in the layout, reusing the existingSnackbarprimitive.executeOrEnqueue), not the raw*Request— so it stays offline-aware, cache-invalidating, and consistent with the optimistic read overlay.manageListsDrawerStore+ provider) so "change list" can open the drawer from anywhere.MessageWithBold), a theme-aware outline "pill" action (stroke token added to bothmodes.scssmixins), a hairline border, and a bottom fly-in/out animation (|global; respectsprefers-reduced-motion).Notes / scope
useRemoveFromHistory(row-level, lossy undo) not wired; ratings "Change" (needs a global rating drawer); the outline-button look is scoped to the toast — a global button restyle is its own pass.Verification
deno fmt✓ ·svelte-check0/0 ✓ ·vitest2418 passed ✓ ·i18n:check✓. Undo is covered by tests that assert the real reverse request fires (watchlist / favorites / history).🤖 Generated with Claude Code