fix(wizard): no encolar generación ante preguntas how-to - #272
fix(wizard): no encolar generación ante preguntas how-to#272cursor[bot] wants to merge 1 commit into
Conversation
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>
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: 56.3/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_0521447a-5edb-487b-bba9-a8de80a8bf7a) |
|
Superseded by #279, which applies this fix together with the other Cursor Wizard/Studio corrections on |
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
Estado
Summary
reconcileAgentTurnWithRequestpromised that how-to questions stay read-only, but two repair paths still injectedprepare_*+start_generation:isResumePreparedStudioVideoRequestran 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.isHowToGenerateQuestionreturned false whenrequest.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
isHowToGenerateQuestionclassifies from the first 240 characters.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 reallanza el vídeostill 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— cleanpython 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 passcd 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
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
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
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.
isHowToGenerateQuestionnow 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 andisResumePreparedStudioVideoRequestalso 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 stripprepare_*/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.