[PR #7690] [MERGED] fix(avatars): talking-head faces are drawn with open eyes and a closed mouth #7882

Closed
opened 2026-10-24 04:08:27 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7690
Author: @SpicyMarinara
Created: 10/15/2026
Status: ✅ Merged
Merged: 10/15/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/talking-head-open-eyes


📝 Commits (1)

  • d48608d fix(avatars): talking-head faces are drawn with open eyes and a closed mouth

📊 Changes

6 files changed (+100 additions, -34 deletions)

View changed files

📝 docs/agents/avatars.md (+1 -1)
📝 e2e/avatar-setup.e2e.ts (+1 -0)
📝 packages/client/src/components/ui/SpriteGenerationModal.tsx (+6 -0)
📝 packages/client/src/features/avatars/generation/AvatarGenerationPanel.tsx (+3 -1)
📝 packages/server/src/routes/sprites.routes.ts (+50 -10)
📝 scripts/regressions/sprite-background.regression.ts (+39 -22)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Follow-up to #7681 (fixed by #7682), from Mari's staging test. No separate issue.

Why this change

On the 2D Avatars page, Make faces from the avatar drew some faces in a way the talking head can't use. Happy always came back as a closed-eye smile (^_^), and angry and surprised came back with the mouth open.

A talking head makes separate blink pictures (eyes closed) and talk pictures (mouth open) from each face. A face whose eyes are already shut, or whose mouth is already open, gives a swap that changes nothing. So the base faces must always have open eyes and a closed mouth.

The portrait prompt only said facial expression: happy, and image models default to those looks.

What changed

  • /api/sprites/generate-sheet (and its preview) takes an optional talkingHeadFaces flag. When it is set, every portrait prompt gets a rule:
    • both eyes open, lips closed, the feeling shown with brows, eyes and cheeks;
    • happy, angry and surprised are named explicitly;
    • negative tags for closed eyes, ^_^, winks, open mouths and teeth.
  • Where the rule is applied: after prompt compilation, like the background contract, so the tag compiler can't drop it. It reaches the sheet, per-expression GPT Image requests, and the prompt review. Full-body sprites ignore the flag.
  • The face maker on the 2D Avatars page sends the flag (new optional talkingHeadFaces prop on SpriteGenerationModal). Sprite generation in the character and persona editors is unchanged.
  • Docs: the Faces from the avatar section says the faces are drawn with open eyes and a closed mouth. The translations are tracked in #7638.
  • Tests: a regression for the rule, and the e2e checks that the face maker sends the flag.

Validation

  • pnpm check passes locally
  • Container (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.md

Manual verification notes

  • Manually verify on the 2D Avatars page: make the six faces from the avatar with GPT Image. Happy, angry and surprised should have open eyes and a closed mouth.
  • Manually verify that sprite generation from the character editor still draws expressions as before, with no talking-head rule in the reviewed prompt.

Agent-run validation:

  • server, client and e2e tsc
  • regressions: sprite-background, gpt-image-2-5, open-issues, sprite-list-security, pixelize
  • Playwright avatar-setup + avatar-generation on desktop-chromium (6/6)

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

No UI change. Only the prompt sent for avatar faces changes.

Summary by CodeRabbit

  • New Features
    • Avatar face generation now produces faces with open eyes and closed mouths, providing consistent starting images for blink and talking animations. The generated faces also include expressions for the avatar’s different feelings, while full-body sprite generation remains unchanged.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/7690 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/15/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/talking-head-open-eyes` --- ### 📝 Commits (1) - [`d48608d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d48608d7a0e7fd3be8e074dc10f1cd88e4f65a66) fix(avatars): talking-head faces are drawn with open eyes and a closed mouth ### 📊 Changes **6 files changed** (+100 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `docs/agents/avatars.md` (+1 -1) 📝 `e2e/avatar-setup.e2e.ts` (+1 -0) 📝 `packages/client/src/components/ui/SpriteGenerationModal.tsx` (+6 -0) 📝 `packages/client/src/features/avatars/generation/AvatarGenerationPanel.tsx` (+3 -1) 📝 `packages/server/src/routes/sprites.routes.ts` (+50 -10) 📝 `scripts/regressions/sprite-background.regression.ts` (+39 -22) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Follow-up to #7681 (fixed by #7682), from Mari's staging test. No separate issue. ## Why this change On the 2D Avatars page, **Make faces from the avatar** drew some faces in a way the talking head can't use. **Happy** always came back as a closed-eye smile (^_^), and **angry** and **surprised** came back with the mouth open. A talking head makes separate blink pictures (eyes closed) and talk pictures (mouth open) from each face. A face whose eyes are already shut, or whose mouth is already open, gives a swap that changes nothing. So the base faces must always have open eyes and a closed mouth. The portrait prompt only said `facial expression: happy`, and image models default to those looks. ## What changed - **`/api/sprites/generate-sheet` (and its preview)** takes an optional `talkingHeadFaces` flag. When it is set, every portrait prompt gets a rule: - both eyes open, lips closed, the feeling shown with brows, eyes and cheeks; - happy, angry and surprised are named explicitly; - negative tags for closed eyes, ^_^, winks, open mouths and teeth. - **Where the rule is applied:** after prompt compilation, like the background contract, so the tag compiler can't drop it. It reaches the sheet, per-expression GPT Image requests, and the prompt review. Full-body sprites ignore the flag. - **The face maker** on the 2D Avatars page sends the flag (new optional `talkingHeadFaces` prop on `SpriteGenerationModal`). Sprite generation in the character and persona editors is unchanged. - **Docs:** the Faces from the avatar section says the faces are drawn with open eyes and a closed mouth. The translations are tracked in #7638. - **Tests:** a regression for the rule, and the e2e checks that the face maker sends the flag. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (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.md` ### Manual verification notes - Manually verify on the 2D Avatars page: make the six faces from the avatar with GPT Image. Happy, angry and surprised should have open eyes and a closed mouth. - Manually verify that sprite generation from the character editor still draws expressions as before, with no talking-head rule in the reviewed prompt. Agent-run validation: - server, client and e2e `tsc` - regressions: sprite-background, gpt-image-2-5, open-issues, sprite-list-security, pixelize - Playwright `avatar-setup` + `avatar-generation` on desktop-chromium (6/6) ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) No UI change. Only the prompt sent for avatar faces changes. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Avatar face generation now produces faces with open eyes and closed mouths, providing consistent starting images for blink and talking animations. The generated faces also include expressions for the avatar’s different feelings, while full-body sprite generation remains unchanged. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:08:27 +07:00
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#7882
No description provided.