Skip to content

fix(wizard): no cancelar ni generar ante preguntas de stop o de etiqueta - #282

Draft
cursor[bot] wants to merge 1 commit into
developmentfrom
cursor/critical-bug-management-5ee0
Draft

fix(wizard): no cancelar ni generar ante preguntas de stop o de etiqueta#282
cursor[bot] wants to merge 1 commit into
developmentfrom
cursor/critical-bug-management-5ee0

Conversation

@cursor

@cursor cursor Bot commented Sep 9, 2026

Copy link
Copy Markdown

Resumen ejecutivo

Qué cambia

El Wizard ya no trata como orden una pregunta educativa sobre cancelar/parar ni una pregunta sobre la etiqueta «generate video». Esas frases vuelven a ser how-to: no cancelan el job activo y no encolan GPU.

Para qué sirve

Tras #279, «How do I launch the video?» ya no genera, pero «How do I stop video generation if it fails?» seguía emitiendo cancel_task, y «What does the generate video button do?» seguía emitiendo prepare_video + start_generation si había prompt en Studio.

Impacto para el usuario

  • Preguntar cómo o cuándo parar/cancelar ya no mata la generación en curso.
  • Preguntar qué hace el botón Generate ya no lanza un vídeo.
  • «cancela el vídeo», «Can you cancel the generation?» y «Generate a video of a wizard» siguen ejecutándose.

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

isHowToGenerateQuestion only covered generate/create/launch/start/make. English stop/cancel and Spanish cancelar still matched inside questions, and reconcileAgentTurnWithRequest forced cancel_task with confirm: true, which executeAgentActions sends to the canonical queue.

UI-label questions («What does the generate video button do?», «¿Qué hace el botón genera el video?») still matched EXPLICIT_VIDEO_REQUESTS / isResumePreparedStudioVideoRequest because they contain generate/genera + video.

This PR extends the how-to window with stop/cancel questions and UI-label generate questions, and isExplicitCancelRequest now rejects how-to text. Imperative cancel and generate commands are unchanged.

Overview

Wizard text classification only. No backend, receipts, persistence, or Studio form changes.

  1. User has a running GPU job and asks «How do I stop video generation if it fails?» → read-only reply, no cancel_task.
  2. Studio has a prepared prompt and the user asks «What does the generate video button do?» → no start_generation.
  3. «cancela el vídeo» / «Generate a video of a wizard» still reconcile to the executable actions.

Detailed changes

Backend

Unchanged.

UI and Wizard

  • agentActions.ts: how-to patterns for stop/cancel questions and generate-button labels; isExplicitCancelRequest returns false when how-to matches.
  • agentActions.test.mjs: locks both directions (question vs command).

Data, provenance and compatibility

No storage, receipt or workspace-name contract change.

Files and ownership

  • ui/src/features/agent/agentActions.ts — classifiers
  • ui/tests/agentActions.test.mjs — regression tests

Intentionally untouched: workflow persist, DramaBox duration, image commands, MCP, launchers.

Validation

  • Date (UTC): 2026-09-09

  • Base SHA: d88c85d

  • Head SHA: bf94304

  • Validation scope: focused

  • python3 scripts/verify_clean_repo.py — PASS

  • python -m compileall — N/A (no Python files in this PR)

  • Focused Python tests: N/A

  • cd ui && npm run i18n:check — not required; no copy catalog change

  • UI tests: npx tsx --tsconfig tsconfig.app.json --import ./tests/setupI18n.ts --test tests/agentActions.test.mjs73 pass / 0 fail

  • eslint on changed files --max-warnings=0 — PASS

  • cd ui && npm run build — pending CI

  • git diff --check — PASS

  • E2E/smoke checks: N/A (classifier unit coverage; no real generation)

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: 73 UI (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

  • «¿Puedo cancelar la generación?» is treated as capability/how-to. «¿Puedes cancelar la generación?» remains a cancel command.
  • «stop the video» still hits the example-turn helper before cancel (pre-existing; not changed here).
  • Residual from the feat(studio): share durable image commands with Wizard and MCP #275 audit, not in this PR: one corrupt localStorage pending image command can hide every other pending recovery row.

Follow-up work

  • Isolate corrupt pending image-command rows in pendingImageGenerationCommands so one bad key cannot hide the rest.

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 

Las preguntas "How do I stop video generation if it fails?" y
"What does the generate video button do?" caían en cancel/explicit
generation y mataban el job activo o encolaban GPU. Tratar how/when/what
y etiquetas de UI como how-to, y rechazar cancel cuando lo son.

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); +96/-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/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: 57.1/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.4 +0.0
File concentration 25% 64.2 +0.0
Oversized-file debt 20% 40.1 +0.0
Modularity 10% 81.0 +0.0

Change vs PR base: +0.0 points.

Metric Value
Production LOC 274,323
Production files 800
Test LOC 104,478
Functions measured 18,159
Functions complexity ≥ 15 861
Maximum complexity 674
Policy code-health-policy-v1
HEAD d33caf0b53ee0e9dcb01f40fe8229a2572f351e8
Base d88c85d543100dad3469014ff0d4c7bd7b242222
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
379 ui/src/stores/useStore.ts:4086 Async method 'startGeneration'
355 app/_launch_runtime.py:23618 _run_generation
308 app/wgp.py:12363 generate_video_tab
268 ui/src/stores/useStore.ts:8638 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:2952 Async function 'executeAgentActions'

Trend vs baseline

Metric Δ
Production LOC +16
Test LOC +79
Functions ≥ 15 +0
Maximum complexity +0

Warnings

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

Ratchet passed.

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.

1 participant