Skip to content

feat: OSC 133 shell integration and OSC 777 desktop notifications (split, independent flags)#48

Merged
roramirez merged 2 commits into
mainfrom
feat/osc133-osc777-split
Jun 30, 2026
Merged

feat: OSC 133 shell integration and OSC 777 desktop notifications (split, independent flags)#48
roramirez merged 2 commits into
mainfrom
feat/osc133-osc777-split

Conversation

@roramirez

@roramirez roramirez commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Splits the previously-mixed feat/shell-integration-osc133-osc777 branch (commit ae2349b) into two independent features behind two independent flags, re-implemented against the current refactored main.

Why

The original commit bundled two unrelated features behind a single general.shell_integration flag, so prompt markers and desktop popups could not be toggled separately. This PR separates them — one concern per commit, one flag per feature.

Commits

  1. OSC 133 shell integrationgeneral.shell_integration
    • A/B/C/D sequences track prompt/command state on the grid
    • status bar shows (waiting for input) and ✗ N (last command exited non-zero)
    • left status cluster now uses a running x cursor so REC / bell / prompt / exit-code badges never overlap
  2. OSC 777 desktop notificationsgeneral.desktop_notifications
    • notify;title;body → desktop notification via notify-send (Linux) / osascript (macOS) on a detached thread
    • routed through a new ParseEffect::Notification (the parser thread can't reach Config after the RwLock-grid + effects-channel refactor); dispatched in drain_effects

Both flags default true and are exposed in the TUI config panel (F_SHELL_INTEGRATION = 39, F_DESKTOP_NOTIFICATIONS = 40).

Verification

  • cargo fmt --check, cargo clippy --locked -- -D warnings, cargo test all clean on each commit
  • bisect-clean: commit 1 builds and tests standalone without commit 2
  • full suite: 1176 + 256 tests pass
  • km score absolute 86.4 (B+), above the fail_below = "B" floor

Supersedes the unmerged feat/shell-integration-osc133-osc777 branch.

OSC 133 A/B/C/D sequences track shell prompt/command state on the grid.
The status bar shows a › indicator (theme.palette[6]) when the shell is
waiting for input (state B) and a ✗ N badge (theme.palette[1]) when the
last command exited non-zero; the badge clears when a new prompt starts
(A). The left status cluster now lays out REC / bell / prompt / exit-code
indicators with a running x cursor so they no longer overlap.

Gated behind general.shell_integration (default true) and exposed in the
TUI config panel as F_SHELL_INTEGRATION = 39.
OSC 777 notify;title;body requests a desktop notification. The parser
stamps it onto the grid (pending_notification); the parser thread drains
it under the write lock and emits a new ParseEffect::Notification, which
drain_effects dispatches on the main thread via notify-send (Linux) /
osascript (macOS) from a detached thread.

Gated behind its own general.desktop_notifications flag (default true,
F_DESKTOP_NOTIFICATIONS = 40) — independent of shell_integration, so
prompt markers and desktop popups can be toggled separately.
@roramirez roramirez merged commit 6d2d01c into main Jun 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant