← Back to Pull requests

fix(transport): recognize Pi input and editor dialogs #2026

Closed
unknown closed this pull request without merging on Oct 25, 2026 16:35 UTC
View on GitHub
unknown unknown commented on Oct 25, 2026 13:14 UTC
Author

What a user gets

An ordinary rig send into a current Pi v1.4.0 extension input or editor dialog returns target_needs_input without typing text or Enter. Previously the message could become the dialog's answer. The shared classifier recognizes the native submit/cancel hints and component rules; the deliberate, reasoned and audited input route remains available.

This includes default 80-column panes, hints wrapped across up to three adjacent rows, and tall editors whose opening rule is outside the transport's 20-line capture. Editors use their bottom rule, the complete four-action help with exactly one blank row on each side, as Pi draws it, and the outer closing border, so a draft in Pi's own editor that quotes the help isn't read as a dialog. Inputs retain the field/spacer and nearby opening-rule checks. The later-composer/fence veto and six-row footer limit still apply.

Merged current main after #2015 landed. Pi renderer source is earendil-works/pi v1.4.0 at 4a080252f06caf63a525d7873c5d94d3c23887e0: extension-input.ts, extension-editor.ts, Input/Editor, Text wrapping and default keybindings. No native runtime or managed RPC changes.

Verification

  • RED: 21 wrapped/tall-layout transport cases failed with the previous matcher; 219 controls passed. A separate counterfactual with the final three-row and clipped scrolled-editor fixtures failed all six ordinary-send cases against that matcher.

  • GREEN: 513 prompt-guard and session-transport checks passed, one worker. After adding explicit three-row/four-row bounds, all 16 affected span/scroll controls passed. Daemon tsc --noEmit and diff checks passed.

  • Tests cover default shift+enter/ctrl+j labels, 80/67/40-column editors, a 30-column input, wrapped selectors, a 15-row editor and its actual 20-line tail, adopted runtime labels, no text/key writes and deliberate audited input. Historical dialogs above a newer composer, fences, blockquotes, incomplete hints, separated hint rows and footer overflow remain outside recognition.

  • Fixtures reconstruct the pinned renderer; they are not native captures. No install, build, provider or native agent run.
  • Limits

    This remains a bounded screen heuristic. Clipped/incomplete hints, more than three wrapped rows, arbitrary custom extension UIs and layouts beyond the stated footer/input bounds keep their prior classification. Editor height alone no longer prevents detection when its bottom chrome is present. No blanket unknown-runtime refusal or new error code was added.

    No stub-agent scenario was added: scripted transport fixtures exercise the shared classifier and its no-write refusal directly; a stub does not establish Pi's native renderer. Native acceptance remains separate.

    🤖 Generated with Claude Code

    Diff: 349 lines (+261 / -88) across 4 files Reviewer: openrig-review Review duration: 201m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 349 lines diff across 4 files
    0.42
    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.350
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #2026"
    general weight: 0.35
    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: 42.4% (MEDIUM) · Higher = larger blast radius
    42.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.8% · Safe to merge
    16.8%