mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2585] [MERGED] feat(gallery): custom emoji and sticker tagging #5674
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#5674
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/2585
Author: @kolacheee
Created: 6/16/2026
Status: ✅ Merged
Merged: 6/16/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/staging-custom-emoji-tagging📝 Commits (10+)
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, indexes1bd3f9cfeat(gallery): custom emoji/sticker tagging columns + endpoints0a2d3e2feat(gallery): custom emoji/sticker tag UI on gallery imagese26276dfix(gallery): address review — error toasts, persona key, server tag length cap📊 Changes
20 files changed (+1887 additions, -6 deletions)
View changed files
📝
packages/client/src/components/characters/CharacterEditor.tsx(+6 -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(+452 -0)📝
packages/client/src/components/personas/PersonaEditor.tsx(+168 -0)➕
packages/client/src/components/ui/CustomEmojiTagButton.tsx(+158 -0)📝
packages/client/src/hooks/use-characters.ts(+95 -0)➕
packages/client/src/hooks/use-global-gallery.ts(+162 -0)➕
packages/client/src/lib/custom-emoji.ts(+59 -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(+70 -0)📝
packages/server/src/db/schema/gallery.ts(+62 -1)📝
packages/server/src/routes/characters.routes.ts(+206 -1)➕
packages/server/src/routes/global-gallery.routes.ts(+228 -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/character-gallery.storage.ts(+16 -0)➕
packages/server/src/services/storage/global-gallery.storage.ts(+107 -0)➕
packages/server/src/services/storage/persona-gallery.storage.ts(+70 -0)📄 Description
Linked issue
Closes #2576
Why this change
refactorin #2362) to the Node/stagingstack. The refactor stored galleries as arbitrary JSON, so it needed no schema change; staging has fixed columns, so this adds real columns + tag endpoints.What changed
Server
custom_kind/custom_namecolumns oncharacter_images,persona_images,global_images(Drizzle schema + libsqlCREATE TABLE/COLUMN_MIGRATIONS; the file-native backend derives columns from the schema).PATCH .../tagendpoint + storagesetTagfor each gallery (/api/characters/:id/gallery/:imageId/tag,/api/characters/personas/:id/gallery/:imageId/tag,/api/global-gallery/:id/tag). Tag, rename, switch-kind, and untag are all the same write; measuredwidth/heightride along and are persisted opportunistically. Light validation:customKind∈emoji|sticker|null, name required when tagging.Client
CustomEmojiTagButtoncorner overlay on every gallery image (character, persona, global): a Tag badge that opens a context menu — Make emoji / Make sticker, or when tagged Rename / Switch kind / Remove.lib/custom-emoji.ts: client-side dimension gating (emoji ≤256×256, sticker ≤512×512 — over-size flashes the card red + toasts, and an over-size emoji that fits as a sticker says so), name slugifying (lowercase,a-z0-9→_, max 32), and an image-dimension reader.use-characters.ts(character + persona) anduse-global-gallery.ts(global);customKind/customNameadded to the gallery image types.Scope note
Faithful to refactor #2362, this is the tagging model + UI only — it does not include emoji rendering in messages, pickers, or
:name:prompt tokens (those are the later full-emoji work). Also matching #2362, there is no name-uniqueness rule at this stage (uniqueness becomes relevant when rendering needs deterministic resolution, in the later work).Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
pnpm checkpasses (full build + lint). Tag persistence smoke-tested against the file-native backend: tag setscustom_kind/custom_name(+ measured dims), switch-kind and untag work.Docs and release impact
Assessment: additive feature — no version bump expected.
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.