Commit graph

5 commits

Author SHA1 Message Date
Kovid Goyal
5bf3c2dc67
Cleanup previous PR
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-10-13 21:05:16 +05:30
Zhizhen He
ee491f4d44
Program status: Preserve displayed progress on identical reports 2026-10-13 22:29:38 +08:00
Kovid Goyal
ed0d236708
Program status protocol: fixes and improvements
- Use the SIMD base64 decoder
- Allow ids of up to 263 bytes, the 128 byte limit in the spec is an error
- Drop transient records when a program run with launch --hold exits, even without shell integration
- Drop done and error records when a key is pressed in the window
- Only build the records list when there are watchers
- Count the raw bytes of a report against the length limit
- Strip only ASCII whitespace and discard reports with over long keys regardless of case
- Identical reports do not change which record is shown in the tab bar
2026-10-13 08:50:39 +05:30
ttyS3
eeb30d7b77
feat: show the number of windows in the most urgent program status
When several windows in a tab report a program status, tab.program_status
now appends the number of windows in the most urgent status, e.g. two
windows blocked on the user. Ties between windows are broken by the most
recently updated record instead of the window order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 22:31:38 +08:00
ttyS3
00f7a0abd5
feat: support the Program Status Protocol (OSC 7501)
Implement revision 0.4 of the Program Status Protocol, which lets a
program report whether it is idle, working, done, blocked on the user
or failed, and why.

- Parse and validate reports per the spec: limits, base64 text without
  control characters, malformed ids discard the report instead of
  falling back to the root record, unknown states are ignored
- Keep up to 256 records per window (LRU eviction), with clear removing
  a record and its descendants and app inherited from ancestors
- Reply to the feature detection query with supported states and kinds
- Lifetime: working/blocked/idle records are dropped at a new shell
  prompt (OSC 133;A), done/error are dropped when the window gets focus,
  a full reset (RIS) removes every record
- Expose records via tab.program_status in tab_title_template, the
  output of kitten @ ls and a new on_program_status_change watcher

Spec: https://www.superlogical.com/rex/docs/build/program-status
Ref: ghostty-org/ghostty#14560, ghostty-org/ghostty#14630

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 22:31:38 +08:00