[PR #3351] [MERGED] Add roleplay TTS volume controls and editor chroma overlays #5894

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

📋 Pull Request Information

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

Base: staging ← Head: agent/roleplay-tts-volume-editor-chroma


📝 Commits (2)

  • 95f6f73 Add roleplay TTS volume controls
  • f611d62 Address TTS volume review feedback

📊 Changes

8 files changed (+220 additions, -12 deletions)

View changed files

📝 packages/client/src/components/chat/ChatArea.tsx (+3 -1)
📝 packages/client/src/components/chat/ChatMessage.tsx (+130 -4)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+1 -0)
📝 packages/client/src/components/ui/MacroTextarea.tsx (+32 -4)
📝 packages/client/src/features/chat-settings/sections/SceneInstructionsSection.tsx (+1 -0)
📝 packages/client/src/lib/tts-service.ts (+19 -2)
📝 packages/client/src/stores/ui.store.ts (+13 -1)
📝 packages/client/src/styles/globals.css (+21 -0)

📄 Description

Linked issue

Closes #

No linked issue yet. Per contributor guidance, an issue or feature request should be opened before this PR is submitted for final review.

Why this change

  • Expanded text editors opened from Presets and other editor surfaces were escaping their local chroma token scope through portals, which made them fall back to older global pink-themed colors.
  • Roleplay TTS message controls needed clearer speak/volume affordances and a persistent per-line playback volume control.

What changed

  • Scoped shared macro editor and macro reference portals to editor chroma variables so text, borders, backgrounds, and hover states use --marinara-editor-* tokens.
  • Set chat expanded text editor callers to the chat chroma surface where they were missing it.
  • Changed Roleplay message TTS speak/stop iconography to mic/mic-off.
  • Added a speaker button beside the Roleplay TTS control that opens a compact volume slider above the icon on desktop and mobile.
  • Added persisted ttsLineVolume, defaulting to 50%, and applied it to manual TTS playback and autoplay.
  • Updated the TTS service so live volume changes apply to the current audio element and continue across multi-chunk playback.

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

Validation performed by Codex:

  • pnpm check passed.
  • pnpm smoke:ui passed, 6 passed and 2 skipped by the suite.
  • git diff --check passed.

Manual verification notes

  • Not manually verified against a real configured TTS provider. Provider-backed audio playback depends on local TTS credentials/provider state.
  • Browser smoke covered desktop and mobile shell reachability, but did not deeply exercise the new Roleplay TTS slider path.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

  • No screenshots attached.

Summary by CodeRabbit

  • New Features

    • Added a per-line text-to-speech volume control in chat, letting you adjust playback volume directly from message actions.
    • TTS playback now respects the selected volume during streaming and after messages finish.
    • Improved modal and text area styling for a more consistent chat/settings editing experience.
  • Bug Fixes

    • Playback volume and mute behavior now stay consistent while TTS is running.
    • Enhanced accessibility for action buttons with proper pressed-state support.

🔄 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/3351 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/7/2026 **Status:** ✅ Merged **Merged:** 7/7/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/roleplay-tts-volume-editor-chroma` --- ### 📝 Commits (2) - [`95f6f73`](https://github.com/Pasta-Devs/Marinara-Engine/commit/95f6f7385f4168c913f753dd36fce8fbc3ccd0a7) Add roleplay TTS volume controls - [`f611d62`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f611d62c9ba8b1f216a29bfbff22ae66ecbee914) Address TTS volume review feedback ### 📊 Changes **8 files changed** (+220 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/ChatArea.tsx` (+3 -1) 📝 `packages/client/src/components/chat/ChatMessage.tsx` (+130 -4) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+1 -0) 📝 `packages/client/src/components/ui/MacroTextarea.tsx` (+32 -4) 📝 `packages/client/src/features/chat-settings/sections/SceneInstructionsSection.tsx` (+1 -0) 📝 `packages/client/src/lib/tts-service.ts` (+19 -2) 📝 `packages/client/src/stores/ui.store.ts` (+13 -1) 📝 `packages/client/src/styles/globals.css` (+21 -0) </details> ### 📄 Description ## Linked issue Closes # No linked issue yet. Per contributor guidance, an issue or feature request should be opened before this PR is submitted for final review. ## Why this change - Expanded text editors opened from Presets and other editor surfaces were escaping their local chroma token scope through portals, which made them fall back to older global pink-themed colors. - Roleplay TTS message controls needed clearer speak/volume affordances and a persistent per-line playback volume control. ## What changed - Scoped shared macro editor and macro reference portals to editor chroma variables so text, borders, backgrounds, and hover states use `--marinara-editor-*` tokens. - Set chat expanded text editor callers to the chat chroma surface where they were missing it. - Changed Roleplay message TTS speak/stop iconography to mic/mic-off. - Added a speaker button beside the Roleplay TTS control that opens a compact volume slider above the icon on desktop and mobile. - Added persisted `ttsLineVolume`, defaulting to 50%, and applied it to manual TTS playback and autoplay. - Updated the TTS service so live volume changes apply to the current audio element and continue across multi-chunk playback. ## 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` Validation performed by Codex: - `pnpm check` passed. - `pnpm smoke:ui` passed, 6 passed and 2 skipped by the suite. - `git diff --check` passed. ### Manual verification notes - Not manually verified against a real configured TTS provider. Provider-backed audio playback depends on local TTS credentials/provider state. - Browser smoke covered desktop and mobile shell reachability, but did not deeply exercise the new Roleplay TTS slider path. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) - No screenshots attached. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a per-line text-to-speech volume control in chat, letting you adjust playback volume directly from message actions. * TTS playback now respects the selected volume during streaming and after messages finish. * Improved modal and text area styling for a more consistent chat/settings editing experience. * **Bug Fixes** * Playback volume and mute behavior now stay consistent while TTS is running. * Enhanced accessibility for action buttons with proper pressed-state support. <!-- 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-23 04:04:54 +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#5894
No description provided.