| 2026-07-11 |

Navi Code TUI: show request duration (live timer + chat metadata)
...
Live elapsed timer next to the activity indicator (ticks once per second
during a turn, format 2m 16s), driven by the same stream_start/stream_end
hooks as the activity indicator — so it spans the whole turn (all LLM calls,
tool calls, planning, sub-agent steps). On stream_end it syncs to the
backend's authoritative elapsed_seconds before freezing; on stream_stopped/
error/disconnect it freezes at the locally-measured value.
On stream_end the model also appends a turn_meta ChatItem rendered as a dim
"⏱ 2m 16s" line below the answer — the total time the agent spent on the
user's request. The value comes from stream_end.elapsed_seconds, already
measured by the backend over the whole turn, so the TUI needs no timer for
accuracy. stream_stopped/error do not get a metadata line (only completed
requests).
Shared format_duration(): None -> "—", <60s -> "16s", <3600 -> "2m 16s",
>=3600 -> "1h 2m".
Co-Authored-By: Claude <noreply@anthropic.com>
Eugene Sukhodolskiy
committed
12 hours ago
|
tui: load session message history into the chat panel on resume
...
Resuming or switching a session showed a blank chat — the past conversation
was never replayed. GET /sessions/{id} already returns the messages; the TUI
just ignored them.
- ChatModel.load_history maps persisted Message dicts back to the same
ChatItems the live stream produces (user/assistant text, thinking, tool
started/result, plan), skipping is_display=False (context-only user,
summaries, compression events) so only what the user would have seen
live is rebuilt.
- ChatPanel.load_history wraps it (clears the render cache + refresh).
- attach_session loads the messages from get_session, so resume/switch
replays the history before the cwd/Connected banners.
Co-Authored-By: Claude <noreply@anthropic.com>
Eugene Sukhodolskiy
committed
14 hours ago
|
| 2026-07-10 |
tui: bound chat history render cost (cache + visible-item cap)
...
The chat panel rebuilt every renderable on each WS event, including
per-token stream_delta — so markdown was re-parsed for the entire history
on every token and the TUI lagged as conversations grew.
- Cache renderables keyed by id(item)+signature so only the changed item
(the streaming assistant bubble) is rebuilt per token; the rest are
reused. Prune orphaned entries so cache stays bounded by live items.
- Add max_visible_items TUI setting (default 200): render only the last
N items with a "… N earlier messages not shown" hint when truncated.
Items stay in the in-memory model (non-destructive) but are not laid
out, so per-refresh cost is constant regardless of history length.
- Rename the cache attr to _chat_render_cache to avoid collision with
Textual Widget._render_cache, which it resets on mount.
Co-Authored-By: Claude <noreply@anthropic.com>
Eugene Sukhodolskiy
committed
1 day ago
|
| 2026-07-09 |

Navi Code TUI: sub-agent spawn card + nested styling for subagent thinking/planning
...
Sub-agent activity was either rendered as a generic tool card (spawn_agent) or
dropped to raw debug output (turn_thinking was unhandled in the TUI chat model
and the raw CLI). The webclient nests subagent events inside the spawn_agent
card; the TUI is flat, so nesting is conveyed with a distinct spawn card plus
left-indented, dimmed subagent cards.
New renderers/subagent.py:
- SpawnAgentStartedRenderer: "↘ subagent · <profile_id>" card showing the task
(+ briefing dimmed), secondary border. Registered before ToolStartedRenderer.
- SpawnAgentResultRenderer: "↙ subagent · <profile_id> ✓/✗" card with the
result, success/error border. Registered before ToolResultRenderer.
Nested subagent styling (left indent via Padding + dim):
- ThinkingRenderer: is_subagent → "subagent thinking" title, dim border, indented.
- PlanningStatusRenderer / PlanReadyRenderer: is_subagent → indented (label/title
already mark it as subagent).
- ToolStartedRenderer / ToolResultRenderer: is_subagent → indented so inner
tool calls read as nested inside the spawn card.
chat_model handles turn_thinking → thinking_block item with is_subagent meta;
chat_panel._refresh forwards is_subagent to the thinking renderer. Raw CLI
render.py prints turn_thinking as a [thinking] block (with "(subagent)" prefix).
Tests: spawn card shows profile/task and status; subagent thinking/planning/tool
cards are indented and labeled; non-subagent tool card is not indented;
turn_thinking creates a subagent thinking_block. 593 passed, 1 skipped.
Co-Authored-By: Claude <noreply@anthropic.com>
Eugene Sukhodolskiy
committed
1 day ago
|

