From 3533936191be3fd8671891dd0f4812e2e121709a Mon Sep 17 00:00:00 2001 From: Jussi Elo Date: Mon, 9 Nov 2026 11:20:21 +0000 Subject: [PATCH 1/2] docs(dash): correct stale module comments in the dashboard crates Module-level comments in the dashboard crates described things that are not true of the code or the repository. None affects behavior. - Drop the pointers to a wiki/ directory the repository does not have (14 files), keeping the one sentence in each that still carries information. - demo.rs and the two examples named rocm gen-demo, rocm demo, rocm replay and make demo, none of which exist, and default paths under marketing/ and app/. They now name rocm dash --demo / --replay and the session file format. - bench_rollup, rocm-deps, the collectors Cargo.toml, parallel.rs, lib.rs, model_picker, chat, pane and home described a key, a consumer set, a dependency edge, a call path, a tab default or a phase that no longer matches the code. - Remove "Phase N Wave N" labels from the titles of the dash TUI source module headers, together with the sentences that leaned on them, and the pointer to a working-agreements document that is not in the repository. Comment-only change. Fixes #972 Signed-off-by: Jussi Elo --- crates/rocm-dash-collectors/Cargo.toml | 4 ++-- crates/rocm-dash-collectors/src/amd_smi.rs | 2 +- crates/rocm-dash-collectors/src/docker.rs | 1 - crates/rocm-dash-collectors/src/parallel.rs | 7 +++---- crates/rocm-dash-collectors/src/vllm_log.rs | 1 - crates/rocm-dash-collectors/src/vllm_prom.rs | 2 +- crates/rocm-dash-core/src/bench_rollup.rs | 8 ++++---- crates/rocm-dash-core/src/bench_schema.rs | 1 - crates/rocm-dash-core/src/efficiency.rs | 2 +- crates/rocm-dash-core/src/lib.rs | 3 ++- crates/rocm-dash-core/src/metrics.rs | 1 - crates/rocm-dash-core/src/partition.rs | 2 +- crates/rocm-dash-core/src/protocol.rs | 1 - crates/rocm-dash-core/src/state.rs | 1 - crates/rocm-dash-core/src/vram.rs | 2 +- crates/rocm-dash-daemon/src/demo.rs | 9 +++++---- crates/rocm-dash-tui/examples/gen_cast.rs | 18 +++++++++++------- .../rocm-dash-tui/examples/gen_screenshots.rs | 19 +++++++++++-------- crates/rocm-dash-tui/src/jobs.rs | 2 +- crates/rocm-dash-tui/src/llm.rs | 2 +- crates/rocm-dash-tui/src/tool_exec.rs | 4 ++-- crates/rocm-dash-tui/src/ui/approval.rs | 5 ++--- .../src/ui/automations_manager.rs | 2 +- crates/rocm-dash-tui/src/ui/command_screen.rs | 2 +- crates/rocm-dash-tui/src/ui/config_manager.rs | 2 +- crates/rocm-dash-tui/src/ui/dock.rs | 2 +- crates/rocm-dash-tui/src/ui/engine_manager.rs | 7 +++---- .../rocm-dash-tui/src/ui/examine_manager.rs | 2 +- crates/rocm-dash-tui/src/ui/exec.rs | 2 +- crates/rocm-dash-tui/src/ui/folder_browser.rs | 2 +- .../rocm-dash-tui/src/ui/install_manager.rs | 4 ++-- crates/rocm-dash-tui/src/ui/job_console.rs | 2 +- crates/rocm-dash-tui/src/ui/logs_view.rs | 2 +- crates/rocm-dash-tui/src/ui/model_picker.rs | 7 ++++--- crates/rocm-dash-tui/src/ui/onboarding.rs | 11 +++++------ .../rocm-dash-tui/src/ui/runtime_manager.rs | 4 ++-- crates/rocm-dash-tui/src/ui/serve_wizard.rs | 7 +++---- .../rocm-dash-tui/src/ui/services_manager.rs | 11 +++++------ crates/rocm-dash-tui/src/ui/tabs/chat.rs | 8 +++++--- crates/rocm-dash-tui/src/ui/tabs/home.rs | 4 +--- crates/rocm-dash-tui/src/ui/tabs/pane.rs | 7 ++++--- crates/rocm-dash-tui/src/ui/theme.rs | 2 +- crates/rocm-dash-tui/src/ui/update_manager.rs | 2 +- crates/rocm-deps/src/lib.rs | 6 +++--- 44 files changed, 97 insertions(+), 98 deletions(-) diff --git a/crates/rocm-dash-collectors/Cargo.toml b/crates/rocm-dash-collectors/Cargo.toml index f8e7a826eb..57daf33b2d 100644 --- a/crates/rocm-dash-collectors/Cargo.toml +++ b/crates/rocm-dash-collectors/Cargo.toml @@ -30,8 +30,8 @@ reqwest = { version = "0.12", default-features = false } [dev-dependencies] # Test-only: `write_fake_executable` plants the fake `amd-smi` the timeout tests # run without the intermittent "Text file busy" failure that `std::fs::write` -# followed by a chmod hits. Dev-dependencies are exempt from the layering -# allowlist, so the collectors keep no normal dependency on `rocm-core`. +# followed by a chmod hits. `rocm-core` is also a normal dependency above +# (`amd_smi.rs` uses `device_readable_bounded`), so this entry only restates it. rocm-core = { path = "../rocm-core" } tokio = { version = "1", features = ["full"] } tempfile = "3" diff --git a/crates/rocm-dash-collectors/src/amd_smi.rs b/crates/rocm-dash-collectors/src/amd_smi.rs index 0d258952e1..6370f19860 100644 --- a/crates/rocm-dash-collectors/src/amd_smi.rs +++ b/crates/rocm-dash-collectors/src/amd_smi.rs @@ -5,7 +5,7 @@ //! amd-smi subprocess + JSON parse. //! //! Field paths and the GPU-device pre-flight are vendored from the TypeScript -//! `AmdSmiProvider` in instinct-dash. See `../wiki/entities/amd-smi.md`. +//! `AmdSmiProvider` in instinct-dash. use std::ffi::OsString; use std::io; diff --git a/crates/rocm-dash-collectors/src/docker.rs b/crates/rocm-dash-collectors/src/docker.rs index 1727995052..8e573dcbfd 100644 --- a/crates/rocm-dash-collectors/src/docker.rs +++ b/crates/rocm-dash-collectors/src/docker.rs @@ -6,7 +6,6 @@ //! //! Field-extraction logic is vendored from instinct-dash `DockerService.ts` //! (HIP_VISIBLE_DEVICES → gpu_ids, `--tensor-parallel-size`/`-tp`, etc.). -//! See `../../wiki/entities/dockerode.md`. //! //! The async inherent methods are the public API. The `ServiceDiscovery` trait //! impl is sync-only and returns `Unsupported`: bollard requires a tokio diff --git a/crates/rocm-dash-collectors/src/parallel.rs b/crates/rocm-dash-collectors/src/parallel.rs index 0ad1d68f9a..cfe79b221f 100644 --- a/crates/rocm-dash-collectors/src/parallel.rs +++ b/crates/rocm-dash-collectors/src/parallel.rs @@ -4,10 +4,9 @@ //! Shared primitives for async collectors that scrape N targets concurrently. //! -//! Today: [[VllmPrometheusCollector]] uses this pattern hand-rolled in the -//! daemon's runner. As future per-instance scrapers come online, they'll reuse -//! `parallel_scrape` and the `WarningBus` instead of re-implementing the -//! JoinSet glue. +//! Today: the daemon's runner calls `parallel_scrape` for the vLLM Prometheus +//! scrape. Future per-instance scrapers should reuse `parallel_scrape` instead +//! of re-implementing the JoinSet glue. use std::future::Future; use std::sync::Arc; diff --git a/crates/rocm-dash-collectors/src/vllm_log.rs b/crates/rocm-dash-collectors/src/vllm_log.rs index a501d72fb0..7494b88627 100644 --- a/crates/rocm-dash-collectors/src/vllm_log.rs +++ b/crates/rocm-dash-collectors/src/vllm_log.rs @@ -3,7 +3,6 @@ // SPDX-License-Identifier: MIT //! vLLM log slicer — verbatim port of `inspect_bench/log_slicer.py`. -//! See `../wiki/entities/log-slicer.md` and `../wiki/concepts/log-derived-metrics.md`. use regex::Regex; diff --git a/crates/rocm-dash-collectors/src/vllm_prom.rs b/crates/rocm-dash-collectors/src/vllm_prom.rs index 0fb6e2eb76..1aa184d151 100644 --- a/crates/rocm-dash-collectors/src/vllm_prom.rs +++ b/crates/rocm-dash-collectors/src/vllm_prom.rs @@ -5,7 +5,7 @@ //! vLLM Prometheus `/metrics` scraper. //! //! Field paths and the kv-cache 0..1 → 0..100 scaling are vendored from -//! instinct-dash `VllmMetricsService.ts`. See `../../wiki/entities/vllm.md`. +//! instinct-dash `VllmMetricsService.ts`. //! //! Sync `InstanceMetrics::fetch` returns `Unsupported` (the underlying client //! is async); call `fetch_async` from the runner. diff --git a/crates/rocm-dash-core/src/bench_rollup.rs b/crates/rocm-dash-core/src/bench_rollup.rs index f134cfac43..8acbc2a157 100644 --- a/crates/rocm-dash-core/src/bench_rollup.rs +++ b/crates/rocm-dash-core/src/bench_rollup.rs @@ -8,10 +8,10 @@ //! it whenever the row set changes rather than relying on the upstream //! `pass_n_of_n` / `pass_at_n` CSV columns. //! -//! See `../wiki/concepts/benchmark-result-schema.md` and -//! `../wiki/entities/normalize-results.md`: rows are grouped by -//! `(cell, model, backend, concurrency)` and each group of N trials yields -//! two verdicts — strict (all N passed) and lenient (at least one passed). +//! Rows are grouped by `(cell, model, engine, tp, dtype, concurrency)` (the +//! private `RollupKey`) and each group of N trials yields two verdicts — +//! strict (all N passed) and lenient (at least one passed). `engine` is part +//! of the key, so a row with no `engine` does not group with one that has it. use std::collections::BTreeMap; diff --git a/crates/rocm-dash-core/src/bench_schema.rs b/crates/rocm-dash-core/src/bench_schema.rs index 4090b6a4de..ce5aa70359 100644 --- a/crates/rocm-dash-core/src/bench_schema.rs +++ b/crates/rocm-dash-core/src/bench_schema.rs @@ -3,7 +3,6 @@ // SPDX-License-Identifier: MIT //! Benchmark row schema, vendored from instinct-agent-bench. -//! See `../wiki/concepts/benchmark-result-schema.md` and `../wiki/entities/csv-emitter.md`. use serde::{Deserialize, Serialize}; diff --git a/crates/rocm-dash-core/src/efficiency.rs b/crates/rocm-dash-core/src/efficiency.rs index 6781c86024..4083f82f0d 100644 --- a/crates/rocm-dash-core/src/efficiency.rs +++ b/crates/rocm-dash-core/src/efficiency.rs @@ -5,7 +5,7 @@ //! Pure efficiency derivations (tokens-per-watt). No I/O, no rendering. //! //! This is the join that turns vLLM throughput + amd-smi power into a -//! per-instance capacity number. See `../wiki/concepts/metric-registry.md`. +//! per-instance capacity number. use std::collections::HashMap; use std::hash::BuildHasher; diff --git a/crates/rocm-dash-core/src/lib.rs b/crates/rocm-dash-core/src/lib.rs index 03bd4fb6e7..fbaa4bc20e 100644 --- a/crates/rocm-dash-core/src/lib.rs +++ b/crates/rocm-dash-core/src/lib.rs @@ -7,7 +7,8 @@ //! Pure types, traits, schemas, and the reducer for rocm-dash. //! No rendering deps. No async deps at the type boundary. //! -//! See `../wiki/concepts/tea-reducer-pattern.md` for the architectural pattern. +//! `State::apply` in `state` is the pure reducer, in the style of The Elm +//! Architecture. pub mod bench_rollup; pub mod bench_schema; diff --git a/crates/rocm-dash-core/src/metrics.rs b/crates/rocm-dash-core/src/metrics.rs index 77d14afbe3..c474b1f9eb 100644 --- a/crates/rocm-dash-core/src/metrics.rs +++ b/crates/rocm-dash-core/src/metrics.rs @@ -3,7 +3,6 @@ // SPDX-License-Identifier: MIT //! Live metric types. snake_case + units encoded in field names. -//! See `../wiki/concepts/metric-registry.md` and `../wiki/data/metric-field-index.md`. use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; diff --git a/crates/rocm-dash-core/src/partition.rs b/crates/rocm-dash-core/src/partition.rs index 6f7706623a..3aa94bb6e7 100644 --- a/crates/rocm-dash-core/src/partition.rs +++ b/crates/rocm-dash-core/src/partition.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: MIT -//! GPU partition mode enums. See `../wiki/concepts/gpu-partition-modes.md`. +//! GPU partition mode enums. use serde::{Deserialize, Serialize}; diff --git a/crates/rocm-dash-core/src/protocol.rs b/crates/rocm-dash-core/src/protocol.rs index 01e9888b3c..6dd2a5cbc6 100644 --- a/crates/rocm-dash-core/src/protocol.rs +++ b/crates/rocm-dash-core/src/protocol.rs @@ -3,7 +3,6 @@ // SPDX-License-Identifier: MIT //! NDJSON command/event protocol between rocmdashd and rocmdash. -//! See `../wiki/comparisons/ctux-vs-rocm-dash.md` (resolved decisions). use serde::{Deserialize, Serialize}; diff --git a/crates/rocm-dash-core/src/state.rs b/crates/rocm-dash-core/src/state.rs index ec80d1ffc5..1f50df725f 100644 --- a/crates/rocm-dash-core/src/state.rs +++ b/crates/rocm-dash-core/src/state.rs @@ -3,7 +3,6 @@ // SPDX-License-Identifier: MIT //! Pure reducer. `State::apply(StateEvent) -> Vec`. -//! See `../wiki/concepts/tea-reducer-pattern.md`. use std::collections::{HashMap, VecDeque}; use std::sync::Arc; diff --git a/crates/rocm-dash-core/src/vram.rs b/crates/rocm-dash-core/src/vram.rs index 5752b45901..98fd294809 100644 --- a/crates/rocm-dash-core/src/vram.rs +++ b/crates/rocm-dash-core/src/vram.rs @@ -17,7 +17,7 @@ //! //! Graceful degradation: an instance that matches nothing (empty `gpu_ids`, //! no container entry — e.g. Lemonade) resolves to `(0, 0)`, never a panic and -//! never a confidently-wrong number. See `../wiki/concepts/metric-registry.md`. +//! never a confidently-wrong number. use std::collections::HashMap; diff --git a/crates/rocm-dash-daemon/src/demo.rs b/crates/rocm-dash-daemon/src/demo.rs index 50ede75a7e..acb7b6565c 100644 --- a/crates/rocm-dash-daemon/src/demo.rs +++ b/crates/rocm-dash-daemon/src/demo.rs @@ -6,13 +6,14 @@ //! //! Simulates a single 8× AMD Instinct MI355X node serving inference traffic //! through three vLLM containers. Output is the same `PersistedEntry` NDJSON -//! the daemon writes when `--persist-dir` is set, so `rocm replay` (and -//! `rocm demo`) play it back unmodified. +//! the daemon's session writer produces, so `rocm dash --replay` plays it back +//! unmodified. //! //! Deterministic: the same [`DemoOptions`] always produce byte-identical //! output (seeded xorshift jitter + a fixed wallclock anchor), which the -//! tests below pin as a hard invariant. `rocm gen-demo`, `rocm demo`, and the -//! marketing screenshot/cast examples all consume this one generator. +//! tests below pin as a hard invariant. `rocm dash --demo` is the consumer: it +//! writes a session to a private file under the user data directory with +//! [`generate_file`] and replays it. use std::collections::BTreeMap; use std::f64::consts::PI; diff --git a/crates/rocm-dash-tui/examples/gen_cast.rs b/crates/rocm-dash-tui/examples/gen_cast.rs index 490480958c..6468caabf6 100644 --- a/crates/rocm-dash-tui/examples/gen_cast.rs +++ b/crates/rocm-dash-tui/examples/gen_cast.rs @@ -3,13 +3,17 @@ // SPDX-License-Identifier: MIT //! Render the TUI against a synthetic session NDJSON to an asciicast v2 -//! recording. The marketing page replays it as a real animated terminal -//! demo — no live terminal, no external capture tools, no drift. +//! recording — no live terminal and no external capture tools. //! //! Usage: //! cargo run --release --example gen_cast -p rocm-dash-tui -- \ -//! --input /tmp/mi355x-demo.ndjson \ -//! --output ../marketing/asciinema/rocm-dash.cast +//! --input session.ndjson \ +//! --output rocm-dash.cast +//! +//! `--input` is a `PersistedEntry` NDJSON session recording, the format +//! `rocm dash --replay` reads, such as the `session-*.ndjson` that +//! `rocm dash --demo` writes under the `demo/` folder of the user data +//! directory. Whatever the input, the cast is marked as simulated data. //! //! Each frame is the actual `ui::draw` framebuffer for a point in a //! scripted storyboard (tab + modal walk), converted to a truecolor ANSI @@ -45,12 +49,12 @@ const DEFAULT_BG: (u8, u8, u8) = (13, 15, 18); about = "Render TUI storyboard to an asciicast v2 recording" )] struct Args { - /// Synthetic session file (produced by `make demo`). + /// Session NDJSON recording to render (`PersistedEntry` lines). #[arg(long, default_value = "/tmp/mi355x-demo.ndjson")] input: PathBuf, - /// Output cast file. Parent dir created if absent. Default targets the - /// repo-root `marketing/asciinema/` directory when run from `app/`. + /// Output cast file. Parent dir created if absent. The default is relative + /// to the working directory. #[arg(long, default_value = "../marketing/asciinema/rocm-dash.cast")] output: PathBuf, diff --git a/crates/rocm-dash-tui/examples/gen_screenshots.rs b/crates/rocm-dash-tui/examples/gen_screenshots.rs index 77bd598741..9677b39984 100644 --- a/crates/rocm-dash-tui/examples/gen_screenshots.rs +++ b/crates/rocm-dash-tui/examples/gen_screenshots.rs @@ -3,13 +3,17 @@ // SPDX-License-Identifier: MIT //! Render the TUI against a synthetic session NDJSON and dump each view to -//! a standalone SVG. The screenshots embed cleanly in the marketing page -//! and demo decks — no live terminal, no manual capture, no drift. +//! a standalone SVG — no live terminal and no manual capture. //! //! Usage: //! cargo run --release --example gen_screenshots -p rocm-dash-tui -- \ -//! --input /tmp/mi355x-demo.ndjson \ -//! --output-dir marketing/screenshots +//! --input session.ndjson \ +//! --output-dir screenshots +//! +//! `--input` is a `PersistedEntry` NDJSON session recording, the format +//! `rocm dash --replay` reads, such as the `session-*.ndjson` that +//! `rocm dash --demo` writes under the `demo/` folder of the user data +//! directory. Whatever the input, the views are marked as simulated data. //! //! Each output is the actual `ui::draw` framebuffer for a specific //! AppState configuration (tab + modal + theme). Cells get run-length @@ -35,13 +39,12 @@ use rocm_dash_tui::ui; about = "Render TUI views to SVG for marketing" )] struct Args { - /// Synthetic session file (produced by `make demo`). + /// Session NDJSON recording to render (`PersistedEntry` lines). #[arg(long, default_value = "/tmp/mi355x-demo.ndjson")] input: PathBuf, - /// Output directory. Created if absent. SVGs are named per view. - /// Default targets the repo-root `marketing/screenshots/` directory - /// when run from the `app/` workspace. + /// Output directory. Created if absent. SVGs are named per view. The + /// default is relative to the working directory. #[arg(long, default_value = "../marketing/screenshots")] output_dir: PathBuf, diff --git a/crates/rocm-dash-tui/src/jobs.rs b/crates/rocm-dash-tui/src/jobs.rs index 8f964bc71d..a3a1b55169 100644 --- a/crates/rocm-dash-tui/src/jobs.rs +++ b/crates/rocm-dash-tui/src/jobs.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: MIT -//! Async job-bridge runtime (Phase 3 Wave 0). +//! Async job-bridge runtime. //! //! Interprets [`SideEffect::SpawnJob`]: launches the child process, streams its //! stdout+stderr back as [`StateEvent::JobLine`], finishes with diff --git a/crates/rocm-dash-tui/src/llm.rs b/crates/rocm-dash-tui/src/llm.rs index f83f85e687..b5627f9616 100644 --- a/crates/rocm-dash-tui/src/llm.rs +++ b/crates/rocm-dash-tui/src/llm.rs @@ -4,7 +4,7 @@ //! Chat LLM configuration: a pure precedence resolver plus a std-only TCP liveness probe. //! -//! No HTTP client here — the Rig-built `AgentClient` (Phase 3) +//! No HTTP client here — the Rig-built `AgentClient` //! lives in `agent/clients.rs`. Keeping detection in the TUI crate preserves the //! core's render/async-free boundary. diff --git a/crates/rocm-dash-tui/src/tool_exec.rs b/crates/rocm-dash-tui/src/tool_exec.rs index 0ae43ff45f..8ad611e742 100644 --- a/crates/rocm-dash-tui/src/tool_exec.rs +++ b/crates/rocm-dash-tui/src/tool_exec.rs @@ -7,8 +7,8 @@ //! Plain-data signatures ONLY (serde_json / std / serde). The bin (`apps/rocm`, //! which owns `rocm-core` and the tool engine) implements [`RocmToolExecutor`]; //! the dash holds it as `Option>` and never depends on -//! `rocm-core`. Phase 2 stored the seam; Phase 3 used it for read-only tools; -//! Phase 4 adds the mutating "execute approved" path + the approval descriptor. +//! `rocm-core`. The trait has a read-only `execute` and a mutating +//! `execute_approved` path, plus the approval descriptor. use std::sync::Arc; diff --git a/crates/rocm-dash-tui/src/ui/approval.rs b/crates/rocm-dash-tui/src/ui/approval.rs index 66d080905b..6fa82ffef9 100644 --- a/crates/rocm-dash-tui/src/ui/approval.rs +++ b/crates/rocm-dash-tui/src/ui/approval.rs @@ -2,12 +2,11 @@ // // SPDX-License-Identifier: MIT -//! Approval-gate seam (Phase 3 Wave 0). +//! Approval-gate seam. //! //! This is a **render + event seam ONLY**. The decision *logic* — what an //! approval actually does (run a CLI command, enable full access, approve a -//! proposal) — stays CLI-side per the working agreement -//! (`rocm-cli-unification-working-agreements.md` §1). This module renders an +//! proposal) — stays CLI-side. This module renders an //! [`ApprovalRequest`] and reports the user's [`ApprovalVerdict`]; the caller //! maps the verdict onto a CLI-side action. //! diff --git a/crates/rocm-dash-tui/src/ui/automations_manager.rs b/crates/rocm-dash-tui/src/ui/automations_manager.rs index b54ee199ca..acf6e4ab1e 100644 --- a/crates/rocm-dash-tui/src/ui/automations_manager.rs +++ b/crates/rocm-dash-tui/src/ui/automations_manager.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: MIT -//! Automations manager overlay (Phase 3 Wave 3). +//! Automations manager overlay. //! //! Lists the background checks ("watchers", plumbed in from the bin which owns //! `rocm-core`) and toggles them via the `rocm automations …` verbs: diff --git a/crates/rocm-dash-tui/src/ui/command_screen.rs b/crates/rocm-dash-tui/src/ui/command_screen.rs index dca012b8bc..e52936af09 100644 --- a/crates/rocm-dash-tui/src/ui/command_screen.rs +++ b/crates/rocm-dash-tui/src/ui/command_screen.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: MIT -//! Command runner overlay (Phase 3 Wave 3). +//! Command runner overlay. //! //! A general escape hatch: type any `rocm …` subcommand and run it through the //! job-bridge. Because arbitrary subcommands can't be statically classified as diff --git a/crates/rocm-dash-tui/src/ui/config_manager.rs b/crates/rocm-dash-tui/src/ui/config_manager.rs index 278104ac4d..9f124dbc5a 100644 --- a/crates/rocm-dash-tui/src/ui/config_manager.rs +++ b/crates/rocm-dash-tui/src/ui/config_manager.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: MIT -//! Config + provider manager overlay (Phase 3 Wave 3). +//! Config + provider manager overlay. //! //! Folds the frozen `config_manager` and `provider_manager` into one screen: //! diff --git a/crates/rocm-dash-tui/src/ui/dock.rs b/crates/rocm-dash-tui/src/ui/dock.rs index 3ba1ea738f..fc1c0e58c0 100644 --- a/crates/rocm-dash-tui/src/ui/dock.rs +++ b/crates/rocm-dash-tui/src/ui/dock.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: MIT -//! Wide-layout triptych rails (Phase 6). +//! Wide-layout triptych rails. //! //! When the terminal is wide enough, `ui::draw` splits the body into a left GPU //! wall, the existing center tab body, and a persistent right dock. The right diff --git a/crates/rocm-dash-tui/src/ui/engine_manager.rs b/crates/rocm-dash-tui/src/ui/engine_manager.rs index 5a1cd82037..802a645d90 100644 --- a/crates/rocm-dash-tui/src/ui/engine_manager.rs +++ b/crates/rocm-dash-tui/src/ui/engine_manager.rs @@ -2,13 +2,12 @@ // // SPDX-License-Identifier: MIT -//! Engine manager overlay (Phase 3 Wave 1). +//! Engine manager overlay. //! //! Lists the serving engines ROCm CLI knows about and runs use/install/reinstall //! **through the approval gate and the job-bridge** — never inline. Installs -//! stream their output into the shared job console (the Wave-0 `running_job` -//! replacement). This is the third operational screen on the proven primitives; -//! it feeds the serve wizard (which engine to launch a model with). +//! stream their output into the shared job console. It feeds the serve wizard +//! (which engine to launch a model with). //! //! The approval *decision* is the user's, captured by the render+event seam; the //! CLI owns the actual mutation (`rocm config set-default-engine` / diff --git a/crates/rocm-dash-tui/src/ui/examine_manager.rs b/crates/rocm-dash-tui/src/ui/examine_manager.rs index 40138296b0..67c21878c4 100644 --- a/crates/rocm-dash-tui/src/ui/examine_manager.rs +++ b/crates/rocm-dash-tui/src/ui/examine_manager.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: MIT -//! Examine overlay (Phase 3 Wave 2). +//! Examine overlay. //! //! Runs `rocm examine` — a read-only environment check — through the job-bridge //! and shows its streamed output in the shared job console. That run is diff --git a/crates/rocm-dash-tui/src/ui/exec.rs b/crates/rocm-dash-tui/src/ui/exec.rs index 5da3542ef0..48a9fda0a3 100644 --- a/crates/rocm-dash-tui/src/ui/exec.rs +++ b/crates/rocm-dash-tui/src/ui/exec.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: MIT -//! Shared helpers for launching `rocm` sub-commands from operational screens (Phase 3 Wave 1). +//! Shared helpers for launching `rocm` sub-commands from operational screens. //! //! Every screen that routes a mutating action through the //! approval gate + job-bridge resolves the binary the same way, so the logic diff --git a/crates/rocm-dash-tui/src/ui/folder_browser.rs b/crates/rocm-dash-tui/src/ui/folder_browser.rs index b26c490c9a..b6e5adf618 100644 --- a/crates/rocm-dash-tui/src/ui/folder_browser.rs +++ b/crates/rocm-dash-tui/src/ui/folder_browser.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: MIT -//! Reusable folder browser (Phase 3 Wave 0). +//! Reusable folder browser. //! //! A shared input primitive: pick (or create-under) a directory. Dependency of //! serve / install / runtime / onboarding. Models the frozen rocm-cli diff --git a/crates/rocm-dash-tui/src/ui/install_manager.rs b/crates/rocm-dash-tui/src/ui/install_manager.rs index 6a25a1a742..e2d4cdb6df 100644 --- a/crates/rocm-dash-tui/src/ui/install_manager.rs +++ b/crates/rocm-dash-tui/src/ui/install_manager.rs @@ -2,12 +2,12 @@ // // SPDX-License-Identifier: MIT -//! Install overlay (Phase 3 Wave 2). +//! Install overlay. //! //! A compact form that builds a `rocm install sdk …` invocation (TheRock ROCm //! wheels). Dry-run is read-only and spawns straight through the job-bridge; a //! real install is mutating and routes through the approval gate first. The -//! install folder is picked with the Wave-0 [`FolderBrowser`]. Streaming-install +//! install folder is picked with the [`FolderBrowser`]. Streaming-install //! archetype, zero thread::spawn/try_recv. use crossterm::event::{KeyCode, KeyEvent}; diff --git a/crates/rocm-dash-tui/src/ui/job_console.rs b/crates/rocm-dash-tui/src/ui/job_console.rs index 7df8480d25..15cb9d69cf 100644 --- a/crates/rocm-dash-tui/src/ui/job_console.rs +++ b/crates/rocm-dash-tui/src/ui/job_console.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: MIT -//! Job console widget (Phase 3 Wave 0). +//! Job console widget. //! //! Renders a [`JobState`] from the reducer: a status header, the streamed //! output ring, and key hints. This is the shared "running job" surface every diff --git a/crates/rocm-dash-tui/src/ui/logs_view.rs b/crates/rocm-dash-tui/src/ui/logs_view.rs index ff5f40afc1..53f6e71530 100644 --- a/crates/rocm-dash-tui/src/ui/logs_view.rs +++ b/crates/rocm-dash-tui/src/ui/logs_view.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: MIT -//! Logs overlay (Phase 3 Wave 3). +//! Logs overlay. //! //! Browses recent ROCm CLI logs via `rocm logs [--search WORDS]` — read-only, so //! no approval gate. An optional search box filters before running. Output diff --git a/crates/rocm-dash-tui/src/ui/model_picker.rs b/crates/rocm-dash-tui/src/ui/model_picker.rs index 0072970e3c..aa2c8db33e 100644 --- a/crates/rocm-dash-tui/src/ui/model_picker.rs +++ b/crates/rocm-dash-tui/src/ui/model_picker.rs @@ -2,12 +2,13 @@ // // SPDX-License-Identifier: MIT -//! Model picker (Phase 3 Wave 1). +//! Model picker. //! //! A reusable, filterable list of model recipes — the sub-step the serve wizard //! opens from its Model field so the user can pick a built-in recipe instead of -//! typing a model name. Selecting a recipe fills the model id and (when known) -//! pre-selects the recipe's preferred engine. +//! typing a model name. Selecting a recipe returns its summary; the serve +//! wizard keeps only the id and fills the Model field with it. The recipe's +//! preferred engine is shown in the list but never applied. //! //! Recipes are passed in as plain TUI-local [`ModelRecipeSummary`] values — the //! bin (`apps/rocm`, which has `rocm-core`) adapts the full `ModelRecipeRecord` diff --git a/crates/rocm-dash-tui/src/ui/onboarding.rs b/crates/rocm-dash-tui/src/ui/onboarding.rs index 0afcd56cf8..ea38f4d669 100644 --- a/crates/rocm-dash-tui/src/ui/onboarding.rs +++ b/crates/rocm-dash-tui/src/ui/onboarding.rs @@ -2,19 +2,18 @@ // // SPDX-License-Identifier: MIT -//! Onboarding wizard (Phase 3 Wave 2, minimal). +//! Onboarding wizard (minimal). //! -//! The first-run flow, rebuilt on the Wave-0 primitives. This is the **minimal** -//! version the phase-3 plan calls for: get a clean machine to a working ROCm -//! runtime two ways — +//! The first-run flow, kept deliberately **minimal**: get a clean machine to a +//! working ROCm runtime two ways — //! //! - **Install ROCm SDK** — a one-shot gated `rocm install sdk` with a Configure //! step to pick the channel (Release/Nightly), an optional version pin //! (`--build-date` / `--version`), and an optional install folder -//! (`--prefix`, via the same Wave-0 [`FolderBrowser`] the Adopt path uses); +//! (`--prefix`, via the same [`FolderBrowser`] the Adopt path uses); //! defaults to `--channel release --format wheel` installed into the //! default managed folder. -//! - **Adopt existing folder** — pick an existing ROCm env with the Wave-0 +//! - **Adopt existing folder** — pick an existing ROCm env with the //! [`FolderBrowser`], then approve `rocm runtimes adopt`. //! //! Reinstall / uninstall / show-log sub-modals (the full frozen onboarding), diff --git a/crates/rocm-dash-tui/src/ui/runtime_manager.rs b/crates/rocm-dash-tui/src/ui/runtime_manager.rs index 98d2e443da..dcbacb05c4 100644 --- a/crates/rocm-dash-tui/src/ui/runtime_manager.rs +++ b/crates/rocm-dash-tui/src/ui/runtime_manager.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: MIT -//! Runtime manager overlay (Phase 3 Wave 2). +//! Runtime manager overlay. //! //! Lists the registered ROCm runtimes (plumbed in from the bin, which owns //! `rocm-core` — this crate stays core-free) and runs the @@ -12,7 +12,7 @@ //! job-bridge. //! - **activate / rollback / uninstall** — mutating, routed through the approval //! gate first. -//! - **adopt** — pick an existing ROCm env folder with the Wave-0 +//! - **adopt** — pick an existing ROCm env folder with the //! [`FolderBrowser`], then approve `rocm runtimes adopt`. //! - **import** — type a manifest path, then approve `rocm runtimes import`. //! diff --git a/crates/rocm-dash-tui/src/ui/serve_wizard.rs b/crates/rocm-dash-tui/src/ui/serve_wizard.rs index 2ea58fde01..0b08a236af 100644 --- a/crates/rocm-dash-tui/src/ui/serve_wizard.rs +++ b/crates/rocm-dash-tui/src/ui/serve_wizard.rs @@ -2,10 +2,9 @@ // // SPDX-License-Identifier: MIT -//! Serve wizard overlay (Phase 3 Wave 1). +//! Serve wizard overlay. //! -//! The headline operational screen rebuilt on the Wave-0 primitives: a compact -//! **model-first** form that builds a `rocm serve …` invocation and runs it +//! The headline operational screen: a compact **model-first** form that builds a `rocm serve …` invocation and runs it //! **through the approval gate and the job-bridge** — never inline, never with //! a legacy `std::thread::spawn` + `try_recv`. A served model launched here //! surfaces in the services manager and the dashboard's live `gen_tps`. @@ -19,7 +18,7 @@ //! policy, the loopback host, the port, and managed mode. //! //! The model field can be typed directly (a recipe name, alias, or path) or -//! filled from the reusable Wave-0 [`FolderBrowser`] for a local model path +//! filled from the reusable [`FolderBrowser`] for a local model path //! (`Tab` on the Model field). The approval *decision* is the user's, captured //! by the render+event seam; the CLI owns the actual launch — the read-only //! chat invariant is untouched. diff --git a/crates/rocm-dash-tui/src/ui/services_manager.rs b/crates/rocm-dash-tui/src/ui/services_manager.rs index 24441b3b7d..1fe23796fe 100644 --- a/crates/rocm-dash-tui/src/ui/services_manager.rs +++ b/crates/rocm-dash-tui/src/ui/services_manager.rs @@ -2,13 +2,12 @@ // // SPDX-License-Identifier: MIT -//! Services manager overlay (Phase 3 Wave 1). +//! Services manager overlay. //! -//! The first operational screen rebuilt on the Wave-0 primitives: it lists the -//! managed inference services the daemon surfaces (model · port · status · live -//! `gen_tps`) and runs stop/restart **through the approval gate and the -//! job-bridge** — never inline. This is the pattern the remaining Wave-1 screens -//! (serve_wizard / model_picker / engine_manager) reuse. +//! It lists the managed inference services the daemon surfaces (model · port · +//! status · live `gen_tps`) and runs stop/restart **through the approval gate +//! and the job-bridge** — never inline. The serve wizard and the engine manager +//! follow the same pattern. //! //! Mutating actions invoke the CLI (`rocm services stop|restart --yes`) as //! a background job; the approval *decision* is the user's, captured by the diff --git a/crates/rocm-dash-tui/src/ui/tabs/chat.rs b/crates/rocm-dash-tui/src/ui/tabs/chat.rs index ffb32550a3..a3a1736fe8 100644 --- a/crates/rocm-dash-tui/src/ui/tabs/chat.rs +++ b/crates/rocm-dash-tui/src/ui/tabs/chat.rs @@ -4,9 +4,11 @@ //! Chat tab — a TUI-local conversation surface. //! -//! Phase 1 is render-only with a local echo backend; later phases wire a Rig-built agent behind the -//! `AgentClient` trait. The transcript and input buffer are plain TUI state on -//! `AppState` (`rocm-dash-core` carries no chat types). +//! Until the user accepts the detected endpoint (`ChatConsent`), the tab shows a +//! consent gate or an empty state; once accepted it draws the transcript and +//! the input line of the real chat, whose backend sits behind the `AgentClient` +//! trait. The transcript and input buffer are plain TUI state on `AppState` +//! (`rocm-dash-core` carries no chat types). use ratatui::Frame; use ratatui::layout::{Constraint, Direction, Layout, Rect}; diff --git a/crates/rocm-dash-tui/src/ui/tabs/home.rs b/crates/rocm-dash-tui/src/ui/tabs/home.rs index e49cdeb872..9ee54d7ec4 100644 --- a/crates/rocm-dash-tui/src/ui/tabs/home.rs +++ b/crates/rocm-dash-tui/src/ui/tabs/home.rs @@ -11,9 +11,7 @@ //! with a hint at the tab/key that would produce something, so no tile is a //! dead end. //! -//! ponytail: Home is added behind the existing default this phase (P2). It is -//! reachable by Tab / digit `1` but is NOT the default tab yet — P3 repoints -//! the default and folds the telemetry tabs into Observe. +//! Home is the default tab (`ActiveTab::Home`) and is reachable by Tab / digit `1`. use ratatui::Frame; use ratatui::layout::{Constraint, Direction, Layout, Rect}; diff --git a/crates/rocm-dash-tui/src/ui/tabs/pane.rs b/crates/rocm-dash-tui/src/ui/tabs/pane.rs index 0909fb74cb..be6373134c 100644 --- a/crates/rocm-dash-tui/src/ui/tabs/pane.rs +++ b/crates/rocm-dash-tui/src/ui/tabs/pane.rs @@ -6,9 +6,10 @@ //! //! Each domain tab is a left **Actions** bento (its locked verb list) plus a //! right **`Details: `** bento that previews the selected operation. The -//! verb rows open EXISTING managers through the EXISTING execution seam -//! (`KeyAction::Open*` → `apply_action` → `RocmToolExecutor` / `ui/approval.rs`) -//! — no second approval path, no reimplementation of the managers. +//! verb rows open EXISTING managers: a verb produces a `KeyAction::Open*`, and +//! `apply_action` (in `app/actions.rs`) opens the matching overlay. Nothing +//! here executes anything — no second approval path, no reimplementation of +//! the managers. //! //! `rocm.rs` and `serving.rs` only declare their verb tables; all rendering, //! hit-testing, and the list|detail geometry live here so the two tabs cannot diff --git a/crates/rocm-dash-tui/src/ui/theme.rs b/crates/rocm-dash-tui/src/ui/theme.rs index d875802791..b90827a168 100644 --- a/crates/rocm-dash-tui/src/ui/theme.rs +++ b/crates/rocm-dash-tui/src/ui/theme.rs @@ -11,7 +11,7 @@ //! sourced from each project's published palette. Theme catalogue //! inspired by [ansicolor.com](https://ansicolor.com/). //! -//! Pattern borrowed from ctux (see `../../../wiki/sources/ctux.md`). +//! Pattern borrowed from ctux. use ratatui::style::{Color, Modifier, Style}; use rocm_dash_core::metrics::InstanceStatus; diff --git a/crates/rocm-dash-tui/src/ui/update_manager.rs b/crates/rocm-dash-tui/src/ui/update_manager.rs index 49e9c80896..4b6c6ac2aa 100644 --- a/crates/rocm-dash-tui/src/ui/update_manager.rs +++ b/crates/rocm-dash-tui/src/ui/update_manager.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: MIT -//! Update overlay (Phase 3 Wave 2). +//! Update overlay. //! //! Wraps `rocm update`: a read-only check (and a `--apply --dry-run` preview) //! that run straight through the job-bridge, plus the mutating `--apply` / diff --git a/crates/rocm-deps/src/lib.rs b/crates/rocm-deps/src/lib.rs index e8044d7602..ee95efbf0d 100644 --- a/crates/rocm-deps/src/lib.rs +++ b/crates/rocm-deps/src/lib.rs @@ -6,9 +6,9 @@ //! helpers that derive artifact names and URLs from them. //! //! The pins live in the workspace-root `runtime-deps.toml` and are turned into -//! the constants below by `build.rs`. Every consumer — the engine adapters and -//! the dashboard TUI alike — derives what it needs from those constants, so a -//! runtime version is spelled exactly once in the repository and two crates +//! the constants below by `build.rs`. Every consumer — the `rocm` binary and +//! the Lemonade engine adapter — derives what it needs from those constants, so +//! a runtime version is spelled exactly once in the repository and two crates //! cannot disagree about it. // `pub const LEMONADE_VERSION: &str = "..."`, one per `runtime-deps.toml` field. From 66c7a196f0e5391718580d51b7d74f0846598fe5 Mon Sep 17 00:00:00 2001 From: Jussi Elo Date: Mon, 9 Nov 2026 13:27:41 +0000 Subject: [PATCH 2/2] docs(dash): rewrap the serve wizard module header The rewritten header line ran to about 120 columns; rewrap it to match the surrounding `//!` lines. Signed-off-by: Jussi Elo --- crates/rocm-dash-tui/src/ui/serve_wizard.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/rocm-dash-tui/src/ui/serve_wizard.rs b/crates/rocm-dash-tui/src/ui/serve_wizard.rs index 0b08a236af..172dbc8099 100644 --- a/crates/rocm-dash-tui/src/ui/serve_wizard.rs +++ b/crates/rocm-dash-tui/src/ui/serve_wizard.rs @@ -4,10 +4,11 @@ //! Serve wizard overlay. //! -//! The headline operational screen: a compact **model-first** form that builds a `rocm serve …` invocation and runs it -//! **through the approval gate and the job-bridge** — never inline, never with -//! a legacy `std::thread::spawn` + `try_recv`. A served model launched here -//! surfaces in the services manager and the dashboard's live `gen_tps`. +//! The headline operational screen: a compact **model-first** form that builds +//! a `rocm serve …` invocation and runs it **through the approval gate and the +//! job-bridge** — never inline, never with a legacy `std::thread::spawn` + +//! `try_recv`. A served model launched here surfaces in the services manager +//! and the dashboard's live `gen_tps`. //! //! Progressive disclosure: the default form is Model → `Advanced settings` → //! Launch. Everything else (engine, device policy, host, port, mode) is