← Back to Pull requests

Refresh terminal colours on system theme/palette changes #63701

Closed
unknown closed this pull request without merging on Oct 10, 2026 16:08 UTC
View on GitHub
unknown unknown commented on Oct 09, 2026 15:03 UTC
Author

As helpfully flagged by @vtjnash in https://github.com/JuliaLang/julia/pull/59958#issuecomment-5843183385, quite a few terminals (Kitty, Ghostty, VTE, tmux, and others) now support sending events when the system's colour theme/terminal palette changes.

Based on https://github.com/contour-terminal/contour/blob/master/docs/vt-extensions/color-palette-update-notifications.md, I've got Opus 5.5 to add this in to the DA1/DCS sequence reading that we've added recently.

Along the way, I also ran into #63591 which makes me thing at this point it's worth centralising the three changes we make to the terminal state when going into/out of input mode:

  • Raw/cooked mode

  • Bracketed paste

  • (new) Palette update notifications
  • So, {enable,disable}_bracketed_paste are now no longer used (but there are a handful of packages in the ecosystem that do, so I've left them in to be removed later), and the new helper functions {enter,leave}_input_mode handle all three state toggles.

    The \e[? handler previously assumed every private CSI sequence was a DA1 reply and read until a c, which would swallow typed input after a notification. It now reads to the sequence's final byte and dispatches on it, discarding unrecognised or truncated sequences.

    Diff: 156 lines (+117 / -39) across 1 files Reviewer: adienes Review duration: 1505m
    All Vouch review confidence checks passed
    Residual risk 0.13 = Change Risk (0.33) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.33 · 156 lines diff across 1 files
    0.33
    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.303
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #63701"
    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: 33.2% (LOW) · Higher = larger blast radius
    33.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: 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: 13.1% · Safe to merge
    13.1%