feat(cli): keel tui — live read-only operator dashboard - #140
Merged
Conversation
A full-screen, auto-refreshing terminal dashboard built directly on the pure `gather_status(...) -> StatusReport` that `keel status` (PR #138) was left as the substrate for. It is strictly a *view* over the same report: mode, kill-switch, autonomy, Rail 11 drawdown/equity, open positions, rule counts, per-product data freshness and subscriptions, colour-coded and refreshed on an interval so an operator can watch the funded paper-forward at a glance. - Pure, testable core (`build_screen`/`render_plain`/`_freshness_style`); never re-derives Rail 11 / freshness / autonomy logic. - stdlib `curses` only — no new dependency (in keeping with the project's hand-rolled ethos). `curses` imported lazily so the module stays importable and the pure-core tests stay portable. - Strictly read-only: NEVER calls the broker or touches the network, and cannot confirm/kill/arm anything. - `--once` renders a single frame to stdout (pipes/CI); `--interval N` sets the refresh cadence; the live loop re-opens the repo each poll (so it reflects a separate `keel agent`'s committed writes) and survives a transient DB read error by painting an alert instead of crashing. 39 new tests. Design spec: docs/superpowers/specs/2026-07-24-tui-dashboard-design.md Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
keel tui— a full-screen, auto-refreshing, read-only terminal dashboard for watching a running agent / the funded paper-forward at a glance. It is built directly on the puregather_status(...) -> StatusReportthatkeel status(PR #138) was deliberately left as the substrate for, and is strictly a view over that same report (it never re-derives Rail 11 / freshness / autonomy logic).Shows: mode, kill-switch, autonomy, Rail 11 drawdown/equity state, open positions (bracket-less positions flagged), rule counts + live rules, per-product data freshness (stale series flagged), and subscriptions — colour-coded and refreshed on an interval.
Why now
The funded paper-forward (5-trend Turtle, $10k + $500/mo) is live and accrues trades toward the n=100 floor over months. Watching it meant re-running
keel statusby hand; this is the auto-refreshing dashboard the user asked for, and it's unblocked today — no monorepo split orkeel-clientprotocol needed.Design
build_screen/render_plain/_freshness_styleare pure functions of theStatusReport; the curses I/O (_paint/run_live) is a thin layer tested against a fake stdscr.cursesonly, in keeping with the project's hand-rolled ethos (norich/textual).cursesis imported lazily so the module stays importable and the core tests stay portable.--oncerenders one frame to stdout (pipes/CI);--interval Nsets cadence; the live loop re-opens the repo each poll (so it reflects a separatekeel agent's committed writes) and survives a transient DB read error (e.g.database is lockedfrom the writer) by painting an alert line instead of crashing.Testing
tests/commands/test_tui.py); full suite 1519 passed,ruff checkclean.use_default_colors()→-1background illegal undercurses.wrapper), and the live loop crashing on a transient SQLite lock.keel tui --onceverified against the realkeel.db.Design spec:
docs/superpowers/specs/2026-07-24-tui-dashboard-design.md🤖 Generated with Claude Code