Skip to content

Task 6 — Show IQ delta in Optimizer run view #185

@hiydavid

Description

@hiydavid

Part of #179.

Goal

Surface pre-run vs post-run IQ Scan deltas inside the Optimizer run detail view so users can see what the optimization improved.

Work

  • Extend GET /api/auto-optimize/runs/{run_id} to return preflight_scan and postflight_scan objects read from the new genie_opt_scan_snapshots Delta table
  • Update frontend/src/components/auto-optimize/RunDetailView.tsx to render IQ scan summary (score, maturity, key findings resolved)
  • Extract a shared <ScanSummary /> component if one does not exist; reuse the same visual vocabulary as IQScoreTab.tsx
  • Display delta prominently: IQ 8/12 → 11/12 · Ready to Optimize → Trusted
  • Show a resolved-checks list: which previously-failing checks now pass
  • If postflight scan is missing (run in progress or failed), gracefully show just preflight

Acceptance

  • Run detail view clearly shows both preflight and postflight IQ state when available
  • Delta rendering handles all edge cases: same score, regression, big jump
  • Shared <ScanSummary /> primitive used in both IQ Score tab and Optimizer run view

Files

  • backend/routers/auto_optimize.py (extend run detail response)
  • backend/models.py (add preflight_scan, postflight_scan to run detail response model)
  • frontend/src/components/auto-optimize/RunDetailView.tsx
  • frontend/src/components/ScanSummary.tsx (new)
  • frontend/src/pages/IQScoreTab.tsx (refactor to reuse ScanSummary)
  • frontend/src/types/index.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions