[PR #3310] [MERGED] [codex] Polish conversation calls and media clips #5875

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3310
Author: @SpicyMarinara
Created: 7/6/2026
Status: ✅ Merged
Merged: 7/6/2026
Merged by: @SpicyMarinara

Base: staging ← Head: codex/chat-html-entity-display


📝 Commits (7)

  • f77215d Fix conversation call playback and chat text rendering
  • 5d447ee Move call clips into sprite editors
  • 0096b15 Center missing call clip placeholders
  • 00cf601 Hide delete action for missing persona call clips
  • f27ab77 Apply CodeRabbit fixes for call media PR
  • 9fbeb21 Refine conversation call video clips
  • bb30f5d Apply call clip review fixes

📊 Changes

27 files changed (+2805 additions, -944 deletions)

View changed files

📝 packages/client/src/App.tsx (+8 -11)
📝 packages/client/src/components/characters/CharacterEditor.tsx (+290 -104)
📝 packages/client/src/components/chat/ChatGallery.tsx (+186 -178)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+46 -37)
📝 packages/client/src/components/chat/ConversationCallSurface.tsx (+461 -115)
📝 packages/client/src/components/connections/ConnectionEditor.tsx (+142 -145)
📝 packages/client/src/components/panels/settings/TTSConfigCard.tsx (+5 -3)
📝 packages/client/src/components/personas/PersonaEditor.tsx (+257 -85)
➕ packages/client/src/components/ui/CallClipGenerationModal.tsx (+249 -0)
📝 packages/client/src/components/ui/ImageUploadDropzone.tsx (+15 -8)
📝 packages/client/src/hooks/use-characters.ts (+127 -9)
📝 packages/client/src/hooks/use-conversation-calls.ts (+16 -3)
📝 packages/client/src/lib/markdown.tsx (+33 -5)
📝 packages/client/src/lib/tts-service.ts (+2 -1)
📝 packages/client/src/stores/gallery.store.ts (+15 -1)
📝 packages/server/src/routes/characters.routes.ts (+358 -41)
📝 packages/server/src/routes/conversation-calls.routes.ts (+292 -53)
📝 packages/server/src/routes/gallery.routes.ts (+1 -0)
📝 packages/server/src/routes/game.routes.ts (+35 -27)
📝 packages/server/src/services/agents/default-prompt-migration.ts (+7 -2)

...and 7 more files

📄 Description

Summary

Fixes several follow-up issues from Conversation Call testing, normal chat rendering, and editor media organization:

  • Decodes standard HTML entities in safe React-rendered chat text so < no longer appears as &lt; in messages.
  • Smooths video-call character clips by guarding loop boundaries and hiding newly switched clips until the first frame is decoded.
  • Stops call voice playback and queued response playback immediately when the user ends a call.
  • Ends calls server-side immediately and finalizes the audio-call summary in the background.
  • Makes voice interruption detection more responsive while characters are speaking or TTS is loading.
  • Batches adjacent multi-character voice turns into a single prepared TTS sequence so group-call speakers hand off with less silence.
  • Reconciles optimistic call-chat messages with persisted server messages to avoid temporary duplicated typed messages.
  • Centers the mobile muted-microphone reminder above the call controls so it is not clipped by the viewport edge.
  • Renames Gallery clips to Videos for broader roleplay/game/chat video assets, with upload support for user videos.
  • Moves Video Call Clips into the Sprites tab for characters and personas as a third category.
  • Adds a call-clip generation dialog with video connection selection, avatar-reference toggle, specific clip-kind selection, and named custom clip generation.
  • Uses the same loop/camera/motion scaffold for custom call clips, with only the user-entered action swapped into the prompt.
  • Allows mixed video-call participants where only some characters have video clips, while others stay avatar-only.
  • Replaces the per-chat Soundboard toggle with Automatic video clips generation, defaulting off and generating only cached idle/talking clips when enabled.
  • Keeps the call soundboard always available in the call UI.
  • Adds playable custom call clips through [play_clip="name"], listing ready per-character clips in the call prompt.
  • Centers missing call-clip placeholders in the preview tile and keeps persona empty slots from showing delete actions.
  • Matches Character/Persona Gallery Videos upload controls to the Images tab dropzone styling and spacing.
  • Applies CodeRabbit follow-ups for Seedance source/download handling, persona clip cache invalidation, uploaded call-clip avatar persistence, game-video prompt override precedence/debug logging, selfie busy state, call TTS metadata alignment, soundboard command gating, and legacy Immersive HTML migration.

Why

