fix(studio): no convertir la duración auto de DramaBox en 1 s - #269
fix(studio): no convertir la duración auto de DramaBox en 1 s#269cursor[bot] wants to merge 1 commit into
Conversation
…o 1s setDurationSeconds used a video floor of 1s, so Wizard prepare and the Advanced slider rewrote the TTS 0=auto sentinel into a one-second clip. Co-authored-by: ignaciodelcano+dcl <ignaciodelcano+dcl@gmail.com>
PR Review — Loreframe StudioRisk: low Automated review from Findings
Changed files
CONTRIBUTING checklist
Posted by the repo PR review workflow. Re-runs on each push to the PR. |
Code healthQuality score: 55.5/100Higher is better. The score is a trend dashboard; the independent ratchet below remains the CI gate.
Change vs PR base: +0.0 points.
Markdown, JSON catalogs and tests are out of this table. Only Most complex functions
Trend vs baseline
Warnings
Ratchet passed. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_cf10c4b3-84e1-4394-909d-7f91d8c16720) |
|
Superseded by #279, which applies this fix together with the other Cursor Wizard/Studio corrections on |
Resumen ejecutivo
Qué cambia
setDurationSecondsya no reescribe el 0 de DramaBox («auto, derivar del prompt») a 1 segundo.Para qué sirve
Evita que Wizard o el slider Avanzado generen un clip de 1 s cuando el usuario o el modelo pidieron duración automática.
Impacto para el usuario
En DramaBox y otros TTS con
duration_slider.min = 0, dejar o pedir duración auto vuelve a producir la duración derivada del prompt. El resto de modelos sigue con un mínimo de 1 s.Riesgo
Estado
Summary
556d77e4already sentduration_seconds: 0throughstartGenerationas the DramaBox auto sentinel. The shared setter still used a video floor of 1s, so any latersetDurationSeconds(0)— WizardprepareAudiowith the store already at 0, or the Advanced slider labeled0 = auto— silently became a 1-second job.Overview
loadModelOptionssetsdurationSeconds = 0(auto).prepareAudiowithout an explicit duration, or the Advanced duration slider, callssetDurationSeconds(0).audio_onlyandduration_slider.min === 0. Video models still clamp 0 to 1s.Detailed changes
Backend
No backend changes.
UI and Wizard
ui/src/stores/studioConfigurationSlice.ts: allow a 0-second floor only for TTS models that declareduration_slider.min === 0.ui/tests/architectureSlices.test.mjs: lock auto=0 for that slider contract and keep the 1s floor for video.Data, provenance and compatibility
No persistence or provenance change.
startGenerationalready mappeddurationSeconds === 0to the slider default (0 for DramaBox).Files and ownership
ui/src/stores/studioConfigurationSlice.ts— setter contract.ui/tests/architectureSlices.test.mjs— focused regression.useStore.startGeneration(already correct), Wizard 20s music cap (existing product policy).Validation
Date (UTC): 2026-09-09
Base SHA: f2ef220
Head SHA: 6f1b454
Validation scope: focused
Focused UI tests:
cd ui && npx tsx --tsconfig tsconfig.app.json --import ./tests/setupI18n.ts --test tests/architectureSlices.test.mjs— 14/14 pass, includingStudio duration setter keeps TTS auto sentinel at zeropython scripts/verify_clean_repo.pypython -m compileall -q app/services app/launch.py scriptscd ui && npm run i18n:checkcd ui && npm run lint -- --max-warnings=0cd ui && npm run buildgit diff --checkE2E/smoke checks: N/A — store setter; no live DramaBox generation in this environment
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
Could not exercise a live DramaBox generation here. The contract test drives the same setter Wizard and the Advanced slider use.
Also noted, not in this PR:
prepare_audiostill caps explicit music duration at 20s (existing schema / product policy)Follow-up work
None for this setter. PR 263 remains the persist-merge follow-up.
Checklist
Note
Low Risk
Narrow store clamping change for a documented TTS slider contract; video duration floors unchanged and covered by a new unit test.
Overview
setDurationSecondsno longer forces a 1 second floor when the active model is audio-only TTS and declaresduration_slider.min === 0, where 0 means auto-derive duration from the prompt (e.g. DramaBox). Wizard prepare and the Advanced duration slider can call the setter with 0 without silently turning jobs into 1 s clips.Video and other models keep the existing minimum (at least 1 s, or frame-based limits). A regression test in
architectureSlices.test.mjslocks 0 for the TTS auto contract and 1 for a typical videomodelOptionsprofile.Reviewed by Cursor Bugbot for commit 6f1b454. Configure here.