tiletopia/src-tauri
megaproxy 6772b8db37 Idle filter: pivot per-distro → per-pane via TILETOPIA_PANE_ID env marker
Per-distro suppression (shipped earlier today) broke tiletopia's primary
use case — multiple claude panes per distro means as soon as one runs
claude, ALL Ubuntu panes go silent. Tested live: user couldn't reproduce
idle on any pane because PID 46848 (their main session) tripped the gate.

New mechanism, per-pane via env-var marker:

1. pty.rs tags every WSL spawn with TILETOPIA_PANE_ID=<id> as a Windows
   env var, plus WSLENV=...TILETOPIA_PANE_ID/u (appended to any pre-
   existing WSLENV) so the var forwards into the distro. Pane id is now
   reserved BEFORE build_command so the tag is available at spawn time.
2. probe.rs rewritten — is_watch_process_running(distro, pane_id) runs
   a bash one-liner that pgreps for each watched name, then for each PID
   checks /proc/<pid>/environ for the matching TILETOPIA_PANE_ID line.
   Env inheritance does the work: shell inherits from wsl.exe, claude
   inherits from shell. Cache keyed by (distro, pane_id).
3. Fail-safe INVERTED: probe failure now returns false (don't suppress)
   instead of true (suppress). A transient error should never silence
   the idle indicator permanently. Frontend catch updated to match.
4. LeafPane tracks PaneId in paneIdRef set by onPaneSpawned; idle ticks
   before spawn-completion pass 0, which won't match any real marker so
   the pane idles normally.

Existing panes won't have the marker until respawned — they'll always
show idle (since probe never matches). User opens fresh panes once after
deploying this. Documented in memory.md follow-ups.

pnpm check clean. Rust validation: cargo test --lib on Windows.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 17:58:51 +01:00
..
capabilities Scope opener plugin to http/https/mailto so clicks open the browser 2026-05-25 19:47:24 +01:00
icons M5 ship infrastructure: icon, version, release script, README 2026-05-22 13:38:29 +01:00
src Idle filter: pivot per-distro → per-pane via TILETOPIA_PANE_ID env marker 2026-05-26 17:58:51 +01:00
build.rs Initial scaffold from M1 spike (tiletopia) 2026-05-22 12:31:29 +01:00
Cargo.lock MCP v2 PR-1: policy engine + audit log + Config/Audit/Policy panel tabs 2026-05-26 12:05:31 +01:00
Cargo.toml MCP v2 PR-1: policy engine + audit log + Config/Audit/Policy panel tabs 2026-05-26 12:05:31 +01:00
tauri.conf.json Route terminal clipboard through tauri-plugin-clipboard-manager; bump to 0.2.3 2026-05-22 23:27:43 +01:00