Skip to content

feat(B.9): la GUI expone quality_report y preguntas abiertas — verificado por ejecución offscreen - #9

Merged
klssxx merged 1 commit into
mainfrom
feat/b9-gui-visibility
Sep 25, 2026
Merged

klssxx merged 1 commit into
mainfrom
feat/b9-gui-visibility

Conversation

@klssxx

@klssxx klssxx commented Sep 25, 2026

Copy link
Copy Markdown
Owner

B.9 (informal) — visibilidad en GUI de lo construido en B.2–B.6

Hasta ahora ambiguities, four_layers, policy_check y clarification existían solo en el JSON exportado. La vista de resultado del modo simple muestra ahora:

1. Pestaña "Preguntas abiertas"

  • Numerada, desde clarification.questions (B.6) con fallback a four_layers.open_questions (B.2/B.4).
  • Título con contador: Preguntas abiertas (3) o ✓ si limpia.
  • Si el input supera el umbral del perfil: aviso explícito dentro de la pestaña.
  • Estrictamente informativa — nada bloqueante; el gating sigue siendo decisión del modo clarify.

2. Etiqueta de calidad

Calidad: NN/100 · X errores · Y avisos · Z notas + tooltip con los issues de mayor severidad (errores primero). Con un resultado legacy sin quality_report: degrada a vacío sin crashear (pinado por test).

3. Verificado por ejecución (no inspección)

7 tests driving la ruta real controller.compile → compile_prompt → _render_result sobre un MainWindow offscreen: texto del score, contenido del tooltip, \{\{modulo\}\} apareciendo en la pestaña, título ✓ en input limpio, degradación legacy.

Cero cambios en el servicio (el controller de la GUI ya enruta por compile_prompt). Suite: 311 passed + 10 subtests, ruff limpio.

Everything B.2-B.6 built was invisible to the desktop app's user — the
product's primary use case. The simple-mode result view now shows:

- 'Preguntas abiertas' tab: numbered open questions from the
  clarification gate (B.6) with the B.2 four-layer open_questions as
  fallback; tab title carries the count ('Preguntas abiertas (3)' or
  '✓' when clean); over-threshold inputs get an explicit warning
  header. Strictly informational — gating stays the clarify mode's
  decision, no blocking dialogs added.
- 'Calidad: NN/100 · X errores · Y avisos · Z notas' label with a
  tooltip listing the highest-severity issues from the deterministic
  evaluator (B.3); empty-string + empty tooltip when a legacy result
  has no quality_report (pre-B.2 shapes render without crashing —
  pinned by test).

Both widgets are populated by _render_b9_fields(), called from the
production _render_result() path. Verified BY EXECUTION through the
real chain controller.compile → compile_prompt → _render_result on an
offscreen MainWindow (7 tests in tests/test_gui_b9.py): score text,
issue tooltip content, '{{modulo}}' surfacing in the questions tab,
clean-state '✓' title, and legacy-shape degradation. The GUI's
controller already routes through compile_prompt, so no service changes
were needed. Suite: 311 passed + 10 subtests.
@klssxx
klssxx merged commit f7db74b into main Sep 25, 2026
1 check 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