Rebuild the grid-agent operator TUI with Ratatui dashboards #140
Reference in New Issue
Block a user
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?
Goal
Replace the current hand-built, line-oriented grid-agent terminal renderer with a responsive Ratatui operator dashboard. The result should make the agent's major operational areas inspectable from one keyboard-driven interface in both integrated (
--tui) and split-client (--tui-client) modes.Use btop as inspiration for information density and live operational feedback: compact panels, clear focus, gauges, bounded histories, and immediately visible pressure or failure states. This is not a request to copy btop's layout. The agent is still evolving, so this issue defines the information architecture and behavioral guarantees while leaving exact panel placement adaptable to the data that becomes available.
Current code anchors
crates/metacrate-grid-agent/src/tui.rsalready ownsOperatorTui,OperatorScreen, the transport-neutral reducer/snapshot model, terminal lifecycle, and the current manualStringrenderer. Preserve the useful state and transport boundaries; replace manual layout, truncation, clearing, and printing with Ratatui widgets and a Crossterm backend.OperatorSnapshotalready gathers health, runtime state, metrics, sessions, schedules, approvals, audit data, structured events, gap counts, and sequence state through the control plane. The TUI must consume those public views rather than reach into private runtime state.PreferencesPanelalready loads, edits, validates, masks, and saves mode, LLM, grid, and privileged-user settings. Preferences must become a first-class Ratatui form without weakening secret handling or the standalone--preferencespath.observability.rs::MetricsSnapshotalready exposes active sessions/tasks, queue depth/capacity, inference and tool latency aggregates, outcome counters, rate-limit use, recorded events, and dropped-event counts.observability.rs::StructuredEventalready exposes timestamp, severity, component, family, correlation IDs, duration, retries, result/reason codes, redaction flags, and bounded fields.control_plane.rs::RuntimeViewalready exposes connection/readiness, region and pose, behavior mode, control-queue pressure, budgets, active build progress/orphans, and visual-capture progress.Required experience
Overview
Queues and performance
Operational areas
Preferences
AgentPreferences; do not create a second settings model or storage format for the TUI.Layout and interaction
Evolving areas and related issues
Non-goals
Acceptance criteria
metacrate-grid-agentuses Ratatui with Crossterm for terminal rendering; the manual full-screenStringrenderer/layout path is removed rather than kept as a second UI.TestBackendor equivalent deterministic tests cover layout and interaction for every screen, focus/navigation, refresh stability, preferences including secret redaction, confirmation dialogs, and representative small/large terminal sizes.ubuntu-latest; portable Rust code paths are kept compatible with Linux and Windows, with no macOS-only implementation.Relationship to existing work
This supersedes the presentation layer delivered by closed issue #128 while retaining its control-plane, security, responsiveness, and integrated/split-mode requirements. It complements rather than replaces #137 and #138.
Implemented and pushed as
95cca3e.Completion review against the issue:
Focused gates:
A Windows target probe reached the existing aws-lc-sys build dependency and stopped because this Linux host does not have x86_64-w64-mingw32-gcc installed; it did not report a TUI/Ratatui/Crossterm source error. Repository policy requires ubuntu-latest workflows, which remain unchanged.
The pre-existing repository-wide codegen license and compatibility parity metadata failures are unrelated to this presentation-only issue and were left untouched as required.