Phase 2.2 of #327. The title numbering is the work order: take milestone issues in Phase N.M order. The one hard dependency is #331 on #330, recorded as blockedBy; the rest is sequence, not blocking. Read gh issue view 327 --comments for the plan of record.
Current state
Pressing i twice on the same signal starts a second Claude Code session against the same item, with no indication the first one exists. launch() in ui/tui/src/investigations/launch.rs runs its tmux command unconditionally, and nothing anywhere checks whether an investigation for that signal is already open.
Ideal state
- Pressing
i on a signal that already has an open investigation window switches to that window instead of opening a second one
- The TUI reports which window it switched to, rather than appearing to do nothing
- Pressing
i after that window has been closed opens a fresh investigation normally
- Two different signals still get two separate windows
Out of scope
- Detecting whether the session inside the window is still running or has finished. Window presence is the signal here; session state belongs to ADR 019's session records, which are not built
- Resuming or reusing a completed session
- Any automatic or unattended launching, which stays out of scope for this milestone
Starting points
ui/tui/src/investigations/launch.rs — the launch path, and the window naming introduced by the previous issue in this phase
ui/tui/src/state/update/mod.rs — where the investigate action becomes an effect
QA plan
- Select a PR, press
i — expect a new named window
- Return to the TUI and press
i on the same PR — expect no second window, and the TUI to switch to the existing one
- Run
tmux list-windows — expect exactly one window for that PR
- Close the investigation window, return to the TUI, press
i on the same PR — expect a fresh window to open
- Press
i on a different PR — expect a second window alongside the first
- Run the TUI outside tmux and press
i — expect the existing "not in tmux" error
Done when
Pressing i on a signal that already has an open investigation window switches to it instead of opening a second one.
Phase 2.2 of #327. The title numbering is the work order: take milestone issues in
Phase N.Morder. The one hard dependency is #331 on #330, recorded asblockedBy; the rest is sequence, not blocking. Readgh issue view 327 --commentsfor the plan of record.Current state
Pressing
itwice on the same signal starts a second Claude Code session against the same item, with no indication the first one exists.launch()inui/tui/src/investigations/launch.rsruns its tmux command unconditionally, and nothing anywhere checks whether an investigation for that signal is already open.Ideal state
ion a signal that already has an open investigation window switches to that window instead of opening a second oneiafter that window has been closed opens a fresh investigation normallyOut of scope
Starting points
ui/tui/src/investigations/launch.rs— the launch path, and the window naming introduced by the previous issue in this phaseui/tui/src/state/update/mod.rs— where the investigate action becomes an effectQA plan
i— expect a new named windowion the same PR — expect no second window, and the TUI to switch to the existing onetmux list-windows— expect exactly one window for that PRion the same PR — expect a fresh window to openion a different PR — expect a second window alongside the firsti— expect the existing "not in tmux" errorDone when
Pressing
ion a signal that already has an open investigation window switches to it instead of opening a second one.