Skip to content

fix(wizard): no encolar generación ante preguntas how-to - #272

Closed
cursor[bot] wants to merge 1 commit into
developmentfrom
cursor/critical-bug-identification-9e40
Closed

fix(wizard): no encolar generación ante preguntas how-to#272
cursor[bot] wants to merge 1 commit into
developmentfrom
cursor/critical-bug-identification-9e40

Conversation

@cursor

@cursor cursor Bot commented Sep 9, 2026

Copy link
Copy Markdown

Resumen ejecutivo

Qué cambia

El Wizard ya no trata una pregunta de tipo «¿cómo lanzo el vídeo?» como una orden de generar. Esas consultas se quedan en solo lectura; «lanza el vídeo» sigue encolando el prompt ya preparado en Studio.

Para qué sirve

Evita jobs GPU accidentales y que el prompt de Studio se sustituya por el texto de la pregunta.

Impacto para el usuario

Preguntar cómo lanzar o generar vídeo/audio ya no encola nada. Un comando explícito («lanza el vídeo») no cambia.

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

reconcileAgentTurnWithRequest promised that how-to questions stay read-only, but two repair paths still injected prepare_* + start_generation:

  1. isResumePreparedStudioVideoRequest ran before the how-to guard and matched «How do I launch/start the video?» / «Explain how to launch the video». If Studio already had a prompt, the Wizard queued that clip.
  2. isHowToGenerateQuestion returned false when request.length > 240, so a long «How do I generate a video? Please explain…» fell through to explicit-generation repair and queued a job whose prompt was the question itself. The same hole existed for Studio Audio.

The how-to classifier now inspects the opening 240-character window (instead of rejecting long messages), runs after the comic-specific how-to and before resume/explicit repair, and those matchers also refuse how-to phrasing.

Overview

User asks an informational how-to → reconciliation keeps only navigation → no start_generation.
User says «lanza el vídeo» with a prepared Studio prompt → still prepare_video + start_generation.

Detailed changes

Backend

No backend changes.

UI and Wizard

  • isHowToGenerateQuestion classifies from the first 240 characters.
  • How-to (and comic launch how-to) run before the prepared-Studio resume shortcut.
  • Explicit video/image/audio/3D and resume matchers return false for how-to phrasing.
  • Comic «cómo lo lanzo?» still opens Comics with the existing help copy.

Data, provenance and compatibility

No persistence or schema changes. Explicit launch commands are unchanged.

Files and ownership

  • ui/src/features/agent/agentActions.ts — classifier order and how-to window.
  • ui/tests/agentActions.test.mjs — launch how-to, long how-to video/audio, and real lanza el vídeo still queues.

Unchanged: MCP contracts, Studio form persistence, comic launch copy.

Validation

  • Date (UTC): 2026-09-09

  • Base SHA: a52fb86

  • Head SHA: 3d04a29

  • Validation scope: focused

  • git diff --check — clean

  • python scripts/verify_clean_repo.py — N/A (UI-only)

  • python -m compileall — N/A (UI-only)

  • Focused Python tests: N/A

  • cd ui && npm run i18n:check — N/A (no catalog changes)

  • UI tests: npx tsx --tsconfig tsconfig.app.json --import ./tests/setupI18n.ts --test tests/agentActions.test.mjs tests/wizardLabsL5L6.test.mjs tests/labsWizardL12.test.mjs tests/programmaticVideo.test.mjs tests/wizardTruthfulnessDom.test.tsx tests/wizardTurnReport.test.ts tests/wizardPresentation.test.mjs — 113/113 pass

  • cd ui && npm run lint -- --max-warnings=0 — not run (focused)

  • cd ui && npm run build — not run (focused)

  • E2E/smoke checks: N/A — logic-only reconciliation; no live GPU/LLM turn

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

A how-to phrase in the first 240 characters still wins over a later command in the same message (same as short mixed how-to+command today). Comic «cómo lo lanzo?» stays on the dedicated Comics help path.

Follow-up work

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
UI-only intent classification and reconciliation ordering; no auth, persistence, or API changes. Main edge case: a how-to phrase in the first 240 chars still blocks later commands in the same message.

Overview
Fixes the Wizard treating how-to questions (e.g. “How do I launch the video?”) as GPU generation commands.

isHowToGenerateQuestion now matches patterns in the first 240 characters instead of skipping long messages, so lengthy “how do I generate…” text stays educational. Explicit video/image/audio/3D matchers and isResumePreparedStudioVideoRequest also bail out when that classifier fires.

In reconcileAgentTurnWithRequest, comic launch how-to and general how-to handling run before the prepared-Studio resume shortcut and strip prepare_* / start_generation, leaving only navigation actions (open_tab, story/series sections). Explicit commands like «lanza el vídeo» are unchanged.

Tests cover launch how-tos, long how-to video/audio, and that real launch still queues.

Reviewed by Cursor Bugbot for commit 3d04a29. Configure here.

Las preguntas "how do I launch the video?" y how-to largos (>240)
caían en resume/explicit generation y lanzaban un job de Studio.
Clasificar how-to antes de esos atajos y mirar la ventana inicial.

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); +95/-27; 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/features/agent/agentActions.ts, ui/tests/agentActions.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: 56.3/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% 55.1 +0.0
File concentration 25% 62.8 +0.0
Oversized-file debt 20% 38.8 +0.0
Modularity 10% 80.3 +0.0

Change vs PR base: +0.0 points.

Metric Value
Production LOC 269,383
Production files 779
Test LOC 98,184
Functions measured 17,828
Functions complexity ≥ 15 852
Maximum complexity 674
Policy code-health-policy-v1
HEAD cf31a52274f7850a7060493be7ee62e1fee3b3ee
Base a52fb866dff5f77ded5872d1dff4f6c346f6333e
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'
262 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:1150 Function 'parseAction'
226 app/services/director_pipeline.py:6541 update_comic_preview
225 ui/src/features/agent/agentActions.ts:2927 Async function 'executeAgentActions'

Trend vs baseline

Metric Δ
Production LOC +3
Test LOC +65
Functions ≥ 15 +0
Maximum complexity +0

Warnings

  • production LOC increased by +3
  • hotspot ui/src/features/agent/agentActions.ts increased by +3 lines

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_0521447a-5edb-487b-bba9-a8de80a8bf7a)

@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