fix(studio): no enviar residuos de SFX en generation.speech y generation.music - #288
Merged
IAnMove merged 1 commit intoSep 9, 2026
Conversation
SFX escribe MMAudio_prompt y sfx_text_weight en el formulario compartido. Al pasar a Speech o Music, generation.speech rechazaba el prompt activo y generation.music rechazaba el peso desconocido. El adaptador del formulario los descarta; el envelope cerrado de MCP sigue fallando en cerrado. Co-authored-by: ignaciodelcano+dcl <ignaciodelcano+dcl@gmail.com>
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
El adaptador del formulario de Speech y Music descarta los campos que solo SFX escribe (
MMAudio_prompt,sfx_text_weighty el resto de controles MMAudio) antes de construir el comando cerrado.Para qué sirve
Tras rellenar SFX y pasar a Speech o Music, Generate fallaba: Speech rechazaba un
MMAudio_promptactivo y Music rechazabasfx_text_weightcomo campo desconocido. El usuario no veía esos controles en la pestaña nueva.Impacto para el usuario
Puede generar Speech o Music después de usar SFX. El envelope MCP/Wizard directo sigue fallando en cerrado si envía esos campos.
Riesgo
Estado
Summary
Studio Audio tabs share one
paramsmap.SfxControlswritesMMAudio_prompt,MMAudio_neg_promptandsfx_text_weight. Tab isolation stashes audio/TTS refs (and PR #287 stashesvideo_guide) but leaves SFX prompt/weight in place.generation.speechcataloguesMMAudio_promptas an inactive"" | nullsentinel, so a leftover sound description fails closed.sfx_text_weightis not in the Speech or Music catalogs, soprojectStudioMusicFormParams/projectStudioSpeechFormParamsthrownot supported.Trigger: Audio → SFX, type a description or move Strength, switch to Speech or Music, click Generate.
This PR adds
neutralizeSfxOwnedFormFieldsand runs it only in the Studio form adapters (prepareStudioSpeechSubmission/prepareStudioMusicSubmission) before projection. Direct MCP envelopes still 422.Does not stash SFX drafts across tabs (documented remaining work on #280). Does not change
video_guideisolation (PR #287) or Speech TTS residue on Music (PR #283).Overview
MMAudio_promptorsfx_text_weight.Detailed changes
Backend
No server contract change. Native speech/music schemas already rejected these leftovers.
UI and Wizard
sfxFormResidue.ts: list of SFX-owned form keys and a strip helper.speechCommandSubmission.ts/musicCommandSubmission.ts: neutralize before projection.Data, provenance and compatibility
No sidecar change. SFX drafts remain in the in-memory params map when the user returns to the SFX tab.
Files and ownership
ui/src/features/studio/sfxFormResidue.ts— new helperui/src/features/studio/speechCommandSubmission.ts— form-only stripui/src/features/studio/musicCommandSubmission.ts— form-only stripui/tests/studioSpeechGenerationCommands.test.ts— closed builder still rejects; form path admitsui/tests/musicGenerationCommands.test.ts— same for Musicui/tests/studioSpeechCommandPresentation.test.tsx/studioMusicCommandPresentation.test.tsx— prepare pathLeft untouched:
audioReferenceState.ts(PR #287), Speech TTS neutralize on Music (PR #283), duration overwrite inloadModelOptions.Validation
Date (UTC): 2026-09-09
Base SHA:
07be48c196d4ff0f04881e3401fff69735c830f8(feat/shared-tool-commands)Head SHA:
c5f235d7Validation scope: focused
python scripts/verify_clean_repo.py— N/A (UI-only)python -m compileall -q app/services app/launch.py scripts— N/AFocused Python tests: N/A
cd ui && npm run i18n:check— not required (no i18n keys)UI tests:
npx tsx --tsconfig tsconfig.app.json --import ./tests/setupI18n.ts --test tests/studioSpeechGenerationCommands.test.ts tests/musicGenerationCommands.test.ts tests/studioSpeechCommandPresentation.test.tsx tests/studioMusicCommandPresentation.test.tsx— 31/31 passcd ui && npm run lint -- --max-warnings=0— not run (focused change)cd ui && npm run build— not rungit diff --check— cleanE2E/smoke checks: N/A — command-contract unit tests cover the trigger; no live generation
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
SFX prompt/weight/duration are still not stashed across tabs. Direct envelopes still reject explicit SFX fields on
generation.speech/generation.music.video_guideleftover remains PR #287.Follow-up work
generation.music) still openvideo_guidetab isolation) still openloadModelOptionsstill overwrites an in-range audio duration with the slider defaultChecklist