mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1201] [MERGED] Fix bulk sprite folder imports #4976
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#4976
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1201
Author: @cha1latte
Created: 5/25/2026
Status: ✅ Merged
Merged: 5/25/2026
Merged by: @cha1latte
Base:
refactor← Head:fix/refactor-issue-1185-sprite-import📝 Commits (2)
98c3e07Fix bulk sprite folder imports2e04968Freeze sprite import category📊 Changes
7 files changed (+258 additions, -41 deletions)
View changed files
📝
src-tauri/src/commands/storage/commands/media.rs(+9 -0)📝
src-tauri/src/commands/storage/sprites.rs(+127 -0)📝
src-tauri/src/lib.rs(+1 -0)📝
src/features/catalog/characters/components/CharacterEditor.tsx(+50 -22)📝
src/features/catalog/characters/hooks/use-characters.ts(+22 -0)📝
src/features/catalog/personas/components/PersonaEditor.tsx(+47 -19)📝
src/shared/api/image-generation-api.ts(+2 -0)📄 Description
What?
Fixes #1185.
Adds a bulk sprite upload path for folder imports:
sprite_upload_bulkin Tauri storage commandsspriteApi.bulkUploadanduseUploadSpritesWhy?
Folder sprite imports were using the single-upload mutation inside the file loop. That meant every successful file upload invalidated and refetched the full sprite list while the folder was still importing, and the Rust single-upload response also read the saved file back for each item.
How?
The new Rust bulk helper validates the character/persona sprite ID, writes each valid image payload, records per-file failures without aborting the whole batch, then returns one final
list_spritesresult. The editors use that final list to set thespriteKeys.list(characterId)cache once instead of invalidating it after every file.Out of scope for this PR:
sprite_listaway from base64 data URLsTesting?
Machine verification:
node scratch\issue-1185-bulk-sprite-proof.mjspassedcargo test --manifest-path src-tauri/Cargo.toml sprite_upload_testspassedpnpm checkpassednode C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.jsonpassedProof report:
Manual verification:
Screenshots
N/A. This is a storage/cache behavior fix. The proof gist above includes the raw command output from the verification run.
Anything Else?
Targets
refactorbecause the issue references the refactor-branch source layout and the request was to ship this to refactor.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.