Auto-refresh the home list while it's visible (Closes #26)
The interactive overview was a snapshot taken on screen entry — new
sessions, exits, tag changes, and rename events stayed invisible
until the user navigated away and back. Reported by
@schickling-assistant.
Implementation: poll listSessions() once a second while the home
screen is the active view, push the result through the existing
`sessions` signal. The framework's effect()-wrapped renderFrame
re-runs because it tracks signal reads — no other plumbing needed.
Polling pauses around attach / spawn handoffs (pauseApp /
resumeApp wrap myApp.pause / myApp.resume so the polling toggles
in lockstep), and the interval is .unref()-ed so the event loop
isn't held alive by it (when stdin closes the process exits
cleanly).
Tried fs.watch + EventFollower first; both were silent in the
test harness because the TUI runs in a node-pty child process and
the file changes happen in a sibling process — that combination
isn't reliably picked up on macOS. Existing EventFollower tests
all run in-process so the cross-process case wasn't covered. A 1-
second poll is responsive enough for the "did a session appear
or exit" UX, costs a single readdir + per-file stat per tick,
and works on every platform regardless of fd / IPC quirks.
Tests (tests/tui.test.ts) cover three trigger types end-to-end
through a real PTY: session created externally appears in the
list; session that exits externally shows up as exited (or its
absence is reflected); tag added externally with `pty tag`
renders inline as `#k=v`. Each waits up to 5-8s for the next
poll tick to fire.