[PR #1748] [MERGED] feat(gacha-forge): expression portraits for story dialogue (1.24.7) #1950

Closed
opened 2026-11-07 16:38:15 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1748
Author: @SpicyMarinara
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feat/gacha-forge-expression-portraits


📝 Commits (3)

  • a3fe0be feat(gacha-forge): expression portraits for story dialogue (#1742)
  • 60a390b chore(gacha-forge): release 1.24.7
  • 9697233 fix(gacha-forge): persona keeps its voice on shared names; release unspent combat clips (1.24.7)

📊 Changes

26 files changed (+2318 additions, -101 deletions)

View changed files

➕ artifacts/gacha-forge-1.24.7.zip (+0 -0)
📝 catalog/catalog.json (+12 -12)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+12 -12)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+12 -12)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/gacha-forge/CHANGELOG.md (+5 -0)
📝 packages/gacha-forge/README.md (+8 -0)
📝 packages/gacha-forge/bundle-patches.json (+112 -0)
📝 packages/gacha-forge/client.js (+100 -13)
📝 packages/gacha-forge/manifest.json (+9 -9)
📝 packages/gacha-forge/server.mjs (+429 -13)
📝 packages/gacha-forge/src/audio-client.mjs (+5 -4)
📝 packages/gacha-forge/src/browser-presentation.mjs (+37 -1)
📝 packages/gacha-forge/src/combat-voices-client.mjs (+6 -2)
📝 packages/gacha-forge/src/combat-voices-server.mjs (+6 -3)
➕ packages/gacha-forge/src/story-expressions-en.mjs (+28 -0)
➕ packages/gacha-forge/src/story-expressions-server.mjs (+395 -0)
➕ packages/gacha-forge/src/story-expressions.mjs (+15 -0)

...and 6 more files

📄 Description

Linked issue

Closes #1742

Why this change

Mari asked for story portraits that follow each line's emotion (anger, fear, sadness, joy), with the normal image as neutral, instead of always showing the same portrait. This was meant to ship together with the voices work in #1746. That PR merged with only its voices half (1.24.6), so expression portraits ship here as 1.24.7. The two small voices follow-up fixes Mari asked for join this PR as their own commit.

What changed

  • "Expression portraits" toggle: World → Sources → Images, shown only with an image connection, off by default.
    • Four expressions are painted per character look: the worn outfit, or the default portrait. For the persona the base is its Engine avatar.
    • Each expression is an edit of the current image, which is sent as the only reference, with a prompt that changes only the facial expression. Connections that cannot edit produce a redraw from that reference.
  • When painting happens: in the background on the low-priority lane, only for characters who speak in a scene that is written, pre-forged or opened. It never blocks a scene.
  • One set per base image: switching outfits back never pays twice. Redrawing a portrait or outfit prunes only its own set; gallery images are deleted after the document drops their refs.
  • Per line: the scene writer tags each dialogue or thought line with an optional expression in the same call. The story plate follows each line, including same-speaker changes, without flicker. Untagged lines and old scenes stay neutral.
  • Cost safety
    • A set is marked pending before the first paid image.
    • Every paid call re-checks the toggle and the connection.
    • The module is disposed with the package. After a teardown it never pays or writes set state.
    • A set that another instance took over is never paid for.
    • A pending set left behind by a crash or reload is never repainted automatically. Turning the toggle off and on allows one more attempt for the missing faces.
  • Voices follow-ups (from independent review of 1.24.6)
    • A story line whose speaker could be the persona (its surname, first word or an alias) no longer gets an NPC pool voice when the cast resolver sees a tie with another character. It uses the persona's own voice or stays silent.
    • Turning Voice other characters off while a combat clip is reserved but not yet synthesized now releases that reservation back to missing: a whitelisted released: true on the fail route, with the token compare-and-swap kept. Turning it back on never shows the paid-retry banner for a clip nothing was spent on.
  • Release: Gacha Forge 1.24.7. Manifest, one appended ledger entry per bundle, rebuilt bundles, catalog lanes, What's-new and CHANGELOG.

The voices code from 1.24.6 is kept as is. The expression map and the voices gender sit together in the story cast, and the scene prompt carries both the voices block and the expression field.

Validation

  • npm run check: passed.
  • Targeted regressions: persona-voices, formation-voices, formation-voices-sdk, audio, story-expressions, story-expressions-safety, location-ids, bundle-rebuild, battle-power and story-presentation. Catalog lanes and the release-notes regression also passed. The full regression suite runs in CI.
  • The build is reproducible: a second build leaves no changes. The ledger is a pure append against staging (one 1.24.7 entry per bundle).
  • Local CodeRabbit: 1 finding, a README version label (1.24.6 → 1.24.7), fixed in 969723306.
  • The two new voices regressions fail against the 1.24.6 code.
  • The feature went through independent adversarial review and two fix rounds before the 1.24.6 split, and a combined interaction check with voices (505 regressions passing).
  • Browser e2e runs in CI.

Manual verification

  • Turn on Expression portraits (World → Sources → Images) with an image connection and play a scene. Once the faces are painted, confirm the portrait changes on angry, afraid, sad or happy lines, and shows the normal image on calm lines.
  • Change a character's outfit and confirm their expressions follow the new outfit once painted, and that switching back reuses the old set without repainting.
  • Confirm the persona's expressions come from its Engine avatar.
  • Confirm the in-game What's-new shows 1.24.7.

🤖 Generated with Claude Code