Conversation Calls were close, but testing still exposed immersion-breaking edges: escaped symbols in chat text, black-frame flashes when videos switched, voices continuing after hang-up, unreliable interruption, long speaker handoff gaps, doubled typed call messages, and call summaries blocking user hang-up. The editor media model also needed clearer separation between general generated/uploaded videos and reusable video-call loop clips. This update also avoids forcing every call participant into generated video presence: characters without clips can remain avatar-only, while users can opt into basic idle/talking auto-generation or create named gesture clips manually.

Validation

  • pnpm --filter @marinara-engine/client lint
  • pnpm --filter @marinara-engine/server lint
  • pnpm --filter @marinara-engine/shared lint
  • pnpm --filter @marinara-engine/client build
  • pnpm exec prettier --check packages/client/src/components/personas/PersonaEditor.tsx
  • git diff --check
  • pnpm regression:prompt
  • pnpm check
  • coderabbit review --agent --base staging -c AGENTS.md

Manual Verification Needed

  • Manually verify a mobile call starts muted and shows the reminder centered above the bottom controls.
  • Manually verify ending a call cuts off any remaining character voice lines immediately.
  • Manually verify ending a call returns control immediately while the call summary appears later in the conversation context.
  • Manually verify talking over a character interrupts current playback.
  • Manually verify group-call character voice turns hand off smoothly.
  • Manually verify character video clips do not flash black when switching idle/talking/expression clips.
  • Manually verify typed call-chat messages do not briefly duplicate.
  • Manually verify Character and Persona Gallery tabs show Images/Videos, and uploaded videos can be added/deleted.
  • Manually verify Character and Persona Sprites tabs show Expressions/Full Body/Clips, and call clips can be generated with selected settings.
  • Manually verify Automatic video clips generation is off by default and only generates idle/talking clips when enabled.
  • Manually verify a group call can include one character with ready clips and other characters without clips, without forcing generation or showing a reminder.
  • Manually verify enabling character video presence with no ready idle/talking clips shows the dismissible Sprites > Clips reminder.
  • Manually verify a named custom clip can be generated from Sprites > Clips and played during a call via [play_clip="name"].
  • Manually verify missing call-clip placeholders are centered and persona missing slots do not show trash actions.
  • Manually verify Gallery Videos upload dropzones match the Images tab spacing and style.

Notes

Maintainer-requested follow-up from Conversation Call and editor media testing; no linked issue was provided for this PR.


