← Back to Pull requests

fix: keep CLI filters consistent and clearable #43

Closed
unknown closed this pull request without merging on Oct 20, 2026 18:43 UTC
View on GitHub
unknown unknown commented on Oct 09, 2026 05:40 UTC
Author

Summary

Fixes #42. Starting with --port 1080 no longer traps the TUI in that filter: Backspace clears CLI filters even when they have results, and cleared filters stay cleared after refresh. Typing and deleting interactive filter text now respect any CLI filters that are still active.

 Backspace in normal mode or on empty filter input
-  clear CLI filters only when no processes match
+  clear CLI filters and remove their banners

 Keypress, background refresh, or post-kill refresh
-  alternate between unfiltered and CLI-filtered process lists
+  use the same get_filtered_processes() path

The CLI filter banners now render inside the live view so they disappear when cleared. The README and keyboard hints describe the clear action.

Evidence

  • Before: CLI filters return after interactive edits; reproduction and recording.

  • After: Clearing the filter shows both ports and keeps them visible across real background refreshes:
  • !After the fix: cleared CLI filters stay cleared across refreshes

    <details>
    <summary>MP4 with pause and seek controls</summary>

    https://github.com/user-attachments/assets/c938ae00-6de3-4fcc-9d9e-64b43bbcaf70

    </details>

    Both recordings use synthetic process discovery with the real UI and refresh loop; termination is disabled.

    Nine regression cases exercise the real keyboard handlers and deterministic refreshes: clearing individual/combined CLI filters, clearing with no matches, exiting an empty interactive filter, editing text, leaving an unmatched search, and refreshing after a confirmed kill. Each changed behavior was observed failing before its fix; process operations are mocked.

    Validated on macOS with Python 3.13:

  • uv run --locked pytest -q — 26 passed, 1 skipped (Windows-only test)

  • uv run --locked ruff check gruyere/ test_cli_filters.py — passed

  • uv run --locked ruff format --check gruyere/ test_cli_filters.py — passed

  • uv run --locked pyright — 0 errors, 0 warnings
  • Merge Danger

    Door: two-way

    Revert the commit to restore the previous behavior. No dependency, persistence, or configuration changes.

    Blast Radius: Filtering

    Backspace now clears all startup CLI filters even when matches exist, expanding the visible process list. Process termination still requires confirmation; no real processes were terminated during validation.

    Diff: 315 lines (+236 / -79) across 3 files Reviewer: savannahostrowski Review duration: 16623m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.40) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 315 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%
    56%
    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.344
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #43"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 17.5% · Safe to merge
    17.5%