mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7578] [MERGED] fix(avatars): one set of setup controls, and sprites show as an avatar #7809
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#7809
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/7578
Author: @SpicyMarinara
Created: 10/13/2026
Status: ✅ Merged
Merged: 10/13/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/avatars-base-integration📝 Commits (2)
030d1cffix(avatars): one set of setup controls, and sprites show as an avatar9a44b29test(avatars): check the saved avatar in chat and keep other workers' avatars out📊 Changes
12 files changed (+409 additions, -587 deletions)
View changed files
📝
docs/agents/avatars.md(+6 -7)📝
e2e/avatar-setup.e2e.ts(+66 -28)📝
packages/client/src/features/avatars/setup/AvatarAgentSetup.tsx(+94 -310)📝
packages/client/src/features/avatars/setup/avatar-setup-logic.ts(+3 -93)📝
packages/client/src/features/avatars/setup/demo-avatar.ts(+2 -2)📝
packages/client/src/features/avatars/stage/AvatarStage.tsx(+74 -30)📝
packages/client/src/features/avatars/stage/avatar-stage-logic.ts(+36 -5)📝
packages/client/src/hooks/use-avatar-models.ts(+4 -26)📝
packages/client/src/localization/locales/en.json(+0 -24)📝
packages/server/src/services/avatars/storage.ts(+13 -2)📝
scripts/regressions/avatar-models.regression.ts(+37 -11)📝
scripts/regressions/avatar-stage-logic.regression.ts(+74 -49)📄 Description
Linked issue
Refs #7537 (epic: 2D and 3D avatar agents). This follows up the base lane, #7556, which merged while these integration fixes were being made. The epic stays open for the remaining lanes.
Why this change
An integration review of the base lane against the 2D (#7549, merged), 3D (#7557), director (#7555) and generation (#7554) lanes found these problems:
.vrmpicked on a phone from replacing the model.happy_talkand similar sprites into separate faces instead of the open-mouth picture. It also skipped full-body-only owners. The 2D lane's builder handles both cases.avatar-models.regression.tschecked the 3D stub's exact refusal text, and the real VRM importer answers with a different message. Each PR passed alone, but whichever merged second would breakcomplete-node-regressions.What changed
setup/AvatarAgentSetup.tsx): base now keeps only the controls that apply to every kind: the character/persona picker, Show this avatar in chats, Avatar type with Show this one, the Movement switches and the preview. Importing, removing, sprites and faces belong to the kind panels below it. Base's sprite builder, face-editor helpers, import/remove hooks and their 24 unusedavatars.setup.*strings are deleted. Show this one on a sprite-only PNGTuber saves the sprite setup along with the choice, because the schema requires the active kind to be set up.buildPngtuberLayersFromSprites, so one rule applies everywhere. Show this avatar in chats and Movement now also appear for such owners. Turning the avatar off hides it. Nothing shows until the saved-avatar list has loaded, so a turned-off avatar never flashes in. Sprite lists are fetched per participant only when 2D Avatars is on, the same wayChatAreaalready fetches them for expression avatars.services/avatars/storage.ts), a behaviour change the maintainer did not request: removing the last kind still deletes the owner's folder. The exception is an avatar that is turned off or has a Movement switch changed: thenavatar.jsonstays, with no kinds. Without this, removing the last kind would bring a turned-off avatar back through the sprite fallback.avatar-models.regression.tspins both cases. The original "folder is gone with its last kind" check still holds once the switches are back at their defaults, and the old "folder gone" check on a turned-off avatar now expectsavatar.jsonto stay. CodeRabbit flagged this expectation change, so it is called out here for review..vrmthe importer does not recognise goes to that importer and that the person sees its own message, and it no longer depends on the 3D lane's text.docs/agents/avatars.md"Setting up an avatar" now describes the split page and the sprite avatar. The guide's translation is already tracked in #7540.Whether avatars should show from sprites with nothing saved is a product decision for @SpicyMarinara. This PR follows what the merged 2D panel copy and guide already promise, and what the 2D PR asked of base. If the answer is no, revert the stage and setup fallback in
030d1cf9eand change the 2D copy and guide instead.Not changed here (other lanes, noted for whoever merges): the director lane's branch edits
setup/AvatarAgentSetup.tsxto render<AvatarModelStatus />, andavatar-director.regression.tschecks for it. That file now conflicts with staging, so #7555 needs to add<AvatarModelStatus />to the merged setup page when it resolves the conflict. The preview's Try a face menu still labels the resting face "Calm" while the 2D panel says "Neutral". I left that copy alone.Validation
pnpm checkpasses locallyCONTRIBUTING.mdCommands run by the agent (results as reported; the boxes above are for the human reviewer):
pnpm install --frozen-lockfile --prefer-offline --store-dir <main checkout>/.pnpm-store,pnpm build:shared: done. No dependency or lockfile change.pnpm checkon the rebased head: passed (exit 0). The only ESLint warning is the existing one inHomeProfessorMariChat.tsx.pnpm localization:check: passed.node scripts/run-regressions.mjs --filter avatar(10 files): all passed, on the rebased head too.--filterforagent-activation,spatial-context,open-issues,admin-preset-expunge,backup(4 files),character-delete-chat-membership,profile-import,sprite-list-security,capability-package-lifecycle,docs-command-searchanddocs-language: all passed.origin/feat/avatars-3d,--filter avatargave 11/11 (includingavatar-vrmandavatar-models). Before the fix, the integration review reported 13/14 there, with onlyavatar-modelsfailing.storage.tsand the new regression,avatar-models.regression.tsfails.avatar-stage-logic.regression.tsnow covers the sprite fallback (a sprite-only owner shows, a VRM whose agent is off falls back to sprites, a turned-off owner stays hidden, nothing shows before the list loads, sprites need 2D Avatars). It also checkswithSpriteAvatar(identity kept so nothing remounts, a saved setup wins) and that_talksprites become open mouths. Source checks confirm the director is created only once an avatar shows and that the setup page has no file picker, removal or face editor.npx playwright test e2e/avatar-setup.e2e.ts --repeat-each=3on its own ports: 9/9 passed on desktop Chromium, Android-sized Chromium and iPhone-sized WebKit. The test proves the chat shows the sprite avatar with noavatar.json(404). It checks that the page has exactly one Use my sprites, one Import PNGTuber Plus save and no Remove before saving. It covers the preview showing the character's sprites instead of the example, the covered chat pausing on phones, the saved layers usinghappy_talkashappy's open mouth, a hand-picked face being saved, and the chat showing the saved avatar. The owner list is narrowed to the test's own character, because the two mobile projects share one local server and the other worker's saved avatar made the page open on that owner.e2e/avatar-preview.e2e.ts(profile-picture library, not this code) failed once on mobile Chromium in a combined run and passed when run alone.pngtuber-layersis its own small lazy chunk shared by the stage, the setup and the renderer, and none of it is in the entry chunk.coderabbit review --agent --committed --base-commit 2b417feaa): 2 findings. Fixed in9a44b29db: the chat check after saving is back. Not changed: the storage expectation change, which is deliberate and explained above (no maintainer request; flagged for review). Not rerun after the test-only fix.Manual verification notes
Install a local build of the 2D Avatars package, or add
2d-avatarsto a chat's agents with a package that declares that id.happyandhappy_talk) and nothing saved. The page shows one set of controls: the switches, Avatar type with PNGTuber marked Shown in chats, Movement, then the PNGTuber panel with one Use my sprites. The preview shows the character's sprites, not the example avatar.happyface opens its mouth withhappy_talk, andhappy_talkis not offered as a separate face.POST /api/avatar-classify/modelis sent (needs #7555).[data-avatar-stage]carriesdata-avatar-paused="true"while the agent page covers it.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)docs/agents/avatars.md("Setting up an avatar") changed. Its translation is tracked in #7540.UI evidence (if applicable)
None attached. The e2e saves
avatar-setup-sprites.pngandavatar-setup.pngper project undertest-results/when it runs.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.