🔄 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/3310 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/6/2026 **Status:** ✅ Merged **Merged:** 7/6/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/chat-html-entity-display` --- ### 📝 Commits (7) - [`f77215d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f77215db1243631187fcdc9f4e1909ffce8d4660) Fix conversation call playback and chat text rendering - [`5d447ee`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5d447ee84a8d145d49360d907b7fea5a2f0db7b5) Move call clips into sprite editors - [`0096b15`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0096b15815d19b5d0c8412ff4f15e441d8c10cab) Center missing call clip placeholders - [`00cf601`](https://github.com/Pasta-Devs/Marinara-Engine/commit/00cf601a3da2a1e7f34ffa636202427ad8a94cff) Hide delete action for missing persona call clips - [`f27ab77`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f27ab770ee1ee181bc04cc9f8f2aad9202bff84f) Apply CodeRabbit fixes for call media PR - [`9fbeb21`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9fbeb21f5275aec2fa8a10fc5eee3b73df31d90b) Refine conversation call video clips - [`bb30f5d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bb30f5ded939681a6507065cc9063f1cc8040da8) Apply call clip review fixes ### 📊 Changes **27 files changed** (+2805 additions, -944 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/App.tsx` (+8 -11) 📝 `packages/client/src/components/characters/CharacterEditor.tsx` (+290 -104) 📝 `packages/client/src/components/chat/ChatGallery.tsx` (+186 -178) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+46 -37) 📝 `packages/client/src/components/chat/ConversationCallSurface.tsx` (+461 -115) 📝 `packages/client/src/components/connections/ConnectionEditor.tsx` (+142 -145) 📝 `packages/client/src/components/panels/settings/TTSConfigCard.tsx` (+5 -3) 📝 `packages/client/src/components/personas/PersonaEditor.tsx` (+257 -85) ➕ `packages/client/src/components/ui/CallClipGenerationModal.tsx` (+249 -0) 📝 `packages/client/src/components/ui/ImageUploadDropzone.tsx` (+15 -8) 📝 `packages/client/src/hooks/use-characters.ts` (+127 -9) 📝 `packages/client/src/hooks/use-conversation-calls.ts` (+16 -3) 📝 `packages/client/src/lib/markdown.tsx` (+33 -5) 📝 `packages/client/src/lib/tts-service.ts` (+2 -1) 📝 `packages/client/src/stores/gallery.store.ts` (+15 -1) 📝 `packages/server/src/routes/characters.routes.ts` (+358 -41) 📝 `packages/server/src/routes/conversation-calls.routes.ts` (+292 -53) 📝 `packages/server/src/routes/gallery.routes.ts` (+1 -0) 📝 `packages/server/src/routes/game.routes.ts` (+35 -27) 📝 `packages/server/src/services/agents/default-prompt-migration.ts` (+7 -2) _...and 7 more files_ </details> ### 📄 Description ## Summary Fixes several follow-up issues from Conversation Call testing, normal chat rendering, and editor media organization: - Decodes standard HTML entities in safe React-rendered chat text so `<` no longer appears as `&lt;` in messages. - Smooths video-call character clips by guarding loop boundaries and hiding newly switched clips until the first frame is decoded. - Stops call voice playback and queued response playback immediately when the user ends a call. - Ends calls server-side immediately and finalizes the audio-call summary in the background. - Makes voice interruption detection more responsive while characters are speaking or TTS is loading. - Batches adjacent multi-character voice turns into a single prepared TTS sequence so group-call speakers hand off with less silence. - Reconciles optimistic call-chat messages with persisted server messages to avoid temporary duplicated typed messages. - Centers the mobile muted-microphone reminder above the call controls so it is not clipped by the viewport edge. - Renames Gallery clips to Videos for broader roleplay/game/chat video assets, with upload support for user videos. - Moves Video Call Clips into the Sprites tab for characters and personas as a third category. - Adds a call-clip generation dialog with video connection selection, avatar-reference toggle, specific clip-kind selection, and named custom clip generation. - Uses the same loop/camera/motion scaffold for custom call clips, with only the user-entered action swapped into the prompt. - Allows mixed video-call participants where only some characters have video clips, while others stay avatar-only. - Replaces the per-chat Soundboard toggle with Automatic video clips generation, defaulting off and generating only cached idle/talking clips when enabled. - Keeps the call soundboard always available in the call UI. - Adds playable custom call clips through `[play_clip="name"]`, listing ready per-character clips in the call prompt. - Centers missing call-clip placeholders in the preview tile and keeps persona empty slots from showing delete actions. - Matches Character/Persona Gallery Videos upload controls to the Images tab dropzone styling and spacing. - Applies CodeRabbit follow-ups for Seedance source/download handling, persona clip cache invalidation, uploaded call-clip avatar persistence, game-video prompt override precedence/debug logging, selfie busy state, call TTS metadata alignment, soundboard command gating, and legacy Immersive HTML migration. ## Why Conversation Calls were close, but testing still exposed immersion-breaking edges: escaped symbols in chat text, black-frame flashes when videos switched, voices continuing after hang-up, unreliable interruption, long speaker handoff gaps, doubled typed call messages, and call summaries blocking user hang-up. The editor media model also needed clearer separation between general generated/uploaded videos and reusable video-call loop clips. This update also avoids forcing every call participant into generated video presence: characters without clips can remain avatar-only, while users can opt into basic idle/talking auto-generation or create named gesture clips manually. ## Validation - `pnpm --filter @marinara-engine/client lint` - `pnpm --filter @marinara-engine/server lint` - `pnpm --filter @marinara-engine/shared lint` - `pnpm --filter @marinara-engine/client build` - `pnpm exec prettier --check packages/client/src/components/personas/PersonaEditor.tsx` - `git diff --check` - `pnpm regression:prompt` - `pnpm check` - `coderabbit review --agent --base staging -c AGENTS.md` ## Manual Verification Needed - Manually verify a mobile call starts muted and shows the reminder centered above the bottom controls. - Manually verify ending a call cuts off any remaining character voice lines immediately. - Manually verify ending a call returns control immediately while the call summary appears later in the conversation context. - Manually verify talking over a character interrupts current playback. - Manually verify group-call character voice turns hand off smoothly. - Manually verify character video clips do not flash black when switching idle/talking/expression clips. - Manually verify typed call-chat messages do not briefly duplicate. - Manually verify Character and Persona Gallery tabs show Images/Videos, and uploaded videos can be added/deleted. - Manually verify Character and Persona Sprites tabs show Expressions/Full Body/Clips, and call clips can be generated with selected settings. - Manually verify Automatic video clips generation is off by default and only generates idle/talking clips when enabled. - Manually verify a group call can include one character with ready clips and other characters without clips, without forcing generation or showing a reminder. - Manually verify enabling character video presence with no ready idle/talking clips shows the dismissible Sprites > Clips reminder. - Manually verify a named custom clip can be generated from Sprites > Clips and played during a call via `[play_clip="name"]`. - Manually verify missing call-clip placeholders are centered and persona missing slots do not show trash actions. - Manually verify Gallery Videos upload dropzones match the Images tab spacing and style. ## Notes Maintainer-requested follow-up from Conversation Call and editor media testing; no linked issue was provided for this PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:20:24 +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#5875
No description provided.