mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2584] [MERGED] feat(gallery): persona and global image galleries #5672
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#5672
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/2584
Author: @kolacheee
Created: 6/15/2026
Status: ✅ Merged
Merged: 6/16/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/staging-persona-global-galleries📝 Commits (8)
def5d0afeat(gallery): add persona + global gallery server (schema, storage, routes)50bf0f3feat(gallery): persona gallery tab + global gallery panel (client)5307bfefix(gallery): register persona/global gallery tables in the file-native store7e3182cfix(gallery): surface persona gallery upload errors with a toaste51185cfix(gallery): responsive global gallery grid on small screens091bea0fix(gallery): responsive persona + character gallery grids on mobilecb5004efix(gallery): address review — path-traversal guards, upload rollback, indexesb8eb6beMerge staging into persona global galleries📊 Changes
17 files changed (+1392 additions, -6 deletions)
View changed files
📝
packages/client/src/components/characters/CharacterEditor.tsx(+2 -2)📝
packages/client/src/components/layout/RightPanel.tsx(+6 -1)📝
packages/client/src/components/layout/TopBar.tsx(+14 -1)➕
packages/client/src/components/panels/GlobalGalleryPanel.tsx(+434 -0)📝
packages/client/src/components/personas/PersonaEditor.tsx(+164 -0)📝
packages/client/src/hooks/use-characters.ts(+68 -0)➕
packages/client/src/hooks/use-global-gallery.ts(+148 -0)📝
packages/client/src/stores/ui.store.ts(+1 -0)📝
packages/server/src/db/file-backed-store.ts(+4 -0)📝
packages/server/src/db/migrate.ts(+34 -0)📝
packages/server/src/db/schema/gallery.ts(+50 -1)📝
packages/server/src/routes/characters.routes.ts(+133 -1)➕
packages/server/src/routes/global-gallery.routes.ts(+186 -0)📝
packages/server/src/routes/index.ts(+2 -0)📝
packages/server/src/services/mari-db/mari-db.service.ts(+1 -0)➕
packages/server/src/services/storage/global-gallery.storage.ts(+91 -0)➕
packages/server/src/services/storage/persona-gallery.storage.ts(+54 -0)📄 Description
Linked issue
Closes #2575
Why this change
refactorin #2361) to the Node/stagingstack — a re-implementation, since the original relied on the Tauri/Rust storage layer.What changed
Server
persona_images,gallery_folders,global_images— registered in the Drizzle schema, the startup migrations (db/migrate.ts, libsql backend), and the file-native store (file-backed-store.tsFILE_BACKED_TABLES+ apersonas → persona_imagescascade), which is the default backend./api/characters/personas/:id/gallery(list / upload / serve file / delete), mirroring the existing character gallery. Deleting a persona also removes its gallery directory and rows./api/global-gallery:?folderId), upload (?folderId; a missing folder coerces to root, resolved before bytes are written so a bad id can't strand an orphan file), serve, delete (unlinks the file), and move (PATCH /:id).Client
PersonaGalleryTab) mirroring the character gallery — upload dropzone, grid, lightbox, with upload-error toasts.GlobalGalleryPanel): 2-column grid, newest/oldest sort, flat folder chips (All / Unfiled / per-folder with counts + create / rename / delete), drag-an-image-onto-a-folder to move, and a lightbox with a folder-move dropdown + download + delete.RightPanelregistry + aTopBartoggle button;"gallery"added to the UI storePaneltype.use-characters.ts; newuse-global-gallery.ts(image list / upload / delete / optimistic move + folder CRUD).Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Automated:
pnpm checkpasses locally — full build (shared + server + client Vite/PWA bundle) and lint across all packages. Storage/migrations smoke-tested against both backends (in-memory libsql + a temp file-native store): tables create, inserts work, and deleting a folder re-files its image to root.In-browser playtest (done): uploading to the global Gallery panel and the persona Gallery tab; folder create / rename / delete; drag-an-image-onto-a-folder; move via the lightbox dropdown; newest/oldest sort; and deleting a folder re-filing its images to Unfiled — all confirmed working.
Docs and release impact
Assessment: galleries are additive — no version bump, and no existing docs describe gallery scope, so I don't expect doc changes.
UI evidence (if applicable)
Summary by CodeRabbit
Release Notes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.