feat(dashboard): Enter on agents pane re-attaches to bottle #45

Merged
didericis merged 1 commits from chunk-3-reattach into main 2026-05-26 03:40:43 -04:00
Owner

Summary

PRD 0020 chunk 3. Enter on a focused agents-pane row drops into a claude session inside the selected bottle.

Works for both:

  • Dashboard-owned bottles — looks up the stored Bottle handle in the main loop's bottles dict (populated by chunk 2's new-agent flow).
  • Externally-discovered bottles — synthesizes a DockerBottle from the slug → container name claude-bottle-<slug>. Covers cross-dashboard re-attach (previous-dashboard or ./cli.py start bottles).

For the synthesized path, --append-system-prompt-file resolves via read_metadata(slug)manifest.agents[name].prompt. If either lookup fails (no metadata, agent removed from manifest), re-attach runs without the flag — claude defaults to no system prompt, the bottle's other state is untouched.

Shares the curses.endwin → attach → stdscr.refresh() handoff with chunk 2's new-agent flow via a new _attach_to_bottle helper.

Footer reshuffled to surface [Enter] view/attach. 464 unit tests pass (3 new for _bottle_for_slug).

## Summary PRD 0020 chunk 3. Enter on a focused agents-pane row drops into a claude session inside the selected bottle. Works for both: - **Dashboard-owned bottles** — looks up the stored `Bottle` handle in the main loop's `bottles` dict (populated by chunk 2's new-agent flow). - **Externally-discovered bottles** — synthesizes a `DockerBottle` from the slug → container name `claude-bottle-<slug>`. Covers cross-dashboard re-attach (previous-dashboard or `./cli.py start` bottles). For the synthesized path, `--append-system-prompt-file` resolves via `read_metadata(slug)` → `manifest.agents[name].prompt`. If either lookup fails (no metadata, agent removed from manifest), re-attach runs without the flag — claude defaults to no system prompt, the bottle's other state is untouched. Shares the `curses.endwin` → attach → `stdscr.refresh()` handoff with chunk 2's new-agent flow via a new `_attach_to_bottle` helper. Footer reshuffled to surface `[Enter] view/attach`. 464 unit tests pass (3 new for `_bottle_for_slug`).
didericis added 1 commit 2026-05-26 03:40:11 -04:00
feat(dashboard): Enter on agents pane re-attaches to bottle
test / unit (pull_request) Successful in 18s
test / integration (pull_request) Successful in 1m11s
572306ddb6
PRD 0020 chunk 3. Enter on a focused agents-pane row drops to a
claude session inside the selected bottle. Works for both
dashboard-owned bottles (looks up the stored Bottle handle in
the main loop's `bottles` dict) and externally-discovered ones
(synthesizes a DockerBottle from the slug → `claude-bottle-<slug>`
container name).

For the synthesized path, the `--append-system-prompt-file`
target resolves via metadata.json + the manifest's agent prompt
if both can be read; otherwise the re-attach runs without the
flag (claude defaults to no system prompt, the bottle's other
state is untouched).

Shares the curses.endwin → attach → refresh handoff with the
chunk-2 new-agent flow via a new `_attach_to_bottle` helper.
Footer reshuffled to advertise `[Enter] view/attach`. 464 unit
tests pass (3 new for `_bottle_for_slug`).
didericis merged commit fc8be2e418 into main 2026-05-26 03:40:43 -04:00
Sign in to join this conversation.