🔄 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-Agents/pull/1748 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/gacha-forge-expression-portraits` --- ### 📝 Commits (3) - [`a3fe0be`](https://github.com/Pasta-Devs/Marinara-Agents/commit/a3fe0be7fb889155298ce991068eab8c7ef9fc04) feat(gacha-forge): expression portraits for story dialogue (#1742) - [`60a390b`](https://github.com/Pasta-Devs/Marinara-Agents/commit/60a390b2dc4c5f3c94cc2bf4a50de2986627ba2f) chore(gacha-forge): release 1.24.7 - [`9697233`](https://github.com/Pasta-Devs/Marinara-Agents/commit/96972330652ac0092b2da7993536e667fecb7b07) fix(gacha-forge): persona keeps its voice on shared names; release unspent combat clips (1.24.7) ### 📊 Changes **26 files changed** (+2318 additions, -101 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/gacha-forge-1.24.7.zip` (+0 -0) 📝 `catalog/catalog.json` (+12 -12) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+12 -12) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+12 -12) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/gacha-forge/CHANGELOG.md` (+5 -0) 📝 `packages/gacha-forge/README.md` (+8 -0) 📝 `packages/gacha-forge/bundle-patches.json` (+112 -0) 📝 `packages/gacha-forge/client.js` (+100 -13) 📝 `packages/gacha-forge/manifest.json` (+9 -9) 📝 `packages/gacha-forge/server.mjs` (+429 -13) 📝 `packages/gacha-forge/src/audio-client.mjs` (+5 -4) 📝 `packages/gacha-forge/src/browser-presentation.mjs` (+37 -1) 📝 `packages/gacha-forge/src/combat-voices-client.mjs` (+6 -2) 📝 `packages/gacha-forge/src/combat-voices-server.mjs` (+6 -3) ➕ `packages/gacha-forge/src/story-expressions-en.mjs` (+28 -0) ➕ `packages/gacha-forge/src/story-expressions-server.mjs` (+395 -0) ➕ `packages/gacha-forge/src/story-expressions.mjs` (+15 -0) _...and 6 more files_ </details> ### 📄 Description ## Linked issue Closes #1742 ## Why this change Mari asked for story portraits that follow each line's emotion (anger, fear, sadness, joy), with the normal image as neutral, instead of always showing the same portrait. This was meant to ship together with the voices work in #1746. That PR merged with only its voices half (1.24.6), so expression portraits ship here as 1.24.7. The two small voices follow-up fixes Mari asked for join this PR as their own commit. ## What changed - **"Expression portraits" toggle**: World → Sources → Images, shown only with an image connection, off by default. - Four expressions are painted per character look: the worn outfit, or the default portrait. For the persona the base is its Engine avatar. - Each expression is an edit of the current image, which is sent as the only reference, with a prompt that changes only the facial expression. Connections that cannot edit produce a redraw from that reference. - **When painting happens**: in the background on the low-priority lane, only for characters who speak in a scene that is written, pre-forged or opened. It never blocks a scene. - **One set per base image**: switching outfits back never pays twice. Redrawing a portrait or outfit prunes only its own set; gallery images are deleted after the document drops their refs. - **Per line**: the scene writer tags each dialogue or thought line with an optional `expression` in the same call. The story plate follows each line, including same-speaker changes, without flicker. Untagged lines and old scenes stay neutral. - **Cost safety** - A set is marked pending before the first paid image. - Every paid call re-checks the toggle and the connection. - The module is disposed with the package. After a teardown it never pays or writes set state. - A set that another instance took over is never paid for. - A pending set left behind by a crash or reload is never repainted automatically. Turning the toggle off and on allows one more attempt for the missing faces. - **Voices follow-ups (from independent review of 1.24.6)** - A story line whose speaker could be the persona (its surname, first word or an alias) no longer gets an NPC pool voice when the cast resolver sees a tie with another character. It uses the persona's own voice or stays silent. - Turning Voice other characters off while a combat clip is reserved but not yet synthesized now releases that reservation back to missing: a whitelisted `released: true` on the fail route, with the token compare-and-swap kept. Turning it back on never shows the paid-retry banner for a clip nothing was spent on. - **Release**: Gacha Forge 1.24.7. Manifest, one appended ledger entry per bundle, rebuilt bundles, catalog lanes, What's-new and CHANGELOG. The voices code from 1.24.6 is kept as is. The expression map and the voices gender sit together in the story cast, and the scene prompt carries both the voices block and the expression field. ## Validation - `npm run check`: passed. - Targeted regressions: persona-voices, formation-voices, formation-voices-sdk, audio, story-expressions, story-expressions-safety, location-ids, bundle-rebuild, battle-power and story-presentation. Catalog lanes and the release-notes regression also passed. The full regression suite runs in CI. - The build is reproducible: a second build leaves no changes. The ledger is a pure append against staging (one 1.24.7 entry per bundle). - Local CodeRabbit: 1 finding, a README version label (1.24.6 → 1.24.7), fixed in `969723306`. - The two new voices regressions fail against the 1.24.6 code. - The feature went through independent adversarial review and two fix rounds before the 1.24.6 split, and a combined interaction check with voices (505 regressions passing). - Browser e2e runs in CI. ### Manual verification - [ ] Turn on **Expression portraits** (World → Sources → Images) with an image connection and play a scene. Once the faces are painted, confirm the portrait changes on angry, afraid, sad or happy lines, and shows the normal image on calm lines. - [ ] Change a character's outfit and confirm their expressions follow the new outfit once painted, and that switching back reuses the old set without repainting. - [ ] Confirm the persona's expressions come from its Engine avatar. - [ ] Confirm the in-game What's-new shows 1.24.7. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:38:15 +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-Agents#1950
No description provided.