fix(sfx): no enviar letras residuales de Speech/Music en generation.sfx - #286
Merged
IAnMove merged 1 commit intoSep 9, 2026
Merged
Conversation
Studio SFX owns MMAudio_prompt. Audio sub-tabs share one params map, so Speech or Music lyrics stayed in prompt. startGeneration used MMAudio_prompt ?? prompt, and the closed command accepted that leftover as the sound description. An empty SFX box then generated the previous script. Co-authored-by: ignaciodelcano+dcl <ignaciodelcano+dcl@gmail.com>
26 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumen ejecutivo
Qué cambia
Studio SFX ya no admite las letras residuales de Speech o Music cuando la caja de SFX está vacía. Generate y Wizard
start_generationfallan cerrados en vez de generar el guión anterior como efecto de sonido.Para qué sirve
Speech, Music y SFX comparten el mismo mapa de
params. El textarea de SFX escribe soloMMAudio_prompt. Al cambiar de pestaña, las letras quedaban enprompt.startGenerationhacíaMMAudio_prompt ?? prompty el comando cerradogeneration.sfxaceptaba ese residuo como descripción.Impacto para el usuario
Tras escribir letra en Speech o Music y pasar a SFX con la caja vacía, Generate pide una descripción literal en vez de encolar el texto anterior. Un MCP que envíe solo
promptsigue admitiéndose.Riesgo
Estado
Summary
SfxControlsreads/writes onlyMMAudio_prompt.setAudioSubModedoes not stash per-tab text, so Speech lyrics or Music lyrics remain inparams.prompt.startGenerationdidparams.prompt = params.MMAudio_prompt ?? params.prompt. When the SFX box was never filled,MMAudio_promptisundefinedand the leftover script became the closed-command sound description.Concrete trigger:
generation.sfxadmitted the leftover lyrics and queued MMAudio.neutralizeStudioSfxFormResidueruns on the Studio form snapshot before the closed builder:MMAudio_promptis blank, drop leftoverpromptMMAudio_promptis authored, syncpromptto it so aliases matchstartGenerationno longer falls back to leftoverprompt.The closed MCP/Wizard envelope path is unchanged: a prompt-only direct command still admits.
Overview
prompt, then buildsgeneration.sfx.MMAudio_promptand MCP prompt-only envelopes still work.Detailed changes
Backend
No server contract change. The native SFX schema already required a non-blank
promptorMMAudio_prompt.UI and Wizard
sfxGenerationSpec.ts: exportneutralizeStudioSfxFormResidue.sfxCommandSubmission.ts: run it after form projection.useStore.ts: SFX branch copies onlyMMAudio_promptintoprompt.Data, provenance and compatibility
No sidecar format change. Direct MCP envelopes that supply only
promptstill validate.Files and ownership
ui/src/features/studio/sfxGenerationSpec.ts— residue helperui/src/features/studio/sfxCommandSubmission.ts— call siteui/src/stores/useStore.ts— Generate snapshotui/tests/sfxGenerationCommands.test.ts— leftover vs authored vs MCP prompt-onlyui/tests/studioSfxCommandPresentation.test.tsx— submission rejects leftover SpeechsetAudioSubModetext stash, SFX duration display clamp (Math.min(duration, 20)without writing back)Validation
Date (UTC): 2026-09-09
Base SHA: 94ab006 (
feat/shared-tool-commands)Head SHA: 2a848df
Validation scope: focused
python scripts/verify_clean_repo.pypython -m compileall -q app/services app/launch.py scriptsFocused Python tests: N/A (UI-only)
cd ui && npm run i18n:checkUI tests:
npx tsx --tsconfig tsconfig.app.json --import ./tests/setupI18n.ts --test tests/sfxGenerationCommands.test.ts tests/studioSfxCommandPresentation.test.tsx— 11 passedUI tests:
npx tsx --tsconfig tsconfig.app.json --import ./tests/setupI18n.ts --test tests/studioSfxAction.test.mjs— 17 passedcd ui && npm run lint -- --max-warnings=0cd ui && npm run buildgit diff --checkE2E/smoke checks: N/A (no live generation; provider-free command tests only)
Code quality
main: pending CICI and review
CI of this HEAD: pending
Independent agent review of this HEAD: pending
Human merge click (operational, not code review): pending
Reviewed at current HEAD
Earlier review; HEAD has changed since (stale)
Pending
Unavailable
Coste de la tarea
Notes and limitations
Does not stash lyrics/caption across Speech↔Music↔SFX tabs. Does not clamp
durationSecondswhen the SFX slider displaysMath.min(duration, 20)while the store still holds a Speech/Music value above 20 s — that path already fail-closes on the text-only 20 s cap.Follow-up work
Checklist