Files
ianitor/docs/ui-handoff.md

1444 lines
102 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Ianitor Domi web UI: hand-off for the Svelte build
What apps/web and packages/ui are built from. This file is enough by itself: you never need to open
the design artifact. Where the artifact and this file disagree, this file wins, and §14 lists every such place.
Sources: the approved design (claude.ai artifact "Ianitor Domi — UI", 9 boards, murex palette on Domi),
docs/ui-api.md (the contract), docs/api.md (the built API), crates/control/src/messages.rs (the server's
sentences), ROADMAP §3 and §4, and Mark's decisions of 2026-11-07.
Conventions in this file:
- "Quoted text" is exact UI copy. `{x}` is a value: from `params` on an error, or from a field.
**Hostnames, addresses (upstreams, paths) and match codes are bold** wherever they appear in a sentence.
- **[built]** means the API exists (Phase 2). **[proposed]** means the shape is mine and the API is not
built yet (engine switch, PKI, sign-in). Build the UI against the proposed shape behind a typed client,
so only the client changes if control lands differently.
- Click counts follow ROADMAP §4: typing is not a click; a click that only opens a menu is a click.
---
## 0. Ground rules for the build
- Svelte 5 runes, TypeScript strict. apps/web holds no business logic: every decision (validation,
health state, undo target, restore effects) comes from the API. The UI formats and arranges.
- One typed API client (`apps/web/src/lib/api.ts`) owns: base path `/api/v1`, the `X-Ianitor-UI: 1`
header on every request, `redirect: "manual"`, an `Idempotency-Key` per click (see §11.3), the error
envelope, the server-clock offset (§7.2), and the signed-out and lost-contact detection (§10, §11).
- Show the server's `error.message` as the sentence, verbatim. The UI switches on `error.code` only to
decide which buttons to offer, which field to mark and which words to bold (`params`). The table in §12
gives every code, its sentence and its offer, so you can test that the sentence arrives and that the
right button appears. The UI writes its own sentence only for `ui.*` codes and for the few codes the
server has no sentence for (marked "UI text" in §12).
- Never put a token, share URL, password or one-time password in `localStorage`, `sessionStorage`, the
URL, a log line or an error report. Drop them from component state when their dialog closes.
- Dark only. No light theme, no theme switch.
- No external requests at runtime: fonts are self-hosted (§1.3), no CDN, no analytics.
- Dev server on 127.0.0.1 only (`pnpm --filter web dev`, never `--host`).
---
## 1. Design tokens (packages/ui)
### 1.1 The block to paste
`packages/ui/src/tokens.css`. Apply the class `ia` to `<body>` (the artifact puts the tokens on `.ia`;
`:root` would also work, but keep `.ia` so the shared Domi components scope the same way).
The root font size is left at the browser default (16 px). The artifact rendered with rem = 16 px, so
every rem value below reproduces it exactly, and the UI still follows a user's own font-size setting.
Body text is 0.9375rem (15 px), as drawn.
```css
.ia {
/* ── Ground and structure: violet-tinted iron black ───────────────────── */
--ground: #0c0b0f; /* page ground; every ratio is measured on it */
--colonnade: #121016; /* sidebar, phone bars, menus, dialogs, side panel */
--surface: #18151d; /* fields, the last-change bar, cards */
--surface-2: #221d28; /* hover, the current place, a chosen option */
--hairline: #2c2633; /* dividers only, never a control edge */
--hairline-strong: #3c3445; /* chip and frame edges (facts, not controls) */
--control-edge: #7d7189; /* edge of every field, button, segmented control, engine chip */
/* ── Text ──────────────────────────────────────────────────────────────── */
--text: #f1edf3; /* body text, hostnames */
--text-2: #cfc6d4; /* secondary text, field labels */
--muted: #a99eb1; /* hints, section labels, times */
--disabled: #7a7183; /* disabled controls only, never content */
/* ── The lead: murex (Tyrian purple) ───────────────────────────────────── */
--accent: #e0a3dc; /* links, focus ring, the current place, running state */
--accent-strong: #f2c9ee; /* focus ring on the primary button; match codes */
--primary-high: #8d3b89; /* primary fill, top */
--primary-mid: #76306f; /* primary fill, 55 % */
--primary-low: #5c2257; /* primary fill, foot */
--primary-edge: #c77cc1; /* primary button edge */
--on-primary: #ffffff; /* label on the primary fill */
/* ── Metal ─────────────────────────────────────────────────────────────── */
--bronze: #b6adbe; /* ornaments: the interpunct rule (iron, not bronze) */
--gilt: #f6f0f7; /* the wordmark only */
/* ── Second light: quiet iron (Domi's .domi-pill and .domi-status use these) */
--second: #cfc6d4;
--second-strong: #f1edf3;
--second-edge: #7d7189;
/* ── Status: blue / amber / vermilion, stepped in lightness (L* 84 / 68 / 58) */
--healthy: #a6d6fa; /* host answers; a change was kept. Filled dot. */
--kept: #a6d6fa;
--degraded: #d99a35; /* partly failing; a change was reverted or not applied. Half dot. */
--reverted: #d99a35;
--down: #e2683a; /* not reachable; needs attention; paused; danger actions. Hollow ring. */
--danger: #e2683a;
--on-danger: #170804; /* text on a filled danger button (none is planned) */
--unknown: #a99eb1; /* no health check set; waiting for first check. Dashed ring. */
--running: #e0a3dc; /* queued, applying, watching, switching, waiting for Custos (= accent) */
/* Status washes (banner backgrounds) and edges. color-mix() is what the artifact uses;
the resolved hex is in the comment, for tools that need a literal. */
--wash-degraded: color-mix(in srgb, var(--degraded) 10%, var(--ground)); /* #201913 */
--wash-kept: color-mix(in srgb, var(--kept) 10%, var(--ground)); /* #1b1f26 */
--wash-down: color-mix(in srgb, var(--down) 10%, var(--ground)); /* #211413 */
--edge-degraded: color-mix(in srgb, var(--degraded) 65%, var(--ground)); /* #916828 */
--edge-kept: color-mix(in srgb, var(--kept) 65%, var(--ground)); /* #708fa8 */
--edge-down: color-mix(in srgb, var(--down) 80%, var(--ground)); /* #b75531 */
--edge-outline: color-mix(in srgb, var(--accent) 60%, var(--ground)); /* #8b668a, outline button */
--hover-wash: color-mix(in srgb, var(--accent) 8%, transparent); /* quiet button hover */
--danger-hover: color-mix(in srgb, var(--danger) 7%, transparent);
/* ── Type ──────────────────────────────────────────────────────────────── */
--font-inscription: Cinzel, "Trajan Pro", "Cormorant Garamond", Georgia, "Times New Roman", serif;
--font-book: "Cormorant Garamond", Cormorant, "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
--font-hand: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
--fs-display: 2.6rem; --lh-display: 1.1; /* book 500: a view title ("Hosts") */
--fs-h2: 1.9rem; --lh-h2: 1.15; /* book 500: panel title; phone view title uses 2.1rem */
--fs-h3: 1.45rem; --lh-h3: 1.15; /* book 600: dialog and section titles */
--fs-body: 0.9375rem; --lh-body: 1.6; /* hand 400: everything read (15 px) */
--fs-host: 0.98rem; /* hand 600: hostname in a row */
--fs-button: 0.95rem; /* hand 600; 700 on primary */
--fs-field-label: 0.92rem; /* hand 400, text-2 */
--fs-hint: 0.88rem; --lh-hint: 1.5; /* hand 400, muted: hints, notes */
--fs-sub: 0.86rem; /* hand 400, muted: row sub-lines, times */
--fs-chip: 0.78rem; /* 12.5 px, hand 400, text-2 */
--fs-state: 0.95rem; /* hand 700, all-small-caps, tracking 0.12em */
--fs-label: 0.74rem; /* hand 700, tracking 0.26em: SECTION LABELS */
--fs-nav: 0.95rem; /* sidebar item, hand 600 */
--fs-tab-phone: 0.78rem; /* bottom-bar label, hand 600 */
--fs-wordmark: 0.8125rem; /* 13 px Cinzel 500, tracking 0.3em; phone 12 px, 0.26em */
--fs-code: 2.2rem; /* Cinzel 500, tracking 0.16em: Custos match code */
--tracking-state: 0.12em;
--tracking-label: 0.26em;
--tracking-wordmark: 0.3em;
/* ── Spacing (Domi) ────────────────────────────────────────────────────── */
--space-1: 0.35rem; /* label to its field */
--space-2: 0.6rem; /* between buttons in a row, list items */
--space-3: 1rem; /* field to field */
--space-4: 1.4rem; /* panel padding */
--space-5: 2rem; /* between sections of a view */
--space-6: 3.5rem; /* a view's bottom padding */
--target: 44px; /* minimum height and width of every control and touch target */
/* ── Radii ─────────────────────────────────────────────────────────────── */
--radius-chip: 6px;
--radius-sm: 10px; /* quiet buttons, fields, nav items, menu items */
--radius: 12px; /* primary button, cards inside panels */
--radius-lg: 18px; /* panels, banners, the bar, the host list, dialogs */
--radius-pill: 999px; /* chips, the engine chip */
/* ── Shadows ───────────────────────────────────────────────────────────── */
--leaf-bevel: 0 0 0 1px rgba(199,124,193,0.25), 0 12px 40px -14px rgba(141,59,137,0.6),
inset 0 1px 0 rgba(255,220,250,0.30), inset 0 -2px 0 #3a1237; /* primary button */
--carved: inset 0 2px 6px rgba(12,11,15,0.8), inset 0 -1px 0 rgba(182,173,190,0.16); /* fields */
--inset-lit: inset 0 0 18px rgba(224,163,220,0.07); /* current nav item */
--shadow-dialog: 0 40px 100px -40px rgba(0,0,0,0.95); /* dialogs, menus, popover */
--scrim: rgba(12,11,15,0.82); /* behind modals */
/* ── Focus ─────────────────────────────────────────────────────────────── */
--focus-ring: 2px solid var(--accent); /* outline, offset 3px, on every :focus-visible */
--focus-ring-primary: 2px solid var(--accent-strong);
--focus-offset: 3px;
--focus-halo: 0 0 0 4px rgba(224,163,220,0.16); /* fields: border goes accent, plus this halo */
/* ── Motion (Domi's transitions; the last three are new for this UI) ──── */
--dur-color: 0.3s; /* border, background, colour */
--dur-lift: 0.45s; /* box-shadow, transform (primary hover lifts 1px) */
--ease: ease;
--dur-tick: 1s; /* watch progress bar: linear, one step per second */
--dur-enter: 0.18s; /* dialog, panel, menu, toast enter (opacity + 8px) */
--dur-exit: 0.12s;
/* ── Layout ────────────────────────────────────────────────────────────── */
--sidebar-w: 232px;
--main-pad: 26px 32px 40px; /* desktop; phone 18px 16px 20px */
--gutter-phone: 16px;
--panel-w: 480px; /* add/edit host side panel */
--dialog-w: 520px; /* share, token, device dialogs */
--popover-w: 420px; /* engine popover */
--phone-bar-h: 56px; /* bottom navigation item height */
--bp-phone: 720px; /* below: phone layout (header + bottom bar) */
color-scheme: dark;
background: var(--ground);
color: var(--text);
font-family: var(--font-hand);
font-size: var(--fs-body);
line-height: var(--lh-body);
font-variant-numeric: tabular-nums;
}
.ia *, .ia *::before, .ia *::after { box-sizing: border-box; }
.ia :focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }
.ia h1, .ia h2, .ia h3, .ia p { margin: 0; }
.ia button { font: inherit; }
@media (prefers-reduced-motion: reduce) {
.ia *, .ia *::before, .ia *::after { animation: none !important; transition: none !important; }
}
```
Two things the artifact's theme.css also does, which you must keep in packages/ui:
the Domi button edges raised for contrast (`.domi-btn` edge = `--control-edge`; outline button edge =
`--edge-outline`; danger edge = `--edge-down`; primary edge = `--primary-edge`), and the primary
gradient `linear-gradient(180deg, var(--primary-high) 0%, var(--primary-mid) 55%, var(--primary-low) 100%)`.
### 1.2 Contrast, every pair used (WCAG 2.x)
Measured with the resolved hex values above. AA needs 4.5:1 for text, 3:1 for large text (24 px, or
18.7 px bold) and for control edges and focus indicators (1.4.11).
**Text on the backgrounds it appears on**
| Text \ background | ground #0c0b0f | colonnade #121016 | surface #18151d | surface-2 #221d28 | wash-degraded #201913 | wash-kept #1b1f26 | wash-down #211413 |
|:--|--:|--:|--:|--:|--:|--:|--:|
| text #f1edf3 | 16.95 | 16.33 | 15.59 | 14.24 | 15.00 | 14.28 | 15.46 |
| text-2 #cfc6d4 | 11.85 | 11.41 | 10.90 | 9.95 | 10.48 | 9.98 | 10.80 |
| muted #a99eb1 | 7.67 | 7.39 | 7.06 | 6.44 | 6.79 | 6.46 | 6.99 |
| accent #e0a3dc (links, running) | 9.76 | 9.39 | 8.97 | 8.19 | 8.63 | 8.22 | 8.89 |
| accent-strong #f2c9ee (match code) | 13.42 | 12.92 | 12.34 | 11.27 | n/u | n/u | n/u |
| healthy / kept #a6d6fa | 12.72 | 12.25 | 11.70 | 10.69 | n/u | 10.72 | n/u |
| degraded / reverted #d99a35 | 8.06 | 7.76 | 7.41 | 6.77 | 7.13 | n/u | n/u |
| down / danger #e2683a | 5.86 | 5.65 | 5.39 | 4.92 | n/u | n/u | 5.34 |
| gilt #f6f0f7 (wordmark) | 17.49 | 16.85 | n/u | n/u | n/u | n/u | n/u |
| disabled #7a7183 | 4.22 | 4.06 | 3.88 | 3.54 | | | |
n/u = not used together. Every used pair passes AA for small text. `disabled` is below 4.5 by design:
WCAG exempts inactive controls, and a disabled control always has its reason in readable text nearby.
Never use `disabled` for content.
Button labels on fills: on-primary #fff on primary-high 6.73, on primary-mid 8.67, on primary-low 11.53
(the label sits across the gradient, so the floor is 6.73). on-danger on down 5.85 (reserved).
Quiet-button hover background (8 % accent over ground, #1d171f): text 15.19, text-2 10.62.
**Edges and indicators (3:1 needed)**
| Element | Against | Ratio |
|:--|:--|--:|
| control-edge #7d7189 (fields, quiet buttons, engine chip, segmented control) | ground / colonnade / surface / surface-2 | 4.29 / 4.13 / 3.95 / 3.61 |
| control-edge on banner washes | degraded / kept / down | 3.80 / 3.62 / 3.91 |
| outline-button edge #8b668a | ground / colonnade / surface | 4.08 / 3.93 / 3.75 |
| danger-button edge #b75531 | ground / colonnade | 4.07 / 3.92 |
| primary-edge #c77cc1 | ground / colonnade | 6.62 / 6.37 |
| focus ring accent #e0a3dc | ground / surface-2 | 9.76 / 8.19 |
| focus ring on primary, accent-strong | ground (outside the button) / primary-high | 13.42 / 4.61 |
| banner edges degraded #916828 / kept #708fa8 / down #b75531 | ground | 3.94 / 5.78 / 4.07 |
| status dots healthy / degraded / down / unknown | ground | 12.72 / 8.06 / 5.86 / 7.67 |
| progress fill accent | track surface-2 | 8.19 |
| chosen segment ring (accent 55 % over surface-2, #8b678b) | surface-2 | 3.46 |
Decoration only, not required to pass: hairline 1.34, hairline-strong 1.65 (dividers and chip edges;
chips are facts, not controls).
Status colours against each other: healthy/degraded 1.58, degraded/down 1.37. Not enough alone, which is
why every status carries a word and a shape (§2.2). Never colour alone.
### 1.3 Fonts
Self-host the Latin woff2 subsets in packages/ui/fonts (all OFL): Cinzel 500; Cormorant Garamond 500,
600, 500 italic; Manrope 400, 600, 700. `font-display: swap`. No Google Fonts request at runtime (the UI
runs on a home server behind Authelia and makes no outside requests). Italic Cormorant is only in the
Domi system; this UI does not use it.
Where each face goes: Cinzel only for the wordmark "IANITOR DOMI" (written in capitals as is, never
text-transformed) and the Custos match code. Cormorant Garamond (book) only for headings: view title,
panel title, dialog title. Manrope (hand) for everything else.
---
## 2. Components
Each component lists: what it looks like, states, keyboard, ARIA. Class names follow the artifact
(`ia-*`, `domi-*`) so packages/ui can carry the CSS as drawn; Svelte components wrap them.
### 2.1 Buttons (`Button.svelte`, Domi `.domi-btn`)
| Variant | Look | Use |
|:--|:--|:--|
| primary | min-height 50px, padding 0 1.6rem, radius 12px, gradient fill, primary-edge, leaf-bevel, label #fff 700 | at most one per screen: "+ Host", "Apply", "Restore this version", "Copy link", "Issue", "Copy token", "Restore the last kept version" in the needs-attention banner |
| quiet (default) | min-height 44px, padding 0 1.1rem, radius 10px, transparent, control-edge, text-2 600 | Undo, Cancel, Close, secondary actions |
| outline | as quiet, edge #8b668a, label accent | an action inside a banner or card that leads but is not the primary: "Renew", "Edit and try again", "+ Device", "New token", "Switch to Caddy", "Turn on share links and copy link" |
| danger | as quiet, edge #b75531, label danger | "Revoke", "Stop all share links", menu item "Remove host" (as menu text colour) |
| link | no edge, no padding, accent, underline offset 0.2em, hit area ≥ 44px tall (pad vertically) | "More options…", "Show details", "Add a password", "See history" |
States: hover (quiet: edge accent, bg `--hover-wash`, label text; primary: lifts 1px), focus-visible
(2px accent outline, offset 3px; primary uses accent-strong), active (no extra style), pending, disabled.
- **Pending**: after a click that waits on the API for more than 300 ms, keep the label, add a 16px
spinner before it, set `aria-busy="true"` and `aria-disabled="true"`, ignore further clicks. No width
change (reserve the spinner slot).
- **Disabled**: use `aria-disabled="true"` (not the `disabled` attribute) so the button stays focusable
and its reason can be read: `aria-describedby` points at the visible reason text. Look: label
`--disabled`, edge `--hairline`, no hover.
- Icon-only buttons (`.ia-icon-btn`, 44×44, radius 10px, text-2): always an `aria-label`
("More for photos.home.example", "Close").
- Icons are inline stroke SVGs, 18px, stroke 1.8–2.2, `aria-hidden="true"`. The artifact's set:
plus, undo arrow, check, clock, link, pencil, history, trash, key, gear, building (hosts), swap arrows,
copy, chevron down, dots.
### 2.2 Status: dot and word (`Status.svelte`)
Always the pair: a 12px shape (decorative, `aria-hidden`) plus a word in small capitals (700,
`font-variant-caps: all-small-caps`, tracking 0.12em, 0.95rem). The word is the accessible text.
| `data-s` | Dot | Word colour | Words used |
|:--|:--|:--|:--|
| healthy | filled circle, healthy | healthy | "healthy" |
| kept | (no dot; check icon) | kept | "kept" |
| degraded | 2px ring, left half filled, degraded | degraded | "degraded" |
| reverted | (undo-arrow icon) | reverted | "reverted", "not applied" |
| down | 3px hollow ring, down | down | "down", "needs attention", "paused", "renew now", "expired" |
| unknown | 2px dashed ring, unknown | muted | "not checked", "waiting" (pending health), "stopped", "revoked" |
| running | clock icon, accent | accent | "waiting", "applying", "watching", "switching" |
The degraded dot: `border: 2px solid var(--degraded); background: linear-gradient(90deg, var(--degraded) 50%, transparent 50%)`.
A dot with no word is only allowed where the word is next to it in the same row on phone
(the phone row repeats the word in the sub-line).
### 2.3 Chips (`Chip.svelte`, `.ia-chip`)
Facts about a host, not controls: pill, 1px hairline-strong, text-2, 12.5px, `white-space: nowrap`,
padding 1px 10px, gap 6px between chips, wraps. Not focusable, no role.
| Field | Chip text |
|:--|:--|
| tls = domi | "Domi certificate" |
| tls = letsencrypt | "Let's Encrypt" |
| auth = forward-auth | "Sign-in first" |
| auth = none | no chip (see open question Q11) |
| share_links = true | "Share links on" |
| websockets = false | "No websockets" (G19: no chip when true, the default) |
| access_log = truncated | "Visit log on" |
### 2.4 Engine chip (`EngineChip.svelte`, `.ia-engine`)
A control: pill, min-height 44px, padding 0 16px 0 14px, control-edge, surface background, text 600
0.92rem. Content: status dot · `<small>` "Engine" (muted, 400) · engine name · chevron down.
- Pingora running: dot healthy, "Engine Pingora".
- Caddy running: dot healthy, "Engine Caddy" `<small>`"(fallback)"`</small>`.
- Switching: clock icon in accent instead of the dot, "Engine Switching…".
- Stopped (control cannot reach the engine, `engine.state = "stopped"`): dot down, "Engine Pingora" and
the word is announced: accessible name "Engine: Pingora, not answering".
Phone: no "Engine" label (as drawn): dot · name · chevron, padding 0 12px.
`<button aria-haspopup="dialog" aria-expanded>`; accessible name "Engine: Pingora. Change engine".
Opens the engine popover (§9).
### 2.5 Host row (`HostRow.svelte`)
Desktop grid: `128px | minmax(0,1.4fr) | minmax(0,1.6fr) | 44px`, gap 16px, padding 12px 10px 12px 18px,
1px hairline between rows. Inside `.ia-list` (1px hairline, radius 18px, overflow hidden). Header row on
colonnade with section labels "STATUS", "HOST", "SENDS TRAFFIC TO" (Domi label style).
1. Status: dot + word (§2.2).
2. Host: hostname (600, 0.98rem, text, `overflow-wrap: anywhere`), then the chips.
3. Sends traffic to: the first upstream (text), "+{n} more" (muted) if several; under it the sub-line
(muted 0.86rem; text-2 when it describes a problem). Sub-line copy in §5.1.
4. More (⋯) icon button.
Phone: a list item, grid `minmax(0,1fr) 44px`, padding 12px 6px 12px 14px. Line 1: dot + hostname, More
button. Line 2 (indented 22px, muted): state word (0.86rem) · short detail ("42 ms", "slow" is never
used, "refused for 6 min", "no health check", "added today", "share links on").
ARIA: the desktop list is `role="table"` with `role="row"`, `columnheader`, `cell`, as drawn (simpler:
a real `<table>` styled as grid; either is fine). The phone list is `<ul>`. Rows are not clickable as a
whole; the More button is the only control. Keyboard: Tab reaches each More button in order.
Row states: normal; pending (just added, health `pending`: dashed dot, "waiting", sub-line "Waiting for
the first check."); being changed (the host is in the running apply: sub-line prefix "Changing now · ");
removed-while-watching (the row stays, greyed text-2, sub-line "Removing…" until the apply ends).
### 2.6 Host menu (`HostMenu.svelte`, `.ia-menu`)
Opened by the row's More button. Colonnade, 1px hairline-strong, radius 12px, shadow-dialog, padding
6px, min-width 200px (250 as drawn). Items 44px high, icon + label, text-2 600 0.92rem; hover and
keyboard focus: surface-2 background, text colour.
Items, in order: "Share link" (link icon) · "Edit host" (pencil) · "Show in history" (history) ·
divider · "Remove host" (trash, danger colour).
Disabled items stay in the list with a muted one-line reason under the label:
- "Share link" when `site.share_links_available` is false: reason "Share links are not set up on this server."
- "Edit host" and "Remove host" while changes are paused: reason "Changes are paused."
Keyboard (WAI-ARIA menu button): Enter/Space/ArrowDown on the button opens and focuses the first item;
ArrowUp opens on the last; Up/Down move (wrap), Home/End, Enter/Space activates, Esc closes and returns
focus to the More button, Tab closes and moves on. ARIA: button `aria-haspopup="menu"`,
`aria-expanded`, `aria-controls`; list `role="menu"` `aria-label="{hostname}"`; items
`role="menuitem"`, disabled ones `aria-disabled="true"`. Click outside closes. On phone the menu is a
bottom sheet with the same items (same roles), plus a "Close" item at the end.
### 2.7 Last-change bar with Undo (`ChangeBar.svelte`, `.ia-bar`)
Surface background, 1px hairline, radius 18px, padding 10px 12px 10px 18px, flex-wrap, gap 10px 16px.
`<section aria-label="Last change">`. Content and states in §7.4. The Undo button is a quiet button with
the undo-arrow icon. Its accessible name always says what it undoes: "Undo: Added recipes.home.example.
Removes recipes.home.example."
### 2.8 Banners (`Banner.svelte`, `.ia-banner`)
Flex-wrap, gap 12px 18px, padding 14px 18px (phone 12px 14px), radius 18px, a 22px icon, a text block
(line 1: optional state word + bold sentence; line 2: text-2 0.9rem), then actions on the right (wrap
below on phone).
| Tone | Background / edge | Icon | Used for |
|:--|:--|:--|:--|
| notice (default) | wash-degraded / edge-degraded | clock or undo arrow, degraded | intermediate due, reverted, not applied, push not saved, health unavailable, Caddy serving with share links |
| kept | wash-kept / edge-kept | check, kept | renewed, engine switched, restore kept (in panel) |
| down | wash-down / edge-down | ring with bar, down | needs attention, paused, signed out (in the dialog), lost contact, intermediate urgent/expired |
ARIA: banners that appear while the user is on the page and need action (needs attention, paused, lost
contact) are `role="alert"`, announced once. Others are `role="status"` (polite). A banner present on
first load is not announced (render it without the live role first, then add the role only for changes).
Dismissable banners ("reverted", "renewed", "switched") have a Close icon button
(`aria-label="Dismiss"`); paused, needs attention, lost contact and the certificate notice cannot be
dismissed.
Order on the main screen, top to bottom: paused / needs attention → lost contact → health unavailable →
Caddy-and-share-links notice → intermediate certificate → last-change bar → host list.
### 2.9 Dialogs, side panel, popover, sheets
- **Dialog** (`Dialog.svelte`, `.ia-dialog`): native `<dialog>` opened with `showModal()`. Colonnade,
1px hairline-strong, radius 18px, shadow-dialog, padding 22px 24px, gap 14px, width `min(var(--dialog-w), 100vw - 32px)`.
Backdrop `--scrim`. Title in book h3 with a Close icon button at the top right. `aria-labelledby`
the title. Focus on open: the first field, or the primary button if there is no field (share dialog:
the Copy link button). Esc closes (except in the token dialog, §8.6, where Esc acts like "I have saved
it"). Focus returns to the control that opened it. Enter: §2.10.
- **Side panel** (add/edit host): the same `<dialog>`, docked right, full height, width 480px, slides
in 8px with opacity over `--dur-enter`. Footer actions sticky at the bottom.
- **Popover** (engine): a `<dialog>` opened with `show()` (non-modal), anchored under the engine chip,
right-aligned, width 420px. Focus moves into it (to its heading, `tabindex="-1"`); Esc or a click
outside closes and returns focus to the chip.
- **Phone (< 720px)**: dialogs and the popover become bottom sheets: full width, radius 18px on the top
corners only, max-height 90dvh, scroll inside, actions sticky at the bottom with 16px side gutter and
`env(safe-area-inset-bottom)`. The add/edit panel becomes a full-screen sheet.
- Only one modal at a time. The signed-out dialog (§10) sits above everything and is the exception.
### 2.10 Forms and fields (Domi `.domi-field`)
- Label above (`.domi-field-label`, text-2 0.92rem, 0.35rem gap), field 44px min height, surface
background, control-edge, radius 10px, carved shadow, padding 0.55rem 0.8rem. Hover edge muted. Focus:
edge accent + `--focus-halo` (no outline on fields). Hint under (`.domi-hint`, muted 0.88rem).
- Error: `aria-invalid="true"`, edge danger, the error sentence under the field in danger 0.88rem
(`.domi-error`) with a small ring icon, linked by `aria-describedby` (error first, then hint). The hint
stays. An offer from the table in §12 ("Use wiki.home.example") is a link button right after the
error sentence.
- Segmented control (`.ia-seg`): a radio group. Wrapper control-edge, surface, radius 10px, padding 3px;
options 38px high (the wrapper makes 44px), text-2 600 0.9rem; chosen option surface-2, text colour,
inset ring of accent 55 %. Real `<input type="radio">` inside `<label>`, visually hidden; `<fieldset>`
with `<legend>` (field-label style). Keyboard: Tab into the group, arrows move and select (native).
Focus-visible ring on the chosen label (`:has(:focus-visible)`).
- Checkbox: native, `accent-color: var(--accent)`, 20px, label to the right, 44px row.
- Enter in a single-line field submits the form (Apply / Issue). Never submit on blur.
- Server validation on blur: `POST /hosts/validate?mode=create|edit` for the field that lost focus
(debounce 300 ms, cancel the previous one); show only errors for fields the user has touched or that
`Apply` returned. Never block typing.
- On submit with errors (`422` + `errors[]`): mark every field, move focus to the first invalid field,
and put a summary at the top of the form for screen readers only:
"{n} things to fix before Apply." (`role="alert"`).
- Nothing the user typed is lost on any error, sign-out or lost contact.
### 2.11 Toasts (`Toasts.svelte`)
For short confirmations that need no action. One region, `role="status"` `aria-live="polite"`, fixed
bottom right on desktop (24px from edges), above the bottom bar on phone (16px gutter). Each toast:
colonnade, 1px hairline-strong, radius 12px, shadow-dialog, padding 12px 16px, icon + one sentence,
optional Close icon. Stays 6 s; hovering or focusing it pauses the timer. At most 3, newest at the bottom.
A toast is never the only place an error or a needed action appears.
Toasts used: "Copied." variants (§8), "Stopped. The link stops working within a few seconds.",
"All share links are stopped. New ones work as usual.", "Revoked. Anything using "{name}" stops working
now.", "Cancelled before it started. Nothing changed.", "Renamed." (token).
### 2.12 Progress (`.ia-progress`)
6px track surface-2, radius 3px, fill accent. `role="progressbar"`, `aria-label`, `aria-valuemin="0"`,
`aria-valuemax`, `aria-valuenow`, `aria-valuetext` in words ("41 seconds left"). Width transitions
linear over `--dur-tick` (none with reduced motion). The bar's own `aria-valuetext` is updated every
second, but nothing is announced per second (§7.3).
### 2.13 Secret box (`.ia-secret`)
For a share URL or a new API token: surface, control-edge, radius 10px, carved shadow, padding 12px
14px, Manrope 600, tracking 0.02em, `word-break: break-all`, text colour. A read-only `<output>` (or
`<input readonly>` so it can be selected): accessible name "Share link" / "New API token". Triple-click
or focus selects all (for the manual-copy fallback).
### 2.14 Show details (`Details.svelte`)
A link button "Show details" / "Hide details" (`aria-expanded`, `aria-controls`) under any message that
carries `detail`. Opens a `<pre>` (surface, radius 10px, muted 0.86rem, wraps) holding `detail` and the
line "Reference: {request_id}", plus a quiet small button "Copy details". Never contains a secret
(control guarantees it).
### 2.15 Empty, loading and error states
- **Loading (first load)**: the view's frame renders at once; lists show 3 placeholder rows (surface-2
blocks at the text positions, no shimmer). The list has `aria-busy="true"` and a visually hidden
"Loading hosts…". After 10 s without an answer: the lost-contact state.
- **Refreshing** (polls): never shows a loading state; data swaps in place. No layout shift.
- **Empty**: a short book-h3 line, one sentence, and the one action. Copy per screen in §5–§8.
- **Error on a view's first load**: the view shows the lost-contact banner (§11.2) in place of the list,
with "Try again now" (quiet), and retries every 5 s by itself.
### 2.16 Navigation
- Desktop (≥ 720px): sidebar `<nav aria-label="Main">`, colonnade, 1px hairline right, width 232px,
padding 22px 14px. Top: wordmark "IANITOR DOMI" (Cinzel 500 13px, tracking 0.3em, gilt, padding 4px 10px
18px). Items (44px, radius 10px, text-2 600 0.95rem, 18px icon): "Hosts", "History", "Certificates",
"Settings". Current item: `aria-current="page"`, surface-2, text colour, inset-lit, edge accent 30 %,
icon accent. Bottom (muted 0.82rem): "Signed in as {name} through Authelia" (or "Signed in through
Authelia" if no name is known) and "Control on 127.0.0.1 only". Then a link "Sign out" (§10.3).
- Phone (< 720px): top bar (colonnade, 1px hairline bottom, padding 10px 16px): wordmark (12px, tracking
0.26em) left, engine chip right. Bottom bar `<nav aria-label="Main">`, colonnade, 1px hairline top,
padding 6px 8px 10px + safe area, 4 equal items 56px high, icon over label (0.78rem 600); current
item surface-2, text colour, accent icon.
- Routes: `/` (Hosts), `/hosts/new`, `/hosts/{hostname}/edit`, `/history`, `/history/{change_id}`,
`/history?host={hostname}`, `/certificates`, `/certificates/new`, `/settings/general`, `/settings/api`,
`/settings/share-links`, `/settings/about`, `/signed-in`. Panels and dialogs that have a route open
over their parent view; Back closes them. Page title: "{View} — Ianitor Domi".
- A visible "Skip to content" link first in the tab order.
---
## 3. Data and timing (the client's behaviour)
| What | How |
|:--|:--|
| Main screen | `GET /overview` on load; every 5 s while the tab is visible, every 30 s when hidden; `If-None-Match` with the ETag, `304` keeps the data |
| Hidden for 15 min | stop polling; resume on `visibilitychange` (see Q9) |
| An apply | `GET /applies/{id}` every 1 s while `queued`, `validating`, `applying`, `watching`; stop on `kept`, `reverted`, `failed`, `needs_attention`; then refresh the overview once |
| A Custos request | `GET /pki-requests/{id}` every 2 s while `waiting` [proposed] |
| Engine switch | `GET /engine` every 1 s while `switching` [proposed] |
| Other views | load on entry; History and Share links refresh when the window regains focus |
| Clock | every JSON answer has `server_time`; keep `offset = server_time − Date.now()` from the latest answer; all countdowns use `ends_at − (Date.now() + offset)` |
| Time format | browser's zone. "Today 14:02", "Yesterday 21:14", "5 Nov 21:14", "5 Nov 2025" (other year). Long dates in sentences: "14 November 2026 at 14:20". Relative: "Checked 8 s ago", "for 6 minutes", "for 2 hours", "since yesterday 21:14". 24-hour clock |
The active apply id is kept in `sessionStorage` (`ianitor.activeApply`) so a reload or a sign-in
resumes watching it. It is an id, not a secret.
---
## 4. Click budget (ROADMAP §4), as built
Counted from the main screen (or the screen named) with nothing open. Typing, focus and scrolling are not clicks.
| Flow | Path | Clicks | Budget |
|:--|:--|:-:|:-:|
| Add host | "+ Host" → (type) → "Apply" | 2 | 2 |
| Undo last change | "Undo" | 1 | 1 |
| Restore | "History" → pick an entry → "Restore this version" | 3 | 3 |
| Share link | "⋯" → "Share link" → "Copy link" | 3 | 3 |
| Share link, host has links off | "⋯" → "Share link" → "Turn on share links and copy link" | 3 | 3, if Q1 is accepted; else 4 |
| Switch engine | engine chip → "Switch to Caddy" | 2 | 2 |
| Device certificate | "Certificates" → "+ Device" → (type) → "Issue" → approve in Custos | 3 | 3 |
| Install device certificate | "Show QR code" or "Download file (.p12)" | +1 = 4 | accepted 4th click |
| Renew intermediate | banner "Renew" → approve in Custos | 1 | 1 |
| API token | "Settings" → "API" → "New token" | 3 | 3 |
| Copy new API token | "Copy token" | +1 = 4 | accepted 4th click |
| Edit host | "⋯" → "Edit host" → (type) → "Apply" | 3 | (not in §4) |
| Remove host | "⋯" → "Remove host" | 2 | (not in §4) |
| Stop a share link | "Settings" → "Share links" → "Stop this link" | 3 | (not in §4) |
| Recover from needs attention | "Restore the last kept version" in the banner | 1 | (not in §4) |
On phone the same paths and counts hold: "History", "Certificates" and "Settings" are in the bottom bar.
The smoke test (Phase 3 Done) counts these clicks with Playwright: each flow is a test that asserts the
number of `click()` calls.
---
## 5. Main screen (Hosts)
### 5.1 Desktop (≥ 720px)
Shell: sidebar + main (`padding: 26px 32px 40px`, flex column, gap 18px). Main, top to bottom:
1. **Header row** (flex, wrap, space-between, align end, gap 16px):
- Left: `<h1>` "Hosts" (book display 2.6rem); under it (text-2) the counts sentence:
"{hosts} hosts · {healthy} healthy, {degraded} degraded, {down} down". Leave out zero parts except
healthy ("7 hosts · 7 healthy"). Add ", {unknown} not checked" when unknown > 0. One host: "1 host · …".
- Right: engine chip, then the primary "+ Host" (plus icon, label "Host"; accessible name "Add a host").
2. **Banners** (§2.8 order).
3. **Last-change bar** (§7.4), shown once there is any `last_apply`.
4. **Host list** (§2.5), sorted: down, degraded, pending, unknown, healthy; then by hostname.
5. Footer: interpunct ornament (max 360px, centred), then a centred muted line:
"Routes live in the {repo.name} repository, one file per host. Last pushed to Gitea at 14:03."
followed by the link "See history". With unpushed commits: "… {n} changes not yet pushed." With no
remote (`repo.no_remote` / repo null): "Routes live in the {repo.name} repository, one file per host."
**Row sub-lines** (column 3, under the address):
| Health | Sub-line |
|:--|:--|
| healthy | "Checked 8 s ago · 42 ms" (latency left out when null, e.g. under Caddy) |
| healthy, added within 24 h | "Added today · checked 3 s ago · 27 ms" |
| degraded, some upstreams fail | "{n} of {m} addresses answer. Visitors are sent to the ones that do." |
| degraded, one upstream, mixed results | "Answering only some checks: {passed} of the last 5 passed." |
| down, refused | "Connection refused for {duration}. Visitors see a "not reachable" page." |
| down, timeout | "Not answering for {duration}. Visitors see a "not reachable" page." |
| down, name | "The name **{upstream_host}** cannot be found. Visitors see a "not reachable" page." |
| down, tls | "The certificate of **{upstream}** cannot be checked." |
| down, bad_answer | "Answering with an error page for {duration}." |
| unknown | "No health check set for this host." |
| pending | "Waiting for the first check." |
| certificate pending (extra line) | "Waiting for Let's Encrypt to issue the certificate." |
| certificate failed (extra line, down colour) | "Let's Encrypt could not confirm **{hostname}**. The name must point to this server, and port 80 must be open from the internet." + link "Try again" (`POST /hosts/{h}/certificate/retry`) |
Until the "not reachable" visitor page exists (ui-api §6: edge still answers an empty 502), use
"Visitors get an error page." instead of "Visitors see a "not reachable" page.". Switch the wording when
edge serves the page.
**Empty state** (no hosts): in place of the list, a frame (1px hairline, radius 18px, padding 32px,
centred): book h3 "No hosts yet", then "Add the first one: the name people type, and where Ianitor
should send them." The "+ Host" button in the header stays the one primary; no second button.
### 5.2 Phone (< 720px)
Top bar and bottom bar (§2.16). Main: padding 18px 16px 20px, gap 14px.
1. Header: `<h1>` "Hosts" (book 2.1rem) with the counts under it, short form "5 healthy, 1 degraded,
1 down" (muted 0.86rem); "+ Host" primary on the right (padding 0 1.2rem).
2. Banners, compact: the certificate banner reads "The Domi intermediate certificate expires in 23 days."
/ "Approve the renewal in Custos." / "Renew".
3. Last-change bar, compact: line 1 state word + summary (0.92rem 600); line 2 muted "Today 14:02 ·
4f1c2ab"; Undo button right.
4. Host list (§2.5 phone).
5. Muted centred "Last pushed to Gitea at 14:03".
Nothing on the phone scrolls sideways; long hostnames wrap.
---
## 6. Add and edit a host
### 6.1 The panel
Route `/hosts/new` (or `/hosts/{h}/edit`). Side panel 480px, colonnade (§2.9). Header: book h3 "New
host" (edit: "Edit {hostname}"), Close icon. Body (gap 16px), then sticky footer: "Cancel" (quiet),
"Apply" (primary). Opening focuses Hostname (edit: Send traffic to).
Fields, in order, exactly:
| Field | Label | Control | Default | Hint |
|:--|:--|:--|:--|:--|
| hostname | "Hostname" | text, `autocapitalize="none"`, `spellcheck="false"`, `inputmode="url"` | empty | none. Edit: read-only, hint "To use another address, add a new host and remove this one." |
| upstreams[0] | "Send traffic to" | text, placeholder-free | empty | "Add another address later for a second server." |
| upstreams[1..] | (no label; `aria-label="Also send traffic to, address {i+1}"`) | text + Remove icon button | — | — |
| | link button "Add another address" | | | |
| tls | "Certificate" | segmented: "Domi certificate" · "Let's Encrypt" | Domi certificate | "Domi for home devices only; Let's Encrypt for a public site." |
| auth | "Who can open it" | segmented: "Sign in first" · "Anyone" | Sign in first | when `site.forward_auth_configured` is false: "Sign in first" is disabled, "Anyone" chosen, hint "Sign-in is not set up on this server yet, so choose Anyone for now. To set it up, add the Authelia address to ianitor.toml in the routes repository." |
Then the link button "More options: headers, websockets, health check, share links, visit log"
(`aria-expanded`, `aria-controls`). It expands in place (no click counted for the 2-click path, because
it is never needed). Expanded, in order:
| Field | Label | Control | Default | Hint |
|:--|:--|:--|:--|:--|
| health_check | "Health check" | checkbox "Check that it answers" | off | "Ianitor asks this address regularly and shows the result on the main screen." |
| health_check.path | "Health check address" | text | "/" when turned on | "Use an address that answers without signing in, like /health." |
| health_check.interval_secs | "Checks every" | number + suffix "seconds" (1–3600) | 30 | — |
| websockets | "Websockets" | checkbox "Allow websockets" | on | "Live updates for apps like Home Assistant. Leave on unless you know the app does not need them." |
| share_links | "Share links" | checkbox "Allow share links" | off | "Lets you make links that open this host without signing in, until they expire." |
| access_log | "Visit log" | segmented "Off" · "On" | Off | "On keeps a log on this server, with visitor addresses shortened." |
| request_headers | "Header rules sent to your service" | rule list | none | — |
| response_headers | "Header rules sent back to visitors" | rule list | none | — |
A header rule row: segmented "Set" · "Remove"; "Header name" text; for Set: segmented "Fixed value" ·
"Secret", then "Value" text or "Secret" select listing `site.secrets` (names only; empty list: the
option is disabled with hint "No secrets are listed in ianitor.toml."); Remove icon button
(`aria-label="Remove this rule"`). Under each list the link "Add a rule". Response rules have no Secret
option (secrets never go back to visitors).
The UI always sends every field explicitly (the schema's own defaults differ: letsencrypt, none).
When `auth` is "Anyone" and Share links is on, show the warning (muted, not an error):
"Anyone can already open {hostname}, so a share link changes nothing."
### 6.2 Apply
"Apply" → `POST /hosts {host, base_rev}` (edit: `PUT /hosts/{h} {host, base_rev}`), with an
Idempotency-Key. Results:
- `422` with `errors[]` → mark fields (§2.10). Panel stays.
- `409 change.conflict` → §6.3. `409 change.unchanged` → message under the footer: "This is the same as
what is live now, so nothing changed." Panel stays.
- `202 {apply}` → the panel body becomes the progress view (§7.1); the form is kept in memory (hidden),
so "Edit and try again" brings it back unchanged.
- Paused → the Apply button was already disabled (§7.6).
Cancel and Close: with unsaved typing, no confirmation; the draft is kept for the session in memory and
the next "+ Host" offers it back: a notice at the top of the form "You have an unfinished host from
earlier." with "Use it" and "Start empty" (link buttons). Closing while an apply runs only hides the
panel; the bar shows the progress.
### 6.3 Conflict
`change.conflict` shows a notice banner at the top of the panel with the server message ("{hostname} was
changed at {time} ("{summary}") after you opened it. Your edits are still here. Check them, then Apply
again.") and two buttons: "Keep my edits" (quiet: re-reads the host for its new `rev`, keeps the form,
the next Apply uses the new rev) and "Use the new version" (quiet: replaces the form with the server's
host). Under the buttons, a list of the fields that differ: "{label}: now {theirs}, yours {mine}"
(labels from §6.5).
### 6.4 Edit and Remove
- "⋯" → "Edit host": `GET /hosts/{h}` fills the panel (with its `rev`).
- "⋯" → "Remove host": `DELETE /hosts/{h}?base_rev=` at once, no confirmation (Undo puts it back in one
click). The bar shows "Removing {hostname}" and then "kept {hostname} is removed." with Undo.
### 6.5 Field labels in sentences
For restore previews, conflicts and "Edit and try again" (the same words everywhere):
hostname "address", upstreams "sends traffic to", tls "certificate", auth "who can open it",
health_check.path "health check address", health_check.interval_secs "checks every", share_links "share
links", access_log "visit log", websockets "websockets", headers "header rules".
Values: domi "Domi certificate", letsencrypt "Let's Encrypt", forward-auth "sign in first", none
"anyone", true/false "on"/"off", truncated "on", interval "{n} s", upstream lists joined with ", ",
no health check "none".
---
## 7. Apply progress and outcomes
### 7.1 The progress view (in the panel)
Heading (book h3), by `kind`: add "Adding {hostname}", edit "Changing {hostname}", remove "Removing
{hostname}", undo "Undoing: {target summary}", restore "Restoring the version of {date}",
share_links "Turning on share links for {hostname}".
A checklist (`<ol>`, gap 10px, each item an 18px icon + text). The API's six steps map to four rows;
`write` folds into row 2, `push` is shown in the outcome, not here.
| Row | pending (muted, hollow circle) | running (text, accent clock) | done (text-2, kept check) | failed (text, down ring) | skipped |
|:--|:--|:--|:--|:--|:--|
| validate | "Check the host file" | "Checking the host file" | "Checked the host file" | "The host file did not pass the check" | — |
| compile + write | "Build the Pingora and Caddy settings" | "Building the Pingora and Caddy settings" | "Built the Pingora and Caddy settings" | "Could not build the settings" | — |
| reload | "Reload {engine}" | "Reloading {engine}" | "Reloaded {engine}, no connections dropped" | "{engine} did not take the new settings" | — |
| watch | "Watch health checks for {watch_seconds} s" | "Watching health checks: {left} s left" | "Health checks passed for {watch_seconds} s" | "Health checks failed" | "Nothing to watch: the host is removed." |
`{engine}` is "Pingora" or "Caddy" from `overview.engine.running`. A host without a health check: the
watch row reads "Checking that it answers: {left} s left" / "It answers" (`apply.kept.no_watch`).
When the watch row is failed and the state is not final yet, add a fifth row, running:
"Undoing the change". Each icon has a visually hidden prefix for screen readers: "Done:", "Now:",
"Next:", "Failed:", "Skipped:".
Under the list, while `watching`: the progress bar (`aria-label="Health watch"`,
`aria-valuemax={watch_seconds}`, `aria-valuenow={watch_seconds − left}`,
`aria-valuetext="{left} seconds left"`). Then the note (muted 0.88rem):
"You can leave this screen. Other changes wait their turn; only one apply runs at a time."
**Queued** (`state = queued`): no checklist yet. Accent clock + "Waiting for "{waiting_for.summary}" to
finish, about {seconds} s." (when `queue.position` > 1: "{position − 1} other changes are ahead of this
one.") and a quiet "Cancel" (`DELETE /applies/{id}`; then toast "Cancelled before it started. Nothing
changed." and the form comes back).
### 7.2 Countdown
`left = max(0, ceil((watch.ends_at − (Date.now() + offset)) / 1000))`, recomputed every second by a
local timer between polls, so it ticks evenly when a poll is late. It never goes up between two polls
unless the server's `ends_at` changed. At 0 it shows "0 s left" until the next poll gives the outcome.
### 7.3 What is announced
One polite live region per panel (and one for the bar when the panel is closed). Announce only state
changes, once each: "Waiting for {summary} to finish." · "Applying {summary}." · "Watching health
checks for 60 seconds." · "Kept. {reason.message}" · "Reverted. {reason.message}" · "Not applied.
{reason.message}". `needs_attention` goes to the alert banner instead. No per-second announcements.
### 7.4 The last-change bar (main screen)
| Situation | Line 1 | Line 2 (muted 0.86rem) | Right side |
|:--|:--|:--|:--|
| Running (from `active_apply`) | accent clock, word "applying" / "watching" / "waiting" (running colour), "{summary}" (for running applies the server summary is past tense, so the UI writes the panel heading instead, e.g. "Adding wiki.home.example") | "{left} s left" + a 4px progress bar under the line; queued: "Waiting for "{x}" to finish" | link "Show steps" (opens the panel's progress view); queued: "Cancel"; Undo hidden |
| kept | kept check, word "kept", "{summary}" | "Today 14:02 · health checks passed for 60 s · pushed to Gitea as 4f1c2ab" | "Undo" |
| kept, push pending | same | "… · sending to Gitea" | "Undo" |
| kept, push failed | same | the push message in degraded: e.g. "Kept, but not yet saved to Gitea: Gitea did not answer. Ianitor tries again at 14:20." | "Try now" (quiet, `POST /repo/push`) for unreachable and auth; "Show details" for rejected; and "Undo" |
| kept, no remote | same | "Today 14:02 · health checks passed for 60 s · saved as commit 4f1c2ab" | "Undo" |
| kept.no_watch | same | "{hostname} has no health check, so Ianitor only checked that it answers." | link "Add a health check" (opens Edit with More options open and Health check on), "Undo" |
| kept.removed | same | "Today 14:02 · removed · pushed to Gitea as 4f1c2ab" | "Undo" |
| reverted / failed | the amber banner (§7.5) replaces line 1 | — | — |
| after a reverted change, Undo still available | line 2 of the bar, its own row: "Undo: {undo.target.summary}" | `{undo.effect}`, e.g. "Removes recipes.home.example" | "Undo" |
Undo button states: available → `POST /undo {target_change_id: undo.target.change_id}`; while its own
Undo runs → disabled, reason under it "Wait for the check to finish ({seconds} s)."; nothing to undo →
no button, line "Nothing to undo yet."; paused → disabled, reason "Changes are paused, so Undo is not
available." `409 undo.target_moved` → toast-free: the bar refreshes and shows "The last change is now
"{summary}", so Undo did nothing. Look again and choose." in place of line 2 until the next poll.
After an Undo is kept, the bar reads "kept Undid: Added recipes.home.example", and the button's line 2 is
"Undo: Undid: Added recipes.home.example" / "Adds recipes.home.example back".
### 7.5 Outcome banners
**Kept** (in the panel, then the panel closes after 1.5 s and focus goes to the new host's row More
button; the bar takes over): kept banner, "kept **{hostname}** is live." / "Health checks passed for 60 s.
Saved as commit 9b20e7d and pushed to Gitea." (push part from `push`), "Undo".
**Reverted** (amber, in the panel and on the main screen until dismissed or the next apply): word
"reverted", bold "{hostname} was not {verb}." then line 2 "Reason: {reason.message after the first
sentence}". The server message starts with the same first sentence; split on the first ". " so the
reason reads on its own line. Offers by code:
- refused, timeout, server_error, name, tls, no_answer → "Edit and try again" (outline): shows the form,
focuses `reason.field` (e.g. `upstreams[0]`), else Send traffic to.
- not_found, redirect, sign_in → "Edit health check" (outline): form, More options open, focus Health check address.
- interrupted, edge_lost → "Try again" (outline): re-sends the same body with a new Idempotency-Key.
Below the banner (note, muted): "Your form is kept. History records the attempt as reverted."
**Not applied** (`failed`; amber, word "not applied"): the reason message; offers: `apply.failed.reload`,
`apply.failed.build`, `apply.failed.edge_unreachable` → "Show details"; `apply.failed.validation` → "Edit
and try again"; `apply.interrupted.queued` → "Try again"; `apply.cancelled` → no banner, toast only.
**Needs attention**: §7.6.
### 7.6 Paused and needs attention
`overview.paused` is set (`control.paused`) when control stops taking changes. Visitors are not affected.
The banner (down tone, `role="alert"`, cannot be dismissed), first on every screen (Hosts, History,
Certificates, Settings), word "paused" or "needs attention":
| `paused` reason | Bold line | Line 2 | Offers |
|:--|:--|:--|:--|
| `apply.needs_attention` | "Ianitor could not undo a failed change." | "Visitors are served the last good settings, but the routes repository still has the change. Restore the last kept version to make them match again." | **primary** "Restore the last kept version", "Show details" |
| `control.files_unwritten` | "The change is live, but Ianitor could not save the proxy settings to disk." | "Changes are paused until Ianitor restarts and saves them. Restoring the last kept version also clears this." | **primary** "Restore the last kept version", "Show details" (detail plus "On the server: sudo systemctl restart ianitor-control") |
| `repo.unreadable`, `file.*`, `repo.*`, `site.*` | the server message, e.g. "hosts/wiki.home.example.toml in the routes repository cannot be read. Changes are paused until it is fixed." | "Fix the file in the {repo.name} repository; Ianitor picks it up by itself." | "Show details" |
| any other | the server's `paused.message` | — | "Show details" |
Under the restore button, muted: "Goes back to "{undo.target.summary}" from {kept_at}. It is checked
like any change." The button calls `POST /restore {change_id: undo.target.change_id, base_rev: overview.rev}`
and shows the progress in a panel like any apply (heading "Restoring the version of {date}"). This is the
one place a second primary appears: "+ Host" is disabled while paused, so the banner's button is the
only primary on the screen.
While paused: "+ Host" disabled (reason via `aria-describedby` = the banner); Undo disabled; menu items
"Edit host" and "Remove host" disabled; History's "Restore this version" enabled only for
`apply.needs_attention` and `control.files_unwritten`, otherwise disabled with "Changes are paused."
Share links, tokens and certificates keep working.
Phase 2 controls also report `needs_attention` as an apply state: the panel shows the same banner.
---
## 8. Other screens
### 8.1 History (`/history`)
Desktop: two columns inside main: the list (min 360px, max 520px) and the detail (rest). Phone: the list;
picking an entry opens `/history/{id}` as its own view with a back link "History".
Title `<h1>` "History" (book display). With `?host=`: "History of {hostname}" and a link "Show all changes".
List: buttons, one per entry, 44px+ high, radius 10px, padding 10px 12px, grid `1fr auto`:
summary (600) · state word (§2.2: kept, reverted, not applied, waiting, applying) / sub-line (muted):
"Today 14:02 · 4f1c2ab" for kept, "Today 13:40 · {reason_short}" for reverted and not applied.
The chosen entry: surface-2, edge accent 55 %, `aria-current="true"`. Keyboard: Tab to each button,
Up/Down move between entries when the list has focus (roving tabindex), Enter picks.
After 50 entries: quiet button "Show older changes" (`before=next_before`).
Empty: book h3 "No changes yet" / "Every change you apply is listed here, newest first."
Detail (`GET /history/{id}/restore-preview`), on colonnade, padding 20px:
- Label "VERSION OF 3 NOV, 09:30" (Domi label), book h3 "Go back to this version?"
- "Restoring puts {n} hosts back to how they were then:" (1 host: "Restoring puts 1 host back to how it
was then:"), then a list, one line per change: added → "**{hostname}** is added back"; removed →
"**{hostname}** is removed"; changed → one line per field: "**{hostname}**: {label} changes from {from}
to {to}" (headers: "**{hostname}**: header rules change").
- Note: "Applied as a new commit with the same 60-second watch. If health checks fail, it is undone."
- Buttons right: "Close" (quiet), "Restore this version" (primary) → `POST /restore {change_id, base_rev}`.
- `blocked = restore.same`: no list, "This version is the same as the current one. Nothing to restore."
and only "Close".
- `blocked = restore.not_kept` (reverted or not-applied entry): heading "This change did not stay",
the reason message from `GET /history/{id}`, "This change was undone at the time, so there is nothing
to go back to.", and "Edit and try again" (outline) which opens the add/edit panel filled from
`attempted_host`.
Outcome: the bar shows "kept Restored the version of 3 November 2026" (server summary), line 2 "Saved as
commit e3f7a10 and pushed to Gitea. Undo brings back today's version."
### 8.2 Share link dialog
Route-less dialog over Hosts. Opened from "⋯" → "Share link" (click 2).
**Host has share links on.** On open: `POST /hosts/{h}/share-links {path_prefix: "/", expires_in_s: 604800}`.
- Title "Share {hostname}". Line (text-2 0.92rem): "Anyone with this link can open the site without
signing in, until it expires."
- Secret box with the URL; while minting (< 1 s): "Making the link…" in muted, Copy disabled.
- Primary full width "Copy link" (copy icon) — click 3. `navigator.clipboard.writeText(url)` inside
the click. Then the button becomes a status ("Copied", kept colour, check icon, `role="status"`) and
the line under it: "Expires on 14 November 2026 at 14:20. To stop it sooner: Settings, Share links,
Stop this link."
If the browser refuses the clipboard: select the URL in the box and say "Your browser did not allow
copying. Press Ctrl+C to copy the selected link." (Cmd+C on macOS).
- Options under the button (changing any re-mints with `replaces: <previous id>`, so only one link from
this dialog is ever valid; if the user had copied the old one, say "The link you copied before is
stopped. Copy this one."):
- "Expires after": segmented "1 day" · "7 days" · "30 days" (default 7). Re-mint on change.
- "Only addresses starting with": text, default "/", hint "/ shares the whole site. Try
/share/summer-2026 for one album." Re-mint on blur or Enter (not per keystroke).
- Link button "Add a password" → reveals "Password" (type password, `autocomplete="new-password"`,
hint "At least 8 characters. Send it to them separately.") and the quiet button "Use this
password" → re-mint with `password`. Then the line "This link asks for the password." and the link
button "Remove the password".
- Warnings shown above the link when they apply:
- `warning = host.share.no_signin`: "Anyone can already open {hostname}, so a share link changes nothing."
- Caddy serving: "Caddy is serving right now, so share links do not work: visitors with this link get
the normal sign-in. The link works after switching back to Pingora, until it expires."
- Closing without having copied: `DELETE /share-links/{id}` (fetch with `keepalive: true`), so a link
nobody copied does not stay valid. After a copy, closing keeps it.
- Errors: `share.prefix`, `share.password_short`, `share.password_long` under their field;
`share.too_many` in a notice inside the dialog with a link "Open share links" (Settings);
`share.unavailable` replaces the dialog body with the message.
**Host has share links off.** The dialog does not mint on open. Body: bold "Share links are off for
{hostname}." then "Turning them on is a change to the host, checked like any other." and the outline
button "Turn on share links and copy link" (click 3). Design for 3 clicks, needs an API change: see
open-questions Q1. What it does: in the same click, `POST /hosts/{h}/share-links {..., turn_on: true}`
answers at once with the link and the apply that turns links on; the UI writes the link to the clipboard
(`ClipboardItem` with the pending promise, so the copy belongs to the click). The dialog then shows the
link, "Copied. The link starts working in about a minute, when the change is kept." and the apply
progress (compact: watch row + bar). On `kept`: "Share links are on. The link works now." On reverted
or not applied: "Share links were not turned on, so the link you copied never works. {reason.message}"
(control stops that link itself). If Q1 is declined: the button reads "Turn on share links" and Copy link
appears when the apply is kept (4 clicks).
### 8.3 Settings (`/settings/{tab}`)
`<h1>` "Settings". Tabs: "General", "API", "Share links", "About": `role="tablist"`, tabs are buttons
with `role="tab"`, `aria-selected`, `aria-controls`; arrow keys move and select, Home/End; each tab
also changes the route. Chosen tab: surface-2, text colour, no edge. On phone the tab row scrolls
sideways inside its own box (the page does not).
**General** (`GET /settings`): label "ROUTES REPOSITORY" / "{repo.name} on Gitea · pushed 14:03" (or
"not pushed yet", or "no place to push to is set up"); label "HEALTH WATCH AFTER APPLY" / "60 seconds";
label "SIGNED IN" / "{name} through Authelia" with link "Sign out". Read-only in v1.
**API** (`GET /tokens`): heading book h3 "API tokens", outline "New token" (plus icon) — click 3.
Next to it, segmented "New tokens expire after": "1 year" · "Never" (default 1 year; a local choice,
not saved; see Q10). Note (muted): "The API listens on 127.0.0.1 only. Ianitor keeps a hash of each
token, never the token."
Rows (1px hairline between): name (600) / "Made 2 Oct · last used today 03:00 · expires 2 Oct 2027"
("never used", "never expires"), and a small danger "Revoke" (36px high, padding 0 0.8rem; the row is
44px+). Revoke asks in the row: "Revoke "{name}"? Anything using it stops working now." with "Cancel"
and danger "Revoke" (focus goes to Cancel). Then `DELETE /tokens/{id}`, the row shows "Revoked today
14:40" (muted, struck through name) until the next load, and a toast "Revoked. Anything using
"{name}" stops working now."
Empty: book h3 "No API tokens" / "Scripts and other Domi apps use a token to talk to Ianitor."
**New token dialog** (after click 3, `POST /tokens {name: "Token made 7 Nov 2026", expires_in_days: 365 | never_expires: true}`):
- Title "Your new token". Bold "Copy it now and save it in Custos." then (text-2) "Ianitor cannot show it
again; if it is lost, make a new one and revoke this one."
- Secret box with the token (`aria-label="New API token"`).
- Grid: "Name" field (value "Token made 7 Nov 2026", hint "Rename it now or later, so you know what uses
it.") and the primary "Copy token" (copy icon) — click 4, accepted. After copy: "Copied. Paste it into
Custos now. Ianitor cannot show it again." and the button becomes "Copy again" (quiet).
- "Expires on 7 November 2027." (or "Never expires.") muted.
- Footer right: "I have saved it" (quiet) closes. A changed name is saved on close
(`PATCH /tokens/{id} {name}`; `token.name` error keeps the dialog open with the error under Name).
- Closing any way (Close, Esc, "I have saved it", leaving the page) drops the token from memory. If the
token was never copied, closing first asks inside the dialog: "Close without copying? The token cannot
be shown again." with "Go back" and "Close anyway".
**Share links** (`GET /share-links`): heading book h3 "Share links"; danger "Stop all share links".
Rows, active first: "**{hostname}**{path_prefix if not /}" / "Made today 14:20 · expires 14 Nov 14:20 ·
password" and quiet "Stop this link" (immediate, no confirmation: `DELETE /share-links/{id}`, toast
"Stopped. The link stops working within a few seconds.", row moves to Ended). Ended links (expired,
stopped) in a collapsed group "Ended ({n})" (`<details>`), each with "expired 3 Nov" / "stopped 5 Nov".
"Stop all share links" asks inline: "Stop all {n} active links? Every link made so far stops working.
New ones work as usual." with "Cancel" and danger "Stop all" → `POST /share-links/stop-all`, toast
"All share links are stopped. New ones work as usual."
While Caddy serves, a notice at the top: "Caddy is serving, so these links do not work right now. They
work again after switching back to Pingora."
Empty: book h3 "No share links" / "Make one from a host's menu (⋯), Share link."
**About**: "Ianitor Domi {version}", "Build {commit_short}", "CPAL-1.0" with the Built on Domi credit (LICENSE Exhibit B; was "MPL-2.0"), "Built, tested and signed by
Fabrica Domi", link "Source on Gitea".
---
## 9. Engine switch [proposed API]
Decided by Mark: the engine is switched at runtime from the UI. Proposed calls: `GET /engine` →
`{running, state ("running"|"switching"|"stopped"), since, fallback_ready {built_at, compared, matched,
differences[]}|null, switch {id, target, state, started_at, reason}|null}`; `POST /engine {target}` with
an Idempotency-Key → `202 {switch}`. A switch waits in the same queue as applies (one change at a time).
### 9.1 Popover (click 1 = the engine chip)
Desktop: popover under the chip. Phone: bottom sheet. Label "ENGINE", book h3 "Serving with Pingora".
Then (text-2 0.92rem): "Since 3 November, 08:12. Caddy is ready with the same routes: built at 14:02,
and the comparison tests passed ({matched} of {compared} requests matched)."
A card (surface, 1px hairline, radius 12px, padding 12px 14px): bold "What happens", then a list:
- "Pingora stops and Caddy starts. New visits reach Caddy in about 2 seconds."
- "Open connections close; videos and uploads in progress restart."
- "Hosts and certificates stay the same."
- "Share links stop working while Caddy serves: visitors with a link get the normal sign-in. They work
again when you switch back." With active links: "… {n} share links are active." (from `GET /share-links`).
- "This page may lose contact for a few seconds."
Buttons right: "Cancel" (quiet), outline "Switch to Caddy" (swap icon) — click 2. The popover is the
confirmation; no second "Are you sure?".
Variants:
- `fallback_ready.matched < compared`: the sentence becomes "Caddy is built with the same routes, but
{compared − matched} of {compared} test requests answered differently." with "Show details" listing
`differences[]`. The switch stays possible (the fallback is for emergencies; see Q3).
- `fallback_ready = null`: "Caddy is not ready: its settings have not been built and compared yet." The
switch button is disabled with that reason.
- An apply is running: the button stays; after the click the switch waits: "Waiting for "{summary}" to
finish, about {seconds} s." + "Cancel".
- Serving with Caddy: heading "Serving with Caddy", "Since 14:40. Pingora is ready with the same
routes." List: "Caddy stops and Pingora starts. New visits reach Pingora in about 2 seconds." · "Open
connections close; videos and uploads in progress restart." · "Hosts and certificates stay the same." ·
"Share links work again." · "This page may lose contact for a few seconds." Button "Switch to Pingora".
- Engine not answering (`state = stopped`): heading "{engine} is not answering", line "Visitors may not
reach any host. Switching to {other} is the quickest way back." The switch button becomes the
popover's primary.
### 9.2 Switching and the result
After click 2 the popover stays open and shows: accent clock + bold "Switching to Caddy", progress bar
(`aria-label="Switching engine"`, indeterminate until the server gives steps: `aria-valuetext` "Pingora
stopped, starting Caddy"), sub-line "Pingora stopped · starting Caddy". The chip shows "Switching…".
Contact may drop: the client tolerates 15 s of failed polls here without showing lost contact.
- Switched: kept banner on the main screen (dismissable): "healthy **Now serving with Caddy.**" / "All 7
hosts answered. Switch back from the engine chip at any time; it is the same 2 clicks." Chip: "Engine
Caddy (fallback)". Popover closes, focus to the chip.
- Did not start [proposed code `engine.failed`]: down banner: "**Caddy did not start, so Pingora is
serving again.** Visitors had a short break and nothing else changed." + "Show details".
- Both failed [proposed `engine.both_failed`]: needs-attention banner: "**Neither engine is serving.**
Visitors cannot reach any host. On the server: sudo systemctl start ianitor-edge" + "Show details".
(The UI itself is likely unreachable then; the text matters for the CLI and for the moment before.)
While Caddy serves, a notice banner on the main screen, only when there are active share links:
"Caddy is serving (the fallback), so {n} share links do not work until you switch back." Apply steps
say "Reload Caddy". Health latency is not available under Caddy: sub-lines leave it out.
The choice survives a reboot (the engine-select unit); say nothing about it in the UI beyond the
popover.
---
## 10. Sign-in and session expiry
### 10.1 How the UI is reached
The UI is served on the admin host through edge (or Caddy) with forward-auth to Authelia. The browser
never sees a login form from Ianitor; Authelia's portal does that. How control learns who the user is
(G14) is not built: see Q2. The sidebar names the user when a name is known.
### 10.2 When the session ends mid-action
Detection (in the API client): a response that is `type === "opaqueredirect"` (Authelia's portal
redirect, because of `redirect: "manual"`) or `401` without an Ianitor error envelope means signed out.
Answers with an envelope and `token.*` codes are a different thing (§12, "API token" rows).
What the user sees: a modal alert dialog (`role="alertdialog"`, above everything, cannot be dismissed
with Esc), down-tone icon:
- Title "Your sign-in has ended"
- "Sign in again; this page keeps what you typed."
- Primary "Sign in", quiet "I have signed in" (rechecks).
"Sign in" opens `/signed-in` in a new tab (`window.open("/signed-in", "ianitor-sign-in")`). Edge sends
that tab through Authelia, which returns it to `/signed-in` after sign-in; that page is part of the app,
says "You are signed in again. You can close this tab and go back to Ianitor.", posts
`"signed-in"` on `BroadcastChannel("ianitor-auth")` and calls `window.close()`. The first tab hears it,
closes the dialog, reloads the overview and resumes any polling. No portal URL is needed in the UI.
If the new tab is blocked: same-tab navigation to `/signed-in?back={current route}` after saving the
open form's values to `sessionStorage` (never passwords, tokens or share URLs); `/signed-in` then returns
to the route and the form is restored.
What happens to the action:
- A write whose request was redirected never reached control, so nothing changed. The form is intact;
the user presses Apply (or Copy, Issue) again. The same click's Idempotency-Key is kept for that form,
so even a write that did reach control cannot apply twice.
- A running apply goes on on the server. After sign-in the UI resumes polling it (id from
sessionStorage) and shows its outcome.
- A share link or token made just before the redirect is shown again only if the retry with the same
Idempotency-Key returns it (control keeps those answers in memory for 24 h).
- Polling stops while signed out (no redirect loops).
### 10.3 Sign out
"Sign out" in the sidebar and in Settings, General: a link to Authelia's logout URL
(`site.auth_logout_url` [proposed]; until then hide the link).
---
## 11. Lost contact, rate limits, retries
### 11.1 Lost contact
A failed request (network error, 502/503/504 without envelope) during polling: retry quietly for 10 s (a
reload takes about 2 s). Still failing: down banner, `role="alert"`, first on every screen:
"Ianitor's control service is not answering." / "Traffic keeps flowing; changes wait until it is back."
and "Try again now" (quiet). The client keeps polling every 5 s; the data on screen stays, with "Last
updated 14:05" muted in the banner. Write buttons are disabled (reason: the banner). When contact
returns, the banner goes away and a polite "Back in contact." is announced.
Offline (`navigator.onLine === false`): "This device is offline. Ianitor keeps running." instead.
### 11.2 Rate limits and in-progress retries
- `429 rate.limited`: wait `retry_after_s` and retry once by itself; if refused again, show the message
("Too many requests in a short time. Try again in {seconds} s.") where the action was, and disable
that action for `{seconds}` with a countdown in the label ("Try again in 12 s").
- `409 request.in_progress`: retry after 1 s with the same key, up to 10 times, silently.
### 11.3 Idempotency keys
`crypto.randomUUID()` when the click happens; reused for every retry of that click (network retry,
in-progress retry, retry after sign-in). A new click with changed input makes a new key. Never reuse a
key across different bodies (control answers `request.idempotency`).
---
## 12. Every message, by code
The UI shows the server's `message` (left column's sentence is what arrives) and adds the offer. Bold:
hostnames, addresses, paths, match codes. "UI text" rows are written by the UI.
### 12.1 Host form (under the field named)
| Code | Field | Sentence | Offer |
|:--|:--|:--|:--|
| host.hostname.missing | hostname | Enter the address people will type, like wiki.home.example. | focus |
| host.hostname.uppercase | hostname | Use lowercase letters only: {suggestion}. | link "Use {suggestion}" (fills it) |
| host.hostname.characters | hostname | Use only letters a–z, digits, dots and dashes. | focus |
| host.hostname.spaces | hostname | Remove the spaces from the address. | focus |
| host.hostname.wildcard | hostname | Addresses with * are not supported yet. Add each name as its own host. | focus |
| host.hostname.trailing_dot | hostname | Remove the dot at the end. | "Use {suggestion}" |
| host.hostname.empty_label | hostname | There are two dots in a row. Remove one. | focus |
| host.hostname.label_dash | hostname | A part of the address cannot start or end with a dash. | focus |
| host.hostname.label_long | hostname | Each part between dots can be at most 63 characters. | focus |
| host.hostname.too_long | hostname | The address can be at most 253 characters. | focus |
| host.hostname.numeric | hostname | That looks like an IP address. Use a name, like wiki.home.example. | focus |
| host.hostname.taken | hostname | {hostname} is already a host. | link "Open {hostname}" (edit panel) |
| host.hostname.mismatch | hostname | The address in the form ({hostname}) is not the host you are editing ({path_hostname}). | "Use the new version" (reload) |
| host.file_name | hostname | The address does not match the file it is stored in. | Show details |
| host.upstreams.missing | upstreams | Enter where Ianitor should send traffic, like http://10.0.0.23:3000. | focus |
| host.upstream.not_url | upstreams[i] | Write it as a full address, like http://10.0.0.23:3000. | focus |
| host.upstream.scheme | upstreams[i] | Start the address with http:// or https://. | focus |
| host.upstream.no_host | upstreams[i] | Add the server's name or IP address after http://. | focus |
| host.upstream.host_name | upstreams[i] | The server name is not usable. Use letters a–z, digits, dots and dashes, or an IP address. | focus |
| host.upstream.no_port | upstreams[i] | Add the port at the end, like :3000. | focus |
| host.upstream.port_zero | upstreams[i] | Port 0 cannot be used. Enter the port the service listens on. | focus |
| host.upstream.path | upstreams[i] | Leave out the path after the port. Visitors keep their own path. | "Use {suggestion}" |
| host.upstream.query, host.upstream.fragment | upstreams[i] | Leave out everything after ? or #. | "Use {suggestion}" |
| host.upstream.credentials | upstreams[i] | Leave out the user name and password. Put them in a header rule with a secret instead. | link "Open header rules" (More options, request rules) |
| host.upstream.duplicate | upstreams[i] | This address is listed twice. | link "Remove it" |
| host.upstream.mixed_schemes | upstreams | All addresses for one host must start the same way: all http:// or all https://. | focus |
| host.upstream.too_many | upstreams | One host can send traffic to at most {max} addresses. | — |
| host.auth.not_configured | auth | Sign-in is not set up on this server yet, so choose Anyone for now. To set it up, add the Authelia address to ianitor.toml in the routes repository. | prevented up front (§6.1) |
| host.header.name | {list}[i].name | "{name}" cannot be a header name. Use letters, digits and dashes. | focus |
| host.header.value | {list}[i].value | This value has characters a header cannot carry. Use visible characters and spaces only. | focus |
| host.header.empty | {list}[i].value | Enter a value, or choose Remove to drop the header. | link "Switch to Remove" |
| host.header.protected | {list}[i].name | Ianitor sets {name} itself, so a rule cannot change it. | — |
| host.header.duplicate | {list}[i].name | {name} already has a rule in this list. | link "Go to that rule" |
| host.header.both | {list}[i] | Choose a fixed value or a secret, not both. | — |
| host.header.remove_value | {list}[i] | Remove needs only the header name. | link "Clear the value" |
| host.header.secret_unknown | {list}[i].secret | There is no secret named {secret}. Secrets are listed in ianitor.toml and loaded from the server's credentials. | the picker shows `site.secrets` |
| host.header.secret_response | response_headers[i] | Secrets can only be sent to your service, never back to visitors. | link "Move to rules sent to your service" |
| host.health.path | health_check.path | Start with / and use plain characters, like /health. | focus |
| host.health.interval | health_check.interval_secs | Check every 1 to 3600 seconds. | focus |
| host.field.unknown | {field} | Ianitor does not know the setting "{field}". | (API clients only) |
| host.field.invalid, file.field.invalid | — | One of the settings has a value Ianitor cannot use. Show details to see which. | Show details |
| file.field.missing | — | The setting "{field}" is missing. | Show details |
| change.conflict | — (panel notice) | {hostname} was changed at {time} ("{summary}") after you opened it. Your edits are still here. Check them, then Apply again. | "Keep my edits", "Use the new version" (§6.3) |
| change.unchanged | — (under the footer) | This is the same as what is live now, so nothing changed. | — |
| host.not_found | — (panel notice) | {hostname} is no longer a host. | "Back to hosts" |
| host.share.no_signin | — (warning) | Anyone can already open {hostname}, so a share link changes nothing. | — |
### 12.2 Apply, undo, restore, repository
| Code | Where | Sentence | Offer |
|:--|:--|:--|:--|
| apply.queued | progress, bar | Waiting for "{summary}" to finish, about {seconds} s. | Cancel |
| apply.kept | outcome | {hostname} is live. Health checks passed for {seconds} s. | Undo |
| apply.kept.no_watch | outcome | {hostname} is live. It has no health check, so Ianitor only checked that it answers. | Add a health check |
| apply.kept.removed | outcome | {hostname} is removed. | Undo |
| apply.kept.no_edge | outcome (dev only) | Saved. No proxy is attached (development mode), so nothing was checked. | Undo |
| apply.reverted.refused | reverted banner | {hostname} was not {verb}. {upstream} refused the connection on {count} of {of} checks. Ianitor undid the change; every other host kept running. | Edit and try again |
| apply.reverted.timeout | reverted banner | {hostname} was not {verb}. {upstream} did not answer within 5 seconds on {count} of {of} checks. Ianitor undid the change. | Edit and try again |
| apply.reverted.not_found | reverted banner | {hostname} was not {verb}. {upstream} says {path} does not exist. Check the health check address. Ianitor undid the change. | Edit health check |
| apply.reverted.server_error | reverted banner | {hostname} was not {verb}. {upstream} answered with an error page on {count} of {of} checks. Ianitor undid the change. | Edit and try again |
| apply.reverted.redirect | reverted banner | {hostname} was not {verb}. {upstream} sent visitors elsewhere instead of answering {path}. Use an address that answers directly, like /health. | Edit health check |
| apply.reverted.sign_in | reverted banner | {hostname} was not {verb}. {upstream} asked for a sign-in on {path}. Use an address that answers without signing in. | Edit health check |
| apply.reverted.name | reverted banner | {hostname} was not {verb}. The name {upstream_host} could not be found on this network. | Edit and try again |
| apply.reverted.tls | reverted banner | {hostname} was not {verb}. {upstream} uses https://, but its certificate could not be checked. | Edit and try again |
| apply.reverted.no_answer | reverted banner | {hostname} was not {verb}. No health check finished within {seconds} s. Ianitor undid the change. | Edit and try again |
| apply.reverted.edge_lost | reverted banner | The proxy restarted during the check, so it went back to the last good settings. Ianitor undid the change to match. | Try again |
| apply.interrupted | reverted banner | Ianitor restarted during the check, so it undid the change to be safe. | Try again |
| apply.interrupted.queued | not-applied banner | Ianitor restarted before this change ran, so nothing changed. Try again. | Try again |
| apply.cancelled | toast | Cancelled before it started. Nothing changed. | — |
| apply.failed.reload | not-applied banner | {engine} did not take the new settings, so nothing changed. Every host kept running. | Show details |
| apply.failed.build | not-applied banner | Ianitor could not build the settings for this change, so nothing changed. | Show details |
| apply.failed.validation | not-applied banner | This change no longer fits with the routes: {first_error}. Nothing changed. | Edit and try again |
| apply.failed.edge_unreachable | not-applied banner | Ianitor cannot reach the proxy right now, so nothing changed. Traffic is not affected. | Show details |
| apply.needs_attention | paused banner | The change failed its check, and Ianitor could not undo it by itself. Visitors are served the last good settings, but the routes repository still has the change. | Restore the last kept version |
| control.files_unwritten | paused banner | The change is live, but Ianitor could not save the proxy settings to disk. Changes are paused until Ianitor restarts and saves them. | Restore the last kept version, Show details |
| control.paused | any write refused | Changes are paused: {reason} Traffic keeps flowing. | per reason (§7.6) |
| push.failed.unreachable | bar line 2 | Kept, but not yet saved to {remote}: {remote} did not answer. Ianitor tries again at {time}. | Try now |
| push.failed.rejected | bar line 2 | Kept, but {remote} has changes Ianitor does not have, so nothing was sent. Nothing is lost on this server. | Show details |
| push.failed.auth | bar line 2 | Kept, but {remote} refused Ianitor's access key. Check the key in Custos. | Try now |
| repo.no_remote | footer, Settings | No place to push to is set up. | — |
| undo.nothing | bar | Nothing to undo yet. | — |
| undo.watching | under Undo | Wait for the check to finish ({seconds} s). | — |
| undo.paused | under Undo | Changes are paused, so Undo is not available. {paused reason} | — |
| undo.target_moved | bar line 2 | The last change is now "{summary}", so Undo did nothing. Look again and choose. | (bar refreshes) |
| restore.same | history detail | This version is the same as the current one. Nothing to restore. | Close |
| restore.not_kept | history detail | This change was undone at the time, so there is nothing to go back to. | Edit and try again |
| change.not_found | history detail | There is no change with that id. | "Back to history" |
| repo.unreadable | paused banner | {file} in the routes repository cannot be read. Changes are paused until it is fixed. | Show details |
| repo.unexpected_file | paused banner | {file} does not belong in the routes repository. | Show details |
| repo.duplicate_file | paused banner | UI text: "Two files in the routes repository describe {hostname}. Remove one, then Ianitor picks it up." | Show details |
| file.syntax | paused banner | UI text: "{file} in the routes repository has a typing mistake{ at line {line}}. Changes are paused until it is fixed." | Show details |
| file.too_large | paused banner | UI text: "{file} in the routes repository is too large to read. Changes are paused until it is fixed." | Show details |
| site.field.unknown | paused banner | UI text: "ianitor.toml has a setting Ianitor does not know: "{field}"." | Show details |
| site.forward_auth | paused banner | UI text: "The sign-in settings in ianitor.toml cannot be used. Show details to see why." | Show details |
| site.forward_auth.header | paused banner | UI text: "ianitor.toml asks sign-in to pass on "{name}", which cannot be a header name." | Show details |
| site.secret.name | paused banner | UI text: ""{name}" cannot be a secret name in ianitor.toml. Use letters, digits, dashes and underscores." | Show details |
| site.acme | paused banner | UI text: "The Let's Encrypt settings in ianitor.toml cannot be used. Show details to see why." | Show details |
| health.unavailable | notice banner | Ianitor cannot read health from {engine} right now. Traffic is not affected. | — |
| internal | where the action was | Something went wrong inside Ianitor control. Show details for more. | Show details |
The server has no sentence yet for the eight "UI text" codes and answers "Something went wrong." for
them; the UI must switch on the code. See Q12 (add them to messages.rs so curl users get them too).
Health row and certificate lines: §5.1.
### 12.3 Share links
| Code | Where | Sentence | Offer |
|:--|:--|:--|:--|
| share.disabled | share dialog | Share links are off for {hostname}. Turning them on is a change to the host, checked like any other. | Turn on share links and copy link |
| share.prefix | prefix field | Start with /, like /share/summer-2026. / shares the whole site. | focus |
| share.expiry | expiry | Choose between 1 hour and 90 days. | — |
| share.password_short | password field | Use at least 8 characters. | focus |
| share.password_long | password field | Use at most 128 characters. | focus |
| share.stopped | toast | Stopped. The link stops working within a few seconds. | — |
| share.stopped_all | toast | All share links are stopped. New ones work as usual. | — |
| share.unavailable | share dialog body, menu reason | Share links are not set up on this server: the share-link key is missing from the credentials. | — |
| share.too_many | share dialog notice | There are 2,000 active share links already. Stop some, or stop all, then try again. | "Open share links" |
| share.not_found | share links list | There is no share link with that id. | (list refreshes) |
| share.replaces | share dialog | The link to replace is not a link for {hostname}. | (re-mint without `replaces`) |
| share.engine_caddy | share dialog, settings | UI text: "Caddy is serving right now, so share links do not work: visitors with this link get the normal sign-in. The link works after switching back to Pingora, until it expires." | — |
Visitor pages (served by edge, not this app): ui-api §4, unchanged.
### 12.4 API tokens, limits, requests
| Code | Where | Sentence | Offer |
|:--|:--|:--|:--|
| token.missing, token.unknown, token.expired, token.revoked | API clients; in the UI only if the UI itself uses a token (Q2) | This request needs an API token. Make one in Settings, API. / This API token is not one Ianitor issued, or it was copied incompletely. / This API token expired on {date}. Make a new one in Settings, API, then revoke this one. / This API token was revoked on {date}. | treat like signed out (§10) |
| token.created | token dialog | UI text: "Copied. Paste it into Custos now. Ianitor cannot show it again." | Copy again, I have saved it |
| token.revoke_done | toast | UI text: "Revoked. Anything using "{name}" stops working now." | — |
| token.name | Name field | Use 1 to 64 letters, digits, spaces, dots, dashes or underscores. | focus |
| token.expiry | API tab | Choose between 1 and 3650 days, or never. | — |
| token.not_found | API list | There is no API token with that id. | (list refreshes) |
| rate.limited | where the action was | Too many requests in a short time. Try again in {seconds} s. | auto-retry once (§11.2) |
| request.in_progress | (silent) | The first request with this Idempotency-Key is still being handled. Try again in a moment. | auto-retry |
| request.csrf, request.host, request.body, request.body_unknown_field, request.too_large, request.not_found, request.method, request.idempotency, request.base_rev | where the action was | UI text: "Ianitor refused this request from the page. Reload the page and try again." (these are bugs in the UI or a stale page, not user mistakes) | "Reload", Show details |
### 12.5 UI-only
| Code | Sentence | Offer |
|:--|:--|:--|
| ui.signed_out | Your sign-in has ended. Sign in again; this page keeps what you typed. | Sign in, I have signed in |
| ui.lost_contact | Ianitor's control service is not answering. Traffic keeps flowing; changes wait until it is back. | Try again now |
| ui.offline | This device is offline. Ianitor keeps running. | — |
| ui.back_in_contact | Back in contact. (announced only) | — |
| ui.clipboard_refused | Your browser did not allow copying. Press Ctrl+C to copy the selected link. | (text selected) |
| ui.load_failed | This page could not load. Ianitor's control service may be restarting. | Try again now |
### 12.6 PKI and engine [proposed codes]
ui-api §3.6 sentences, plus the ones this design adds (marked new). All in §13 and §9.
| Code | Sentence | Offer |
|:--|:--|:--|
| pki.waiting | Open Custos on your phone. Approve only if it shows the same code: {code}. | Cancel request |
| pki.denied | The request was turned down in Custos. Nothing was issued. | Try again |
| pki.expired | Nobody approved it within 10 minutes, so the request closed. Nothing was issued. | Try again |
| pki.custos_unreachable | Custos is not answering, so the request could not be sent. | Try again; device: "Approve on the server instead"; intermediate: "Sign it by hand" |
| pki.failed (new) | Custos approved it, but Ianitor could not finish the certificate. Nothing was issued. | Try again, Show details |
| pki.device_name_taken | A device named "{name}" already has a certificate. Use another name, or revoke the old one first. | "Show it" |
| pki.issued | {name} has a certificate. Approved in Custos at {time}. | Show QR code, Download file (.p12) |
| pki.bundle_used | This download was already used. Make a new one from the device's row. | — |
| pki.bundle_expired (new) | This download was open for 10 minutes and has closed. Make a new one from the device's row. | "Make a new download" |
| pki.revoked (new) | {name} can no longer get in. Its certificate is revoked. | — |
| pki.renew_due | The Domi intermediate certificate expires in {days} days, on {date}. | Renew |
| pki.renew_urgent | The Domi intermediate certificate expires in {days} days. After that, Domi certificates stop working. | Renew |
| pki.intermediate_expired | The Domi intermediate certificate expired on {date}. Hosts with a Domi certificate are not trusted until it is renewed. | Renew |
| pki.renewed | Renewed. The Domi intermediate certificate is now valid until {date}. | — |
| pki.manual.not_certificate (new) | This file is not a certificate. Choose the .crt file the signing step made. | focus file |
| pki.manual.wrong_request (new) | This certificate was signed from a different request. Use the request you downloaded here. | focus file |
| pki.manual.not_root (new) | This certificate is not signed by the Domi root. | focus file |
| pki.manual.not_ca (new) | This certificate cannot sign other certificates. Sign it again with the signing settings file. | focus file |
| pki.manual.dates (new) | This certificate is not valid yet, or has already expired. Check the clock on the offline computer. | focus file |
| engine.not_ready (new) | Caddy is not ready: its settings have not been built and compared yet. | — |
| engine.failed (new) | {target} did not start, so {previous} is serving again. Visitors had a short break and nothing else changed. | Show details |
| engine.both_failed (new) | Neither engine is serving. Visitors cannot reach any host. | Show details |
| engine.switched (new) | Now serving with {target}. All {n} hosts answered. | — |
---
## 13. Certificates (Phase 3, [proposed] API from ui-api §1.7, §1.8)
### 13.1 The Certificates view (`/certificates`)
`<h1>` "Certificates". Right of the title: outline "+ Device" (plus icon, label "Device", accessible
name "Add a device certificate") — click 2. (The view's primary is the form's Issue; this view has no
primary until the form opens.)
Card "DOMI INTERMEDIATE" (surface frame, 1px hairline, radius 12px, padding 12px 14px):
state word + "expires 30 Nov 2026" / muted "Root stays offline in Custos". State words: "valid" (healthy,
> 30 days), "renew soon" (degraded, ≤ 30), "renew now" (down, ≤ 7), "expired" (down). Quiet "Renew now"
inside the card whenever no renewal is open (renewal before the banner shows is allowed).
Section label "DEVICES", then rows (1px hairline between, 44px+): kind icon (phone, laptop, app) ·
name (600) · muted "until 2 Mar 2027" · state word only when not valid ("expired", "revoked 5 Nov") ·
More (⋯) menu: "Install on the device" (makes a new one-time download, §13.3), divider, "Revoke"
(danger; asks in the row: "Revoke the certificate of "{name}"? It can no longer get in." with "Cancel"
and danger "Revoke").
Empty: book h3 "No device certificates yet" / "A device certificate lets a phone, computer or Domi app
into hosts that ask for one."
Phone: the same, single column; the form and waiting states are full-screen sheets.
### 13.2 Issue a device certificate
Form (panel on desktop, sheet on phone), book h3 "New device certificate":
- "Device name": text, focused, hint "Shown in this list and inside the certificate."
- "What is it": segmented "Phone or tablet" · "Computer" · "Domi app" (default Phone or tablet).
- Muted: "Valid for {device_lifetime_days} days, until {date}. It lets this device into hosts that ask
for a Domi device certificate." (the board's "[lifetime decided in phase 3]" placeholder; see Q7)
- Footer: "Cancel", primary "Issue" — click 3. `POST /certs/devices {name, kind}` → `202
{request_id, match_code, expires_at}`. `pki.device_name_taken` goes under Device name with "Show it".
**Waiting for approval** (replaces the form body; no click):
- Accent clock + bold "Waiting for approval in Custos".
- "Open Custos on your phone. Approve only if it shows the same code:"
- The match code: Cinzel 2.2rem, tracking 0.16em, accent-strong, grouped in pairs "47 19 83",
`aria-label="Match code 47 19 83"`. Never a link, never copyable (it is compared by eye).
- Muted: "The request stays open for 10 minutes. Nothing is issued until you approve." and a countdown
"9:12 left" (server clock).
- Quiet "Cancel request" (`DELETE /pki-requests/{id}`).
- Poll every 2 s. Announce once: "Waiting for approval in Custos. Code 47 19 83."
Outcomes: denied, expired, custos_unreachable, failed → notice banner with the sentence (§12.6) and
"Try again" (re-sends the same form; a new request and a new code). Approved → issued.
**Issued** (kept banner): "**{name} has a certificate.** Approved in Custos at 14:31." Then two buttons:
outline "Show QR code for the {tablet|phone|computer|app}" (from the kind; phone-or-tablet reads
"Show QR code for the tablet" only when the name says tablet, otherwise "Show QR code") and quiet
"Download file (.p12)". Either is click 4 (accepted). Note: "The file is protected with a one-time
password shown next to the QR code. It is not kept on the server after you close this."
### 13.3 Install (click 4)
`POST /certs/devices/{id}/bundle {format: "qr" | "p12"}` → `{download_url, one_time_password, expires_at}`.
- QR: 240px code on a white tile (dark on light, 16px quiet zone; scanners need it; this is the one
light surface in the UI), `role="img"` `aria-label="QR code for downloading the certificate"`. Beside
it (under it on phone): label "PASSWORD FOR THE FILE", the one-time password in Manrope 700 1.4rem,
tracking 0.08em, grouped in fours, and "Works once, for 10 minutes ({left} left)."
- Instructions under, by kind:
- Phone or tablet: "Scan the code with the device's camera, open the link, and enter the password when
it asks. Then allow the certificate in the device's settings."
- Computer: "Open the downloaded file and enter the password when it asks."
- Domi app: "In the app, choose Import certificate, pick the file, and enter the password."
- Download: the browser downloads `{name}.p12` from `download_url`; the password shows the same way.
- After it is used or expires: "This download was already used. Make a new one from the device's row."
The password is dropped from memory when the view closes.
### 13.4 Approval when Custos cannot answer (device certificates)
If `pki.custos_unreachable` (or Custos has no approval operation yet), the outcome banner adds a link
button "Approve on the server instead". It shows:
- "Run this on the server, then come back. Check that the code is the same: **47 19 83**."
- A copyable command box: `sudo ianitor-control pki approve 47-19-83` (the exact CLI is the PKI
implementer's; see Q5) with a quiet "Copy command".
- The view keeps waiting (polling) and goes on to Issued when the server approves.
### 13.5 The intermediate banner and Renew (main screen)
Banner (§2.8) on Hosts and Certificates, never dismissable while due:
| State | Tone | Bold line | Line 2 | Button |
|:--|:--|:--|:--|:--|
| due (≤ 30 days) | notice | The Domi intermediate certificate expires in {days} days, on {date}. | Renewing sends a request to Custos. Approve it there when the match code is the same on both screens. | outline "Renew" |
| urgent (≤ 7) | down | The Domi intermediate certificate expires in {days} days. After that, Domi certificates stop working. | same | outline "Renew" |
| expired | down | The Domi intermediate certificate expired on {date}. Hosts with a Domi certificate are not trusted until it is renewed. | same | outline "Renew" |
| waiting | notice, accent clock | Approve the renewal in Custos. Approve only if it shows the same code: **47 19 83** (Cinzel, 1.4rem in the banner) | The request stays open for 10 minutes ({left} left). | quiet "Cancel request" |
| denied / expired request / unreachable / failed | as due/urgent | the §12.6 sentence | — | "Try again"; unreachable also "Sign it by hand" |
| renewed | kept, dismissable | Renewed. The Domi intermediate certificate is now valid until {date}. | — | Dismiss |
"Renew" is 1 click: `POST /certs/intermediate/renewal`. The banner turns into the waiting state in place
(same size, focus stays on the banner's heading, which is `tabindex="-1"`).
### 13.6 Signing by hand (when Custos cannot sign)
ROADMAP Phase 3: if Custos has no CSR-signing operation, a temporary manual offline step. Reached from
"Sign it by hand" (banner or the intermediate card); route `/certificates/renew-by-hand`. A page with
three numbered steps, each a frame (1px hairline, radius 18px, padding 20px) headed "Step 1", "Step 2",
"Step 3" in the Domi label style (plain digits; no Roman numerals, to keep Latin to the brand name):
1. **"Download the request"** — "This file asks the Domi root to sign a new intermediate certificate. It
holds no secret." Quiet "Download the request (.csr)" and "Download the signing settings (.ext)".
2. **"Sign it on the offline computer"** — "Copy both files to the offline computer that holds the Domi
root, then run:" and a command box with the filenames filled in, e.g.
`openssl x509 -req -in domi-intermediate-2026-11-07.csr -CA domi-root.crt -CAkey domi-root.key -days 365 -extfile domi-intermediate-2026-11-07.ext -out domi-intermediate-2026-11-07.crt`
with "Copy command". (The real command is owned by the PKI work and the manual signing doc; the UI
shows whatever control returns as `manual.command`.) Muted: "The root key never comes to this server."
3. **"Upload the signed certificate"** — a file field "Signed certificate (.crt)" (`accept=".crt,.pem"`)
or the link "Paste it instead" (textarea). Primary "Use this certificate". Errors under the field:
pki.manual.* (§12.6). Success: kept banner "Renewed. The Domi intermediate certificate is now valid
until {date}." and back to Certificates.
Click count: this path is outside the 1-click budget by nature (it is the fallback); see Q6.
---
## 14. Where this file corrects the boards
Build from this file, not from these drawn details:
1. Main board, media row: "Slow: answers in 2.8 s, limit is 2 s" — there is no latency limit (G2).
Use the degraded sub-lines in §5.1. Phone: "slow, 2.8 s" likewise.
2. Main board chips "Websockets" — show "No websockets" only when off (G19).
3. Restore board, history entry "media.home.example: health limit 2 s" and preview line "health limit
goes back to 5 s" — not real fields; previews come from `fields[]` (§8.1).
4. Restore board line "wiki.home.example is not affected (never kept)" — dropped.
5. Share board token "?share=v1.p7Kq2…" — real tokens start `ish1.`; show whatever the API returns.
6. Share board "This path takes 4 clicks" — replaced by Q1's 3-click button.
7. Engine board "Hosts, certificates and share links stay the same." — wrong while G7 is open; §9.1.
8. Add-host board: "Built the Pingora and Caddy configs" → "Built the Pingora and Caddy settings";
reverted example "6 of 6 health checks" — the watch probes every 5 s, so counts come from the API.
9. Device board "[lifetime decided in phase 3]" — filled from `device_lifetime_days`.
10. Token board: the 4th click (Copy token) stays, as Mark accepted; the board's "Send to Custos" note
is future work, not v1.
11. Sidebar "Signed in through Authelia" — adds the name when known, and a Sign out link (§2.16).
---
## 15. Done checklist for the UI agent
- Every flow in §4 has a Playwright test that counts clicks and asserts the count.
- axe (or equivalent) passes on every screen in both layouts; manual keyboard pass: every action
reachable by Tab, menus and tabs by arrows, Esc closes, focus returns, visible focus everywhere.
- Each status shows a word; the greyscale check (`filter: grayscale(1)` on the page) still reads.
- 200 % zoom and 320 px width: no sideways page scroll, nothing cut off.
- `prefers-reduced-motion`: no transitions.
- Sign-out mid-form, lost contact mid-apply, reload mid-apply: the form or the progress survives.
- No token, share URL or password in storage, URLs or logs (grep the built bundle's storage calls).