[PR #7845] [MERGED] feat(video): images, videos or both for Attach Card Appearance and Send Avatar References #7966

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

📋 Pull Request Information

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

Base: staging ← Head: feat/media-reference-scope


📝 Commits (8)

  • f8bb6b9 feat(video): choose images, videos or both for appearance and avatar references
  • 3efb003 fix(video): Roleplay clips include the persona's appearance when the clip names them
  • b8a6987 fix(video): Reset on Attach Card Appearance also clears the video half
  • 3f8858d fix(video): CodeRabbit fixes for reference scope
  • 1fcb547 docs(video): Attach Card Appearance reaches image prompts only when images are included
  • 6d3567d Merge branch 'staging' into feat/media-reference-scope
  • a1922eb fix(video): Conversation clips include a character played as the user
  • a50ea1f Merge branch 'staging' into feat/media-reference-scope

📊 Changes

11 files changed (+479 additions, -56 deletions)

View changed files

📝 docs/conversation/getting-started.md (+1 -1)
📝 docs/conversation/selfies.md (+6 -3)
📝 docs/media/illustrator-agent.md (+10 -3)
📝 packages/client/src/components/chat/AgentSettingsControls.tsx (+54 -0)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+57 -35)
📝 packages/client/src/localization/locales/en.json (+7 -0)
📝 packages/server/src/routes/gallery.routes.ts (+49 -2)
📝 packages/server/src/services/generation/conversation-video-runtime.ts (+34 -12)
📝 packages/shared/src/types/chat-preset.ts (+3 -0)
📝 packages/shared/src/types/chat.ts (+9 -0)
➕ scripts/regressions/media-reference-scope.regression.ts (+249 -0)

📄 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 #7844
Part of #7545 (item 5). @SpicyMarinara

