summaryrefslogtreecommitdiff
path: root/docs/tui-refactor-plan.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tui-refactor-plan.md')
-rw-r--r--docs/tui-refactor-plan.md24
1 files changed, 15 insertions, 9 deletions
diff --git a/docs/tui-refactor-plan.md b/docs/tui-refactor-plan.md
index 640db66..15c7e8e 100644
--- a/docs/tui-refactor-plan.md
+++ b/docs/tui-refactor-plan.md
@@ -290,10 +290,10 @@ output. Each takes **structured data in** and produces **lines out**.
| **thinking text** | accumulating thinking deltas | dimmed; streams |
| **assistant text** | accumulating assistant deltas | streams; markdown **deferred** (§8) but hosts it |
| **user text** | submitted user message | |
-| **tool use** | tool name, args, status, result | **one component owns call + result**; collapsible (ctrl+o) — collapse is a length change (§3.3) |
+| **tool use** | tool name, args, status, result | **one component owns call + result**; collapsible (ctrl+o, **global toggle**) — collapse is a length change (§3.3). Render progression: `tool (?)…` at start → `tool (<name>) <input json>` once args finish streaming → `tool (<name>) <input json>\n\n<output>` once the result lands. Args JSON is rendered **verbatim** (no pretty-print), terminal-wrapped. **Collapsed (the default)** shows only the **last 5 output lines**; expanded shows the full output |
| **compaction summary** | compaction event data | shown when context is compacted |
-| **input box** | editor buffer, cursor | `Focusable`; single-row by default, **shift+enter inserts a newline** (enter submits), grows one row per line. **P1:** unbounded growth (no cap). **P2:** configurable cap (default 8) then scrolls within that window showing the last 8 contiguous lines. Raw-key editing |
-| **footer** | model, git branch, token/usage stats | persistent bottom line(s); during P1 also renders a **frame-timing element** (last frame's render time shown inverted as a theoretical-max "fps"), used to validate perf then removed |
+| **input box** | editor buffer, cursor | `Focusable`; single-row by default, **shift+enter inserts a newline** (enter submits), grows one row per line. **P1:** unbounded growth (no cap). **P2:** configurable cap (default 8) then scrolls within that window showing the last 8 contiguous lines; plus standard editing bindings (word-nav via alt+←/→, **ctrl+u** delete-to-line-start, etc.) and **ctrl+g** to punt the buffer to `$EDITOR` as a markdown tempfile. **No kill-ring / undo** (dropped). Raw-key editing |
+| **footer** | model, context-window token count | persistent bottom line(s); shows the **latest context-window size in tokens** = `usage.input + usage.cache_read + usage.cache_write` from the most recent `message_complete`. **No git branch** (panto uses jj, not git; dropped). During P1 also renders a **frame-timing element** (last frame's render time shown inverted as a theoretical-max "fps"), used to validate perf then removed |
The chat transcript is a `Container` of these in order; the input box and footer
are pinned below it.
@@ -418,7 +418,7 @@ the vtable stays C-ABI-friendly so it can be added elsewhere later.
## 9. Phasing
-**P1 — Engine + input + chat skeleton (the core bet).**
+**P1 — Engine + input + chat skeleton (the core bet) ✅ COMPLETE.**
- Terminal raw mode, ANSI output, synchronized output, capability detect.
- Differential renderer: viewport/scrollback tracking, `firstLineChanged` dirty
model + cached-line reuse + line-diff backstop, full-redraw triggers.
@@ -436,13 +436,19 @@ the vtable stays C-ABI-friendly so it can be added elsewhere later.
acceptable for now; we expect to refine once the streaming TUI is exercised in
practice.
-**P2 — Full built-in set + overlays + editor.**
+**P2 — Full built-in set + editor. ✅ COMPLETE.**
- Remaining built-ins: welcome, thinking, tool-use (collapsible), compaction.
-- Overlay system (modal components composited over base content; positioning,
- focus stack).
+- ~~Overlay system~~ **TABLED** (not deferred — likely never picked up). The
+ design prefers the native terminal-scrollback style over composited modals,
+ which is also far simpler. Removed from scope.
- Full editor: configurable line cap (default 8) with scroll-window past it
- (show last 8 contiguous lines), word-nav, kill-ring/undo as warranted.
-- Footer with git branch + usage stats.
+ (show last 8 contiguous lines), word-nav (alt+←/→), standard editing
+ bindings (ctrl+u delete-to-line-start, etc.), and **ctrl+g** to edit the
+ buffer in `$EDITOR` (markdown tempfile). **No kill-ring / undo** (dropped —
+ keep the editor simple).
+- Footer with **context-window token count** (`usage.input + cache_read +
+ cache_write`, latest from `message_complete`). **No git branch** (panto uses
+ jj, not git).
**P3 — Extension components + cursor/IME polish.**
- Event system (`on`/`emit`, `event.get/setComponent`); built-in events wired at