[GH-ISSUE #2604] Chat-scoped Gallery: add emoji/sticker tagging, shrink thumbnails, add import/export (All/Select) #1278

Closed
opened 2026-10-21 05:30:34 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @kolacheee on GitHub (Jun 17, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2604

Summary

The in-chat Gallery (the panel reachable from a chat's right-panel toolbar — ChatGallery / ChatGalleryDrawer, with the Illustrate + Upload Images actions) is missing features that the other gallery surfaces already have, and needs two UX fixes:

  1. Custom emoji/sticker tagging is absent in this chat-scoped gallery.
  2. Thumbnails are far too large.
  3. No import/export for galleries.

Background

  • Galleries were ported to staging in #2584 (persona + global galleries), and the custom emoji/sticker tagging (originally refactor #2362) in #2585. The tag control (CustomEmojiTagButton) is wired into the character gallery (CharacterEditor), the persona gallery (PersonaEditor), and the global gallery panel (GlobalGalleryPanel).
  • The chat-scoped gallery (packages/client/src/components/chat/ChatGallery.tsx) does not use CustomEmojiTagButton, so images uploaded/illustrated there can't be tagged as emoji/stickers from the view a user actually reaches in-chat.

What needs doing

Wire CustomEmojiTagButton (from #2585) into the ChatGallery image cards, matching the other galleries: tag an image as emoji or sticker, name it, the dimension size-gate (emoji ≤256×256, sticker ≤512×512), the corner kind badge, and per-gallery name uniqueness. Reuse the existing shared custom-emoji.ts + the gallery tag mutation — no new model needed.

2. Shrink the thumbnails

ChatGallery renders a fixed grid grid-cols-2 (ChatGallery.tsx:122), so each thumbnail is enormous. Switch to a denser responsive grid — e.g. the auto-fill pattern GlobalGalleryPanel already uses, grid-cols-[repeat(auto-fill,minmax(7rem,1fr))] (or smaller) — so images render at a sensible thumbnail size.

3. Import / Export galleries

Add a way to export a gallery and import one back, with All and Select… options (mirroring the all-vs-pick choice used by other export flows in the app):

  • Export — download the gallery's images (All, or a chosen subset) along with their emoji/sticker tags + names, as a portable bundle.
  • Import — load such a bundle into a gallery, re-creating the images and their tags.

Pointers

  • Chat-scoped gallery: packages/client/src/components/chat/ChatGallery.tsx (+ ChatGalleryDrawer.tsx)
  • Tagging control + model: packages/client/src/components/ui/CustomEmojiTagButton.tsx; shared custom-emoji.ts
  • Reference galleries that already have tagging: GlobalGalleryPanel.tsx, CharacterEditor.tsx, PersonaEditor.tsx
  • Prior work: galleries #2584, tagging #2585 (both merged); original refactor sources #2361 / #2362

Notes

  • Frontend-led; tagging reuses the existing gallery JSON model (no schema change). Import/Export will need a small server endpoint (or client-side bundle) for the image bytes + tag metadata.
Originally created by @kolacheee on GitHub (Jun 17, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2604 ## Summary The in-chat **Gallery** (the panel reachable from a chat's right-panel toolbar — `ChatGallery` / `ChatGalleryDrawer`, with the **Illustrate** + **Upload Images** actions) is missing features that the other gallery surfaces already have, and needs two UX fixes: 1. **Custom emoji/sticker tagging is absent** in this chat-scoped gallery. 2. **Thumbnails are far too large.** 3. **No import/export** for galleries. ## Background - Galleries were ported to `staging` in #2584 (persona + global galleries), and the custom **emoji/sticker tagging** (originally `refactor` #2362) in #2585. The tag control (`CustomEmojiTagButton`) is wired into the character gallery (`CharacterEditor`), the persona gallery (`PersonaEditor`), and the global gallery panel (`GlobalGalleryPanel`). - The chat-scoped gallery (`packages/client/src/components/chat/ChatGallery.tsx`) does **not** use `CustomEmojiTagButton`, so images uploaded/illustrated there can't be tagged as emoji/stickers from the view a user actually reaches in-chat. ## What needs doing ### 1. Bring custom emoji/sticker tagging to the chat-scoped gallery Wire `CustomEmojiTagButton` (from #2585) into the `ChatGallery` image cards, matching the other galleries: tag an image as emoji **or** sticker, name it, the dimension size-gate (emoji ≤256×256, sticker ≤512×512), the corner kind badge, and per-gallery name uniqueness. Reuse the existing shared `custom-emoji.ts` + the gallery tag mutation — no new model needed. ### 2. Shrink the thumbnails `ChatGallery` renders a fixed `grid grid-cols-2` (`ChatGallery.tsx:122`), so each thumbnail is enormous. Switch to a denser responsive grid — e.g. the auto-fill pattern `GlobalGalleryPanel` already uses, `grid-cols-[repeat(auto-fill,minmax(7rem,1fr))]` (or smaller) — so images render at a sensible thumbnail size. ### 3. Import / Export galleries Add a way to **export** a gallery and **import** one back, with **All** and **Select…** options (mirroring the all-vs-pick choice used by other export flows in the app): - **Export** — download the gallery's images (All, or a chosen subset) along with their emoji/sticker tags + names, as a portable bundle. - **Import** — load such a bundle into a gallery, re-creating the images and their tags. ## Pointers - Chat-scoped gallery: `packages/client/src/components/chat/ChatGallery.tsx` (+ `ChatGalleryDrawer.tsx`) - Tagging control + model: `packages/client/src/components/ui/CustomEmojiTagButton.tsx`; shared `custom-emoji.ts` - Reference galleries that already have tagging: `GlobalGalleryPanel.tsx`, `CharacterEditor.tsx`, `PersonaEditor.tsx` - Prior work: galleries #2584, tagging #2585 (both merged); original `refactor` sources #2361 / #2362 ## Notes - Frontend-led; tagging reuses the existing gallery JSON model (no schema change). Import/Export will need a small server endpoint (or client-side bundle) for the image bytes + tag metadata.
Author
Owner

@SpicyMarinara commented on GitHub (Jun 17, 2026):

Big UI changes coming, hold on.

<!-- gh-comment-id:4732742901 --> @SpicyMarinara commented on GitHub (Jun 17, 2026): Big UI changes coming, hold on.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#1278
No description provided.