mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1715] [Issue]: Chat surfaces eagerly invoke TTS config and regex script reads #849
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#849
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Promansis on GitHub (May 31, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1715
Originally assigned to: @Promansis on GitHub.
Summary
Chat/game surfaces eagerly invoke optional TTS and regex storage commands even when the user has never configured TTS and may not be actively using regex scripts. In CrabNebula DevTools these appeared alongside a stale stream command as long-running rows:
command: tts_config 19:41:22 1022784.77ms uri: http://ipc.localhost/tts_configcommand: storage_list 19:41:22 1022784.36ms entity: regex-scripts options: null uri: http://ipc.localhost/storage_listThe exact reason those two calls remained pending in that session is not yet proven, but the code does prove that visible chat/game UI mounts these reads eagerly rather than gating them behind actual TTS/regex use.
Expected behavior
Optional systems should avoid unnecessary embedded IPC/storage work:
tts_configorstorage_list(regex-scripts)call that is issued should complete quickly or fail visibly; it should not sit in DevTools with an ever-increasing duration.Actual behavior
Code inspection shows eager calls from normal UI render paths:
useTTSConfig()callsttsApi.config()with query key["tts", "config"].ChatMessagecallsuseTTSConfig()while rendering each message's TTS affordance path.useChatTtsAutoplay()also callsuseTTSConfig()before checking whether TTS is enabled.useApplyRegex()callsuseRegexScripts(), which callsstorageApi.list("regex-scripts").ChatInput,ChatMessage, and game narration paths calluseApplyRegex(), so regex scripts are loaded as part of ordinary mode surfaces.In the observed session, the corresponding embedded IPC rows were still running for ~17 minutes.
Steps to reproduce
tts_configandstorage_listforregex-scriptscan be issued even if TTS has never been used and regex scripts are not being edited.Impact area
Environment
refactorat local inspection commit1d1fd0ca6.8.0-117-genericv24.15.0, pnpm10.33.2rustc 1.95.0 (59807616e 2026-04-14)http://ipc.localhostembedded commandsLogs, screenshots, or video
Observed DevTools rows:
command: tts_config 19:41:22 1022784.77ms uri: http://ipc.localhost/tts_configcommand: storage_list 19:41:22 1022784.36ms entity: regex-scripts options: null uri: http://ipc.localhost/storage_listRelevant local code paths:
src/shared/hooks/use-tts.ts:15-20src/features/modes/shared/chat-ui/components/ChatMessage.tsx:1055-1057src/features/modes/shared/chat-ui/hooks/use-chat-tts-autoplay.ts:34-49src/features/catalog/agents/hooks/use-regex-scripts.ts:35-39src/features/catalog/agents/regex-application.ts:72-82src/features/modes/shared/chat-ui/components/ChatInput.tsx:166-167Regression notes
Unknown. The user noted they had “LONG since finished the LLM” and “never even used tts_config,” but no last-known-good build was captured.
Additional context
This is intentionally separate from the
llm_stream_channellifecycle issue. The LLM command is a streaming transport command;tts_configandstorage_list(regex-scripts)are ordinary reads and should be short-lived. If these ordinary reads are actually blocked for minutes, that may indicate a shared IPC/runtime/storage starvation problem, but the eager call sites are already a concrete cleanup target.Potential fixes to evaluate:
useTTSConfig()per rendered message if a single parent/provider query can own that state.staleTimeor load them only from owners that actually apply transforms.Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:
@cha1latte commented on GitHub (May 31, 2026):
Tracking note: PR #1719 merged into
refactorwithCloses #1715, so tagging this asfixed-in-stagingpending the normal branch/closure flow.