Stable thread updates, folded work view, always-on composer

- Track selection by thread id and sort active threads by run start, so
  reordering no longer resubscribes and reloads the open thread
- Cache blocks per turn item, reuse unchanged segments, memoize views,
  and batch streamed updates to one redraw per frame
- Keep left threads subscribed for a minute so switching back is instant
- Fold runs of tool calls and reasoning into one summary line; clip long
  user messages; e expands both
- Always-visible multi-line composer with per-thread drafts and
  typing/navigation modes
This commit is contained in:
Callum Alpass committed 2026-11-02 17:06:06 +11:00
1 parent 3b7ed56e16
commit cea1409f40
9 files changed
+500 -212

No files matched your search

+22 -8
View File
@@ -21,19 +21,31 @@ tui3 list [--json] # print threads and exit
tui3 tmux [--watch] # mirror active threads into a tmux session, one window each
```
Dashboard keys:
The message box is always at the bottom. tui3 has two modes: **typing**, where keys go to the message box, and **navigation**, where single keys act. `esc` switches to navigation; `i`, `enter` or `tab` switch back. Drafts are kept per thread.
Any mode:
| Key | Action |
| --- | --- |
| `j`/`k`, arrows | move in the list, or scroll the thread |
| `enter`/`tab`, `esc` | switch between list and thread |
| `/` | filter threads by title or project |
| `i` | message the thread (queued after the current run) |
| `ctrl+n` / `ctrl+p` (or `alt+↓`/`alt+↑`) | next / previous thread |
| `pgup`/`pgdn`, `ctrl+u`/`ctrl+d` | scroll the conversation |
| `ctrl+c` | quit |
Typing: `enter` sends (queued after the current run if the thread is busy), `shift+enter` or `ctrl+j` adds a newline.
Navigation:
| Key | Action |
| --- | --- |
| `j`/`k`, arrows | next / previous thread (scroll, in `attach`) |
| `y` / `Y` / `n` | accept / accept for session / decline the pending approval |
| `e` | expand folded work and long messages |
| `/` | filter threads by title or project |
| `S` | stop the thread |
| `r` | show full reasoning |
| `g` / `G` | top / bottom of the thread |
| `q`, `ctrl+c` | quit |
| `g` / `G` | top / bottom of the conversation |
| `q` | quit |
The conversation shows your messages and the agent's replies; each run of tool calls and reasoning between them folds into one summary line (`▸ 5 commands · 3 edits`), with the latest step shown while it's running.
Threads are grouped into **Needs you** (waiting on an approval), **Running**, and **Recent**.
@@ -43,6 +55,8 @@ Threads are grouped into **Needs you** (waiting on an approval), **Running**, an
- On first run it mints its own bearer session with `t3 auth session issue --label tui3`, scoped to `orchestration:read` and `orchestration:operate`, and stores it in `~/.config/tui3/credentials.json` (mode 600). Revoke it any time with `t3 auth session revoke`. For a remote server, pass a token in `TUI3_TOKEN`.
- It speaks T3 Code's own WebSocket RPC protocol, typed by upstream's `@t3tools/contracts`, and applies thread updates with upstream's own reducers. Both come from `vendor/t3code`, a submodule pinned to the server version this was built against (`v0.1.6-nightly.20261030.3917`).
Set `TUI3_DEBUG=/path/to/log` to log thread subscriptions and snapshots.
## Updating for a newer T3 Code
The protocol packages are private and change without notice, so tui3 tracks a pinned upstream tag: