prototype: titlebox health layout and presets
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
# PROTOTYPE — titlebox, drive health and colour presets (throwaway)
|
||||
|
||||
Answers wayfinder ticket **Approve titlebox, health layout and colour presets**
|
||||
on map **Fenris TUI polish and hourly history**.
|
||||
Not production code. Do not merge onto main.
|
||||
|
||||
## Question
|
||||
|
||||
What concrete layout and preset contract makes Fenris feel polished while
|
||||
preserving monitoring clarity and accessibility?
|
||||
|
||||
## Run
|
||||
|
||||
```sh
|
||||
./run
|
||||
# then open http://127.0.0.1:8765/prototype/titlebox-health-presets/
|
||||
```
|
||||
|
||||
Or open `index.html` directly.
|
||||
|
||||
## What this prototype asks the human to react to
|
||||
|
||||
Use the bottom control bar to switch:
|
||||
|
||||
- preset: **Amber**, **Nord**, **High Contrast**;
|
||||
- status: Monitoring, Collecting, Paused, Waiting, Interrupted, Error, Stale,
|
||||
Unknown;
|
||||
- terminal size: 80×24 baseline, 140×40 wide, or a constrained/narrow layout;
|
||||
- title glyph: wolf emoji or fallback text;
|
||||
- motion: normal blink or reduced motion.
|
||||
|
||||
## Contract under test
|
||||
|
||||
1. **Title hierarchy** — the only maker-credit surface is the top titlebox,
|
||||
`🐺 Fenris by Bongbetic`; the old service-strip credit is removed. The
|
||||
lifespan headline stays a product data surface, not the app title.
|
||||
2. **Glyph fallback** — when the wolf is unsupported, explicitly fall back to
|
||||
`Fenris by Bongbetic` rather than rendering tofu or disturbing border width.
|
||||
3. **Drive health vs settings** — vendor wear lives in **Drive health** beside
|
||||
temperature/spare/error facts. **Settings** stays read-only for device,
|
||||
baseline, retention and display preferences.
|
||||
4. **Palette roles** — themes style chrome, graph and accent colours; status
|
||||
semantics (green/amber/red/grey plus glyph+text) outrank the theme and are
|
||||
never the sole carrier.
|
||||
5. **Display preferences** — preset and reduced-motion preferences are scoped
|
||||
to the unprivileged TUI user, not `/etc/fenris/fenris.conf` and not the
|
||||
observation store. Proposed persistence: `${XDG_CONFIG_HOME:-~/.config}/fenris/tui.json`.
|
||||
6. **Reduced motion** — normal Monitoring blinks only the dot at the settled
|
||||
750 ms cadence; reduced motion renders the same `● Monitoring` state steady.
|
||||
7. **Constrained terminal** — below 80×24, the graph region hides and leaves a
|
||||
one-line textual summary plus `graph needs ≥80×24`; status, title, drive
|
||||
health and action/quit affordances stay visible.
|
||||
|
||||
## Framework facts verified
|
||||
|
||||
Current Textual docs via Context7 library `/websites/textual_textualize_io`:
|
||||
|
||||
- `App.register_theme(theme)` registers a theme; setting `App.theme` activates
|
||||
it. Textual themes generate CSS variables from base colours.
|
||||
- `$text`, `$text-muted`, `$text-disabled` and `color: auto` exist to maintain
|
||||
text legibility against theme backgrounds.
|
||||
- Mouse events expose coordinates relative to the screen or widget; focusable
|
||||
widgets can be resolved at coordinates, and Pilot can click widgets/offsets
|
||||
for automated proof of keyboard+mouse paths.
|
||||
|
||||
Local repo lockfile still pins `textual==8.2.8`; this prototype is static HTML
|
||||
so it deliberately does not depend on the Python environment.
|
||||
Reference in New Issue
Block a user