[PR #952] [MERGED] Fix saved sprite cleanup fallback #4857

Closed
opened 2026-10-22 04:11:13 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/952
Author: @cha1latte
Created: 5/17/2026
Status: ✅ Merged
Merged: 5/17/2026
Merged by: @cha1latte

Base: staging ← Head: fix/saved-sprite-cleanup


📝 Commits (1)

  • 92dcead Fix saved sprite cleanup fallback

📊 Changes

2 files changed (+20 additions, -14 deletions)

View changed files

📝 packages/client/src/components/characters/CharacterEditor.tsx (+10 -7)
📝 packages/client/src/components/personas/PersonaEditor.tsx (+10 -7)

📄 Description

Linked issue

No linked issue yet; filed from Celia's local bug report that saved sprite cleanup showed "No saved sprites were cleaned" even though the cleanup tool was installed.

Why this change

  • The saved-sprite cleanup button forced the optional backgroundremover engine. If that executable was present but failed at runtime, the whole cleanup request failed instead of using Marinara's built-in fallback cleanup.

What changed

  • Saved character and persona sprite cleanup now requests engine: "auto" so the server can fall back to the built-in cleanup path when backgroundremover cannot run.
  • Updated the confirmation text, tooltip, and success toast so the UI does not promise that every cleanup used backgroundremover.
  • Kept the existing restore-point behavior and per-sprite failure warnings.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Codex ran packages\server\node_modules\.bin\tsx.cmd scratch\repro-saved-sprite-cleanup-auto-fallback.ts.
  • The repro showed the old forced backgroundremover request fails with 500 and No saved sprites were cleaned when the command cannot run.
  • The same repro showed engine: "auto" succeeds with processed=1, builtinProcessed=1, and changed the saved PNG corner alpha from 255 to 0.
  • Codex ran pnpm check; it passed.
  • Manual browser click-through is still recommended before merge because this is a button copy/behavior change, but the core cleanup request path is machine-proven.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

No docs or version changes needed.

UI evidence (if applicable)

No screenshot attached; this is a UI-triggered behavior fix, but the visible UI only changes confirmation/toast copy. The core behavior is covered by the saved-sprite cleanup route repro above.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/952 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/17/2026 **Status:** ✅ Merged **Merged:** 5/17/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `staging` ← **Head:** `fix/saved-sprite-cleanup` --- ### 📝 Commits (1) - [`92dcead`](https://github.com/Pasta-Devs/Marinara-Engine/commit/92dcead39ce6acb9cf68f5301586647b197ffe13) Fix saved sprite cleanup fallback ### 📊 Changes **2 files changed** (+20 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/characters/CharacterEditor.tsx` (+10 -7) 📝 `packages/client/src/components/personas/PersonaEditor.tsx` (+10 -7) </details> ### 📄 Description <!-- Target branch: `staging`. The default base in this UI is `main` (release branch). --> <!-- Change the base to `staging` before submitting unless this is a maintainer-approved mainline change. --> <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> No linked issue yet; filed from Celia's local bug report that saved sprite cleanup showed "No saved sprites were cleaned" even though the cleanup tool was installed. ## Why this change <!-- What user problem, bug, or goal does this solve? --> - The saved-sprite cleanup button forced the optional `backgroundremover` engine. If that executable was present but failed at runtime, the whole cleanup request failed instead of using Marinara's built-in fallback cleanup. ## What changed <!-- List the key changes in this PR --> - Saved character and persona sprite cleanup now requests `engine: "auto"` so the server can fall back to the built-in cleanup path when `backgroundremover` cannot run. - Updated the confirmation text, tooltip, and success toast so the UI does not promise that every cleanup used `backgroundremover`. - Kept the existing restore-point behavior and per-sprite failure warnings. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> - Codex ran `packages\server\node_modules\.bin\tsx.cmd scratch\repro-saved-sprite-cleanup-auto-fallback.ts`. - The repro showed the old forced `backgroundremover` request fails with `500` and `No saved sprites were cleaned` when the command cannot run. - The same repro showed `engine: "auto"` succeeds with `processed=1`, `builtinProcessed=1`, and changed the saved PNG corner alpha from `255` to `0`. - Codex ran `pnpm check`; it passed. - Manual browser click-through is still recommended before merge because this is a button copy/behavior change, but the core cleanup request path is machine-proven. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) No docs or version changes needed. ## UI evidence (if applicable) No screenshot attached; this is a UI-triggered behavior fix, but the visible UI only changes confirmation/toast copy. The core behavior is covered by the saved-sprite cleanup route repro above. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:11:13 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
Pasta-Devs/Marinara-Engine#4857
No description provided.