docs(research): claude-code pane in the dashboard #43

Merged
didericis merged 1 commits from research-claude-code-pane into main 2026-05-26 02:53:30 -04:00
Owner

Summary

Research doc surveying the three realistic ways to put a claude-code session inside the dashboard TUI so you can interact with it without leaving ./cli.py dashboard:

  1. Handoff — drop curses, foreground claude via docker exec -it, restore on exit. Clones the existing e/p editor pattern. ~30 lines, no new deps, side-by-time rather than side-by-side.
  2. Embedded emulator — open a PTY, parse claude-code's ANSI stream via pyte, paint cells into a curses pane. Real "pane in the dashboard" but a six-week build with one new dep and several integration trap-doors (alt-screen support, resize protocol, input routing, multi-PTY state).
  3. External multiplexer — when running inside tmux / iTerm / wezterm, delegate pane creation to that. Tiny code, but splits the operator's mental model.

Recommends shipping Option 1 first; defers Option 2 to "only if Option 1 is observably insufficient"; treats Option 3 as niche augmentation.

Calls out four followups to verify before committing to any path (claude-code's PTY behavior at small heights, attach-to-existing-exec semantics, SIGWINCH handling, the -it vs -i requirement for the embedded path).

## Summary Research doc surveying the three realistic ways to put a claude-code session inside the dashboard TUI so you can interact with it without leaving `./cli.py dashboard`: 1. **Handoff** — drop curses, foreground claude via `docker exec -it`, restore on exit. Clones the existing `e`/`p` editor pattern. ~30 lines, no new deps, side-by-time rather than side-by-side. 2. **Embedded emulator** — open a PTY, parse claude-code's ANSI stream via `pyte`, paint cells into a curses pane. Real "pane in the dashboard" but a six-week build with one new dep and several integration trap-doors (alt-screen support, resize protocol, input routing, multi-PTY state). 3. **External multiplexer** — when running inside tmux / iTerm / wezterm, delegate pane creation to that. Tiny code, but splits the operator's mental model. Recommends shipping Option 1 first; defers Option 2 to "only if Option 1 is observably insufficient"; treats Option 3 as niche augmentation. Calls out four followups to verify before committing to any path (claude-code's PTY behavior at small heights, attach-to-existing-exec semantics, SIGWINCH handling, the `-it` vs `-i` requirement for the embedded path).
didericis added 1 commit 2026-05-26 02:51:20 -04:00
docs(research): claude-code pane in the dashboard
test / integration (pull_request) Successful in 1m8s
test / unit (pull_request) Successful in 17s
test / unit (push) Successful in 17s
test / integration (push) Successful in 1m2s
8cd867f3d2
Survey the three realistic ways to surface a claude-code session
inside the dashboard TUI:

  1. Handoff — drop curses, foreground claude, restore on exit
     (the existing `e`/`p` pattern, extended). Minimal code,
     side-by-time rather than side-by-side.
  2. Embedded emulator — own a PTY, parse claude-code's ANSI
     stream via `pyte`, paint it into a curses pane. Real
     "pane in the dashboard" but a six-week build with one new
     dep and several integration trap-doors (alt-screen, resize,
     input routing, multi-PTY state).
  3. External multiplexer — delegate pane creation to tmux /
     iTerm / wezterm when detected. Tiny code, but splits the
     operator's mental model and gives up layout control.

Recommendation: ship Option 1 first; defer Option 2 to "only if
Option 1 is observably insufficient"; treat Option 3 as a
niche augmentation for power users.

Calls out four followups worth verifying before committing
(PTY behavior at small sizes, attach-to-existing-exec, SIGWINCH
handling, `-it` vs `-i` for the embedded path).
didericis merged commit 8cd867f3d2 into main 2026-05-26 02:53:30 -04:00
didericis deleted branch research-claude-code-pane 2026-05-26 02:53:30 -04:00
Sign in to join this conversation.