From 8de9fe4ee1655376b869f76ce03d39a303119121 Mon Sep 17 00:00:00 2001 From: xavierk Date: Mon, 14 Sep 2026 02:00:16 +0530 Subject: [PATCH] prototype: titlebox health layout and presets --- prototype/titlebox-health-presets/README.md | 67 +++++++++++++++ prototype/titlebox-health-presets/index.html | 89 ++++++++++++++++++++ prototype/titlebox-health-presets/run | 6 ++ 3 files changed, 162 insertions(+) create mode 100644 prototype/titlebox-health-presets/README.md create mode 100644 prototype/titlebox-health-presets/index.html create mode 100755 prototype/titlebox-health-presets/run diff --git a/prototype/titlebox-health-presets/README.md b/prototype/titlebox-health-presets/README.md new file mode 100644 index 0000000..4958e53 --- /dev/null +++ b/prototype/titlebox-health-presets/README.md @@ -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. diff --git a/prototype/titlebox-health-presets/index.html b/prototype/titlebox-health-presets/index.html new file mode 100644 index 0000000..f686097 --- /dev/null +++ b/prototype/titlebox-health-presets/index.html @@ -0,0 +1,89 @@ + + + + + +Fenris titlebox, health layout and presets prototype + + + +

PROTOTYPE: titlebox, health/settings grouping, theme presets and status accessibility for Approve titlebox, health layout and colour presets. Static throwaway; no production code.

+
+
+
🐺 Fenris by BongbeticFenris by Bongbetic
+
privileged actions will prompt for authentication (polkit) · clears after first refresh
+
+
lifespan + monitoring
+
Usage-adjusted theoretical lifespan: 8 yr 103 d remaining
+
if current habits continue · sustained regime: 46 days · scenario range: 7d 12.4 / 28d 11.1 / 90d 10.7 GB/day
+
●Monitoring
Last sample: 4 min ago · blink means enabled + fresh, not data refresh
+
last run failed (exit 3) · last good sample 4 min ago · collection stopped outside Fenris details stay visible without changing the status vocabulary
+
‖ Paused — monitoring paused · paused time excluded from your usage habit
+
Boot
on
Runtime
timer active
Last collect
ok · 4 min ago
Freshness
fresh
+
+
+
+
usage history
+
usage history · Local · UTC+05:30 · Asia/Kolkata7142890
+
14-day write history: 9.2–18.6 GB/day · selected Wed 09 Sep · graph needs ≥80×24
+ +
    ▼
+
2728293031010203040506070809
+
legend: █ allocated · ▒ unallocated · ░ gap/no evidence · · 0 B · ┄ partial · ▼ selected
+
Wed 09 Sep · writes 14.2 GB allocated + 2.0 GB unallocated · 21 evidenced hours · coverage 87% · partial · 13 h elapsed · so far
Enter/click drills into hourly detail; Esc/Backspace returns. Footer shows graph keys while graph is focused.
+
+
+

Drive health

Samsung SSD 990 PRO
temperature 41°C · spare 100%
media errors 0 · unsafe shutdowns 2
power-on 1,184 h · 46 cycles · 2 TB
vendor wear: 3% used · 18.4 TB written (context, not a second projection)
+

Settings

device/dev/disk/by-id/nvme-Samsung_990baselineverified override · 1,200 TBWretentionraw 14 d · intervals/hours/days indefinitethemeAmber preset · user preferencemotionnormal blink
+
+
+
+
CONTINUITY monitoring: active in background · persists across reboots
p pause · r resume · c collect · d disclosures · graph focus: ←/→ select · Enter drill · 1/2/3/4 ranges · t preset · m motion
+
q QUIT TUI
+
+
+
+ + + + diff --git a/prototype/titlebox-health-presets/run b/prototype/titlebox-health-presets/run new file mode 100755 index 0000000..c25ada3 --- /dev/null +++ b/prototype/titlebox-health-presets/run @@ -0,0 +1,6 @@ +#!/bin/sh +# PROTOTYPE: static local server; no dependencies or persistence. +set -eu +cd "$(git rev-parse --show-toplevel)" +printf '%s\n' 'Open http://127.0.0.1:8765/prototype/titlebox-health-presets/?preset=amber&state=monitoring' +exec python3 -m http.server 8765 --bind 127.0.0.1