← Back to Pull requests

feat(desktop): child terminals and an overview tab in the Terminal window #3586

Open
unknown opened this pull request with 335 lines diff across 4 files
View on GitHub
unknown unknown commented on Nov 22, 2026 20:16 UTC
Author

Summary

An overview of every terminal in the active space, with live previews (spec 2706, last layer of this stack). Child terminals hang under their agent with program badges; those badges landed in L5 (#3567) to keep this layer small.

  • desktop/src/renderer/src/features/terminal-window/TerminalOverview.tsx, use-terminal-previews.ts: a card per terminal (name with inline rename, status, machine and folder, time since change, last 8 screen lines), refreshed every 3 s while open, at most 24 terminals; a click opens the terminal.

  • TerminalTabBar.tsx, TerminalWindowApp.tsx, use-terminal-window.ts: an Overview entry in the tab bar and Cmd+Shift+O (reserved from a focused terminal).

  • desktop/src/main/local-terminals/{host,ipc}.ts, shared/local-terminals.ts: IPC local-terminal:read (herdr-core terminal.read, bounded to 8,000 chars, generic failure). Matrix computers use the gateway's GET …/tabs/:tab/read.
  • Tests

  • terminal-window-overview.test.tsx (previews, status, open, inline rename, tab-bar toggle, trimming), the computer preview through the gateway, IPC and host read, menu and sender policy: passing.

  • Typecheck, check:patterns and react-doctor (no findings in changed files) are clean.
  • Process

  • Linear: ENG-521

  • GitHub native stack: #3541 (layer 10 of 10)

  • Spec: #3539 (overview section)

  • UI: live Electron Desktop screenshots and recording from a preview (dev-build capture only so far)

  • UI: shared in Slack tech channel
  • <details><summary>Surface matrix</summary>

    | Surface | UI | Behavior | State/recovery | Automated tests | Real evidence |
    | --- | --- | --- | --- | --- | --- |
    | Web Canvas | N/A | N/A | N/A | N/A | N/A |
    | Web Desktop | N/A | N/A | N/A | N/A | N/A |
    | Electron Desktop | pass | pass | pass | pass | pending |
    | Web Mobile | N/A | N/A | N/A | N/A | N/A |
    | Native Mobile | N/A | N/A | N/A | N/A | N/A |

    N/A: the Terminal window exists only in Electron Desktop (spec 651).
    </details>

    <details><summary>Invariants</summary>

  • Source of truth: herdr-core (local, ssh) and the gateway (computers) own the screen; previews are read-only copies held only while the overview is open.

  • Lock/transaction scope: none; reads are independent and bounded (5 s timeout, 64 KiB per gateway reply, 8,000 chars per local read).

  • Acceptable orphan states: a failed read leaves that preview as it was.

  • Auth source of truth: the main-process sender policy for local-terminal:read; the computer's credential for gateway reads.

  • Deferred scope: titles for Matrix computer terminals need a title source on the computer (see spec).

  • </details>

    Diff: 335 lines (+251 / -84) across 4 files Reviewer: greptile-apps[bot] Review duration: 9m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.42) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 335 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    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.348
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #3586"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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.2% (MEDIUM) · Higher = larger blast radius
    42.2%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 22.5% · Safe to merge
    22.5%