mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8580] [MERGED] feat(sprites): add optional folders and streamline sprite management #8687
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#8687
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/8580
Author: @DSBwizzard
Created: 10/30/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @SpicyMarinara
Base:
staging← Head:codex/sprite-folders📝 Commits (10+)
6a21797feat(sprites): organize sprites in folders with shared selectiona707352fix(sprites): adapt folder layout to editor width15d7c08refactor(sprites): focus character editor on the sprite library186f0f6fix(sprites): tighten mobile controls and loading state8da4cccfix(sprites): protect image edits while savingf9ca401fix(sprites): wrap long folder labels within the libraryf327d15fix(sprites): contain folder names across library toolsc51f569fix(sprites): keep selection scoped to the visible library0b13c77Keep sprites available across organizational foldersab8fcf4Keep sprite folders optional and simplify character sheet panel📊 Changes
51 files changed (+5318 additions, -1293 deletions)
View changed files
📝
docs/characters/personas.md(+4 -0)📝
docs/characters/sprites.md(+40 -16)📝
e2e/core-flows.e2e.ts(+30 -3)➕
e2e/sprite-library.e2e.ts(+1008 -0)📝
e2e/ui-state-fixture.ts(+2 -0)📝
packages/client/src/components/characters/CharacterEditor.tsx(+673 -489)➕
packages/client/src/components/characters/SpriteLibrary.tsx(+696 -0)📝
packages/client/src/components/chat/SpriteOverlay.tsx(+6 -56)➕
packages/client/src/components/chat/sprite-display-expression.ts(+67 -0)📝
packages/client/src/components/personas/PersonaEditor.tsx(+484 -387)📝
packages/client/src/components/ui/SpriteFrameEditor.tsx(+26 -6)📝
packages/client/src/components/ui/SpriteGenerationModal.tsx(+16 -8)📝
packages/client/src/components/ui/SpriteWandCleanupEditor.tsx(+1 -0)📝
packages/client/src/features/avatars/generation/MeshAvatarSection.tsx(+3 -1)📝
packages/client/src/features/avatars/generation/PngtuberVariantsSection.tsx(+4 -1)📝
packages/client/src/features/avatars/generation/SpritePicker.tsx(+4 -2)📝
packages/client/src/features/avatars/renderers/pngtuber/pngtuber-layers.ts(+2 -1)📝
packages/client/src/features/avatars/stage/avatar-stage-logic.ts(+6 -1)📝
packages/client/src/features/tracker-panel/lib/sprite-expressions.ts(+6 -5)📝
packages/client/src/hooks/use-characters.ts(+132 -2)...and 31 more files
📄 Description
Linked issue
Closes #8579
Implementation prepared by @DSBwizzard. @SpicyMarinara: this account cannot self-assign in the upstream repository.
Why this change
Large sprite libraries are difficult to manage as a flat grid. This adds optional folders and a clearer editing flow while keeping every sprite available during chats and roleplay.
What changed
Validation
Reviewed source:
05c4a602898d3f2eb9f7d9682f19ccc385ac78bc, based on staging479575facdecd020ced082f37a6e00683b73d41b. Merge compatibility with current staging05ad846e7615f72709949043d8d519f1f2e37505was checked without changing the reviewed source.Follow-up
b619d882epassedpnpm checkand all six sprite regression files. Real route/Mari tests cover cross-participant filename/label precedence, label-only fallback, SVG and same-handle multi-format deletion, and byte-identical metadata on a no-op delete. Earlier broader compatibility, browser and container evidence below was captured at45fc21a4e; client/UI code is unchanged.Existing human validation checkbox states are preserved. Automated evidence is listed separately.
pnpm checkpasses locallyContainer (Docker / Podman) built and ran without issue
Ran the app, clicked through the changes manually
Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
Above manual verification completed (describe below)
Read and followed
CONTRIBUTING.mdpnpm checkpassed: formatting, lint, types, localization and production build.Affected regressions passed, including Expression Engine, Game Mode, avatars, /emote, profile export/import, generated saves, deletion, damaged metadata, invalid owners and linked-directory handling. Gallery checks blocked by Windows filesystem privileges passed 7/7 in an isolated Linux container. A real native-profile ZIP round trip preserves a renamed, foldered sprite and its image bytes.
Sprite browser cases passed 6/6 across desktop Chromium, mobile Chromium and mobile WebKit. They cover failed/orphan catalog metadata, keyboard moves in both editors, import errors, search/delete scope and existing drag/bulk behavior.
The three affected legacy Character Sheet/generation browser cases passed, including regeneration of a renamed, foldered sprite. UI smoke passed 7/7 and production startup/reload passed 3/3.
The revised Docker image built and ran. A verified checkpoint and read-only before/after comparison confirmed that the existing preview's saved library and connections were preserved. Actual desktop/mobile loading and expanded-folder checks passed without page errors or horizontal overflow.
The latest whole-PR CodeRabbit review found one additional mixed-case Mari replacement defect. It was reproduced, fixed and regression-tested; the follow-up review completed with zero findings. No paid/live-provider calls were made.
Earlier incremental CodeRabbit review of the
b619d882efollow-up completed with one finding about literal-extension priority. The same basename/extension fallback exists in both the pinned base and current upstreamstaging; it is unchanged here to preserve upstream lookup behavior. The repair changes filename/handle-versus-label priority only.Security follow-up
05c4a6028:pnpm checkand six Windows sprite regression files passed. Isolated Linux regressions verify file/dangling-link upload refusal, outside-image preservation, invalid DELETE owner rejection and existing sprite behavior. The CodeRabbit test-selector finding was fixed; its correction review completed with zero findings. Fresh hosted CodeQL results remain pending; no scanner rules or suppressions were changed.Manual verification notes
The contributor reviewed the final preview and approved its appearance. The detailed checklist remains for human verification.
Manually verify folder creation, rename, reorder, expansion and deletion; single/multiple moves into expanded/collapsed folders and back to the loose grid; uploads, transfers, selection and editing tools; and representative Expression Engine, Game Mode and avatar choices with renamed sprites. Check touch behavior on a physical device.
Limits: no paid/live-provider calls. Physical Safari long-press remains a manual check. Previously reported intermittent returns to Metadata were not reproduced or established as fixed.
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Updated
docs/characters/sprites.mdanddocs/characters/personas.md; translation follow-up: #8605. The former "No docs changes needed" checkbox was cleared because these guides changed. Other human checklist states are unchanged.GET /api/sprites/:ownerId/catalogexposes folder IDs/category and each sprite's stableexpressionhandle, editablelabel,folderIdand URL. The existingGET /api/sprites/:ownerIdstill returns every sprite. Folders do not select an active sprite set. This PR does not include a version bump.UI evidence (if applicable)
Desktop/mobile dark-mode and desktop light-mode captures use bundled Marinara artwork and disposable characters, with loose and grouped examples. Temporary evidence is attached below and is not committed as product assets.
Desktop before / after
Mobile before / after
Desktop light mode
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.