Navi Code: render planning as a progress line + plan card, not raw events
...
planning_status and plan_ready events were unhandled in the TUI chat model and
the raw CLI renderer, so they fell through to raw debug output (TUI:
"plan_ready: {...}" status lines; raw CLI: "[event: plan_ready] {msg}").
TUI:
- New renderers/planning.py: PlanningStatusRenderer renders a "⚙ Planning ·
<label>" line (info color; dim + "(subagent)" prefix for subagent planning);
PlanReadyRenderer renders the plan as a Panel wrapping themed Markdown, titled
"Plan" with an accent border ("subagent plan" + dim border for subagents).
- Registered both in default_registry().
- chat_model handles the events: non-subagent planning_status rolls in place
(Analysis → Execution plan → Plan review share one line instead of stacking);
plan_ready consumes the pending planning line and appends the plan card;
subagent planning is appended as its own dim line/card so it does not bleed
into the parent turn's indicator (matching the webclient).
- chat_panel._refresh maps the new kinds to the registry.
Raw CLI (render.py): planning_status prints "[planning] <label>"; plan_ready
prints a "[plan] … [/plan]" block with the plan text.
Tests: renderer accepts/render (label, subagent prefix, plan title/content);
chat_model rolling-in-place, plan_ready consumes indicator, subagent separation.
584 passed, 1 skipped.
Co-Authored-By: Claude <noreply@anthropic.com>
Eugene Sukhodolskiy
committed
2 days ago
|
| 2026-06-26 |
Navi Code TUI: fix input box layout, command palette duplicate IDs, status renderer, and WS input loop
...
- clients/terminal/tui/widgets/input_box.py: switch Horizontal to Vertical with width: 100% for Input so it renders and accepts input in real terminals; add refresh on Input.Changed.
- clients/terminal/tui/screens/command_palette.py: remove fixed ListItem IDs to avoid DuplicateIds on fast filter.
- clients/terminal/tui/chat_model.py + renderers/status.py + widgets/chat_panel.py: render backend status events as dim system messages instead of raw dicts.
- clients/terminal/tui/ws_bridge.py: start NaviWebSocketClient.input_loop so enqueued user messages are actually sent to the backend.
- clients/terminal/tui/tui_app.py: focus InputBox synchronously in on_mount so typing works immediately.
- tests/clients/test_tui_app.py: regression test for visible input text.
Co-Authored-By: Claude <noreply@anthropic.com>
Eugene Sukhodolskiy
committed
15 days ago
|
| 2026-06-24 |
Navi Code TUI: review fixes for Phase 5
...
- Fix raw CLI session API fields (session_id/name/preview)
- Add --mouse/--no-mouse flags and persistent TUI settings coercion
- Make attach_session/apply_theme public, add ChatPanel.clear()
- Deduplicate session selection handlers and editor error handling
- Update docs and tests
Eugene Sukhodolskiy
committed
17 days ago
|
| 2026-06-23 |
Navi Code TUI: apply gnexus theme to widgets and renderers
...
- Register Navi themes as Textual themes so $tui-* CSS variables resolve.
- Update ChatPanel, StatusPanel, InputBox to use palette colors.
- Update all content renderers to draw from the active theme.
- Add set_active_theme/get_active_theme helpers for runtime color access.
Co-Authored-By: Claude <noreply@anthropic.com>
Eugene Sukhodolskiy
committed
18 days ago
|
Navi Code: Phase 3 — Textual TUI skeleton (OpenCode-style)
...
- Add clients/terminal/tui package with micro-architecture:
- events, context, chat_model, ws_bridge, permissions engine.
- widgets: ChatPanel, StatusPanel, InputBox.
- renderers: user/assistant messages, thinking, tool calls, errors,
markdown, plain — registry-based and extensible.
- slash commands: /help, /new, /sessions, /switch, /profile, /thinking,
/compact, /quit — registry-based and extensible.
- Wire navi-code to launch TUI by default; keep click-CLI via --raw.
- Add textual>=0.70 dependency.
- Add TUI smoke tests via Textual Pilot.
- Add docs/plan_navi_code_tui.md with full Phase 4/5 roadmap.
Tests: 463 passed, 1 skipped (excluded unrelated websocket test).
Co-Authored-By: Claude <noreply@anthropic.com>
Eugene Sukhodolskiy
committed
18 days ago
|