Skip to content

Commit 44e6432

Browse files
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

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ __pycache__/
2828
*$py.class
2929
.venv/
3030
*.egg-info/
31+
# Compiled PyO3 extension modules dropped in-tree by `maturin develop`
32+
*.abi3.so
33+
*.pyd
3134
.pytest_cache/
3235
.mypy_cache/
3336
.ruff_cache/

0 commit comments

Comments
 (0)