Skip to content

fix(studio): no convertir la duración auto de DramaBox en 1 s - #269

Closed
cursor[bot] wants to merge 1 commit into
developmentfrom
cursor/bc-0bee7d95-5df3-4c39-bbef-c2da6d005f1d-a377
Closed

fix(studio): no convertir la duración auto de DramaBox en 1 s#269
cursor[bot] wants to merge 1 commit into
developmentfrom
cursor/bc-0bee7d95-5df3-4c39-bbef-c2da6d005f1d-a377

Conversation

@cursor

@cursor cursor Bot commented Sep 9, 2026

Copy link
Copy Markdown

Resumen ejecutivo

Esta primera sección está pensada para project managers y revisores no
técnicos. Mantén el detalle técnico completo más abajo.

Qué cambia

setDurationSeconds ya 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

  • Bajo
  • Medio
  • Alto

Estado

  • En desarrollo
  • Listo para revisión
  • Bloqueado por CI o revisión
  • Requiere migración o acción manual

Summary

556d77e4 already sent duration_seconds: 0 through startGeneration as the DramaBox auto sentinel. The shared setter still used a video floor of 1s, so any later setDurationSeconds(0) — Wizard prepareAudio with the store already at 0, or the Advanced slider labeled 0 = auto — silently became a 1-second job.

Overview

  1. User selects DramaBox Audio. loadModelOptions sets durationSeconds = 0 (auto).
  2. Wizard prepareAudio without an explicit duration, or the Advanced duration slider, calls setDurationSeconds(0).
  3. Before: clamp to 1s → generation is a 1-second clip.
  4. After: 0 is kept when audio_only and duration_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 declare duration_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. startGeneration already mapped durationSeconds === 0 to the slider default (0 for DramaBox).

Files and ownership

  • ui/src/stores/studioConfigurationSlice.ts — setter contract.
  • ui/tests/architectureSlices.test.mjs — focused regression.
  • Left untouched: 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, including Studio duration setter keeps TTS auto sentinel at zero

  • python scripts/verify_clean_repo.py

  • python -m compileall -q app/services app/launch.py scripts

  • cd ui && npm run i18n:check

  • cd ui && npm run lint -- --max-warnings=0

  • cd ui && npm run build

  • git diff --check

  • E2E/smoke checks: N/A — store setter; no live DramaBox generation in this environment

Code quality

  • Score: pending CI
  • Complexity trend: pending CI
  • Production LOC trend: pending CI
  • Regression versus main: pending CI
  • Ratchet: pending CI

CI 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

  • Tests simulados: 0 tokens externos
  • Tests reales: N/A
  • Llamadas LLM externas: 0
  • Tokens de prompt: N/A
  • Tokens de respuesta: N/A
  • Tokens totales: N/A
  • Generaciones de imágenes/audio/vídeo: 0
  • Tiempo transcurrido: N/A
  • Proveedores/modelos: N/A

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:

Follow-up work

None for this setter. PR 263 remains the persist-merge follow-up.

Checklist

  • The executive summary is understandable without reading the code.
  • The detailed Summary/Overview has not been removed or shortened.
  • Tests and their actual results are recorded.
  • Generated assets, secrets and local-only files are not committed.
  • Required CI and Cursor/Bugbot review are complete, or the PR is clearly marked as waiting for them.
Open in Web View Automation 

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
setDurationSeconds no longer forces a 1 second floor when the active model is audio-only TTS and declares duration_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.mjs locks 0 for the TTS auto contract and 1 for a typical video modelOptions profile.

Reviewed by Cursor Bugbot for commit 6f1b454. Configure here.

…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>
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

PR Review — Loreframe Studio

Risk: low
Scope: 2 file(s); +54/-1; React UI

Automated review from scripts/analyze_pr.py. This is a heuristic pass (no LLM) so humans still own the merge decision.

Findings

  • low — UI changed — rebuild before merge
    Run cd ui && npm run build (CI already does this). Pinokio Update rebuilds for end users; keep ui/dist untracked.

Changed files

  • modified: ui/src/stores/studioConfigurationSlice.ts, ui/tests/architectureSlices.test.mjs

CONTRIBUTING checklist

  • python scripts/verify_clean_repo.py
  • python -m compileall -q app/services app/launch.py scripts
  • cd ui && npm run build if the UI changed
  • No weights, CivitAI sidecars, or generated guides
  • Stays local-first (no required accounts / telemetry)

Posted by the repo PR review workflow. Re-runs on each push to the PR.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Code health

Quality score: 55.5/100

Higher is better. The score is a trend dashboard; the independent ratchet below remains the CI gate.

Component Weight Current Change
Cyclomatic health 45% 54.5 +0.0
File concentration 25% 62.1 +0.0
Oversized-file debt 20% 38.0 +0.0
Modularity 10% 77.9 +0.0

Change vs PR base: +0.0 points.

Metric Value
Production LOC 267,029
Production files 741
Test LOC 96,942
Functions measured 17,423
Functions complexity ≥ 15 847
Maximum complexity 674
Policy code-health-policy-v1
HEAD 16598bf771d866398d362df7beb084fa7942cf9a
Base f2ef220529e7e9b1b70cc5bc269afa5db7938084
UI measurement complete

Markdown, JSON catalogs and tests are out of this table. Only app/ runtime + ui/src TS/JS count.

Most complex functions

Complexity Where
674 app/wgp.py:7221 generate_video
381 ui/src/stores/useStore.ts:4084 Async method 'startGeneration'
355 app/_launch_runtime.py:23613 _run_generation
308 app/wgp.py:12363 generate_video_tab
268 ui/src/stores/useStore.ts:8636 Async method 'loadSettingsFromOutput'
260 ui/src/components/Sidebar/SceneAnimatorPanel.tsx:496 Function 'SceneAnimatorPanel'
258 app/services/director/planners/short_film.py:3433 ShortFilmPlanner._plan_story_driven
248 app/services/director_pipeline.py:13607 _run_video_generation
245 app/services/director_pipeline.py:7712 _run_pipeline
244 ui/src/features/agent/agentActions.ts:1145 Function 'parseAction'
226 app/services/director_pipeline.py:6541 update_comic_preview
225 ui/src/features/agent/agentActions.ts:2898 Async function 'executeAgentActions'

Trend vs baseline

Metric Δ
Production LOC +11
Test LOC +42
Functions ≥ 15 +1
Maximum complexity +0

Warnings

  • production LOC increased by +11
  • functions at complexity >= 15 increased by +1

Ratchet passed.

@cursor

cursor Bot commented Sep 9, 2026

Copy link
Copy Markdown
Author

Bugbot couldn't run - usage limit reached

Bugbot 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)

@IAnMove

IAnMove commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Superseded by #279, which applies this fix together with the other Cursor Wizard/Studio corrections on origin/development. Not merged from this branch.

@IAnMove IAnMove closed this Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants