Files
bot-bottle/claude_bottle
didericis 83ec9669c9
test / unit (pull_request) Successful in 17s
test / integration (pull_request) Successful in 1m8s
feat(dashboard): route launch output into right tmux pane
PRD 0021 follow-up. When starting a new agent via `n` while
in tmux, the dashboard now:

  1. Pre-creates the right pane with `tail -F
     state/<slug>/bringup.log`.
  2. Redirects fd 2 (stderr) to that log file via dup2 — affects
     both Python `info()` calls AND subprocess inheritors'
     stderr (docker compose up, network creates, provision).
  3. Runs `backend.launch().__enter__()` with the redirect in
     place; everything streams into the right pane via tail.
  4. Restores stderr.
  5. Respawns the right pane (tail → claude session).

Net effect: dashboard pane stays uncluttered during bringup,
and the operator watches the compose-up + provision output in
the same pane that's about to hold the claude session — no
visual handoff between "starting" and "started."

Curses never needs to come down on the tmux path (the pane is
already created in the dashboard's neighbor pane, and stderr
is redirected away from the terminal entirely).

If `_tmux_split_pane_tail` fails (tmux missing, server died),
falls through to the existing curses-endwin handoff so the
operator still gets a session.
2026-05-26 14:41:53 -04:00
..