ci / rust (push) Failing after 4m44s
Adds the full visual layer: - `state.rs` — `AppState` (tabs/focus/mode/sidebar visibility/overlay). v1 keeps each tab to one optional session; the split tree is v1.5. - `terminal.rs` — `TerminalGuard` (raw mode + alt screen + mouse capture with RAII restore) and an idempotent panic hook that restores the terminal before re-panicking. - `sidebar.rs` — daemon → session tree with ●/○/✗ glyphs. Pulls a label out of `metadata.label` (the protocol's shape), falls back to the command. - `tabs.rs` — top-row TabBar with active highlight. - `pane.rs` — `vt100::Screen` → ratatui `Buffer` cell-by-cell, with full fg/bg/bold/italic/underline/reverse translation. `PaneStatus` round-trips from `SessionState`. - `overlays.rs` — SpawnModal (5-field form with rotation), KillConfirm, HelpOverlay, Toast. All centered popups with `Clear` underlay. - `render.rs` — `draw(f, RenderInputs)` composes everything; returns a `RegionMap` whose `region_at(col, row)` resolves a mouse coordinate to a tagged Region (modal eclipses the rest). 22 new unit tests bringing the crate total to 80 passing. Tests use content-based assertions over `ratatui::backend::TestBackend` output rather than file-based goldens — less brittle to whitespace shifts while still covering the visible content.
47 lines
1.3 KiB
Rust
47 lines
1.3 KiB
Rust
//! `maestro tui` — terminal UI client over the local daemon's `/api/*` surface.
|
|
//!
|
|
//! Design: `docs/superpowers/specs/2026-05-28-maestro-tui-design.md`
|
|
//! Implementation: `docs/superpowers/plans/2026-05-28-maestro-tui.md`
|
|
//!
|
|
//! Phase 1 (NAP-276) scaffolds the crate and a `Tui` subcommand stub. The real
|
|
//! event loop, rendering, and `/api/*` plumbing land in NAP-277 onward.
|
|
|
|
#![deny(missing_debug_implementations)]
|
|
|
|
pub mod action;
|
|
pub mod catalog;
|
|
pub mod cli;
|
|
pub mod config;
|
|
pub mod emulators;
|
|
pub mod input;
|
|
pub mod keymap;
|
|
pub mod overlays;
|
|
pub mod pane;
|
|
pub mod render;
|
|
pub mod session_task;
|
|
pub mod sidebar;
|
|
pub mod state;
|
|
pub mod tabs;
|
|
pub mod terminal;
|
|
|
|
/// Inputs for [`run`]. Built by the umbrella binary from the parsed
|
|
/// `TuiArgs` plus any global flags.
|
|
#[derive(Debug, Clone)]
|
|
pub struct RunConfig {
|
|
/// HTTP base URL of the local daemon, e.g. `http://127.0.0.1:7070`.
|
|
/// No trailing slash.
|
|
pub daemon_url: String,
|
|
}
|
|
|
|
#[derive(Debug, thiserror::Error)]
|
|
pub enum TuiError {
|
|
#[error("not implemented")]
|
|
NotImplemented,
|
|
}
|
|
|
|
/// Entry point. Phase-1 stub — returns `NotImplemented` so the subcommand
|
|
/// dispatch path is exercisable end-to-end before the renderer lands.
|
|
pub async fn run(_cfg: RunConfig) -> Result<(), TuiError> {
|
|
Err(TuiError::NotImplemented)
|
|
}
|