Skip to content

fix(studio): no bloquear Generate de imagen por campos residuales del formulario - #276

Closed
cursor[bot] wants to merge 1 commit into
feat/shared-generation-commandsfrom
cursor/critical-bug-management-f3f8
Closed

fix(studio): no bloquear Generate de imagen por campos residuales del formulario#276
cursor[bot] wants to merge 1 commit into
feat/shared-generation-commandsfrom
cursor/critical-bug-management-f3f8

Conversation

@cursor

@cursor cursor Bot commented Sep 9, 2026

Copy link
Copy Markdown

Resumen ejecutivo

Qué cambia

El constructor v2 de comandos de imagen omite las claves ajenas al catálogo que llegan del formulario compartido de Studio (Load Settings, reroll y primary_settings nativos). Sigue rechazando inyección de envelope y valores inválidos del contrato.

Para qué sirve

Tras el lápiz o un reroll, Generate de imagen dejaba de funcionar: el formulario arrastra política H3, perturbación, duration_seconds y otros leftovers. El contrato cerrado los trataba como error fatal.

Impacto para el usuario

Volver a generar o cargar ajustes de una imagen ya no falla. Vídeo, audio y MCP no cambian.

Riesgo

  • Bajo
  • Medio
  • Alto

Estado

  • Listo para revisión

Summary

createStudioImageGenerationCommand projected the complete Studio params bag onto the closed v2 image catalog and threw on any unknown key. That bag is not image-only:

  1. loadSettingsFromOutput always writes minimax_h3_planning_style / minimax_h3_audio_policy.
  2. Image jobs admitted by feat(studio): share durable image commands with Wizard and MCP #275 freeze wgp.primary_settings into the sidecar (duration_seconds, perturbation_*, stg_scale, keyframe_*, …).
  3. Pencil or rerollGeneration copies those keys back into params, then Generate fails before POST.

The builder now drops non-catalog leftovers and undefined values. Envelope injection, bad references, and invalid catalogued fields still fail closed.

Overview

Studio Image Generate → startGeneration assembles the shared form → prepareStudioSubmissioncreateStudioImageGenerationCommand. After Load Settings or reroll that form includes video/H3/engine defaults. Those keys are omitted from the durable command; the typed image fields still freeze and POST as before.

Detailed changes

Backend

Unchanged.

UI and Wizard

ui/src/features/studio/generationSpec.ts: skip non-catalog form leftovers instead of throwing. Wizard start_generation uses the same path.

Data, provenance and compatibility

No storage or receipt change. MCP clients that already send a typed envelope are unaffected.

Files and ownership

  • ui/src/features/studio/generationSpec.ts — form projection
  • ui/tests/studioImageGenerationCommands.test.ts — leftover omission + existing fail-closed cases
  • ui/tests/studioSubmissionFailure.test.ts — preparation path

Intentionally untouched: server admission, fingerprint, recovery queue.

Validation

  • Date (UTC): 2026-09-09

  • Base SHA: fe46f41 (feat/shared-generation-commands)

  • Head SHA: 8881bda

  • Validation scope: focused

  • python scripts/verify_clean_repo.py

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

  • Focused Python tests: N/A (UI-only)

  • cd ui && npm run i18n:check

  • UI tests: npx tsx --tsconfig tsconfig.app.json --import ./tests/setupI18n.ts --test tests/studioSubmissionFailure.test.ts tests/studioImageGenerationCommands.test.ts22 passed, 0 failed

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

  • cd ui && npm run build

  • git diff --check (clean commit)

  • E2E/smoke: N/A — logic projection; no browser stack with installed image models in this run

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

  • Pending

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

Active incompatible catalogued values (for example a non-empty video_guide that is not translated to image_guide) still fail closed. This PR only drops keys outside the image catalog.

Follow-up work

Merge into #275 before that branch lands, or cherry-pick onto development after #275.

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 

Load Settings and reroll copy H3/video/primary-settings keys into the
shared Studio params bag. The closed v2 builder treated those leftovers
as fatal, so Generate and reroll of an image failed after pencil.

Co-authored-by: ignaciodelcano+dcl <ignaciodelcano+dcl@gmail.com>
@IAnMove

IAnMove commented Sep 9, 2026

Copy link
Copy Markdown
Owner

These ideas are already in #275 (65ed2852, refined locally). They cannot target development until that feature lands, so this stacked draft is closed instead of duplicating #275. Grouped development fixes are in #279.

@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