mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #4276] [MERGED] Store generated gallery images once and cascade deletion #6314
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#6314
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/4276
Author: @SpicyMarinara
Created: 7/29/2026
Status: ✅ Merged
Merged: 7/30/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/gallery-delete-cascade-4275📝 Commits (6)
9f1b23dlink generated gallery copies to chat images864ca25cascade chat gallery image deletionc0c70b2store generated gallery images oncee89fbabaddress gallery lifecycle review feedback7b09c95reuse gallery path lifecycle resolver0f931e5Merge remote-tracking branch 'origin/staging' into fix/gallery-delete-cascade-4275📊 Changes
19 files changed (+1014 additions, -200 deletions)
View changed files
📝
package.json(+1 -0)📝
packages/server/src/db/schema/gallery.ts(+4 -0)📝
packages/server/src/routes/characters.routes.ts(+52 -28)📝
packages/server/src/routes/gallery.routes.ts(+34 -33)📝
packages/server/src/routes/generate.routes.ts(+4 -1)📝
packages/server/src/routes/generate/retry-agents-route.ts(+2 -1)📝
packages/server/src/routes/global-gallery.routes.ts(+2 -10)📝
packages/server/src/services/generation/conversation-selfie-command-runtime.ts(+2 -1)➕
packages/server/src/services/image/chat-gallery-cascade-deletion.ts(+205 -0)➕
packages/server/src/services/image/gallery-file-lifecycle.ts(+176 -0)📝
packages/server/src/services/image/generated-image-entity-gallery.ts(+57 -71)📝
packages/server/src/services/image/image-generation.ts(+18 -4)📝
packages/server/src/services/mari-db/mari-images.service.ts(+52 -21)📝
packages/server/src/services/noodle/noodle-vision.ts(+11 -22)📝
packages/server/src/services/storage/character-gallery.storage.ts(+40 -1)📝
packages/server/src/services/storage/chats.storage.ts(+26 -6)📝
packages/server/src/services/storage/gallery.storage.ts(+4 -0)📝
packages/server/src/services/storage/persona-gallery.storage.ts(+40 -1)➕
scripts/regressions/gallery-cascade-deletion.regression.ts(+284 -0)📄 Description
Linked issue
Closes #4275
Why this change
What changed
gallery/shared/path.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Automated validation completed:
pnpm checkpnpm --filter @marinara-engine/server lintpnpm regression:gallery-deletepnpm regression:noodleThe focused gallery regression proves that chat, two character galleries, and two persona galleries all reference one physical file; deleting individual entity-gallery references preserves it; deleting the final reference removes it; and explicit source deletion removes linked metadata plus exact legacy copies. Negative controls preserve different metadata, different bytes, old creation timestamps, copies linked to another source image, and files outside the gallery root.
pnpm regression:issuescurrently stops before this feature area on the pre-existing stale expectation atscripts/regressions/open-issues.regression.ts:330: the runtime includesfavorites: []while the assertion expects onlyfoldersandassignments. This PR does not modify that fixture.Manual verification still needed:
data/gallery/shared/.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue openedUI evidence (if applicable)
Not applicable; this is a server storage lifecycle fix.
Summary by CodeRabbit
New Features
Bug Fixes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.