mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2948] [Issue]: Deleting a theme or extension happens instantly with no confirmation #1524
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#1524
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Originally created by @kolacheee on GitHub (Jun 28, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2948
Originally assigned to: @SpicyMarinara on GitHub.
What's wrong
The trash buttons for themes and extensions delete immediately on a single click — no confirmation, no undo. Everywhere else in the app, deleting something destructive (a character, a preset, a regex script, a function) pops a confirmation dialog first. Themes and extensions are the only two that skip it, so one stray click permanently destroys a hand-written theme or extension (including all its CSS/JS source) with nothing but a success toast.
How to reproduce (try it yourself)
You'll see: the item is deleted instantly, with only a "removed" toast — no "Delete this?" dialog.
Expected: a confirmation dialog, the same as deleting a character or preset.
Where it is
packages/client/src/components/panels/SettingsPanel.tsx:3697-3713— theme delete button callsdeleteTheme.mutateAsync(t.id)directly on click.SettingsPanel.tsx:4185— extension delete button callsdeleteExtension.mutate(ext.id)directly on click.For contrast, these all confirm first via
showConfirmDialog(already imported inSettingsPanel.tsx:123):PresetsPanel.tsx:515(presets),:762(single preset),:1351(regex script),:1514(function);CharactersPanel.tsx:641/:1363(characters).What's happening
These two delete handlers were just never wired to
showConfirmDialog.Suggested fix
Wrap both handlers in an unconditional confirm before mutating, matching the rest of the app:
(and the equivalent for extensions). Note: there's a "Confirm before delete" setting floating around, but no delete handler in the app actually reads it — the other deletes confirm unconditionally — so don't gate on it here; just confirm unconditionally like everything else.
AI-investigated against v2.0.6; cited lines were read and the repro verified. Please confirm before fixing.
@SpicyMarinara commented on GitHub (Jun 28, 2026):
Fixed on staging: deleting themes and extensions now asks for confirmation before permanently removing saved CSS/JS.