feat(console): operator UI mounted on the gateway; retire visualizer.py#558
Open
jeffreysijuntan wants to merge 1 commit into
Open
feat(console): operator UI mounted on the gateway; retire visualizer.py#558jeffreysijuntan wants to merge 1 commit into
jeffreysijuntan wants to merge 1 commit into
Conversation
Replaces the standalone Streamlit-style ``rllm/eval/visualizer.py``
(~1k LOC) with a proper SPA + panel-registry backend mounted onto
the model gateway. ``rllm view`` boots a view-only gateway
(TraceStore + console; no proxy workers) and serves the console at
``/console``.
Frontend (``rllm-console/``):
- bun + Vite 6 + React 19 + RR7 + Tailwind v4 + TanStack Query 5.
- Sessions panel: cross-run trace feed (gateway TraceStore) with
filter bar (run / model / harness / has_error / latency) and
chat-message rendering.
- Runs panel: per-eval-run grid → episode viewer → live Step view
reading from ``~/.rllm/eval_results/<run>/`` and the gateway's
shared db.
- Datasets panel: registry browser, entry inspector, pull-from-UI
with PTY-streamed progress.
- Settings panel: config viewer + env-var manager (writes to
``~/.rllm/.env`` for the env-var store; presets in ``known.py``).
- Sandboxes / Eval Launcher / Training panels: placeholders for the
next iteration.
Backend (``rllm/console/``):
- ``mount_console(app, eval_results_root, url_prefix="/console")``
attaches the panel registry to any FastAPI app — typically
rllm-model-gateway, but works on any host.
- Panels are ``Panel(id, title, icon, nav_order, router, placeholder)``
dataclasses registered via ``register_panel``. Each panel ships its
own ``api.py`` (FastAPI APIRouter) and a frontend ``panels/<id>/``
module mounted by id.
CLI:
- ``rllm/cli/view.py`` rewritten to launch the gateway+console pair.
- ``rllm/eval/trace_loader.py`` (new) loads run/episode/step data for
the Runs panel; ``rllm/eval/visualizer.py`` (deleted, ~1k LOC).
Packaging:
- ``pyproject.toml``: ``console/static/**`` package-data; visualizer.py
ruff exclusion dropped.
- ``.gitignore``: ``console/static/`` (built SPA) + ``rllm-console/``
build artefacts (node_modules/, build/).
Tests: 77 new — ``test_mount`` (panel registry + shell-info
contract), ``test_panels_{datasets,runs,sessions,settings}``,
``test_trace_loader``. Full suite across all stacked PRs: 577 passing.
Stacked on PR #557.
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.
Summary
Stacked on #557. The largest PR in the stack — replaces the standalone
rllm/eval/visualizer.py(~1k LOC) with an SPA + panel-registry backend mounted onto the model gateway.rllm viewboots a view-only gateway (TraceStore + console; no proxy workers) and serves the console at/console.What changes
Frontend (
rllm-console/) — bun + Vite 6 + React 19 + RR7 + Tailwind v4 + TanStack Query 5~/.rllm/eval_results/<run>/and the gateway's shared db.~/.rllm/.env; presets inknown.py).Backend (
rllm/console/)mount_console(app, eval_results_root, url_prefix=\"/console\")attaches the panel registry to any FastAPI app — typically rllm-model-gateway, but works on any host.Panel(id, title, icon, nav_order, router, placeholder)dataclasses registered viaregister_panel. Each panel ships its ownapi.py(FastAPI APIRouter) and a frontendpanels/<id>/module mounted by id.CLI
rllm/cli/view.pyrewritten to launch the gateway+console pair.rllm/eval/trace_loader.py(new) loads run/episode/step data for the Runs panel.rllm/eval/visualizer.py(deleted, ~1k LOC).Packaging
pyproject.toml:console/static/**added to package-data so the built SPA ships in the wheel; visualizer.py ruff exclusion dropped..gitignore:console/static/(built SPA) +rllm-console/build artefacts.Stack
Test plan
python -m pytest tests/console/ tests/eval/test_trace_loader.py— 77 passedpython -m pytest tests/eval/ tests/sandbox/ tests/cli/test_eval_command.py tests/harnesses/ tests/console/— 577 passedrllm viewboots cleanly; SPA shell + panel API endpoints reachableFollow-ups (separate PRs)
cd rllm-console && bun install && bun run buildbefore packaging the wheel — until that lands,pip install -eusers have an emptyconsole/static/untilrllm viewauto-builds.rllm evalruns from the UI.🤖 Generated with Claude Code