mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1941] [MERGED] Fix gallery media managed files #5352
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#5352
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/1941
Author: @cha1latte
Created: 6/2/2026
Status: ✅ Merged
Merged: 6/2/2026
Merged by: @cha1latte
Base:
refactor← Head:fix/issue-1927-managed-gallery-files📝 Commits (4)
f0443d3Fix gallery media managed filesf074b6bClean up gallery files on create failure8c5875fMerge upstream refactor into gallery media fixa9d29dcTrigger review after base sync📊 Changes
7 files changed (+289 additions, -33 deletions)
View changed files
📝
src-tauri/src/commands/storage/commands/entities.rs(+117 -3)📝
src-tauri/src/commands/storage/shared.rs(+85 -6)📝
src-tauri/src/http_dispatch.rs(+12 -2)📝
src-tauri/src/http_server.rs(+44 -11)📝
src/features/catalog/characters/hooks/use-characters.ts(+8 -4)📝
src/features/catalog/gallery/hooks/use-gallery.ts(+6 -6)📝
src/shared/api/local-file-api.ts(+17 -1)📄 Description
Linked issue
Closes #1927
Why this change
data:imageURLs in storage rows. That bloats storage records and leaves remote runtime without a managed gallery asset route.What changed
data/galleryand store managedfilePath/filenamemetadata instead of inline image data.storage_createwrites forgalleryandcharacter-galleryso generated illustrations, selfies, and regenerations are also persisted as managed gallery files./api/assets/gallery/<filename>routing for remote runtime with filename-only path validation.urlrows as fallback.Refactor impact
Primary owner:
Impact areas reviewed:
Boundary notes:
galleryas a managed asset kind alongside avatar/background/font/game/lorebook.Pressure points touched:
src-tauri/src/commands/storage/commands/entities.rssrc-tauri/src/commands/storage/shared.rssrc-tauri/src/http_server.rssrc-tauri/src/http_dispatch.rssrc/shared/api/local-file-api.tssrc/features/catalog/gallery/hooks/use-gallery.tssrc/features/catalog/characters/hooks/use-characters.tsValidation
pnpm typecheck,pnpm build,pnpm check:architecture,pnpm check:docs, or fullpnpm checkwhen warranted)pnpm checkpasses before PR push/handoffManual verification notes
cargo test --manifest-path src-tauri\Cargo.toml gallery_create_persists_data_url_as_managed_filefailed because the gallery row kept an inlinedata:imageURL.cargo test --manifest-path src-tauri\Cargo.toml gallerypassed, covering generic generated-row create, chat/character upload dispatch, managed delete cleanup, legacy gallery import rendering, and gallery route positive/negative controls.pnpm checkpassed after the final diff.node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.jsonpassed locally.Feature Discoverability
Check exactly one:
src/features/shell/discovery/because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.Reason:
Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdUI evidence
N/A. This is a storage and remote-runtime routing fix with no visible UI layout change. Machine proof is listed above.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.