← Back to Pull requests

Persist fit panel inputs per tab #461

Closed
unknown closed this pull request without merging on Oct 14, 2026 11:40 UTC
View on GitHub
unknown unknown commented on Oct 03, 2026 21:30 UTC
Author

Summary

Remember FitPanel inputs independently for each chart or dataset tab. Restore custom sources, fit category and model, parameter text, confidence options, point count, and range settings when returning to a tab. Clear cached context when its tab or project closes.

Floating-window activation now publishes the same tab context as docked-tab selection, including when returning to the previously active pane. Restore duplicate-source series by object identity before falling back to dataset/column identity, and preserve an explicitly empty selection. Ignore late fit results after changing tabs or selecting a different duplicate series.

Includes the current main branch and preserves its pending-edit close guards and fit-category controls.

Refs #456. This covers the fit panel only (the issue's "fit panel first"); statistics, transform, signal, preprocessing and chart-analysis panels remain open and should be tracked in follow-ups. The per-tab state lives in FitPanel itself rather than a shared per-tab store, so the next panel will need either its own copy or an extracted shared mechanism.

Behavior change: FitPanel._on_chart_updated now ignores chart updates while no chart is loaded (for example on a dataset tab), instead of loading the updated chart into the panel.

Known gap: a fit whose tab is left before it finishes is discarded, and it should be applied if the user returns to that tab before it completes. A suggested change for this is in the review.

Validation

  • Targeted FitPanel, tab-container, and floating-window checks: 125 passed. Regressions reproduced empty-selection restoration, duplicate-series reordering, floating activation, category restoration, and late results for duplicate series before their fixes.

  • Broad suite on Python 3.12.13: 3,996 passed, 3 failed with real configuration services using temporary default configuration paths. All three failures reproduced on unchanged main: the existing image-lightbox title-elision assertion and two subprocess startup tests blocked from writing outside the workspace.

  • Ruff on all changed Python files, git diff --check, and dependency audit: passed.

  • Whole-tree Ruff still reports the same two existing EXE001 script-mode findings on main. Bandit and Vulture report existing findings; comparison with main found no new findings.

  • The required ty type-check comparison found no new diagnostics in the changed files against main's existing backlog.
  • Prepared and tested with Codex assistance.

    Diff: 317 lines (+237 / -80) across 3 files Reviewer: Harshil-1603 Review duration: 15250m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 317 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.345
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #461"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 40.4% (MEDIUM) · Higher = larger blast radius
    40.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.0% · Safe to merge
    16.0%