Skip to content

Support iTerm2 OSC notifications and terminal bells#57

Merged
nedtwigg merged 7 commits intomainfrom
codex/add-iterm2-osc-support
May 8, 2026
Merged

Support iTerm2 OSC notifications and terminal bells#57
nedtwigg merged 7 commits intomainfrom
codex/add-iterm2-osc-support

Conversation

@nedtwigg
Copy link
Copy Markdown
Member

@nedtwigg nedtwigg commented May 7, 2026

Summary

  • Add iTerm2-compatible terminal identity and OSC handling for OSC 9, OSC 9;4, OSC 99, OSC 777, plus standalone terminal BEL notifications.
  • Keep protocol alerts subject to user attention while separating them from the visual timer-based alert track.
  • Simplify alert data to the fields MouseTerm actually renders and update the alert/TODO UI, persistence, and specs accordingly.
  • Refresh VS Code, Tauri, and fake adapter paths so protocol notifications propagate consistently across environments.

Testing

  • Added unit coverage for protocol parsing, OSC 99 support responses, BEL notifications, alert suppression with attention, and persistence validation.
  • Ran targeted lib tests and the VS Code build successfully.

nedtwigg and others added 4 commits May 7, 2026 15:08
Dedup AlertManager.notify so OSC progress spam doesn't fire listeners
every chunk, fast-path no-OSC chunks in TerminalProtocolParser, and
collapse the duplicate display-side parser in the vscode-ext router so
each PTY chunk is parsed once. Replace ad-hoc ternary cascades in
parseOsc94 and TerminalPaneHeader with lookup tables, and derive
ACTIVITY_NOTIFICATION_SOURCES from a single const tuple.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Extract setProtocolRinging / clearProtocolRingIfActive helpers to remove
five copies of the ringing-clear block. Add a no-op guard so repeated
OSC 9;4 progress updates skip listener notification. In the OSC parser,
fast-path stripDeviceAttributeQueries when no DA query is present, and
replace findOscTerminator's allocate+sort with three indexOf compares.
Make ALERT_BUTTON_LABELS exhaustive over SessionStatus so adding a new
status forces a label decision.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 7, 2026

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 39e290c
Status:⚡️  Build in progress...

View logs

@nedtwigg nedtwigg marked this pull request as ready for review May 8, 2026 00:19
@nedtwigg nedtwigg merged commit 020490a into main May 8, 2026
3 of 4 checks passed
@nedtwigg nedtwigg deleted the codex/add-iterm2-osc-support branch May 8, 2026 00:24
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