Add moonetui Mission Control demo

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
SpriteandClaude Sonnet 5.5 committed 2026-11-21 12:16:08 +00:00
commit ea0cd50b9f
21 files changed
+831

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
# moonetui-demo: Mission Control
A full-screen terminal dashboard built with [`moonbitstack/moonetui`](https://mooncakes.io/docs/#/moonbitstack/moonetui/) 0.4.3.
A simulated spacecraft: eight subsystems with live load/temperature, a sortable table,
a detail pane, a line chart of load history, a fleet sparkline, gauges, a command palette
and a dark/light theme switch. Animation comes from a 125 ms `App::every` timer in the frame loop.
## Run
```
moon run --target native main # needs a real terminal, at least ~100x30
moon build --target native # binary: _build/native/debug/build/main/main.exe
moon test --target native # headless tests (scripted key bytes, assertions on ui.screen())
```
## Keys
| Key | Action |
|---|---|
| `↑` `↓` | select a subsystem (chart + detail follow) |
| `s` | cycle sort: name, load, temp |
| `t` | toggle dark / light theme |
| `space` | pause / resume telemetry |
| `r` | reset the simulation |
| `ctrl+p` | command palette (type to filter, Enter runs, Esc closes) |
| `q` / `ctrl+c` | quit |
## Layout
- `lib/demo.mbt`: model, simulation, widget tree, key handling (generic over the driver)
- `lib/demo_test.mbt`: headless tests using `@driver.Headless`
- `main/main.mbt`: native entry point using `@native.NativeTty`