The context indicator never showed because it matched on leaf.cwd, which
is almost always undefined (newLeaf sets none; the shell picker never
supplies one) — so the cwd<->transcript match never hit.
Fix: report each WSL pane's real working directory.
- pty.rs: inject PROMPT_COMMAND (forwarded via WSLENV) so the WSL shell
emits OSC 7 (file://host/path) on every prompt. Default Ubuntu bash
inherits an env-provided PROMPT_COMMAND; a shell that hard-assigns it,
or a non-bash login shell, just won't report (indicator stays hidden,
no breakage).
- XtermPane: register an OSC 7 handler, decode the path, emit onCwd.
- LeafPane: track liveCwd from onCwd and match the session on
(liveCwd ?? leaf.cwd). OSC 7 fires at the bash prompt right before
'claude' launches, so liveCwd is exactly claude's launch cwd; it also
follows 'cd'.
tsc clean. Rust builds on the Windows host; needs runtime verification.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>