[PR #7565] [MERGED] feat(video): play generated videos inline in Roleplay and Conversation #7800

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

📋 Pull Request Information

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

Base: staging ← Head: feat/inline-chat-videos


📝 Commits (10+)

  • fa4312e feat(video): play generated videos inline in Roleplay and Conversation
  • 3bfa6d3 fix(video): review follow-ups for inline chat videos
  • 0a60ee2 fix(video): show a message's videos even when its text is an image link
  • f24101e fix(video): put Gallery clips under the newest reply
  • fb79101 fix(video): choose a Gallery clip's reply after the clip is made
  • 26cbf40 fix(video): leave Game Mode messages without inline clips
  • cac45af Merge branch 'staging' into feat/inline-chat-videos
  • 3df933e Merge branch 'staging' into feat/inline-chat-videos
  • 23b3b46 Merge branch 'staging' into feat/inline-chat-videos
  • 3eceb7c Merge branch 'staging' into feat/inline-chat-videos

📊 Changes

13 files changed (+488 additions, -30 deletions)

View changed files

📝 docs/media/scene-video.md (+2 -0)
📝 packages/client/src/components/chat/ChatArea.tsx (+3 -5)
📝 packages/client/src/components/chat/ChatMessage.tsx (+26 -4)
📝 packages/client/src/components/chat/ChatRoleplaySurface.tsx (+1 -1)
➕ packages/client/src/components/chat/ChatVideoAttachment.tsx (+56 -0)
📝 packages/client/src/components/chat/ConversationMessageShared.tsx (+20 -3)
📝 packages/client/src/localization/locales/en.json (+2 -0)
📝 packages/server/src/routes/gallery.routes.ts (+31 -3)
📝 packages/server/src/services/advanced-memory.ts (+16 -12)
➕ packages/server/src/services/video/chat-video-messages.ts (+51 -0)
📝 packages/shared/src/types/chat.ts (+4 -0)
📝 scripts/regressions/advanced-memory-recall.regression.ts (+8 -2)
➕ scripts/regressions/inline-chat-videos.regression.ts (+268 -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 #7564
Part of #7545 (item 2 of 7).

Why this change

  • A video made from the Roleplay Gallery only opened in a floating window and never appeared in the chat, unlike generated images. Once the window was closed, the clip was only in the Gallery, cut off from the moment it shows.

What changed

  • Behavior change: in Roleplay, a new scene video no longer opens in a floating window on its own. To float one, use Pin video to chat under the Gallery's Videos tab, which works as before.
  • In Roleplay, a scene video you make from the Gallery now plays inline in the chat, under the newest reply you can see (hidden command-only replies are skipped), even when the picture came from an earlier message. The reply is chosen when the clip finishes, so a reply that arrives meanwhile gets it. If attaching fails, the clip stays in the Gallery.
  • Remove a clip from a message with its X; it stays in the Gallery.
  • Conversation messages also play video attachments inline.
  • Video attachments are never sent to the model as part of the prompt, and Advanced Memory ignores them: they never become memory text, and a clip landing mid-reply does not count as a history change.
  • Game Mode is unchanged.
  • This PR does not depend on #7553 and can be merged on its own.

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 the final head c39cf82a1 (staging merged at c599d1ef2):

  • pnpm check: passes.
  • Regression inline-chat-videos: passes. It makes scene videos through the real Gallery route and checks the clip is attached (message and swipe) to the newest reply even when the picture is on an older one, that a reply arriving during generation gets it, that hidden command-only replies are skipped, that Game Mode clips attach to no message, that video attachments stay out of the prompt, and that adding a clip leaves Advanced Memory's history fingerprint unchanged.
  • advanced-memory-recall now includes a video attachment and checks it never reaches summaries or recalled excerpts.
  • Related regressions pass: all 18 advanced-memory regressions, prompt-attachments, the prompt regressions, the 6 gallery regressions and the video regressions.
  • Full pnpm regression on this head: 833/833 pass.
  • Not run: pnpm smoke:ui / pnpm regression:ui (Playwright browsers not installed locally), so inline playback on mobile Chromium/WebKit is only covered by the manual checks below.

Manual verification notes

  • Manually verify in a Roleplay chat: Gallery → Video (or Animate illustration on an older picture) plays the clip inline under the newest reply, not under the picture's message, and no floating window opens.
  • Manually verify that Pin video to chat in the Gallery's Videos tab still floats a clip.
  • Manually verify that the X on an inline clip removes it from the message and the clip stays in the Gallery.
  • Manually verify that the clip plays inline after a page reload.
  • Manually verify inline playback at a phone-sized width, in light and dark mode.
  • Manually verify that Game Mode scene videos behave as before.

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/media/scene-video.md (inline playback and Pin video to chat). Translations: #7566

UI evidence (if applicable)

Screenshot from 2026-10-13 15-10-57 Screenshot from 2026-10-13 15-13-06 Screenshot from 2026-10-13 15-28-00 (Demoing that pinned videos still works.)

Summary by CodeRabbit

  • New Features
    • Generated scene videos now appear inline beneath the latest assistant reply, including when the source image came from an earlier message.
    • Videos in chat messages can be removed without deleting them from the Gallery. Use Pin video to chat under Videos to float a clip.
  • Bug Fixes
    • Image links in messages no longer hide other attachments, and video details are excluded from Advanced Memory text and source tracking.

🔄 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/7565 **Author:** [@JamesMowery](https://github.com/JamesMowery) **Created:** 10/13/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/inline-chat-videos` --- ### 📝 Commits (10+) - [`fa4312e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fa4312e8b3c15250478e43cb86f553f31e999d2a) feat(video): play generated videos inline in Roleplay and Conversation - [`3bfa6d3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3bfa6d325a5d8533bc58028e0b3a9dc800070703) fix(video): review follow-ups for inline chat videos - [`0a60ee2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0a60ee26f2bef4aa0cde30883d614119ea149ec8) fix(video): show a message's videos even when its text is an image link - [`f24101e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f24101ea53e9af07a1b30b81d31d5df765091408) fix(video): put Gallery clips under the newest reply - [`fb79101`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fb791019a7b7f2d7532e3293c41a5bf86c07647c) fix(video): choose a Gallery clip's reply after the clip is made - [`26cbf40`](https://github.com/Pasta-Devs/Marinara-Engine/commit/26cbf400ca021bfd72f9a47627d6c92d7d50ded2) fix(video): leave Game Mode messages without inline clips - [`cac45af`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cac45af13e7d0e07390455a1386d2e41a5f69502) Merge branch 'staging' into feat/inline-chat-videos - [`3df933e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3df933e808f27b5dc607cf97ff03cfe0c541c1f4) Merge branch 'staging' into feat/inline-chat-videos - [`23b3b46`](https://github.com/Pasta-Devs/Marinara-Engine/commit/23b3b466b556db30808d6ae4530ed04d489ff98b) Merge branch 'staging' into feat/inline-chat-videos - [`3eceb7c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3eceb7c5e63966d5949d0ffb3de91ea6a5868014) Merge branch 'staging' into feat/inline-chat-videos ### 📊 Changes **13 files changed** (+488 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `docs/media/scene-video.md` (+2 -0) 📝 `packages/client/src/components/chat/ChatArea.tsx` (+3 -5) 📝 `packages/client/src/components/chat/ChatMessage.tsx` (+26 -4) 📝 `packages/client/src/components/chat/ChatRoleplaySurface.tsx` (+1 -1) ➕ `packages/client/src/components/chat/ChatVideoAttachment.tsx` (+56 -0) 📝 `packages/client/src/components/chat/ConversationMessageShared.tsx` (+20 -3) 📝 `packages/client/src/localization/locales/en.json` (+2 -0) 📝 `packages/server/src/routes/gallery.routes.ts` (+31 -3) 📝 `packages/server/src/services/advanced-memory.ts` (+16 -12) ➕ `packages/server/src/services/video/chat-video-messages.ts` (+51 -0) 📝 `packages/shared/src/types/chat.ts` (+4 -0) 📝 `scripts/regressions/advanced-memory-recall.regression.ts` (+8 -2) ➕ `scripts/regressions/inline-chat-videos.regression.ts` (+268 -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 #7564 Part of #7545 (item 2 of 7). ## Why this change - A video made from the Roleplay Gallery only opened in a floating window and never appeared in the chat, unlike generated images. Once the window was closed, the clip was only in the Gallery, cut off from the moment it shows. ## What changed - **Behavior change:** in Roleplay, a new scene video no longer opens in a floating window on its own. To float one, use **Pin video to chat** under the Gallery's **Videos** tab, which works as before. - In **Roleplay**, a scene video you make from the Gallery now plays inline in the chat, under the newest reply you can see (hidden command-only replies are skipped), even when the picture came from an earlier message. The reply is chosen when the clip finishes, so a reply that arrives meanwhile gets it. If attaching fails, the clip stays in the Gallery. - Remove a clip from a message with its **X**; it stays in the Gallery. - Conversation messages also play video attachments inline. - Video attachments are never sent to the model as part of the prompt, and Advanced Memory ignores them: they never become memory text, and a clip landing mid-reply does not count as a history change. - Game Mode is unchanged. - This PR does not depend on #7553 and can be merged on its own. ## 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 the final head `c39cf82a1` (`staging` merged at `c599d1ef2`): - `pnpm check`: passes. - Regression `inline-chat-videos`: passes. It makes scene videos through the real Gallery route and checks the clip is attached (message and swipe) to the newest reply even when the picture is on an older one, that a reply arriving during generation gets it, that hidden command-only replies are skipped, that Game Mode clips attach to no message, that video attachments stay out of the prompt, and that adding a clip leaves Advanced Memory's history fingerprint unchanged. - `advanced-memory-recall` now includes a video attachment and checks it never reaches summaries or recalled excerpts. - Related regressions pass: all 18 `advanced-memory` regressions, `prompt-attachments`, the `prompt` regressions, the 6 `gallery` regressions and the `video` regressions. - Full `pnpm regression` on this head: 833/833 pass. - Not run: `pnpm smoke:ui` / `pnpm regression:ui` (Playwright browsers not installed locally), so inline playback on mobile Chromium/WebKit is only covered by the manual checks below. ### Manual verification notes - Manually verify in a Roleplay chat: Gallery → **Video** (or **Animate illustration** on an older picture) plays the clip inline under the newest reply, not under the picture's message, and no floating window opens. - Manually verify that **Pin video to chat** in the Gallery's Videos tab still floats a clip. - Manually verify that the **X** on an inline clip removes it from the message and the clip stays in the Gallery. - Manually verify that the clip plays inline after a page reload. - Manually verify inline playback at a phone-sized width, in light and dark mode. - Manually verify that Game Mode scene videos behave as before. ## 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/media/scene-video.md` (inline playback and Pin video to chat). Translations: #7566 ## UI evidence (if applicable) <img width="1229" height="1166" alt="Screenshot from 2026-10-13 15-10-57" src="https://github.com/user-attachments/assets/91e35678-148a-451a-9a4c-1c6808e99e9a" /> <img width="1229" height="1166" alt="Screenshot from 2026-10-13 15-13-06" src="https://github.com/user-attachments/assets/139fa209-9b2e-451d-8cba-beb1f0c4e608" /> <img width="1813" height="1105" alt="Screenshot from 2026-10-13 15-28-00" src="https://github.com/user-attachments/assets/e2d02228-5387-4593-b764-31c103863849" /> (Demoing that pinned videos still works.) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Generated scene videos now appear inline beneath the latest assistant reply, including when the source image came from an earlier message. * Videos in chat messages can be removed without deleting them from the Gallery. Use **Pin video to chat** under **Videos** to float a clip. * **Bug Fixes** * Image links in messages no longer hide other attachments, and video details are excluded from Advanced Memory text and source tracking. <!-- 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:07:37 +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#7800
No description provided.