[PR #7059] [MERGED] feat(cards): optional image-prompt appearance override (#7053) #7449

Closed
opened 2026-10-23 04:19:55 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7059
Author: @ylli-selmani
Created: 10/4/2026
Status: ✅ Merged
Merged: 10/5/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feat/image-prompt-appearance-override-7053


📝 Commits (10+)

  • 9ff8a1d feat(cards): add optional image-prompt appearance override (#7053)
  • 768437e Merge branch 'staging' into feat/image-prompt-appearance-override-7053
  • 6c68925 fix(illustrator): send persona override to every image-prompt path (#7053)
  • 4ffe472 Merge remote-tracking branch 'privateStuff/feat/image-prompt-appearance-override-7053' into feat/image-prompt-appearance-override-7053
  • 2951024 fix(illustrator): send persona override to every image-prompt path (#7053)
  • 5169e35 fix(personas): keep the image override through export -> import (#7053)
  • e9ffacf Merge remote-tracking branch 'origin/staging' into feat/image-prompt-appearance-override-7053
  • 87add20 fix(game): include the chat persona in illustration appearance (#7053)
  • 3e2e13c Merge remote-tracking branch 'origin/staging' into feat/image-prompt-appearance-override-7053
  • 2169261 fix(review): build retry overrides outside the instruction branch, document the feature

📊 Changes

38 files changed (+1580 additions, -52 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 docs/characters/creating-and-editing-characters.md (+2 -1)
📝 docs/characters/personas.md (+1 -0)
📝 docs/conversation/selfies.md (+2 -0)
📝 docs/game/storyboard.md (+1 -1)
📝 docs/media/illustrator-agent.md (+2 -0)
📝 packages/client/src/components/characters/CharacterEditor.tsx (+59 -8)
📝 packages/client/src/components/personas/PersonaEditor.tsx (+68 -2)
📝 packages/client/src/localization/locales/en.json (+4 -0)
📝 packages/server/src/db/schema/characters.ts (+4 -0)
📝 packages/server/src/routes/characters.routes.ts (+4 -0)
📝 packages/server/src/routes/gallery.routes.ts (+10 -0)
📝 packages/server/src/routes/game.routes.ts (+67 -3)
📝 packages/server/src/routes/generate.routes.ts (+56 -2)
📝 packages/server/src/routes/generate/retry-agents-route.ts (+151 -4)
📝 packages/server/src/services/agents/agent-executor.ts (+81 -17)
📝 packages/server/src/services/chat-user-identity.ts (+28 -1)
📝 packages/server/src/services/generation/character-prompt-context.ts (+9 -0)
📝 packages/server/src/services/generation/conversation-selfie-command-runtime.ts (+14 -1)
📝 packages/server/src/services/image/character-prompts.ts (+60 -5)

...and 18 more files

📄 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

Closes #7053

Labeled bug, but this is a feature request (the label came from the Discord thread). Left as-is.

Why this change

A card's Appearance field does two jobs that pull in opposite directions. It is the narrator's reference, so it is written as prose — build, clothing, distinguishing features. It is also what image models receive, and that prose degrades a tag-trained model: the model reads sentences instead of tags, and scene-specific clothing gets baked into every generation after the scene has moved on.

The requester put it plainly: the Appearance block is good for the narrator but "fucks up an image model like novelAI". They asked for a second, image-shaped block — raven (dc), dc comics, teen titans, 1girl, solo, grey skin, purple hair — used for image prompts while the narrator keeps the prose.

This adds that as an opt-in override. Approved design from @SpicyMarinara: "Just make it an optional toggle under appearance and show the box only when it's on."

What changed

  • Added an opt-in Image Appearance Override under Appearance on character cards and personas. The override box appears only when the toggle is on.
  • The override is a separate field, never a replacement. Only the image-prompt builders read it; narrator prose, roleplay lore, {{appearance}} macros and the card-evolution-auditor block keep reading the untouched appearance. In agent-executor.ts it is read at exactly two sites (:3111, :3122), both inside the if (imageCapable) block.
  • Toggle on and text non-empty uses the override. Off, blank or whitespace falls back to the normal Appearance, so every existing card behaves as before. Enabled-but-blank falls back rather than blanking the prompt.
  • Characters store extensions.imageAppearanceEnabled and extensions.imageAppearance; the extensions blob is .passthrough(), so they round-trip with no schema work. Personas store the same names as top-level columns, since personas have no extensions bag and persist through an explicit write-through allowlist.
  • Covered: Illustrator caption reference, manual/retry illustration, Game mode storyboard, conversation selfies, Gallery selfies, and the avatar / character-sheet generators. Excluded because neither reads a card appearance: sprites (reads body.appearance) and Game tracker-NPC portraits (built from tracker state).
  • Custom illustrator-capable agents are covered too, which was not already working. The guard was agentTypes.includes("illustrator"), but a custom image agent keeps its own type id and is identified by the trigger_image_generation capability — the runtime lists these separately (agent-executor.ts:1979 vs :1983). The toggle showed in a custom agent's UI while the appearance block was never emitted. The guard is now capability-aware, defaulting to the old type check so batch behaviour is unchanged.
  • Storage format is not bumped; storage-format.json and STORAGE_VERSION stay 7. Rows are name-keyed JSON and normalizeRow back-fills a missing key from the column default, so existing rows read as disabled and empty. The number is a one-directional downgrade guard, unaffected by additive columns.
  • Added regression coverage, an [Unreleased] CHANGELOG entry, and updates to the five docs/ guides that describe the toggle this feature extends.

Three defects surfaced while validating, all in paths this feature touches: the persona write-through allowlist dropped the new columns, so the override vanished on save; persona export → import dropped both fields, because the native importer builds its payload from an explicit allow-list they were missing from; and Professor Mari's persona.create failed storage validation because its hand-maintained row builder omitted the columns.

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

  • pnpm check: passed (TypeScript, ESLint, Prettier, localization, production build). pnpm localization:check: passed, with 4 new semantic keys in the canonical en.json.
  • pnpm regression:prompt: 3/3. Focused: illustrator 6/6, persona 5/5, mari/db-review-durability 1/1.
  • Local CodeRabbit: 11 findings over three passes, 10 fixed, 1 dismissed with code evidence. The final pass caught a real bug: in the retry path the override map was built inside if (characterPromptInstruction), so a card with no caption instruction silently dropped every character override and fell back to card prose — the exact failure this feature prevents. Fixed, and the accompanying test now fails if the Game illustration path stops loading the persona.
  • Manual testing across NovelAI (Illustrator), Chroma (NanoGPT) and Game mode found three defects, all fixed, each with a regression that fails without its fix.

Manual verification notes

Verified by hand with character Jessica and persona Fel Lockheart, across NovelAI through the Illustrator, Chroma through NanoGPT, and Game mode:

  • The toggle renders on both editors and the override box appears only when it is on. Both persist across save and reopen, and toggling off and back on retains the typed text.
  • With the override on, image prompts use the override tags; with it off, and separately on but empty, they use the normal Appearance. The toggle is per-entity: Jessica off with Fel on produced prose for Jessica and tags for Fel in the same block.
  • Narrator chat text is unchanged — the main model's <lore><characters> block still receives the full Appearance prose.
  • Chroma sends override tags in the engine-appended "<name>'s Appearance: …" block for characters and personas.
  • The avatar and character-sheet generators seed the override, checked on, off, and on-but-empty. A custom agent with image-generation capability receives the override. Conversation selfies use it, from the button and when asking the character for one.
  • Game mode storyboard injects <character_appearance_context> into the agent's input and the override text appears there.
  • A persona with the override on exports and re-imports with both values intact.
  • Light and dark mode, and a mobile viewport, render the toggle and box correctly.

Not verified by the agent: no live image-model call was made, so "the override reaches the prompt" rests on code paths, regression proofs and captured request text rather than an inspected generated image. Docker was not run during the original contributor validation; see the maintainer follow-up below for later checks.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) 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)

Added a user-facing CHANGELOG.md entry and updated the five docs/ guides that describe the toggle this feature extends. Because docs/ changed, a [docs-i18n] follow-up is required: opened as #7080. No version bump.

UI evidence (if applicable)

before:
before

after:

  • toggled off:
image appearance override toggled off
  • toggled on:
image appearance override toggled on
  • mobile:
mobile version
  • generate avatar pulls the override:
uses override
  • mobile screenshots of the image override being attached, instead of the old appearance field: (note that at least novelAI image models/storyboard calls don't get automatic appearance attachements at all; they get injected into the agent's prompt instead.)
    Screenshot_20261005_031439_Samsung Browser
    Screenshot_20261005_031413_Samsung Browser

Notes for reviewers

  • The diff is larger than the title implies: persona storage (allowlist, so persistence, projection, snapshots, version restore, export and Professor Mari's row builder all need the field) and the Game-mode image channel. Both are in scope because the existing "Attach matching character appearance descriptions to image prompts" toggle governs characters and personas alike — cards only would leave personas sending prose that wrecks the image.
  • Follow-up candidate: four places must declare a persona column — the DB schema, the storage write-fields allowlist, the projector, and buildPersonaCreateRow. Each is an independent silent-failure surface; two bit us here. Consolidating them is a redesign of persona persistence, so it is out of scope.
  • One CodeRabbit finding was dismissed with code evidence. It asked that the Illustrator blocks be re-gated on agentTypes.includes("illustrator"), warning the broadening leaks Illustrator directives to custom agents. The two force flags are set in mutually exclusive branches (retry-agents-route.ts:1482 requires illustrator; :1489 is the single-agent custom case), and the custom case already has its own <manual_image_request> block. Applying it would have re-broken the custom-agent support this PR adds.

Summary by CodeRabbit

  • New Features
    • Character cards and personas can use a separate image appearance description. The setting is off by default; when enabled with nonblank text, it replaces the regular Appearance text in image prompts and avatar generation. Otherwise, existing appearance behavior continues.
    • The override applies to chat illustrations, conversation selfies, Game mode, and custom image agents. The narrator continues to use the full Appearance text.
  • Documentation
    • Updated character, persona, selfie, Game mode, and image-agent guides with details about the setting.

Maintainer review follow-up

The remaining CodeRabbit issue also exposed two incomplete earlier fixes. Custom image agents now receive the selected appearance reference without needing a built-in Illustrator caption instruction. Normal generation prepares image-only overrides independently, and native-caption fallbacks resolve both stored personas and characters used as the user identity. The narrator's original Appearance stays unchanged. Game preview and generation now have actual route-level proof instead of relying only on helper and source checks.

Validation of 36b9b76e29d94be388ad908a72808fb2fe1b2d13:

  • pnpm check: passed (localization, formatting, lint/types and production build).
  • Illustrator regressions: 6/6; persona API regressions: 2/2; prompt, attachments and context-fit regressions: 3/3.
  • New route regressions: 16 normal/retry scenarios and 5 Game scenarios through both preview and generation. Includes enabled/disabled/blank overrides, attachment off, stored and character-backed identities, partial native captions and unchanged narrator lore. Provider transports are local/synthetic; no paid image-model call was made.
  • The new generation regression fails against the pre-fix head with the reported normal-Appearance leak, and passes with the fixes.
  • pnpm smoke:ui: 7/7. pnpm smoke:production: 3/3 (desktop Chromium, mobile Chromium, mobile WebKit).
  • Local CodeRabbit review: completed, 0 findings across the seven follow-up files.
  • Native ARM64 container build and isolated runtime check: passed. /api/health and build metadata report the tested commit; frontend, multiplayer guest assets and the chat tutorial are served successfully.

Documentation-only follow-up e032c12dddef9cf0b61fbc7cd15a16648ac72146 clarifies the avatar prompt fallback; prettier --check and git diff --check passed. Application code remains identical to the validated 36b9b76e2.

Manual follow-up: verify a generated image with a real image provider and physical-device behavior. Existing contributor screenshots remain above. Translation issue #7080 is being handled separately on docs-i18n after this lands.


🔄 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/7059 **Author:** [@ylli-selmani](https://github.com/ylli-selmani) **Created:** 10/4/2026 **Status:** ✅ Merged **Merged:** 10/5/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/image-prompt-appearance-override-7053` --- ### 📝 Commits (10+) - [`9ff8a1d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9ff8a1d32fdeb86f3f4a5b03cc70b705271d67cf) feat(cards): add optional image-prompt appearance override (#7053) - [`768437e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/768437e95396abeb5455cb1d266150c94429771b) Merge branch 'staging' into feat/image-prompt-appearance-override-7053 - [`6c68925`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6c689254b8914b501714c7b19ad02c7a1214a940) fix(illustrator): send persona override to every image-prompt path (#7053) - [`4ffe472`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4ffe47267931305a79b543d96032e95d5be37b25) Merge remote-tracking branch 'privateStuff/feat/image-prompt-appearance-override-7053' into feat/image-prompt-appearance-override-7053 - [`2951024`](https://github.com/Pasta-Devs/Marinara-Engine/commit/29510247f619013ce49c310ec62eea2bbdf3239e) fix(illustrator): send persona override to every image-prompt path (#7053) - [`5169e35`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5169e35c9a5bcd744d8d2a4f523d3493634e3549) fix(personas): keep the image override through export -> import (#7053) - [`e9ffacf`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e9ffacfc1dd51473da4023a922ae4aa5a6bfae50) Merge remote-tracking branch 'origin/staging' into feat/image-prompt-appearance-override-7053 - [`87add20`](https://github.com/Pasta-Devs/Marinara-Engine/commit/87add204b901add38103cfa98c770ce5f42a6e43) fix(game): include the chat persona in illustration appearance (#7053) - [`3e2e13c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3e2e13cc1883169f6ff15b00a000838a16a07768) Merge remote-tracking branch 'origin/staging' into feat/image-prompt-appearance-override-7053 - [`2169261`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2169261f1a06d51d6034f114039666148f543386) fix(review): build retry overrides outside the instruction branch, document the feature ### 📊 Changes **38 files changed** (+1580 additions, -52 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `docs/characters/creating-and-editing-characters.md` (+2 -1) 📝 `docs/characters/personas.md` (+1 -0) 📝 `docs/conversation/selfies.md` (+2 -0) 📝 `docs/game/storyboard.md` (+1 -1) 📝 `docs/media/illustrator-agent.md` (+2 -0) 📝 `packages/client/src/components/characters/CharacterEditor.tsx` (+59 -8) 📝 `packages/client/src/components/personas/PersonaEditor.tsx` (+68 -2) 📝 `packages/client/src/localization/locales/en.json` (+4 -0) 📝 `packages/server/src/db/schema/characters.ts` (+4 -0) 📝 `packages/server/src/routes/characters.routes.ts` (+4 -0) 📝 `packages/server/src/routes/gallery.routes.ts` (+10 -0) 📝 `packages/server/src/routes/game.routes.ts` (+67 -3) 📝 `packages/server/src/routes/generate.routes.ts` (+56 -2) 📝 `packages/server/src/routes/generate/retry-agents-route.ts` (+151 -4) 📝 `packages/server/src/services/agents/agent-executor.ts` (+81 -17) 📝 `packages/server/src/services/chat-user-identity.ts` (+28 -1) 📝 `packages/server/src/services/generation/character-prompt-context.ts` (+9 -0) 📝 `packages/server/src/services/generation/conversation-selfie-command-runtime.ts` (+14 -1) 📝 `packages/server/src/services/image/character-prompts.ts` (+60 -5) _...and 18 more files_ </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`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Closes #7053 Labeled `bug`, but this is a feature request (the label came from the Discord thread). Left as-is. ## Why this change A card's Appearance field does two jobs that pull in opposite directions. It is the narrator's reference, so it is written as prose — build, clothing, distinguishing features. It is also what image models receive, and that prose degrades a tag-trained model: the model reads sentences instead of tags, and scene-specific clothing gets baked into every generation after the scene has moved on. The requester put it plainly: the Appearance block is good for the narrator but "fucks up an image model like novelAI". They asked for a second, image-shaped block — `raven (dc), dc comics, teen titans, 1girl, solo, grey skin, purple hair` — used for image prompts while the narrator keeps the prose. This adds that as an opt-in override. Approved design from @SpicyMarinara: "Just make it an optional toggle under appearance and show the box only when it's on." ## What changed - Added an opt-in **Image Appearance Override** under Appearance on character cards and personas. The override box appears only when the toggle is on. - The override is a separate field, never a replacement. Only the image-prompt builders read it; narrator prose, roleplay lore, `{{appearance}}` macros and the card-evolution-auditor block keep reading the untouched `appearance`. In `agent-executor.ts` it is read at exactly two sites (`:3111`, `:3122`), both inside the `if (imageCapable)` block. - Toggle on **and** text non-empty uses the override. Off, blank or whitespace falls back to the normal Appearance, so every existing card behaves as before. Enabled-but-blank falls back rather than blanking the prompt. - Characters store `extensions.imageAppearanceEnabled` and `extensions.imageAppearance`; the `extensions` blob is `.passthrough()`, so they round-trip with no schema work. Personas store the same names as top-level columns, since personas have no `extensions` bag and persist through an explicit write-through allowlist. - Covered: Illustrator caption reference, manual/retry illustration, Game mode storyboard, conversation selfies, Gallery selfies, and the avatar / character-sheet generators. Excluded because neither reads a card appearance: sprites (reads `body.appearance`) and Game tracker-NPC portraits (built from tracker state). - Custom illustrator-capable agents are covered too, which was **not** already working. The guard was `agentTypes.includes("illustrator")`, but a custom image agent keeps its own type id and is identified by the `trigger_image_generation` capability — the runtime lists these separately (`agent-executor.ts:1979` vs `:1983`). The toggle showed in a custom agent's UI while the appearance block was never emitted. The guard is now capability-aware, defaulting to the old type check so batch behaviour is unchanged. - Storage format is **not** bumped; `storage-format.json` and `STORAGE_VERSION` stay `7`. Rows are name-keyed JSON and `normalizeRow` back-fills a missing key from the column default, so existing rows read as disabled and empty. The number is a one-directional downgrade guard, unaffected by additive columns. - Added regression coverage, an `[Unreleased]` CHANGELOG entry, and updates to the five `docs/` guides that describe the toggle this feature extends. Three defects surfaced while validating, all in paths this feature touches: the persona write-through allowlist dropped the new columns, so the override vanished on save; persona export → import dropped both fields, because the native importer builds its payload from an explicit allow-list they were missing from; and Professor Mari's `persona.create` failed storage validation because its hand-maintained row builder omitted the columns. ## Validation - [x] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` --- - `pnpm check`: passed (TypeScript, ESLint, Prettier, localization, production build). `pnpm localization:check`: passed, with 4 new semantic keys in the canonical `en.json`. - `pnpm regression:prompt`: 3/3. Focused: illustrator 6/6, persona 5/5, `mari/db-review-durability` 1/1. - Local CodeRabbit: 11 findings over three passes, 10 fixed, 1 dismissed with code evidence. The final pass caught a real bug: in the retry path the override map was built inside `if (characterPromptInstruction)`, so a card with no caption instruction silently dropped every character override and fell back to card prose — the exact failure this feature prevents. Fixed, and the accompanying test now fails if the Game illustration path stops loading the persona. - Manual testing across NovelAI (Illustrator), Chroma (NanoGPT) and Game mode found three defects, all fixed, each with a regression that fails without its fix. ### Manual verification notes Verified by hand with character **Jessica** and persona **Fel Lockheart**, across NovelAI through the Illustrator, Chroma through NanoGPT, and Game mode: - The toggle renders on both editors and the override box appears only when it is on. Both persist across save and reopen, and toggling off and back on retains the typed text. - With the override on, image prompts use the override tags; with it off, and separately on but empty, they use the normal Appearance. The toggle is per-entity: Jessica off with Fel on produced prose for Jessica and tags for Fel in the same block. - Narrator chat text is unchanged — the main model's `<lore><characters>` block still receives the full Appearance prose. - Chroma sends override tags in the engine-appended `"<name>'s Appearance: …"` block for characters **and** personas. - The avatar and character-sheet generators seed the override, checked on, off, and on-but-empty. A custom agent with image-generation capability receives the override. Conversation selfies use it, from the button and when asking the character for one. - Game mode storyboard injects `<character_appearance_context>` into the agent's input and the override text appears there. - A persona with the override on exports and re-imports with both values intact. - Light and dark mode, and a mobile viewport, render the toggle and box correctly. Not verified by the agent: no live image-model call was made, so "the override reaches the prompt" rests on code paths, regression proofs and captured request text rather than an inspected generated image. Docker was not run during the original contributor validation; see the maintainer follow-up below for later checks. ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [x] 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) Added a user-facing `CHANGELOG.md` entry and updated the five `docs/` guides that describe the toggle this feature extends. Because `docs/` changed, a `[docs-i18n]` follow-up is required: opened as #7080. No version bump. ## UI evidence (if applicable) before: <img width="586" height="348" alt="before" src="https://github.com/user-attachments/assets/90486720-f23e-473b-a481-e644f2694212" /> after: - toggled off: <img width="491" height="296" alt="image appearance override toggled off" src="https://github.com/user-attachments/assets/93927c8b-ce76-4177-810d-eedf99927522" /> - toggled on: <img width="506" height="511" alt="image appearance override toggled on" src="https://github.com/user-attachments/assets/22a52a1f-7f49-4796-a7de-d3688512168a" /> - mobile: <img width="233" height="524" alt="mobile version" src="https://github.com/user-attachments/assets/1ca70bf1-86e9-4e12-bfc7-6b6f0f00197e" /> - generate avatar pulls the override: <img width="531" height="828" alt="uses override" src="https://github.com/user-attachments/assets/ae6b0762-9c2d-494f-8203-de0ab8dbed74" /> - mobile screenshots of the image override being attached, instead of the old appearance field: (note that at least novelAI image models/storyboard calls don't get automatic appearance attachements at all; they get injected into the agent's prompt instead.) <img width="250" height="550" alt="Screenshot_20261005_031439_Samsung Browser" src="https://github.com/user-attachments/assets/3bbbaf05-721e-4780-8da2-392a33b6e97f" /> <img width="250" height="550" alt="Screenshot_20261005_031413_Samsung Browser" src="https://github.com/user-attachments/assets/42ce3b8a-3a0b-4ec9-92a6-597fa5ee2dd0" /> ### Notes for reviewers - The diff is larger than the title implies: persona storage (allowlist, so persistence, projection, snapshots, version restore, export and Professor Mari's row builder all need the field) and the Game-mode image channel. Both are in scope because the existing "Attach matching character appearance descriptions to image prompts" toggle governs characters and personas alike — cards only would leave personas sending prose that wrecks the image. - Follow-up candidate: **four** places must declare a persona column — the DB schema, the storage write-fields allowlist, the projector, and `buildPersonaCreateRow`. Each is an independent silent-failure surface; two bit us here. Consolidating them is a redesign of persona persistence, so it is out of scope. - One CodeRabbit finding was dismissed with code evidence. It asked that the Illustrator blocks be re-gated on `agentTypes.includes("illustrator")`, warning the broadening leaks Illustrator directives to custom agents. The two force flags are set in mutually exclusive branches (`retry-agents-route.ts:1482` requires `illustrator`; `:1489` is the single-agent custom case), and the custom case already has its own `<manual_image_request>` block. Applying it would have re-broken the custom-agent support this PR adds. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Character cards and personas can use a separate image appearance description. The setting is off by default; when enabled with nonblank text, it replaces the regular Appearance text in image prompts and avatar generation. Otherwise, existing appearance behavior continues. * The override applies to chat illustrations, conversation selfies, Game mode, and custom image agents. The narrator continues to use the full Appearance text. * **Documentation** * Updated character, persona, selfie, Game mode, and image-agent guides with details about the setting. <!-- end of auto-generated comment: release notes by coderabbit.ai --> ## Maintainer review follow-up The remaining CodeRabbit issue also exposed two incomplete earlier fixes. Custom image agents now receive the selected appearance reference without needing a built-in Illustrator caption instruction. Normal generation prepares image-only overrides independently, and native-caption fallbacks resolve both stored personas and characters used as the user identity. The narrator's original Appearance stays unchanged. Game preview and generation now have actual route-level proof instead of relying only on helper and source checks. Validation of `36b9b76e29d94be388ad908a72808fb2fe1b2d13`: - `pnpm check`: passed (localization, formatting, lint/types and production build). - Illustrator regressions: 6/6; persona API regressions: 2/2; prompt, attachments and context-fit regressions: 3/3. - New route regressions: 16 normal/retry scenarios and 5 Game scenarios through both preview and generation. Includes enabled/disabled/blank overrides, attachment off, stored and character-backed identities, partial native captions and unchanged narrator lore. Provider transports are local/synthetic; no paid image-model call was made. - The new generation regression fails against the pre-fix head with the reported normal-Appearance leak, and passes with the fixes. - `pnpm smoke:ui`: 7/7. `pnpm smoke:production`: 3/3 (desktop Chromium, mobile Chromium, mobile WebKit). - Local CodeRabbit review: completed, 0 findings across the seven follow-up files. - Native ARM64 container build and isolated runtime check: passed. `/api/health` and build metadata report the tested commit; frontend, multiplayer guest assets and the chat tutorial are served successfully. Documentation-only follow-up `e032c12dddef9cf0b61fbc7cd15a16648ac72146` clarifies the avatar prompt fallback; `prettier --check` and `git diff --check` passed. Application code remains identical to the validated `36b9b76e2`. Manual follow-up: verify a generated image with a real image provider and physical-device behavior. Existing contributor screenshots remain above. Translation issue #7080 is being handled separately on `docs-i18n` after this lands. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:19:55 +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#7449
No description provided.