M31: illogical tui (tabs, splits and needs-you in any terminal) #50
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Depends on: #48 (S19, done). Works without #49, but heavy output wastes CPU until #49 lands.
Blocks: #51 (M32: copy mode)
TUI track. illogical in any terminal, as herdr does:
illogical tuidraws tabs, splits and a "needs you" sidebar, over the same socket and protocol as the web client. It works locally, over ssh, or against another host with--host.crates/cli/src/tui/; new dependencies ratatui and crossterm. Start fromspikes/s19-tui(about 950 lines that already work).GhosttyEngineper pane, fed snapshot and output frames;sizeresizes it.cells()walk over libghostty'sRenderStatetocrates/vt, next to the formatter, so the client and the daemon share one wrapper.TabView.layoutfor the size weview; its one-cell gaps are the dividers.viewclaims the size when the TUI is opened, focused or typed in, like any client. State ishello/state, plusdeltathroughState::apply(M23).PaneInfo.reasonwith its headline. On a selected entry: Enter goes there; allow, deny and dismiss go through/api/attention/act(M24).key::Encoder::set_options_from_terminal. That covers DECCKM, modifyOtherKeys and the kitty protocol. Ctrl-] is the menu key (and twice types it), as inillogical attach. Bracketed paste is passed through when the pane wants it.resize_split);move_pane);mouse::Encoder), arrow keys on the alternate screen, or local scrollback;--sessionto start in one.tmux.spec.ts, driving the TUI through a PTY);ssh geek illogical tuiworks in an 80x24 terminal and in a 300x80 one;bench.sh).Done 2026-10-02, merged in
15c3331.illogical tui [--session S](--hostfor any host). docs/features.md has the keys and the mouse.What landed:
crates/vt/src/ghostty/view.rs, the client side of the shared libghostty wrapper.cells()over the render state (palette colors stay indexes);attachtakeskitty_keys, and a pane answers while such a client is attached.crates/cli/src/tui/(ratatui), about 2,500 lines with tests.?lists them), and the web client's pane, tab and session menus;--session;Against done-when:
programs_hear_of_kitty_keys_…).topandlessstood in.web/e2e/tui.spec.tsruns the TUI in tmux beside the browser. Splits, typing, renames and closes go both ways. The full browser suite passes: 111 passed, 9 skipped.ssh geek illogical tuiitself wasn't run.--host http://…against another daemon, and the static musl build.a, and the agent ran it, without opening its pane.spikes/s19-tui/bench.shwithTUI_BIN): build p99 0.86 ms; build and write p50 0.94 ms, p99 1.5 ms (max 3.4); 42% of a core.Differences from the issue: a pane is moved with Alt-drag or Move pane… then a click, because panes have no title bar to drag by. Questions and forms from agents are answered in the browser; the TUI shows them as a line.