tui: create loom-tui crate scaffold with crossterm lifecycle #11

Closed
opened 2026-04-11 13:00:45 +00:00 by charles · 0 comments
Owner

User story

As a developer contributing to Loom, I want a new loom-tui binary crate wired into the workspace with a working terminal lifecycle, so that subsequent tickets have a place to land and can assume a running ratatui app.

Acceptance criteria

Workspace

  • crates/loom-tui/ created with Cargo.toml (edition 2024) depending on loom-core, ratatui, crossterm, tokio (multi-thread), color-eyre, tracing, tracing-subscriber
  • crates/loom-tui added to [workspace.members] in root Cargo.toml
  • Binary name is loom-tui
  • cargo clippy -p loom-tui -- -D warnings passes

Terminal lifecycle

  • main.rs initializes color_eyre, a tracing subscriber honoring RUST_LOG
  • Enters alternate screen, enables raw mode, mouse capture, and focus events on launch
  • Panic / eyre hook restores the terminal (disables raw mode, leaves alt-screen, shows cursor) before propagating
  • Ctrl+C, q, and SIGTERM all trigger a clean teardown
  • Resize events trigger a re-render at the new dimensions

Skeleton app

  • src/app.rs exposes an App with run(&mut self) -> Result<()> driving an event loop over tokio::select! (keyboard/mouse stream + shutdown signal)
  • Empty bordered frame renders with centered text loom-tui so the crate is visually alive
  • Pre-declares empty modules per spec §1.1: event, screens, components, image, keybinds, config

Build

  • cargo build -p loom-tui succeeds
  • cargo run -p loom-tui launches the UI and exits cleanly on q

Out of scope

  • Image rendering subsystem (separate ticket)
  • Sidebar / status bar / screens (separate ticket)
  • Keybinds config file and CI wiring (separate tickets)

References

  • Spec §1 "Architecture Overview"
  • Spec §1.1 "Crate Layout"
  • Spec §2.1 "Terminal Setup"
## User story As a developer contributing to Loom, I want a new `loom-tui` binary crate wired into the workspace with a working terminal lifecycle, so that subsequent tickets have a place to land and can assume a running ratatui app. ## Acceptance criteria ### Workspace - [ ] `crates/loom-tui/` created with `Cargo.toml` (edition 2024) depending on `loom-core`, `ratatui`, `crossterm`, `tokio` (multi-thread), `color-eyre`, `tracing`, `tracing-subscriber` - [ ] `crates/loom-tui` added to `[workspace.members]` in root `Cargo.toml` - [ ] Binary name is `loom-tui` - [ ] `cargo clippy -p loom-tui -- -D warnings` passes ### Terminal lifecycle - [ ] `main.rs` initializes `color_eyre`, a tracing subscriber honoring `RUST_LOG` - [ ] Enters alternate screen, enables raw mode, mouse capture, and focus events on launch - [ ] Panic / eyre hook restores the terminal (disables raw mode, leaves alt-screen, shows cursor) before propagating - [ ] `Ctrl+C`, `q`, and `SIGTERM` all trigger a clean teardown - [ ] `Resize` events trigger a re-render at the new dimensions ### Skeleton app - [ ] `src/app.rs` exposes an `App` with `run(&mut self) -> Result<()>` driving an event loop over `tokio::select!` (keyboard/mouse stream + shutdown signal) - [ ] Empty bordered frame renders with centered text `loom-tui` so the crate is visually alive - [ ] Pre-declares empty modules per spec §1.1: `event`, `screens`, `components`, `image`, `keybinds`, `config` ### Build - [ ] `cargo build -p loom-tui` succeeds - [ ] `cargo run -p loom-tui` launches the UI and exits cleanly on `q` ## Out of scope - Image rendering subsystem (separate ticket) - Sidebar / status bar / screens (separate ticket) - Keybinds config file and CI wiring (separate tickets) ## References - Spec §1 "Architecture Overview" - Spec §1.1 "Crate Layout" - Spec §2.1 "Terminal Setup"
charles added this to the loom-tui v0.1.0 milestone 2026-04-11 13:00:45 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/loom#11
No description provided.