Commit 44e6432
committed
tui: add Loro web dashboard, process lifecycle, and runtime resize
Build out the tui crate (and its Python binding) into something you can
drive interactive programs with in place of a raw shell.
Dashboard (feature = "dashboard"): tui::serve mirrors every live terminal
into one loro::LoroDoc and streams CRDT updates to browsers over SSE; the
page imports them with loro-crdt and paints a grid. Loro is the view-sync
layer only; the PTYs stay authoritative in-process. Exposed to Python as
tui.serve(). The whole engine is Rust; Python is a thin binding.
Process lifecycle: the actor now owns the child, so it reaps it (capturing
the exit code through a watch channel), answers a Kill command with SIGKILL,
and reports is_alive/exit_state/wait. TuiManager::remove drops a handle, and
the Python close()/context-manager exit force-kills so an editor that
ignores Ctrl+C still goes away.
Runtime resize: resize() drives the PTY ioctl (SIGWINCH) and the vt100
emulator together; size is shared across handle clones so every clone agrees.
Empty screen is no longer an error: read_viewport returns an empty Vec and
read_blocking polls on content, so snapshot()/wait_for stay total on a blank
screen.1 parent 23bc820 commit 44e6432
23 files changed
Lines changed: 1985 additions & 82 deletions
File tree
- packages
- tui-py
- python/tui
- src
- tui
- src
- actor
- dashboard
- manager
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
0 commit comments