feat(tui): create loom-tui crate scaffold with crossterm lifecycle #48
No reviewers
Labels
No labels
area:agents
area:ai
area:config
area:dashboard
area:design
area:design-review
area:devtools
area:entities
area:gallery
area:generate
area:image
area:infra
area:meta
area:model-browser
area:navigation
area:presets
area:security
area:sessions
area:settings
area:sharing
area:test
area:ux
area:webhook
area:workdir
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/loom!48
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "tui/scaffold-11"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
First step of the loom-tui initiative. Adds a new binary crate
loom-tuiwired into the workspace so subsequent tickets have a place to land and can assume a running ratatui app.Closes charles/loom#11. Tracked under #47.
What's in this PR
crates/loom-tui/withloom-tuibinary (edition 2024)color-eyreadded;crosstermpicks upevent-stream;tokiopicks upsignalsrc/terminal.rs): alt-screen + raw mode + mouse capture + focus events on init, matching teardown on restore, panic hook that restores the terminal before propagatingAppevent loop (src/app.rs):tokio::select!overcrossterm::EventStreamand a SIGTERM/SIGINT listener installed once up front, redrawing after every event, exits cleanly onqorCtrl+Cevent,screens,components,image,keybinds,config— follow-up tickets fill themOut of scope (follow-up tickets in the v0.1.0 milestone)
tui.tomlconfig file — #43just run-tui) — #44Test plan
cargo build -p loom-tuisucceedscargo clippy -p loom-tui -- -D warningspassescargo test -p loom-tui(no tests yet, added by #46) exits 0just qapasses (all 85 existing loom-gtk tests still green)cargo run -p loom-tuilaunches, shows the frame,qexits cleanly, terminal restoredNotes
Signal handling quirk worth flagging for review: the SIGTERM/SIGINT listeners are installed once before entering
select!(seeShutdown::install) rather than re-created each iteration — recreating the listener each loop leaves a race window where the default disposition can kill the process during drop/reinstall.