Files
codewhale/crates
CrepuscularIRIS 60347b8940 feat(notifications): add LC_TERMINAL fallback probe for Cmux and test coverage
Cmux typically does not set TERM_PROGRAM; it sets LC_TERMINAL=Cmux instead.
The previous resolve_method() only checked TERM_PROGRAM, causing Cmux users
to fall back to the Bel method instead of OSC 9 notifications (#1281).

Changes:
- Add LC_TERMINAL as a secondary env-var probe in resolve_method(), checked
  after TERM_PROGRAM. This picks up Cmux (and any other OSC-9 capable
  terminal that sets LC_TERMINAL rather than TERM_PROGRAM).
- Add Cmux to the OSC9_TERMINALS allowlist.
- Document that terminals setting neither env var can force OSC 9 with
  [notifications].method = "osc9" in the config file.
- Add two new tests:
  - auto_detect_picks_osc9_for_cmux_via_lc_terminal
  - auto_detect_picks_osc9_for_wezterm_via_lc_terminal
- Harden existing auto_detect_picks_bel_for_unknown_on_unix to clear
  LC_TERMINAL before asserting the Bel fallback, preventing flakiness in
  test runner environments where LC_TERMINAL is set to a known terminal.
- Update NotificationsConfig.method doc to mention Cmux and the
  LC_TERMINAL probe.

Signed-off-by: CrepuscularIRIS <serenitygp@qq.com>
2026-05-10 17:36:33 -05:00
..