Revert idle "claude foreground" filter — back to legacy 5s notify

Reverts in one combined commit:
- 9931a92 (inline pane_id + watch list into bash script)
- 6772b8d (pivot per-distro → per-pane via TILETOPIA_PANE_ID env)
- f51033a (original per-distro idle filter)

End-to-end probe never worked correctly against the real running app
even after fixing the wsl.exe-drops-positional-args bug. Probe script
ran fine in isolation but kept returning false-negative when called
through tiletopia's wsl.exe spawn. Rather than keep iterating, back
out cleanly — pane behaviour is now the original "go idle after 5s of
silence regardless of what's running."

memory.md session log notes the lessons for a future retry: don't ship
per-distro again (CLAUDE.md explicitly says multi-claude-per-distro is
the primary use case); prove the probe end-to-end before wiring into
the idle effect (a "Test probe" button in MCP panel would have caught
this in minutes).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
megaproxy 2026-05-26 18:33:11 +01:00
parent 9931a92c5f
commit 50fbd0e531
7 changed files with 27 additions and 486 deletions

View file

@ -5,13 +5,11 @@ mod creds;
mod hosts;
mod mcp;
mod mcp_policy;
mod probe;
mod pty;
use std::sync::Arc;
use crate::mcp::{McpServerHandle, McpState, PendingActions};
use crate::probe::ProbeCache;
use crate::pty::PtyManager;
pub fn run() {
@ -42,9 +40,6 @@ pub fn run() {
// Pending action registry — separate managed state so mcp_action_reply can
// grab it without needing to lock McpState or reach into TileService.
let pending_actions: Arc<PendingActions> = Arc::new(PendingActions::default());
// Idle-filter probe cache: shared across all is_watch_process_running
// calls so a per-distro answer is reused for a few seconds. See probe.rs.
let probe_cache: Arc<ProbeCache> = Arc::new(ProbeCache::new());
tauri::Builder::default()
.plugin(tauri_plugin_clipboard_manager::init())
@ -53,7 +48,6 @@ pub fn run() {
.manage(mcp_state)
.manage(McpServerHandle::default())
.manage(pending_actions)
.manage(probe_cache)
.invoke_handler(tauri::generate_handler![
commands::list_distros,
commands::spawn_pane,
@ -76,7 +70,6 @@ pub fn run() {
commands::mcp_policy_load,
commands::mcp_policy_save,
commands::mcp_hard_deny_labels,
commands::is_watch_process_running,
])
.run(tauri::generate_context!())
.expect("error while running tauri application");