Why this change

  • Attach Card Appearance and Send Avatar References only worked for pictures. Now that Conversation characters send video messages (#7651) and Roleplay pictures can be animated, a clip's prompt got none of the card appearance text, so the video model had to guess how the characters look.
  • A Conversation clip set to First frame: Prompt only had nothing to show the character at all.
  • Both settings were all-or-nothing switches, so you couldn't use them for videos without also using them for pictures, or the other way round.

What changed

Nothing that worked before stops working. Existing chats keep their picture settings, and the new video side starts Off.

  • Conversation, Chat Settings, Selfies card: Send Avatar References and Attach Card Appearance are now dropdowns: Off, Images only, Videos only or Images and videos. They moved from the selfie settings to below Video messages, so they are visible even while selfies are off. Images only behaves exactly like the old switch turned on.
  • Conversation video messages, Attach Card Appearance with videos: the clip's prompt gets the appearance text of each character it names, and yours when it names you: your persona's, or the character's you play as when that character is not one of the chat's characters. An enabled Image Appearance Override is used instead of Appearance, as for pictures. A prompt you edited in the review window is sent as written.
  • Conversation video messages, Send Avatar References with videos: a clip whose First frame is Prompt only starts from the character's avatar or sprite. Without a readable avatar it stays a prompt-only clip. The other first frames already start from a picture of the character and are unchanged, because video services take one starting picture.
  • First frame label: while Send Avatar References includes videos, Prompt only (no picture) reads Prompt only (avatar from Send Avatar References).
  • Roleplay, Chat Settings, Illustrator card: Attach Card Appearance is the same dropdown. With videos, a clip made from a Gallery picture gets the appearance text of the characters its motion direction names, including your persona when the direction names them. Use agent default resets both halves. Send Avatar References stays a picture-only switch in Roleplay, because a Roleplay clip here always starts from a picture.
  • Settings profiles: the three new video settings are saved and followed like the picture settings.
  • Docs: docs/conversation/selfies.md, docs/conversation/getting-started.md and docs/media/illustrator-agent.md describe the dropdowns.

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

Automated runs on 1fcb5470a (on staging 9565a2741):

  • pnpm check: passes. Its one lint warning, in HomeProfessorMariChat.tsx, is not from this PR.
  • pnpm localization:check: passes.
  • Regression media-reference-scope: passes. Through the real PATCH /api/chats/:id/metadata and gallery routes, with fake text and ComfyUI services, it covers:
    • Conversation: off adds nothing; the picture settings alone, as older chats have them, leave videos unchanged; with videos on, the character's and the named persona's Appearance lines join the prompt, and a Prompt only clip sends the avatar as its first frame.
    • Roleplay: the Gallery clip preview gets the character's and the named persona's Appearance lines only with the video half on.
    • The Conversation persona check fails without the fix in 3f8858dee.
  • Related regressions pass: convo-video-command, convo-video-character-galleries.
  • Full pnpm regression: 934/935 pass. The failure, multiplayer-peer-server-security (ERR_TLS_CERT_ALTNAME_INVALID, host ::1 versus a localhost certificate), fails the same way on staging 9565a2741 on this machine. This PR does not touch multiplayer or TLS.
  • Local CodeRabbit review (CLI 0.9.0, base staging): 5 findings, 4 fixed in 3f8858dee. Declined: 16px text for the new dropdown on phones, because globals.css already sets every select to 1rem on touch screens (@media (pointer: coarse), "prevents iOS zoom on focus"). A second review of the fixes found 1 docs wording point, fixed in 1fcb5470a.
  • GitHub CodeRabbit review on 6d3567d84 (after the maintainer's staging merge): 2 comments.
    • Fixed in a1922eb73: a Conversation chat where you play as a character outside the chat now gets that character's Appearance line. media-reference-scope covers it through PATCH /api/chats/:id, and the check fails without the fix.
    • Declined, with the reason in the thread: 16px text for the new dropdown on phones, the same point the local review raised.
  • Runs on a1922eb73 (Node 24.21.0, which staging now requires): pnpm check passes; media-reference-scope, convo-video-command and convo-video-character-galleries pass; a local CodeRabbit review of a1922eb73 has 0 findings.
  • Not run: pnpm smoke:ui and pnpm regression:ui.

Manual verification notes

  • Manually verify in a Conversation chat's Chat Settings that Send Avatar References and Attach Card Appearance appear below Video messages as dropdowns, and that an older chat with the old switches on shows Images only.
  • Manually verify a selfie still gets appearance text and avatar references with Images only, and gets neither with Videos only.
  • Manually verify a /video clip that names a character (and your persona) gets their appearance text with Attach Card Appearance set to Videos only (check the prompt with Expose media prompts before sending, or the debug log).
  • Manually verify First frame: Prompt only shows Prompt only (avatar from Send Avatar References) and the clip starts from the avatar once Send Avatar References includes videos.
  • Manually verify in a Roleplay chat that Animate on a Gallery picture adds the named characters' appearance text with Attach Card Appearance on Videos only, and that Use agent default turns both halves back.
  • Manually verify a settings profile saved with the video halves on brings them to a new chat.
  • Manually verify the dropdowns on a phone-width screen and in light and dark mode.

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)

English docs updated: docs/conversation/selfies.md, docs/conversation/getting-started.md, docs/media/illustrator-agent.md. Translations: #7846

UI evidence (if applicable)

Screenshot from 2026-10-19 14-49-05 Screenshot from 2026-10-19 14-49-30

Summary by CodeRabbit

  • New Features
    • Configure avatar references and character appearance separately for images, videos, both, or neither.
    • Video prompts can include matched character appearance details when enabled. Conversation videos can use a character’s avatar as the starting image in “Prompt only” mode when avatar references are enabled.
    • Profile settings for these options now carry over to follower chats.
  • Documentation
    • Updated selfie and Illustrator guides to explain media-specific settings and video behavior.

🔄 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/7845 **Author:** [@JamesMowery](https://github.com/JamesMowery) **Created:** 10/19/2026 **Status:** ✅ Merged **Merged:** 10/19/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/media-reference-scope` --- ### 📝 Commits (8) - [`f8bb6b9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f8bb6b924160e91bf4db45fed300053a5c7a9945) feat(video): choose images, videos or both for appearance and avatar references - [`3efb003`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3efb003360a1d7f31c7f5dbabbf8b35462abc3cd) fix(video): Roleplay clips include the persona's appearance when the clip names them - [`b8a6987`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b8a6987dbfa8fece4838322906dee1480f3560a7) fix(video): Reset on Attach Card Appearance also clears the video half - [`3f8858d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3f8858dee75471df6bc75f44f24dc179cb0089d7) fix(video): CodeRabbit fixes for reference scope - [`1fcb547`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1fcb5470a5fd2400b1f7a212718b927330534ca9) docs(video): Attach Card Appearance reaches image prompts only when images are included - [`6d3567d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6d3567d84610255e38b0e3e5172e861c4106b962) Merge branch 'staging' into feat/media-reference-scope - [`a1922eb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a1922eb73483e21d6bfb368677312a2814ace5c8) fix(video): Conversation clips include a character played as the user - [`a50ea1f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a50ea1f73a7d9cffe4cc62860bc0ab12b452580a) Merge branch 'staging' into feat/media-reference-scope ### 📊 Changes **11 files changed** (+479 additions, -56 deletions) <details> <summary>View changed files</summary> 📝 `docs/conversation/getting-started.md` (+1 -1) 📝 `docs/conversation/selfies.md` (+6 -3) 📝 `docs/media/illustrator-agent.md` (+10 -3) 📝 `packages/client/src/components/chat/AgentSettingsControls.tsx` (+54 -0) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+57 -35) 📝 `packages/client/src/localization/locales/en.json` (+7 -0) 📝 `packages/server/src/routes/gallery.routes.ts` (+49 -2) 📝 `packages/server/src/services/generation/conversation-video-runtime.ts` (+34 -12) 📝 `packages/shared/src/types/chat-preset.ts` (+3 -0) 📝 `packages/shared/src/types/chat.ts` (+9 -0) ➕ `scripts/regressions/media-reference-scope.regression.ts` (+249 -0) </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 #7844 Part of #7545 (item 5). @SpicyMarinara ## Why this change - **Attach Card Appearance** and **Send Avatar References** only worked for pictures. Now that Conversation characters send video messages (#7651) and Roleplay pictures can be animated, a clip's prompt got none of the card appearance text, so the video model had to guess how the characters look. - A Conversation clip set to **First frame: Prompt only** had nothing to show the character at all. - Both settings were all-or-nothing switches, so you couldn't use them for videos without also using them for pictures, or the other way round. ## What changed Nothing that worked before stops working. Existing chats keep their picture settings, and the new video side starts **Off**. - **Conversation, Chat Settings, Selfies card**: **Send Avatar References** and **Attach Card Appearance** are now dropdowns: **Off**, **Images only**, **Videos only** or **Images and videos**. They moved from the selfie settings to below **Video messages**, so they are visible even while selfies are off. **Images only** behaves exactly like the old switch turned on. - **Conversation video messages, Attach Card Appearance with videos**: the clip's prompt gets the appearance text of each character it names, and yours when it names you: your persona's, or the character's you play as when that character is not one of the chat's characters. An enabled **Image Appearance Override** is used instead of **Appearance**, as for pictures. A prompt you edited in the review window is sent as written. - **Conversation video messages, Send Avatar References with videos**: a clip whose **First frame** is **Prompt only** starts from the character's avatar or sprite. Without a readable avatar it stays a prompt-only clip. The other first frames already start from a picture of the character and are unchanged, because video services take one starting picture. - **First frame label**: while **Send Avatar References** includes videos, **Prompt only (no picture)** reads **Prompt only (avatar from Send Avatar References)**. - **Roleplay, Chat Settings, Illustrator card**: **Attach Card Appearance** is the same dropdown. With videos, a clip made from a Gallery picture gets the appearance text of the characters its motion direction names, including your persona when the direction names them. **Use agent default** resets both halves. **Send Avatar References** stays a picture-only switch in Roleplay, because a Roleplay clip here always starts from a picture. - **Settings profiles**: the three new video settings are saved and followed like the picture settings. - **Docs**: `docs/conversation/selfies.md`, `docs/conversation/getting-started.md` and `docs/media/illustrator-agent.md` describe the dropdowns. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [x] `pnpm check` passes locally - [x] 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` Automated runs on `1fcb5470a` (on `staging` `9565a2741`): - `pnpm check`: passes. Its one lint warning, in `HomeProfessorMariChat.tsx`, is not from this PR. - `pnpm localization:check`: passes. - Regression `media-reference-scope`: passes. Through the real `PATCH /api/chats/:id/metadata` and gallery routes, with fake text and ComfyUI services, it covers: - Conversation: off adds nothing; the picture settings alone, as older chats have them, leave videos unchanged; with videos on, the character's and the named persona's Appearance lines join the prompt, and a **Prompt only** clip sends the avatar as its first frame. - Roleplay: the Gallery clip preview gets the character's and the named persona's Appearance lines only with the video half on. - The Conversation persona check fails without the fix in `3f8858dee`. - Related regressions pass: `convo-video-command`, `convo-video-character-galleries`. - Full `pnpm regression`: 934/935 pass. The failure, `multiplayer-peer-server-security` (`ERR_TLS_CERT_ALTNAME_INVALID`, host `::1` versus a `localhost` certificate), fails the same way on `staging` `9565a2741` on this machine. This PR does not touch multiplayer or TLS. - Local CodeRabbit review (CLI 0.9.0, base `staging`): 5 findings, 4 fixed in `3f8858dee`. Declined: 16px text for the new dropdown on phones, because `globals.css` already sets every `select` to `1rem` on touch screens (`@media (pointer: coarse)`, "prevents iOS zoom on focus"). A second review of the fixes found 1 docs wording point, fixed in `1fcb5470a`. - GitHub CodeRabbit review on `6d3567d84` (after the maintainer's `staging` merge): 2 comments. - Fixed in `a1922eb73`: a Conversation chat where you play as a character outside the chat now gets that character's Appearance line. `media-reference-scope` covers it through `PATCH /api/chats/:id`, and the check fails without the fix. - Declined, with the reason in the thread: 16px text for the new dropdown on phones, the same point the local review raised. - Runs on `a1922eb73` (Node 24.21.0, which `staging` now requires): `pnpm check` passes; `media-reference-scope`, `convo-video-command` and `convo-video-character-galleries` pass; a local CodeRabbit review of `a1922eb73` has 0 findings. - Not run: `pnpm smoke:ui` and `pnpm regression:ui`. ### Manual verification notes - Manually verify in a Conversation chat's Chat Settings that **Send Avatar References** and **Attach Card Appearance** appear below **Video messages** as dropdowns, and that an older chat with the old switches on shows **Images only**. - Manually verify a selfie still gets appearance text and avatar references with **Images only**, and gets neither with **Videos only**. - Manually verify a `/video` clip that names a character (and your persona) gets their appearance text with **Attach Card Appearance** set to **Videos only** (check the prompt with **Expose media prompts before sending**, or the debug log). - Manually verify **First frame: Prompt only** shows **Prompt only (avatar from Send Avatar References)** and the clip starts from the avatar once **Send Avatar References** includes videos. - Manually verify in a Roleplay chat that **Animate** on a Gallery picture adds the named characters' appearance text with **Attach Card Appearance** on **Videos only**, and that **Use agent default** turns both halves back. - Manually verify a settings profile saved with the video halves on brings them to a new chat. - Manually verify the dropdowns on a phone-width screen and in light and dark mode. ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README) 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) English docs updated: `docs/conversation/selfies.md`, `docs/conversation/getting-started.md`, `docs/media/illustrator-agent.md`. Translations: #7846 ## UI evidence (if applicable) <img width="594" height="698" alt="Screenshot from 2026-10-19 14-49-05" src="https://github.com/user-attachments/assets/9c3d46af-ef6e-42ce-b151-8eea52f62991" /> <img width="594" height="698" alt="Screenshot from 2026-10-19 14-49-30" src="https://github.com/user-attachments/assets/a8505bd7-697b-46b9-97b3-e64faa51128a" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Configure avatar references and character appearance separately for images, videos, both, or neither. * Video prompts can include matched character appearance details when enabled. Conversation videos can use a character’s avatar as the starting image in “Prompt only” mode when avatar references are enabled. * Profile settings for these options now carry over to follower chats. * **Documentation** * Updated selfie and Illustrator guides to explain media-specific settings and video behavior. <!-- 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:09:14 +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#7966
No description provided.