TUI layout reshape + Tools pane (§5 v1 entry point) #13
Closed
opened 2026-05-23 19:27:39 -07:00 by vh
·
1 comment
No Branch/Tag Specified
main
diag/r30-gap-injection-harness
diag/r30-phi0-step-response
diag/r29-pad-series
graphify-tooling
v0.22.3
v0.22.2
v0.22.1
v0.22.0
v0.21.20
v0.21.19
v0.21.18
v0.21.17
v0.21.16
v0.21.15
v0.21.14
v0.21.13
v0.21.12
v0.21.11
v0.21.10
v0.21.9
v0.21.8
v0.21.7
v0.21.6
v0.21.5
v0.21.4
v0.21.3
v0.21.2
v0.21.1
v0.21.0
v0.20.17
v0.20.16
v0.20.15
v0.20.14
v0.20.13
v0.20.12
v0.20.11
v0.20.10
v0.20.9
v0.20.8
v0.20.7
v0.20.6
v0.20.5
v0.20.4
v0.20.3
v0.20.2
v0.20.1
v0.20.0
v0.19.9
v0.19.8
v0.19.7
v0.19.6
v0.19.5
v0.19.4
v0.19.3
v0.19.2
v0.19.1
v0.19.0
v0.18.11
v0.18.10
v0.18.9
v0.18.8
v0.18.7
v0.18.6
v0.18.5
v0.18.4
v0.18.3
v0.18.2
v0.18.1
v0.18.0
v0.17.17
v0.17.16
v0.17.15
v0.17.14
v0.17.13
v0.17.12
v0.17.11
v0.17.10
v0.17.9
v0.17.8
v0.17.7
v0.17.6
v0.17.5
v0.17.4
v0.17.3
v0.17.2
v0.17.1
v0.17.0
v0.16.1
v0.16.0
v0.15.1
v0.15.0
v0.14.2
v0.14.1
v0.14.0
v0.13.0
v0.12.0
v0.11.0
v0.10.0
v0.9.0
v0.8.2
v0.8.1
v0.8.0
v0.7.1
v0.7.0
v0.6.5
v0.6.4
v0.6.3
v0.6.2
v0.6.1
v0.6.0
v0.5.1
v0.5.0
v0.4.1
v0.4.0
v0.3.0
v0.2.1
v0.2.0
v0.1.0
Labels
Clear labels
blocked-needs-contract
blocked-needs-dependency
bug
cli
documentation
duplicate
enhancement
invalid
needs-architect-decision
needs-info
needs-triage
observability
ready-for-agent
sse-client
task
tui
wontfix
Sleipnir refuses dispatch — issue-scoped contract missing
Sleipnir holds dispatch — INV-029 dependency-aware gate
Something is not working
Command-line surface (--send, --new, --session, etc.)
Docs / contract / spec work
Duplicate of another issue
New feature or improvement
Not a real issue
Escalated for a design call
More info required from reporter
Newly filed, not yet sorted
Log-pane / debug-surface work (persona, admin events, Bifrost, tools)
Gates AFK dispatch via Sleipnir (applied by /sleipnir-preflight)
SSE consumer module (src/ratatoskr/sse_client.py)
Implementation task
Textual app shell + presenters
Accepted as not-fixing
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: vh/ratatoskr#13
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
Today's TUI is a single-pane vertical stack:
This shape was correct for v0.x's chat-only scope. Design-brief §5 commits ratatoskr's actual product surface to a multi-pane debug-observability dashboard:
§5 is the biggest reshape since v0.1.0. Most panes are blocked on substrate that isn't here yet:
/persona/logendpoint (weeks of cross-repo work)admin.events.readscope (issue #11)/admin/sessions/{id}/bifrostToolStart/ToolResultSSE eventsHorizontal2-col +TabbedContentchrome)The realistic §5 entry point is layout refactor + Tools pane together: both unblocked, both compose, together they ship the multi-pane shape the design brief commits to without depending on cross-repo or scope-grant work first.
Solution
One in-place amendment to issue #4 (
ratatoskr.tui). Three coupled pieces:Layout reshape
RatatoskrApp.compose()shifts from vertical-stack toHorizontaltwo-column:The vertical-stack DEFAULT_CSS (
dock: top/dock: bottom) gets reshaped around the new Horizontal parent. Width split ~2:1 (chat is primary).Tools pane
Routes
ToolStart/ToolResultSSE events from the main transcript to a dedicatedtools_log: RichLogin the right column's first tab. The current presenter (TuiPresenterState) treats these as demoted telemetry (· tool_start: …/· tool_result: …inline); post-amendment they go to the pane instead.Rationale: per design-brief §5 "side pane (inline-from-SSE for v1)" — the events are routed, not duplicated. The main transcript becomes cleaner (chat is chat; tool activity is the pane); the Tools pane gains independent scrollback for long tool-call sequences.
CLI mode is unaffected —
--sendis non-interactive, no tabs concept; CLI keeps its current inline tool-event rendering.Status footer
Current footer has
identity(agent_id · …session_id_tail) +hint(Ctrl-C state). §5 adds a current-pane-name indicator. v1 only has one tab (Tools) so the indicator is fixed; it extends naturally as panes are added.Keybindings
Ctrl+1activates the Tools tab without stealing input focus. v1 has just one tab; bindings extend toCtrl+2..5as Persona/AdminEvents/BifrostState/ServerLog land. Input field retains keyboard focus across tab switches (the design brief's "without losing focus on the input field" invariant).Out of scope (this issue)
--server-logflag.{!r:.200}truncate behavior stays; smart truncation is its own concern.Acceptance
docs/contracts/issues/13.contract.md(amends #4) drift-checks clean.Ctrl+1switches tab without focus loss, identity widget still renders, single-turn smoke through the new layout.uv run ruff check src/ tests/clean.ratatoskr --new): picker → mimir → chat pane is left column, Tools pane is right column, type a message, tool-using turn (e.g. ask Mimir to search the KB) → tool events render in the right pane, model text renders in the left transcript.Dependencies
ratatoskr.tui) — landed; this issue is an in-place amendment.render().Shipped at
24e4371(v0.4.0).TUI reshaped to Horizontal two-column per design-brief §5. Left column = chat surface; right column = TabbedContent with Tools tab. ToolStart/ToolResult route to the Tools pane (INV-014); routing-not-duplication confirmed via live smoke against personal Worldtree (mimir KB search populated tools_log with search_library + read_note events; transcript stayed chat-only).
Surface added:
TuiPresenterState.render()widened to taketools_log: RichLog.RatatoskrApp.action_focus_tools+Ctrl+1binding.Static#pane-namefooter element (renders "Tools" v1; dynamic when more tabs land — no handler wiring lands in this issue per Volva amendment).Contract:
docs/contracts/issues/13.contract.md— drift-check clean, two amendments from Völva contract-paraphrase pass applied (Input-focus invariant priority over assumption; pane-name handler-wiring explicit deferral).Tests: +9 net; 236/236 GREEN; ruff clean.
Follow-ups unblocked by this foundation:
/persona/logendpoint if needed.admin.events.readscope).