Dawnline 0.14.0
Build packages / CI (push) Blocked by required conditions
Build packages / Version (push) Waiting to run
CI / Web (format, types, tests, bundles) (push) Blocked by required conditions
CI / ShellCheck (push) Blocked by required conditions
CI / ucode static checks (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 24.10) (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 25.12) (push) Blocked by required conditions

- A device is renamed where its name stands on its card: a click on the
  name, Return or Space on it, or Rename in the ⋯ menu turns it into a
  field with the name selected. Return saves, and the words shimmer until
  the router answers. Esc or a click elsewhere puts the old name back. The
  rename window is gone, and the page no longer redraws under a name being
  edited
- Device names take up to 20 characters: letters of any language, digits,
  spaces and - _ . The router refuses anything else when a device is added
  or renamed, so a name can't carry symbols into configurations, file
  names or the AmneziaVPN key. The portal and the admin turn a character
  like that away as it is typed: the field shakes, its outline goes red
  and a short line says why. Suggested names (a phone's model, "Phone 2")
  are stripped of such characters and cut to fit. Names set before this
  stay as they are
- LAN Bypass: Add a device, in the portal and in the admin, has a switch
  that keeps the device's own local network (printer, TV, NAS) reachable
  while it is connected. It is off by default and stays as chosen; the
  admin's device drawer shows it. With home and internet access the switch
  says which addresses still lead to the home network
- Health warns when a server's home network is on one of the subnets home
  routers come with (192.168.0.x, 192.168.1.x and others). People with
  home access who connect from a network on the same addresses reach your
  home instead of their own, LAN Bypass or not
- The router tells when a device can't connect properly. After the problem
  lasts three minutes, the portal card and the admin drawer name it:
  can't finish connecting (the network may block it), connected but no
  data (an outdated configuration, and the card offers Reconnect), on two
  devices at once, or a connection that keeps dropping. Activity lists
  these under Problems, one line per device per hour, and says when the
  device connects normally again
- The set-up sheet's connection line follows what the device does:
  waiting, can't finish, connected, or connected but no data. The sheet
  closes by itself only once data comes through. On the device itself and
  for a router, the steps regroup to what fixes the problem: "Set it up
  again" when the handshake never finishes, "Add the connection again"
  ("Import the configuration again" for a router) when no data comes
- Set-up in the portal: a QR code too long for a camera to read gives its
  place to a code that opens the set-up link (a LAN Bypass configuration
  or a long AmneziaVPN key can be that long). A TV, box or NAS added from
  a phone gets the steps for setting up from another device. Back from
  "Open on the device" keeps the kind, LAN Bypass and the name typed. The
  packet-size note under the kinds is gone
- The portal on phones keeps its place: nothing jumps when an access row
  opens or folds, a notice comes or goes, or Safari redraws the cards. A
  reload, or coming back from the VPN app, opens where the page was. Cards
  glide to their new height, and an animation interrupted half-way goes on
  from where it is instead of snapping. A double click no longer closes
  the sheet it just opened
- In the admin, a device's drawer has its own MTU and keep-alive (empty
  means the server's), each with a Change dialog. A change touches only
  that device's configuration and restarts nothing on the router. Opening
  the drawer no longer counts as handing out the configuration: "Update
  config" stays until the new configuration is shown as a QR code,
  downloaded or copied ("Show the new configuration"). New keys set the
  device up again, as the portal's Reconnect does
- "Speed now" on a server's Overview is live: one point a second over the
  last two minutes, all there as soon as the Overview opens. The agent
  keeps those two minutes in memory and writes them out only while someone
  is looking
- Disguise values that AmneziaWG refuses or crashes on are stopped before
  they reach the kernel. That covers overlapping H1-H4, Jmin above Jmax,
  broken I1-I5 tags, padding under 12 with header protection, and more.
  Import and restore refuse them. After a hand edit in uci, the server's
  tunnel stays down and Health and the service log say why and what to do.
  Errors are full sentences in the reader's language
- The header protection key no longer shows in the status that read-only
  users can see: the Server page says only that the key is set, and each
  device's configuration still has it. The server no longer turns off
  WireGuard's protection against handshake floods (devices keep
  DisableCookies). A device can't be added with a server's own key
- An AmneziaWG update whose kernel module can't be swapped (another
  AmneziaWG interface holds the old one) no longer fails. It is installed,
  the tunnels come back on the old module, and Health and Components say
  the update starts after a reboot. On apk firmware, an install that apk
  left at the old version counts as failed. A module installed by hand is
  recorded, so after a firmware upgrade Health can tell that it is gone
- Dawnline reads only its own tunnels, each one separately. Another
  AmneziaWG interface on the router no longer slows the agent's
  once-a-second check, has its keys read or breaks Dawnline's reads. A
  portal request reads only that person's server: one process however many
  servers there are
- Fewer false disconnects: a tunnel that netifd sets up again no longer
  logs everyone as leaving and coming back, and a device with a long
  keep-alive stays online between handshakes. One configuration on two
  devices isn't logged as roaming every few seconds, and new keys end the
  old session at once. A tunnel that is missing devices is synced within a
  minute, and traffic across a tunnel restart is no longer undercounted
- Renaming a server no longer restarts its tunnel. If a tunnel's interface
  is edited outside Dawnline (LuCI, uci), the watchdog sets it up again
  with Dawnline's settings and names only the changed options. The routing
  rules for "Internet like a home device" change one at a time, new ones
  first, so traffic never falls between them. Health and the Server page
  warn when the address's AAAA record isn't this router's, or the router
  has no public IPv6: devices that prefer IPv6 fail to connect
- The README screenshots come in English and Russian; the portal's are
  taken from its demo. The demo has a switch beside × in the set-up sheet
  to show each state of the connection line. In Russian, long labels in
  the admin's wide option buttons wrap under their icon. DESIGN.md
  describes the switch, renaming on the card, the shimmer, the shake and
  how the portal scrolls. New tests cover link states, the meter, access,
  Health, firewall rules, network settings and packages
This commit is contained in:
Aemeath committed 2026-10-22 00:11:50 +03:00
1 parent 58492be021
commit dc0f159447
155 files changed
+11062 -1461

No files matched your search

+246 -113
View File
@@ -375,6 +375,21 @@ components:
backgroundColor: "{colors.field}"
rounded: "{rounded.kind}"
height: 56px
option-row:
backgroundColor: "{colors.field}"
textColor: "{colors.text}"
rounded: "{rounded.field}"
padding: 12px 12px 12px 14px
switch:
backgroundColor: "{colors.knob}"
rounded: "{rounded.full}"
width: 44px
height: 26px
switch-on:
backgroundColor: "{colors.accent}"
rounded: "{rounded.full}"
width: 44px
height: 26px
badge:
backgroundColor: "{colors.field}"
rounded: "{rounded.badge}"
@@ -493,11 +508,11 @@ The measured luminance steps are tiny. In dark, raised vs bg is 1.07:1, field vs
| Token | Dark | Light | Meaning |
|---|---|---|---|
| `--accent` | `#4eafff` | `#2b9dff` | Primary action, "this device", today, links in hints, the selection ring |
| `--accent-ink` | `#ffffff` | `#ffffff` | Text on a filled accent button |
| `--accent` | `#4eafff` | `#2b9dff` | Primary action, "this device", today, links in hints, the selection ring, a field's caret and selection, a switch that is on |
| `--accent-ink` | `#ffffff` | `#ffffff` | Text on a filled accent button, the knob of a switch that is on |
| `--accent-soft` | `blue @ 13%` | `blue @ 12%` | Tinted "Connect", the Demo chip, a primary badge's icon tile |
| `--ok` / `--ok-soft` | `#57d64b` / 14% | `#33a328` / 12% | Connected, included, the way filling green, the arrival ring |
| `--warn` | `#ff8a3d` | `#ee6a12` | Not set up yet, settings changed, outside hours, Reconnect, ends soon |
| `--warn` | `#ff8a3d` | `#ee6a12` | Not set up yet, settings changed, outside hours, Reconnect, ends soon, a link that fails (the card's line; the way's can't finish and no data) |
| `--bad` / `--bad-soft` | `#ff5c5c` / 13% | `#e5484d` / 10% | Out of data, access ended, Remove, errors |
| `--sel-bg` / `--sel-fg` | `rgba(131,209,255,.25)` / `#64c6ff` | `rgba(78,175,255,.22)` / `#0a76cf` | `::selection` |
| `--bar` | `text @ 13%` | `text @ 11%` | Chart bars, meter and ring tracks |
@@ -508,13 +523,17 @@ All tints come from `color-mix`, never from new hex values:
| Recipe | Where |
|---|---|
| `color-mix(in srgb, var(--knob), var(--text) 6%)` | hover of knob, soft button, language pill, pinned keys |
| `color-mix(in srgb, var(--knob), var(--text) 6%)` | hover of knob, soft button, language pill, pinned keys; at rest, the file card's icon and a nested row's soft buttons inside an inset row |
| `… var(--text) 10%` | pressed or open (`aria-expanded`) knob and language pill |
| `… var(--text) 12%` | hover of a nested row's soft buttons inside an inset row (the router's "Configuration" in "Set it up again") |
| `color-mix(in srgb, var(--accent) 82%, transparent)` | hover of the filled accent button |
| `accent 20%` / `24%` over transparent | hover / active of the tinted button |
| `color-mix(in srgb, var(--warn|--bad) 10%, var(--raised))` + `inset 0 0 0 1px tone 22%` | warn / bad notice |
| `warn 14%` → hover `22%` | the Update pill |
| `color-mix(in srgb, var(--raised), var(--knob) 40%)` | hover of an accordion row (inset rows: field + knob 50%) |
| `color-mix(in srgb, var(--raised), var(--knob) 40%)` | hover of an accordion row (inset rows and the option row: field + knob 50%) |
| `color-mix(in srgb, var(--knob) 65%, var(--field))` | the app picker's track, the badges, the file card and a nested inset row inside an inset row (a badge's and that row's hover: `knob`) |
| `color-mix(in srgb, var(--accent) 26%, transparent)` | a field's selection wash |
| `color-mix(in srgb, var(--warn) 14%, transparent)` | the way's router end when the device can't finish (accent 14% while waiting) |
| `color-mix(in srgb, var(--accent) 32%, transparent)` inset 1px | ring of the card of "this device" |
| `color-mix(in srgb, var(--text) 16%, transparent)` inset 1.5px | focused field |
| `color-mix(in srgb, var(--accent) 65%, transparent)` 2px outline, offset 2px | `:focus-visible` everywhere |
@@ -532,7 +551,7 @@ Glass icons (`ui/glass.ts`) draw a tinted back shape, the same shape blurred beh
| Tone | Dark a → b | Light a → b | Used for |
|---|---|---|---|
| `t-grey` | `#cfcfcd` → `#5a5a59` | `#a9a9a7` → `#3d3d3c` | Device cards (default), access rows, Add |
| `t-blue` | `#a6d9ff` → `#1d84e6` | `#7cc4ff` → `#0a6fd6` | This device, first device, kinds, reach tiles that are on, lock |
| `t-blue` | `#a6d9ff` → `#1d84e6` | `#7cc4ff` → `#0a6fd6` | This device, first device, kinds, reach tiles that are on, the LAN Bypass row when on, "Set it up again", lock |
| `t-green` | `#a8f29c` → `#3aa32c` | `#82e070` → `#2e8a22` | "Everything works" (demo) |
| `t-orange` | `#ffc08f` → `#ec6a12` | *same as dark* | Warn notices, Reconnect question |
| `t-red` | `#ffadad` → `#dc3a3a` | `#ff9090` → `#c92a2a` | Bad notices, Remove question |
@@ -576,11 +595,12 @@ These ratios feed the findings in *Live audit*.
| Input | 16 / 24 | 500 | −0.012em | Name fields (16 px stops iOS zoom) |
| Step title | 16 / 24 | 500 | −0.02em | "1 Get AmneziaVPN" |
| Row title | 15 / 22 | 500 | −0.02em | Accordion heads, notice title, month total |
| Option title | 15 / 22 | 500 | −0.015em | "LAN Bypass" in its option row |
| Breadcrumb | 15 / 22 | 400 (current 500) | −0.15px | Server › person |
| Question text | 15 / 21 | 400 | — | Remove / Reconnect body |
| Desc / sub / value line | 14 / 20 | 400 | — | Row descriptions, sheet subs, head values |
| Menu item, toast | 14 / 20 | 500 | — | ⋯ menu, toast |
| Meta | 13 / 18 | 400 | — | Card status, usage label, hints, "how to" paths, limit note |
| Meta | 13 / 18 | 400 | — | Card status, usage label, hints, "how to" paths, limit note, the option row's line, the way's second line |
| Pill label | 13 | 600 | — | Update pill, Demo chip |
| Small label | 12 / 16 | 500 | — | Kind labels, badge top line, reach tile sub, "Copy…" labels |
| Divider | 12 | 500 | +0.06em | "OR" (the only positive tracking) |
@@ -661,7 +681,16 @@ There is no strict 4/8 grid. The values in use are `2 3 4 5 6 8 10 12 14 16 18 2
| Toasts | 70 |
| Inside the sheet: ×, pinned keys | 3; their tooltip 4 |
`html { scrollbar-gutter: stable }` and `body.locked { overflow: hidden }` keep the page from shifting sideways when a sheet locks the scroll.
### Scroll
Only the person moves the page: on a phone nothing the page does pulls it up or down under them, and a reload finds it where they left it.
- **No scroll anchoring** (`html { overflow-anchor: none }`). On a phone "Your access" shows above the devices but comes after them in the page, so the browser would hold "Your devices" still while an access row opens or folds, and pull a page scrolled less than the fold to the very top. A row grows and folds in place, and a repaint glides what moves.
- **A fold near the foot takes the page down with it** (`holdFoot()` in `page/frame.ts`). Without anchoring, a fold that leaves the page shorter than where it is scrolled would drop it to its new end on the frame the fold is measured. The page body holds the height the scroll needs until the rows' new shape is known, then lets go over 476 ms on EASE_OUT, which never overshoots: the scroll follows the fold down frame by frame and stops at the new foot, not short of it while the row's spring dips.
- **A repaint holds the page's height** (`render()` in `main.ts`). The content keeps its height on screen while it is refilled and lets go once everything in it has its styles. Safari lays the page out once with the new cards still empty (each is a size container) and would pull the scroll up to fit that shorter page; a language change empties it all. A page that really got shorter (a removed card) still shrinks after.
- **A reload keeps its place.** A phone drops a tab while the visitor is in another app (the VPN app, the App Store) and loads it again on return; a pull to refresh does too. The browser restores the scroll as the page loads, before the router has answered, onto one empty screen, so it would stay at the top. The tab keeps the page's place itself (`sessionStorage`, as the tab is hidden or left), and the first paint of a reload or of a step back onto the page goes there. A fresh visit to the link opens at the top. Each link keeps its own place (several people's links opened in one tab share the origin), and only the page drawn in its place writes one: a tab hidden before the router answered, or showing a card in place of the page, keeps the place it had.
- **The sheet's history entry never moves the page** (`scrollRestoration = 'manual'` on that entry only), and it is current only while its sheet is open. Left behind (a reload with a sheet open, a step forward onto it: Safari's swipe in from the right edge), it is stepped back off at once, on load or on that step, so Back from there leaves the page instead of putting it back where it stood when the sheet opened. The page's own entry stays `auto`, so Back and closing a sheet still restore it.
- `html { scrollbar-gutter: stable }` and `body.locked { overflow: hidden }` keep the page from shifting sideways when a sheet locks the scroll.
---
@@ -678,7 +707,7 @@ There is no strict 4/8 grid. The values in use are `2 3 4 5 6 8 10 12 14 16 18 2
- this device: 1 px, accent at 32%;
- notice tone: 1 px, tone at 22%;
- the arrival flash: 1.5 px `--ok`, fading.
- **Inset context.** Inside the sheet, accordion rows use `--field` (`.acc.inset`), one step above the sheet's `--raised`. Segmented controls inside them step up again (`knob 65% + field`).
- **Inset context.** Inside the sheet, accordion rows use `--field` (`.acc.inset`), one step above the sheet's `--raised`. Segmented controls, badges, the file card and a row nested in one step up again (`knob 65% + field`; a badge's and a nested row's hover go to `knob`).
- **Glass icons** are the only "material" effect: a frosted pane over a 1.5 px Gaussian-blurred copy of the tinted back shape, with a rim stroke. Keep it to icons.
---
@@ -695,15 +724,16 @@ There is no strict 4/8 grid. The values in use are `2 3 4 5 6 8 10 12 14 16 18 2
| 22 | Dense QR |
| 20 | Accordion row (open, and the shared ends of closed rows), usage block, ⋯ menu, the way |
| 18 | Badge, QR in a row, file card |
| 16 | Field, segmented track, reach tile, "until" and "hours" blocks; the pinned keys' outer corners |
| 16 | Field, segmented track, reach tile, option row, "until" and "hours" blocks; the pinned keys' outer corners |
| 14 | Kind tile, link row, menu item and highlight, `.conf` block |
| 12 | Go button, segmented pill |
| 11 | Ends of the way |
| 10 | Name chip, badge icon tile, link row knobs |
| 9 | File card icon |
| 6 | Inner corners of the joined pinned keys |
| 2.5–4 | Chart bars (2.5 month, 3 spark, 3 calendar cells), meter and hours bar |
| 999 / 50% | Buttons, pills, chips, toasts, tooltips / knobs, step numbers, reach marks |
| 2.5–4 | Chart bars (2.5 month, 3 spark, 3 calendar cells), meter and hours bar, a field's selection wash (4) |
| 1 | A field's caret and selection handles |
| 999 / 50% | Buttons, pills, chips, toasts, tooltips, the switch / knobs, step numbers, reach marks, the switch's knob, the handles' knobs |
### Shape rules
@@ -711,7 +741,7 @@ There is no strict 4/8 grid. The values in use are `2 3 4 5 6 8 10 12 14 16 18 2
- **Closed accordion rows touch and share rounded ends.** Only the first row's top and the last row's bottom are round. An open row lifts out with 10 px gaps and gets all four corners, and so do its neighbours' facing corners.
- **Joined key pairs** (Download | Copy beside ×): `16 6 6 16` and `6 16 16 6`, with a 2 px gap.
- **Line icons:** 24 viewBox, `stroke-width 1.8`, round caps and joins, `currentColor`. Shown at 14, 16, 18 or 20 px.
- **Glass icons:** 24 viewBox drawn at 22 (rows), 24, 26 (kinds), 28 (reach), 30 (demo rows), 32 (cards), 36 (notices, add), 44 (first), 56 (gone) and 64 (questions).
- **Glass icons:** 24 viewBox drawn at 22 (rows), 24, 26 (kinds), 28 (reach, option row), 30 (demo rows), 32 (cards), 36 (notices, add), 44 (first), 56 (gone) and 64 (questions).
- **QR codes:** round dots (r 0.42, 0.48 when dense), eyes drawn whole as rounded squares (2.6 / 1.8 / 1.5), and the Dawnline mark in a rounded tile at the centre (dense codes have none). Light dots on `#0a0a0a` in dark, dark dots on white in light.
- **The mark:** a sun dome over a horizon bar, one colour, `fill: var(--text)`: white on dark, black on light, never the accent. Clipped above the bar so the sun can rise from behind it.
@@ -751,15 +781,20 @@ Measurements are CSS pixels, read live at 1138 px and 375 px. Source files are u
### Field and go button · `.field`, `.go`
- **Field:** 48 high, radius 16, `field` fill, padding `0 4 0 16`. The input is 16/24 500 and the placeholder `text-3`. Focus: inset 1.5 px ring at text 16%.
- **Go button:** 48 × 40, radius 12, at the field's end. Idle: `knob` / `text-3`, `cursor: not-allowed`. Ready: accent / white. Press `.9`.
- Arrow for create, check for save. The field and its go button are the whole form: no label row, no separate Save.
- **Field:** 48 high, radius 16, `field` fill, padding `0 4 0 16`. The input is 16/24 500 and the placeholder `text-3`. Focus: inset 1.5 px ring at text 16%, on SMOOTH.
- **Go button:** 48 × 40, radius 12, at the field's end. Idle: `knob` / `text-3`, `cursor: not-allowed`. Ready: accent / white, the colours changing on SMOOTH. Press `.9`.
- Arrow for create, check for save. The field and its go button are the whole form: no label row, no separate Save. Add a device's name field is not a login: no password manager offers itself there (`data-1p-ignore`).
- **Caret** (`ui/caret.ts`, on both name fields: Add a device and the name edited on its card): the input's own is hidden (`caret-color: transparent`) and the field draws one as macOS does: accent, 2 × 20, radius 1. It glides to where the next letter goes (see *Motion → Caret and selection*), and a click puts it where clicked at once. It blinks 0.6 s on / 0.6 s off with soft fades, stays solid while typing and blinks again 0.5 s after the last key.
- **Selection** (`pointer: fine` only): the native selection is see-through and the text keeps its colour. Under the text sits an accent 26% wash, 22 high, radius 4, with an iOS handle at each end: a 2 × 22 line with a 9 px knob, on top at the start and under it at the end. A selection grows out of the caret and, on collapse, fades in place before its ends rejoin the caret. It never runs past the input's edges, so a long, scrolled name's wash stops before the go button. On a touch screen the system's own selection and handles show, and the caret steps aside while one does.
- **What a name may hold** (`shared/name-guard.ts`, both name fields, the admin's too): up to 20 letters of any language (with their marks), digits, spaces and `- _ .` (ordinary words reach about as far as the card's status line), as the router takes it; punctuation, symbols and emoji don't. A character outside that, or a 21st, never gets in: it is turned away as it is typed, pasted or dropped, and the field **shakes** at once, with no request to the router, while the red line under it (`ui/bad-line.ts`, the one the router's refusals use) says why in a few words: "Only letters, digits, - _ ." or "Up to 20 characters." (short enough for a card's status line, where a name edited in place says it). It goes with the next change that gets in. Emptying the field doesn't shake; Return or the go button on an empty name does, as does a name the router or the page refuses (one already taken). Names the page makes up (the kind, the phone's model) are in the page's language, stripped of what doesn't fit and cut to the limit ("Galaxy S24+" → "Galaxy S24").
- **Shake** (`shared/shake.ts`): iOS's wrong-passcode shake, a damped swing sideways about four times in 0.52 s (14 px at most, settling by half), linear over its frames. The field's outline goes red with it (a 1.5 px inset ring in `bad`, as the focus ring is drawn), holds 0.7 s and fades back to the ring the field has (focused or not) over 0.8 s on ease-out; another refusal starts it red again. Another one starts from where the field is, never jumping back; only its own animation is touched, so the focus ring's transition goes on. With less motion asked for it doesn't move (the red line or toast still says why).
### Notice · `page/notices.ts`
- **Layout:** radius 24, padding `14 18 14 14`, gap 14, a 36 px glass icon, a 15/22 500 title and a 14/20 `text-2` line that adds to the title and never repeats it.
- **Tones:** `warn` (orange) for paused, outside hours, server off, no server and ends soon. `bad` (red) for out of data and access ended.
- **Placement:** one per page, above the columns, 22 px above them. Paused is not a notice: the whole page becomes the single card.
- **On a repaint** a notice that comes blurs in, one that goes fades where it stood and one that changes morphs in place, while its slot glides to the new height. The page under it moves instead of jumping.
### Section head
@@ -774,8 +809,9 @@ Measurements are CSS pixels, read live at 1138 px and 375 px. Source files are u
- Top row (padding `8 6 6 10`, gap 12): a 32 px glass icon (blue on "this device", else grey), the name (16/22 500, one line), the status (13/18, one line, full wording in `title`), and the ⋯ knob.
- Bottom, one of three:
- **Usage** (`field`, radius 20, padding `12 14 12 16`, min-height 66): "Last 7 days" 13/18 `text-2` over the total 17/24 500 tabular. Spark of 7 bars at the right: 6 px wide, gap 4, ≤ 34 px high, min 3, radius 3, `--bar`, today in accent. Hovering a bar puts that day's name and bytes in place of the label and total instantly, with no morph.
- **Update pill** (instead of the spark) when the settings changed: 32 high, warn 14%, 13 px 600, refresh icon 14.
- **Reconnect** (instead of the week) when the settings changed or no data gets through ("Connected, but no data"): a `tint` block button with the refresh icon. New keys, then the set-up again. Not on a device never set up, a disabled one or a locked page.
- **Connect** when never set up: a `tint` block button with the QR icon. It disappears when the admin locked the person.
- A status is one line, and Reconnect or Connect takes the week's place. The button is lower than the week (48 against 66), so a card alone in its row is lower too; when its bottom changes, the card glides to its new height (see *Motion → Repaint choreography*).
**Order:** "this device" first, then online, then seen, then never set up, then disabled (`byDeviceState`). The grid keeps cards in place across repaints and glides them (FLIP).
@@ -785,9 +821,10 @@ Measurements are CSS pixels, read live at 1138 px and 375 px. Source files are u
|---|---|---|
| Page opened through this device's tunnel | This device | accent (and the card gets the accent ring, the icon turns blue) |
| Disabled by the admin | Disabled | text-2, card at 50% opacity |
| Settings changed and it has connected before | Settings changed | warn (+ Update pill) |
| Settings changed and it has connected before | Settings changed | warn (+ Reconnect) |
| Online while out of data | Connected, no data left | warn |
| Online outside the hours | Connected, outside your hours | warn |
| Its link fails in a named way (the router's watcher held it 3 min) | Can't finish connecting · Connected, but no data · On two devices at once · Connection keeps dropping; why in `title` ("It reaches the router, but the connection never completes. The network may be blocking it.") and, for a screen reader, in hidden text right after the status | warn (+ Reconnect for "Connected, but no data") |
| Online | Connected | ok |
| Never connected | Not set up yet | warn (+ Connect) |
| Otherwise | Last connected 3 h ago (exact time in `title`) | text-2 |
@@ -802,6 +839,14 @@ Measurements are CSS pixels, read live at 1138 px and 375 px. Source files are u
A disabled device has no Rename, Reconnect or Remove. A locked page has no ⋯ at all.
**Rename on the card** (`flows/rename.ts`): the name is where it is changed. A name the person may change (not a disabled device, not a locked page) is a button: under the pointer a faint wash (`raised` + text 6%, radius 8) hugs its words, a click, Return or Space edits it, as **Rename** in the ⋯ menu does. Editing, the name gives way to its own input in the same font and place, with no frame or fill: only the field's caret and selection (the name selected). The status line morphs to "Return to save, Esc to cancel" in `text-2` where there is a keyboard (a touch screen's Done key saves; there it stays as it was).
- **Return** saves: the words shimmer while the router answers (see *Motion → Shimmer*), settle to solid, and the card is drawn again with the new name, the status morphing back from the hint, words and colour.
- **Esc or a click away** puts the name it had back, whatever was typed; the status turns back.
- **What it won't take** never gets in (see *Field → What a name may hold*): the words shake (no red ring here, the field has none) and the status line says why in `bad`, short enough for its one line ("Only letters, digits, - _ ."). An empty name ("Give the device a name.") and one another device of theirs has ("That name is taken.") are said here before asking the router; a refusal of the router's own says the same way, in full on hover. Typing again brings the hint back.
- The page isn't drawn again under a name being edited.
- **Focus.** The input takes focus in the same turn as the click, the key or the menu's item (iOS raises its keyboard only for a focus made inside the tap), with the whole name selected at once and again a frame later if iOS dropped it. Return (the screen's Done key too) and Esc give focus back to the name, the new one after a save, without its focus ring (that shows only when Tab brings focus there); a click or tap away leaves it where it went. Focus leaving for somewhere else in the page (Tab, iPad's hide-keyboard key) lets the edit go like a click away; leaving the window (another app or tab) keeps it.
**Add card:** a `button.dev.add`, min-height 144, centred, grey glass plus 36 and "Add device" in `text-2` 500. Hover raised + knob 45%, press `.98`. Gone when no slot is free or the page is locked.
**First card** (no devices yet):
@@ -816,8 +861,9 @@ A disabled device has no Rename, Reconnect or Remove. A locked page has no ⋯ a
- **Row:** `raised`, padding `0 8`. Head 52 high, gap 10, with a 22 px glass icon, a 15/22 500 title (ellipsis), an optional chip, an optional value at the end (14 px `text-2`) and a 16 px chevron (pointing down, rotated 90°, and up when open).
- **Body:** padding `0 8 16 40` (inset rows `0 8 16 8`), column, gap 12.
- **One row open at a time.** A **still** row (nothing to open) has no chevron, no hover and no click.
- **A row inside a row** (the router's "Configuration" inside "Set it up again") keeps its own state: the open look (chevron, body, `valHide`) keys on the row's own head and body only.
- **`valHide`:** a row whose body shows the same numbers drops its head value while open (blur, fade, slide 8 px right).
- **Inset variant** (inside the sheet): rows on `field`, hover field + knob 50%.
- **Inset variant** (inside the sheet): rows on `field`, hover field + knob 50%. Inside them the app picker and badges step up to knob 65% over field, and a badge's hover goes to `knob`. The router's file step inside one steps up the same way: the file card and an inset row inside the row on knob 65% over field (that row's hover `knob`, the `.conf` it opens on `knob`), the card's icon and that row's soft buttons on knob + text 6% (hover 12%).
### "Your access" rows · `page/access.ts`
@@ -827,7 +873,7 @@ A disabled device has no Rename, Reconnect or Remove. A locked page has no ⋯ a
| **Data this month** (chart glass; "Data used" for a total limit) | A 16 px **ring** (track `--bar`, arc accent, warn ≥ 90%, bad ≥ 100%) and "38.6 GB / 100 GB" or "· no limit"; hidden while open | The **month**: one bar per day (flex, gap 3, 64 high, radius 2.5, min 3; days to come at 45% bar; today accent), an axis 11 px `text-3` with "Today" in accent under its bar (the month's ends hide when it comes close), the total line ("38.6 GB used" / "61.4 GB left", `bad` when out), a 6 px **meter** (same tone thresholds), and a `.desc` about the reset. Hovering a bar puts "X on 13 Oct" in place of the total instantly. |
| **Access until** (calendar glass) | "30 Nov" plus "42 days" in ok, warn when soon, or "ended" in bad | The **until block** (`field`, radius 16, padding `14 16`): the days left as a 36/40 600 number (warn when soon), "days left", "Ends Mon 30 Nov" in `text-3`, and a **calendar** of the weeks to the end. 7 columns of 10 px cells with gap 5 and radius 3: past at text 5%, left at text 16%, today in accent, the last day ringed 1.5 px accent; warn colours when soon. Under it the **hours bar** when set: 8 px track, the allowed window in ok 70%, a 2 × 16 "now" marker (`text`, warn when outside, with a 2 px field ring), and axis 00/06/12/18/24 at 10 px. Without an end date and hours, the row is still. |
The data row is open by default. A repaint keeps whichever row was open.
The data row is open by default. A repaint keeps the rows on the page and changes what they hold in place, the same row open (see *Motion → Repaint choreography*). Only rows of another shape (an end date set or taken away) are built afresh.
### Sheet · `ui/sheet.ts`
@@ -846,18 +892,20 @@ The data row is open by default. A repaint keeps whichever row was open.
- **Pinned keys:** a view's own buttons, pinned at top 22 / right 58.
- **View:** padding `0 24 24`.
- **View head** (`.vhead`): 76 high. Title 20/28 500, centred with a Back knob inside a flow. The head is the drag handle, with `touch-action: none` and a grab cursor.
- **Sub line:** 14/20 `text-2`, pulled up 16 px under the head.
- **Sub line:** 14/20 `text-2`, pulled up 16 px under the head. In the set-up sheet it shows only while waiting (see *Set-up sheet → Around the way*).
**Behaviour:**
- **Views stack.** `go()` pushes and `back()` pops. The sheet glides to each view's height.
- **Closes by:** ×, the scrim, Escape (instant), the phone's back button (the sheet is a history entry), or a pull down on its head. Focus returns to the opener.
- **A double click** that opened it: clicks in the sheet are ignored for 320 ms, so its second half neither closes it nor answers its question.
- **A flow that comes while it closes** (an answer after Cancel) opens once it is gone. Escape while it closes ends it at once, and nothing opens after it.
- **Labels:** `role="dialog"` named by the view title, or `alertdialog` for questions.
**Pinned keys** (`.hpill`, a phone or tablet set up from elsewhere): Download and Copy for the picked app's config, each 38 × 32, joined.
- **Tooltip:** one 26 px pill in toast colours under the keys. It appears after 420 ms of hover, then follows the pointer from key to key at once, and says "Copied" after a copy.
- **On arrival:** when the device connects, × and the keys step away (`.arrived`).
- **Tooltip:** one 26 px pill in toast colours under the keys. It appears after 420 ms of hover, then follows the pointer (or Tab) from key to key at once, gliding from where it stands, and says "Copied" after a copy. Back on a key while it still fades out, it turns back from there.
- **On arrival:** when the device connects, × and the keys step away (`settle()`, `.arrived`). If it leaves that state (no data after all, or gone again) they come back (`settle(false)`).
**Question view** (`.ask`: Reconnect, Remove):
@@ -886,7 +934,7 @@ The data row is open by default. A repaint keeps whichever row was open.
- Bottom centre, `24px + safe-area` from the bottom, one at a time; a new one replaces the shown one.
- 42 high pill, padding `0 18 0 13`, 14 px 500, an 18 px icon (check in ok, alert in bad).
- 2.4 s on screen. Used for every result and every failure ("Renamed", "Device removed", "Address copied", an error message).
- 2.4 s on screen. Used for every result and every failure ("Device removed", "Address copied", an error message).
### App picker · `ui/seg.ts`
@@ -902,6 +950,18 @@ The data row is open by default. A repaint keeps whichever row was open.
- **Icons and labels:** a 26 px blue glass icon, greyscale at 55% opacity until picked. The label sits under the tile at 12/16 500.
- **Picked:** the tile gets an inset 1.5 px accent ring **in place**, without travelling between tiles. Hover → `knob`, press `.94`.
- **Defaults:** the kind and the name are guessed from the browser (iPhone, iPad, a Samsung model through Client Hints, Mac, Windows PC…), deduplicated with " 2", " 3".
- **Back from "Add it from the device"** brings the view back as they left it: the kind, LAN Bypass and a name they typed.
- **Under them:** the LAN Bypass option row, 16 px under the kinds and 12 px above the name field (see *Option row*). No note sits between them any more (the packet-size note is gone).
### Option row and switch · `.swrow`, `.sw` (`flows/add.ts`)
One choice with a switch: Add a device's **LAN Bypass** ("Your local network stays reachable while connected."). Off by default. With home and internet access, switching it on unfolds a third line, "Except 192.168.1.x: those addresses lead to the home network." (the server's home networks, `server.home`; a /24 reads as "x"): height, opacity and blur on SMOOTH from where the line is, so flicking the switch never snaps, and the row, what follows and the sheet ride along. The admin's drawer says the same ("On, except 192.168.1.x (home)"), and Health warns when a home network is one of the common out-of-the-box subnets. After the device is added it stays as chosen: the admin's drawer shows it ("set when it was added"), and neither the portal nor the admin UI changes it.
- **Row:** the whole row is the switch (`button role="switch"`, `aria-checked`). `field` on the raised sheet, radius 16, padding `12 12 12 14`, gap 12.
- **Icon:** the `lan` glass at 28 px, blue. Grey while off (`grayscale(1)` at 55% opacity), on SMOOTH.
- **Words:** the title 15/22 500 −0.015em over a 13/18 `text-2` line, gap 1.
- **Hover:** field + knob 50% over 200 ms. **No press shrink.**
- **Switch:** a 44 × 26 pill on `knob`, accent when on. Its knob is 20 px, 3 px in, `text-2` (on: `accent-ink`), and moves 18 px. Held down, the knob stretches to 27 px toward where it goes (from the left when off, toward the left when on) and finishes the move when let go, as iOS switches do. Track colour, knob travel, width and colour all run on SMOOTH.
### Badge · `flows/setup-parts.ts`
@@ -911,6 +971,7 @@ The data row is open by default. A repaint keeps whichever row was open.
- A 16 px trailing mark: chevron for an action, "open" for a store page in a new tab.
- `.primary` (the one thing to tap in step 2): the icon tile is accent-soft / accent.
- `.badges2`: two side by side (Android's Google Play beside the APK), no trailing mark.
- Inside an inset row (the steps on the device itself folded into "Set it up again"): knob 65% over field, hover `knob`, one step above the row.
### Set-up sheet · `flows/setup-view.ts`
@@ -918,9 +979,9 @@ The layout follows where the page is open:
| Layout | When | Content |
|---|---|---|
| `same` | The page is on the device being set up | "Not on the X right now?" inset accordion (opening it folds the steps away), then **1 Get <app>** (picker + store badge) and **2 Add the connection** (primary badge: a vpn:// link, the share sheet, a key to copy or a file to download, plus a "how to" path) |
| `away` | A phone or tablet set up from elsewhere | Inset accordion: "Open your link on the phone" (QR of the set-up link + link row) / "Already has the app" (picker + the connection as a QR + scan line), open by default; pinned Download / Copy keys |
| `pc-away` | A computer set up from elsewhere | "Open your link on the computer" / "Copy or save the connection" (picker + two small soft buttons) |
| `same` | The page is on the device being set up (another device, a TV or a box, when the page came from its own set-up link) | "Not on the X right now?" inset accordion (opening it folds the steps away), then **1 Get <app>** (picker + store badge) and **2 Add the connection** (primary badge: a vpn:// link, the share sheet, a key to copy or a file to download, plus a "how to" path) |
| `away` | A phone or tablet set up from elsewhere | Inset accordion: "Open your link on the phone" (QR of the set-up link + link row) / "Already has the app" (picker + the connection as a QR + scan line; where the key or the configuration is too long for a code, the set-up link's code and one line saying so instead, in the picked app's words), open by default; pinned Download / Copy keys |
| `pc-away` | A computer set up from elsewhere, or another device (TV, box, NAS) added from a phone | "Open your link on the computer" / "Copy or save the connection" (picker + two small soft buttons) |
| `router` | A router | **1 Get AmneziaWG on the router** (OpenWrt packages badge), **2 Import the configuration** (file card with Download / Share, plus a "Configuration" inset row with Show key / Copy and the `.conf`, keys masked) |
**Steps:** a 24 px round number (knob, 13 px 600), a 16/24 500 title and a body with gap 10. Steps sit 20 px apart.
@@ -929,32 +990,54 @@ The layout follows where the page is open:
**Scan line:** "In WireGuard: + › Create from QR code". Where iOS and Android name a step differently, that word alternates every 3 s, with the or Android mark beside it.
**The way** (waiting for the first connection), on top of every layout:
**The way** (waiting for the first connection), on top of every layout. Its state is read off the device in each poll's answer (`way.ts`, from the router's `setup`); it has no buttons.
- **Block:** `field`, radius 20, padding `12 14`.
- **Block:** `field`, radius 20, padding `12 14`, 18 px above what is under it in every state.
- **Ends:** two 34 px rounded squares (radius 11): the device icon in `knob`, and the server in accent tint.
- **Track:** a dotted line between the ends (1.4 px dots every 9 px, `text-3` at 80%).
- **Waiting:** a light runs along the track and rests a beat.
- **Line under it:** "Waiting for the connection" (14/20 500).
- **On connection:** the track fills green from the device, the line morphs to "<device> connected" in green, and the server end turns green last with a pop.
- **After 10 minutes:** the line reads "No connection yet" with a 13 px hint.
- **Lines under it:** the line (14/20 500) and, in the states that need one, a second line (13/18 `text-2`).
| State | When | The way | Lines |
|---|---|---|---|
| **Waiting** | Nothing heard yet, or gone quiet, offline or removed again | A light runs along the track and rests a beat | "Waiting for the connection" |
| **Can't finish** (`.trying`) | Its knocks reach the router and no handshake follows | The light turns warn, runs almost to the router and falls back (`way-knock`). A 2 × 18 warn break, tilted 18°, flashes at the router (`way-break`). The router's end turns warn 14%. | "Unable to complete the handshake" (warn) / "Your network may be blocking the connection." |
| **Connected** (`.done`) | A handshake newer than the sheet, and data flowing | The track fills green from the device and the server end turns green last with a pop | "<device> connected" (green) |
| **No data** (`.nodata`) | A handshake newer than the sheet, but nothing in except handshakes and keep-alives (an outdated configuration) | The track is green and both ends too (the router's 600 ms after). Two 8 px warn packets, with a soft warn glow, take turns falling through midway (`way-drop`). | "Handshake complete, but no data" (warn) / "This device is using an outdated configuration." |
| **Given up** (`.stopped`) | 10 minutes without connecting | The light goes out | "No connection yet" / "Close this and open it again to keep checking." |
Arrival is data flowing, not the first handshake, so no data shows instead of the sheet closing. Gone back to waiting, the way says nothing more: no second line.
**Around the way** (`follow()` in `flows/wait.ts`):
- **The sub line** ("Two steps, about a minute") says what setting up takes, so it shows only while waiting. In every other state it folds away with its margins and the way sits right under the head, as in a sheet with no sub line. It comes back with waiting.
- **Connected:** × and the pinned keys step away (`settle()`), the sheet scrolls back to the top, everything under the way folds shut with the way's 18 px gap, and the sheet closes onto the page after the reading time.
- **Any other state** undoes that: × and the keys come back (`settle(false)`), and what folded unfolds straight into the new shape.
- **On the device itself** (`same`) and **for a router**, the steps follow the way (`regroup()` in `flows/setup-view.ts`):
- **can't finish:** one closed inset row, "Set it up again" (refresh glass, blue). On the device itself it holds both steps. A router that knocks has AmneziaWG on it already, so its row holds only the file step (no number, no title of its own);
- **no data:** one open inset row, "Add the connection again" ("Import the configuration again" for a router), holding only the connection step (no number, no title of its own);
- "Not on the X right now?" (the device itself only) hides in both: the device is in hand;
- waiting: the steps as built;
- connected: what shows stays as it is while everything under the way folds shut.
Inside the row what sat on field steps up one (*Accordion → Inset variant*). The layouts set up from elsewhere have rows, not steps, and keep them as built. When focus is inside what moves (a badge just used), it stays in the sheet: on that control where it still shows, else on the head of "Set it up again" or the first control of what now holds the steps.
### Code row, QR and link row · `ui/codes.ts`
- **QR:** 148 px (radius 18) beside its words (gap 14). Big: 208 (radius 24). Dense: full width, square, radius 22, words under it.
- **Link row:** 44 high, radius 14, the URL in mono 13 without its scheme (ellipsis, `user-select: all`), then copy and, where the browser has it, share.
- A code that changes **cross-fades in place**: the new one comes in first, so the place is never empty.
- A code that changes **cross-fades in place**: the new one comes in first, so the place is never empty; a code of the other size scales the box to its own.
- A code **too long to scan** (over about 1.6 KB, e.g. an AmneziaVPN key where the browser cannot compress it, or a LAN Bypass configuration with its long list of networks) gives its place to a stand-in: another code and words that say why (they change with the picked app). The row's own words come back with a code that fits.
### File card and configuration
- **File card:** `field`, radius 18, padding 12. A 38 × 46 "file" icon (radius 9, mono 10 600 ".conf"), the filename in mono 13, "For computers and routers" at 12 px, and an accent `sm` block button.
- **File card:** `field`, radius 18, padding 12. A 38 × 46 "file" icon (radius 9, mono 10 600 ".conf"), the filename in mono 13, "For computers and routers" at 12 px, and an accent `sm` block button. Inside an inset row it steps up one (*Accordion → Inset variant*).
- **Configuration:** `pre` 12/18 mono, max-height 16 rem, scrolls.
- colours: section headers in accent, keys in `text`, values in `text-2`;
- **PrivateKey and PresharedKey are masked** (`••••` in `text-3`, letter-spaced 1 px) until "Show key".
- **PrivateKey and PresharedKey are masked** (`••••` in `text-3`, letter-spaced 1 px) until "Show key". The mask and the key share one place and cross-fade; the one at rest is out of sight, so a selection of the `.conf` never takes a hidden key.
### Glass icon catalogue · `ui/glass.ts`
`phone, mobile, tablet, computer, router, other, plus, globe, home, shield, chart, calendar, clock, pause, server, link, key, lock, check, trash, refresh, app (AmneziaVPN mark), file`. An unknown name falls back to `other`.
`phone, mobile, tablet, computer, router, other, plus, globe, home, shield, chart, calendar, clock, pause, server, link, key, lock, check, trash, refresh, app (AmneziaVPN mark), file, lan (three devices joined: the LAN Bypass row)`. An unknown name falls back to `other`.
### Demo-only pieces · `demo/` (not in the router build)
@@ -1000,14 +1083,14 @@ Motion in the portal does three jobs:
- **Causality.** A response grows out of what caused it: a menu from its button, a dialog from its centre, a toast from below.
- **Calm feedback.** The orb shows waiting, the check shows a copy, the green way shows a connection.
It never decorates, never loops without a reason (the only loops are the busy orb, the way's light and the OS alternation), and **never blinks**: nothing is torn down and redrawn in sight.
It never decorates, never loops without a reason (the only loops are the busy orb, the way's light, its knock and falling packets, a focused field's caret and the OS alternation, each tied to a real state), and **never blinks**: nothing is torn down and redrawn in sight. The caret's blink is the system's own beat for a field that has focus, not a redraw.
Six rules hold everywhere:
1. **Springs, not durations.** Layout motion runs on physical springs (stiffness, damping, mass 1), sampled into CSS `linear()`, so CSS transitions and script animations share one curve.
2. **Exits are quick, entrances are soft.** Exits use an ease-in curve and run 120–220 ms. Entrances use ease-out or a spring and run 280–572 ms. In a cross-fade the incoming part waits 60–110 ms so the two overlap in the blur.
3. **Blur is the transition medium.** Things appear and disappear through `filter: blur(2–6px)` with opacity and a small scale (`.86–.96`) or a few px of travel. Large travel is reserved for the drawer (`translateY(100% + 40px)`) and the FLIP of cards.
4. **Interruptible from the present.** Every new animation starts from the computed current state (`getComputedStyle`, a morph's live width, the pill's current edges) and cancels the old one only after the new one is in place.
4. **Interruptible from the present.** Every new animation starts from the computed current state (`getComputedStyle`, a morph's live width, the pill's current edges, a live rect) and cancels the old one only after the new one is in place. Turned back half-way (a double click, a quick second pick), nothing starts over from fixed keyframes, and a fade runs only what is left of its way.
5. **The keyboard never animates.** Escape closes menus and sheets instantly.
6. **Reduced motion keeps fades, drops travel.** See *Reduced motion*.
@@ -1020,10 +1103,11 @@ spring(k, c, m = 1) // closed-form damped harmonic oscillator; under-, critica
publishSprings(root) // --spring-{bouncy,smooth,soft,quick} and --spring-*-dur on <html> for CSS transitions
play(el, frames, o) // el.animate() with the reduced-motion policy
rubber(dist, dim) // (1 − 1 / (dist·0.55/dim + 1))·dim: resistance that grows with the pull
unrubber(d, dim) // rubber() undone: the pull that puts an edge d past it (a sheet taken while it settles back)
dismisses(dy, v, h) // a pulled sheet goes on a flick down (v > 0.4 px/ms) or past h/3; never on a flick back up (v < −0.1)
```
Animations from script go through `play()` (WAAPI). Hover and press states are CSS transitions. Loops and one-shots are CSS keyframes (`orb-converge`, `orb-breathe`, `way-run`, `way-pop`, `cal-in`).
Animations from script go through `play()` (WAAPI). Hover and press states are CSS transitions. Loops and one-shots are CSS keyframes (`orb-converge`, `orb-breathe`, `way-run`, `way-knock`, `way-break`, `way-drop`, `way-dip`, `way-pop`, `caret-blink`, `cal-in`). The field's caret and selection run a per-frame spring of their own, not `spring()` (`ui/caret.ts`, see *Caret and selection*).
### Springs
@@ -1031,10 +1115,10 @@ Computed from `spring()` and confirmed live: the published CSS variables read 57
| Token | k / c | ζ | Settles | Overshoot | 50% at | 90% at | Peak at | Used for |
|---|---|---|---|---|---|---|---|---|
| **BOUNCY** | 300 / 20 | 0.58 | 572 ms | **10.8%** | 78 ms | 133 ms | 222 ms | Toast in, a newly created device card popping in, the way's server icon pop (via CSS var) |
| **BOUNCY** | 300 / 20 | 0.58 | 572 ms | **10.8%** | 78 ms | 133 ms | 222 ms | Toast in, a newly created device card popping in and the way's server icon pop |
| **POP** | 520 / 24 | 0.53 | 544 ms | **14.3%** | 58 ms | 96 ms | 162 ms | ⋯ menu open, check icon after copy, the OS mark turning in |
| **SOFT** | 380 / 28 | 0.72 | 476 ms | 3.9% | 74 ms | 138 ms | 232 ms | Accordion rows and chevron, dialog open (computer) and its scrim |
| **SMOOTH** | 300 / 35 | 1.01 | 524 ms | 0 | 98 ms | 228 ms | — | Widths and heights (morph width, sheet height glide, sheet width), FLIP of cards and letters, picker pill trailing edge, flex-grow, folds, tooltip glide, snap-back after a pull |
| **SMOOTH** | 300 / 35 | 1.01 | 524 ms | 0 | 98 ms | 228 ms | — | Widths and heights (morph width, sheet height glide, sheet width, a card's and the notice's height on a repaint, the QR box's size), FLIP of cards and letters, picker pill trailing edge, flex-grow and the picked name's width, folds, tooltip glide, snap-back after a pull and its dim; the switch, the field's focus ring and the go button's colours (via CSS var) |
| **LEAD** | 520 / 46 | 1.01 | 396 ms | 0 | 74 ms | 173 ms | — | Leading edge of the stretching picker pill |
| **QUICK** | 900 / 60 | 1.00 | 296 ms | 0 | 56 ms | 130 ms | — | ⋯ menu highlight following the pointer |
@@ -1052,23 +1136,25 @@ Computed from `spring()` and confirmed live: the published CSS variables read 57
| ad hoc | `cubic-bezier(0, 0, .58, 1)` | Accordion body fade-in, 300 ms |
| `ease-out` / `ease` keywords | — | Drawer scrim (420 in / 320 out), tooltip hide, arrival ring, hover background colours |
The duration ladder in use is **120 · 140 · 150 · 160 · 180 · 200 · 220 · 240 · 260 · 280 · 300 · 320 · 340 · 360 · 380 · 400 · 420 · 500 · 520 · 700 · 900 · 1800 ms**, plus springs. Below 200 ms means feedback or exit, 200–400 ms means entrance or cross-fade, ≥ 500 ms means travel or a one-time moment.
The duration ladder in use is **100 · 120 · 140 · 150 · 160 · 180 · 200 · 220 · 240 · 260 · 280 · 300 · 320 · 340 · 360 · 380 · 400 · 420 · 500 · 520 · 700 · 900 · 1200 · 1800 · 2200 ms**, plus springs. Below 200 ms means feedback or exit, 200–400 ms means entrance or cross-fade, ≥ 500 ms means travel or a one-time moment.
### Hover and press (CSS transitions)
| Element | Press | Hover | Timing |
|---|---|---|---|
| `.knob` | `scale(.8)` | bg +6% text | 150 ms ease-out (transform), 150 ms (bg) |
| `.btn` | `scale(.95)` | accent 82% / tint 20% (active 24%) / soft +6% | 200 ms ease-out (transform, bg, colour) |
| `.go.ready` | `scale(.9)` | — | 200 ms ease-out |
| `.btn` | `scale(.95)` | accent 82% / tint 20% (active 24%) / soft +6% (in a row nested in an inset row: +12%) | 200 ms ease-out (transform, bg, colour) |
| `.go.ready` | `scale(.9)` | — | 200 ms ease-out (transform); colours SMOOTH 524 |
| `.kind` tile | `scale(.94)` | `knob` | 200 ms (bg, transform), ring 220, icon colour 260 |
| `.badge`, `.dev.add` | `scale(.98)` | `knob` / raised+knob 45% | 200 ms |
| `.namechip` | `scale(.96)` | `knob` | 150 ms |
| `.upd-pill`, `.cr-lang`, `.hp-b`, demo chip / GitHub | `scale(.94)` | +6% / tone 22% | 150 ms |
| Accordion row | — | raised+knob 40% (inset: field+knob 50%) | 150 ms |
| Accordion row | — | raised+knob 40% (inset: field+knob 50%; nested in an inset row: `knob`) | 150 ms |
| `.swrow` (option row) | none | field+knob 50% | 200 ms |
| Switch knob (`.sw`) | held: stretches 20 → 27 px toward where it goes | — | SMOOTH 524 (travel, width, colour) |
| Picker item | — | `text-3` → `text-2` | 200 ms colour |
| Spark / month bar | — | `--bar` → `text-2` (today: accent+text 25%) | 150 / 120 ms |
| Field | — | focus ring inset 1.5 px | 200 ms |
| Field | — | focus ring inset 1.5 px | SMOOTH 524 |
| Language chevron | — | rotates `90° → −90°` while open | 200 ms ease-out |
### Catalogue: every animation, measured live
@@ -1085,24 +1171,29 @@ Notation:
| What | From → to | Timing |
|---|---|---|
| Each block (crumbs, notice, section heads, each card, the limit note, each access row, the gone card), in DOM order | `opacity 0 → its own opacity, y10 → 0, b4 → 0` | 520 / 60 + 40·i, EASE_OUT, fill backwards |
| Each block (crumbs, notice, section heads, each card, the limit note, each access row, the gone card), in the order they stand on screen (top to bottom, then left to right), from the first one on screen | `opacity 0 → its own opacity, y10 → 0, b4 → 0` | 520 / 60 + 40·i, EASE_OUT, fill backwards |
| The sun of the logo | `translateY(7px) → 0`, clipped above the horizon bar: the sun rises | 900 / 150, EASE_OUT |
A disabled card rises to its own 50%, not to 1. Live at 375 px, the wave ran from `crumbs @60` through `devices head @100`, the cards @140–260, `access head @300` and the access rows @340–420. See *Live audit #2*.
A disabled card rises to its own 50%, not to 1. On a phone the wave runs from the crumbs through "Your access" and its rows down to "Your devices" and the cards. The first block on screen always rises at 60 ms: a reload that goes back deep into the page starts the wave there, and the blocks above it rise with it.
#### 2. Repaint choreography (the page after a change)
| What | Motion | Timing |
|---|---|---|
| Cards that stay but moved (FLIP) | `translate(Δx, Δy) → 0` (live: ±315 px sideways, (−315, 154) diagonally) | SMOOTH 524 |
| Cards that stay but moved (FLIP) | `translate(Δx, Δy) → 0` (live: ±315 px sideways, (−315, 154) diagonally), measured before the notice and, on a phone, "Your access" above them change | SMOOTH 524 |
| A card whose height changes (Connect ↔ its week, a row that no longer stretches it) | `height` old → new, what it holds clipped on the way; a bottom of another kind crosses: the old one fades where it stood (`out, b4`, 180 EASE_IN) as the new one blurs in (280 / 60, EASE_OUT) | SMOOTH 524 |
| A device just created (`pop`) | `in, s.9 → 1, b6 → 0` | BOUNCY 572 |
| A card that newly shows (Add card after a removal, the first card) | `in (to own opacity), s.9, b6` | SMOOTH 524 / 60 |
| A device that just connected (`flash`) | `inset 1.5px var(--ok) → transparent` | 1800, ease-out |
| Changed texts on cards and access rows (`data-t` keys) | letter morph (see 3) | — |
| A card no longer there (Add card once the last slot is taken) | fades where it stood, `out, b4` | 180, EASE_IN |
| A device that just connected (`flash`) | `inset 1.5px var(--ok) →` the card's own ring (this device's accent ring, else none); a repaint while it fades carries it on | 1800, ease-out |
| Changed texts on cards and access rows (`data-t` keys) | letter morph (see 3); a status that takes another colour: the old letters keep the old one, the new turn from it | colour 280, EASE_OUT |
| The count "3 of 4 → 4 of 4" | letter morph | — |
| Limit note appears | `in, y6 → 0, b4 → 0` | 420, EASE_OUT |
| Limit note leaves (a slot freed) | `out, b4`, then `hidden` | 200, EASE_IN |
| Limit note leaves (a slot freed) | `out, b4` from where it stands while its space folds (`height, margin-top → 0`), then `hidden`; with less motion it fades, then goes with its space | 200, EASE_IN; the fold SMOOTH 524 |
| Limit note that stays | glides with the cards when one came in above it | SMOOTH 524 |
| A removed card leaves (before the repaint) | `out, s.9, b6` | 220, EASE_IN, then the repaint glides the rest |
| The notice | comes: blurs in (280 / 60, EASE_OUT); goes: fades where it stood (`out, b4`, 180 EASE_IN); changes: morphs in place (see 3). Its slot glides to the new height and clips it on the way. | SMOOTH 524 |
| "Your access" rows | stay on the page: keyed values morph (one already turning into the same words goes on), a head swaps only what changed, and an open body refills in place (`morphInto`: a value that crosses fades with its old words, the new one blurs in) while its row glides to its new height (a row still opening or folding heads for it instead). The calendar's days don't come in again; a body whose days are still coming in changes once they are in. | SMOOTH 524 |
#### 3. Text morph · `ui/morph.ts`
@@ -1119,15 +1210,17 @@ Every text that changes in place while visible morphs. Hover readouts over chart
**Whole mode** (`whole: true`, for words in a flowing sentence, app names, menu paths): old words `out, b4` 180 ms EASE_IN, new words `in, b4 → 0` 280 / 60 EASE_OUT.
**Colour** (`morphChanged` after a repaint): a text that takes another colour with its words (a status turning green) keeps the old colour on the words that leave, and the new words turn from it (280 ms EASE_OUT).
**`morphInto(box, kids)`** refills a whole box without a blink:
- unchanged pieces stay still;
- a piece with new words morphs where it stands (whole mode, up to 40 characters);
- a changed drawing blurs in (280 / 60);
- a piece that changed kind or height crosses: the old one is pinned where it stood and fades `b4` over 180 ms while the new one blurs in;
- a keyed text (`data-t`) with new words is left to `morphChanged`, which letter-morphs it;
- a piece that changed kind, height or drawing crosses: the old one is pinned where it stood and fades `b4` over 180 ms, from how it showed, while the new one blurs in (280 / 60); what came in whole is not morphed again (`morphChanged` skips it);
- pieces that only moved glide on SMOOTH.
**Interrupting:** a morph under way ends where it was going (`finish`), and the width carries on from its on-screen width. No morph runs for reduced motion or for an element that is not on screen.
**Interrupting:** a morph under way is not cut short. The next one starts from what shows: the words that were coming in leave from as far as they came (a letter both texts keep slides on from where it is), the words still leaving go on leaving, and the width carries on from its on-screen width. Asked again for what it is already turning into, the morph just goes on. A `morphInto` refilled again half-way does the same: what was fading goes on fading where it is, and what was still coming in goes on from as far as it came. No morph runs for reduced motion or for an element that is not on screen.
Live examples:
@@ -1143,13 +1236,15 @@ Live examples:
| What | Motion | Timing |
|---|---|---|
| Every row whose shape changes | `height, margin-top/bottom, four radii` from the measured "before" to the "after" | SOFT 476 |
| Body of the opening row | `opacity 0 → 1, b2 → 0` | 300, `cubic-bezier(0,0,.58,1)` |
| Body of the closing row | `opacity 1 → 0, b2`, kept displayed (`.closing`) until the row finishes | 160, EASE_IN |
| Body of the opening row | from where it stands (`opacity 0, b2` when shut) → `1, b0` | 300 × what is left of the way, `cubic-bezier(0,0,.58,1)` |
| Body of the closing row | from where it stands → `opacity 0, b2`, kept displayed (`.closing`) until the row finishes, also when another row is clicked meanwhile | 160 × what is left, EASE_IN |
| Chevron | `rotate(90°) → rotate(−90°)` | SOFT 476 (CSS var) |
| Head value (`valHide`) | `out, b4, translateX(8px)` | 200 (opacity, blur), 260 (transform), EASE_OUT |
| Calendar cells when "Access until" opens | `cal-in`: `opacity 0, scale .4 → 1` | 360 / 7·i ms (49 cells ≈ 700 ms total), EASE_OUT |
| Calendar cells when "Access until" opens | `cal-in`: `opacity 0, scale .4 → 1`; `.opened` stays until the row has shut, so a row opened again before then carries on its cascade | 360 / 7·i ms (49 cells ≈ 700 ms total), EASE_OUT |
On open the neighbours' facing corners round at the same time, so the open row lifts out of the stack rather than splitting it. Inside the sheet the accordion plans the sheet's width first, so a dense code that comes into view gets its width on the same frame.
On open the neighbours' facing corners round at the same time, so the open row lifts out of the stack rather than splitting it. Inside the sheet the accordion plans the sheet's width first, so a dense code that comes into view gets its width on the same frame. On the page a fold near the foot takes the page down with it (see *Layout → Scroll*).
A click mid-way (a double click) turns every row and body back from where it stands. When content changes under a height glide that is still heading for an old end (a row inside a row, a pick while its row opens, a fold inside a row), that glide is re-aimed from where it stands to the new end on its own curve (`regrow()` in `ui/accordion.ts`). The sheet needs none of this: its height follows its view (see *5. Sheet → Content glide*).
#### 5. Sheet
@@ -1159,7 +1254,7 @@ On open the neighbours' facing corners round at the same time, so the open row l
|---|---|---|---|
| Computer (≥ 760) open | sheet | `in, s.9 → 1, b4 → 0` from its centre | SOFT 476 |
| | scrim | `in` | SOFT 476 |
| Computer close | sheet | `out, s.96, b3` into its centre | 120, EASE_IN |
| Computer close | sheet | from its present fade, blur and scale: `out, s.96, b3` into its centre | 120, EASE_IN |
| | scrim | `out` | 120, EASE_IN |
| Phone open | sheet | `translateY(calc(100% + 40px)) → 0` | 500, DRAWER |
| | scrim | `in` | 420, ease-out |
@@ -1171,25 +1266,26 @@ On open the neighbours' facing corners round at the same time, so the open row l
| Element | Motion | Timing |
|---|---|---|
| Old view (pinned absolutely, inert) | `out, s.96, b2` | 200, `cubic-bezier(.2,0,0,1)` |
| Old view (pinned absolutely where it stands, inert; one already leaving keeps its fade) | from how it shows (one still coming in, from as far as it came) → `out, s.96, b2` | 200 × its opacity, `cubic-bezier(.2,0,0,1)` |
| New view | `in, s.96 → 1, b4 → 0` | 280 / 110, same curve |
| Viewport height | old → new (live: 297 → 830, 430 → 638) | 360, `cubic-bezier(.25,1,.5,1)` |
| Viewport height | old → new, following the view (live: 297 → 830, 430 → 638) | 360, `cubic-bezier(.25,1,.5,1)` |
| Sheet width | 400 → 448 for a dense key | SMOOTH 524 |
| Pinned keys | old out `s.9, b3` 180; new in `s.9 → 1, b3 → 0` | 260 / 110 |
| Clicks on the new view | ignored for 320 ms, so a tap meant for the old button doesn't press the new one | — |
**Content glide** (`glide()`, a pick that changes a view):
- the viewport height glides on SMOOTH;
- every element that moved inside glides from its old place (outermost only) on SMOOTH;
- the viewport height glides on SMOOTH, as a gap (or overhang) under the view that closes, so whatever changes inside meanwhile (a row opening, a fold, a poll) carries the sheet's edge along;
- every element that moved inside glides from its old place (outermost only) on SMOOTH, added to a glide still under way, so a quick second pick takes it on from where it is;
- blocks named as changed blur in (280, EASE_OUT).
**Pull to close** (phone, by the head):
- downward drag follows the finger 1:1, and the scrim fades by `1 − dy/420`;
- taken while it still rises or settles back, it is caught where it stands, the dim with it;
- upward drag resists by `rubber()`;
- release closes on a flick (> 0.4 px/ms) or past a third of the height. Live, a 250 px pull closed from scrim .40, and a fast 50 px flick closed from scrim .88.
- otherwise the sheet snaps back on SMOOTH.
- otherwise the sheet and its dim go back on SMOOTH (a touch that never moved only lets it settle).
**Arrived** (`.arrived`) and question (`.asks`): × and the pinned keys go `out, b3, scale .9` over 240 ms EASE_OUT and stop taking clicks.
@@ -1198,10 +1294,10 @@ On open the neighbours' facing corners round at the same time, so the open row l
| What | Motion | Timing |
|---|---|---|
| Open | `in, s.9 → 1, b4 → 0`, origin at the button's corner (top right, or bottom right when above) | POP 544 |
| Close | `out, s.96, b3` | 120, EASE_IN |
| Close | from where it stands (one still popping in included) → `out, s.96, b3` | 120, EASE_IN |
| Highlight appears | opacity at the hovered item | 150, EASE_OUT |
| Highlight moves | `translateY` to the next item; colour to its tone | QUICK 296; bg 150 |
| Highlight leaves | opacity 0 when the pointer leaves the menu | 150 |
| Highlight leaves | opacity 0 when the pointer leaves the menu; back on an item while it still shows, it turns back and glides from where it stands | 150 |
QUICK replaced SMOOTH for the highlight because SMOOTH felt late: it reaches 90% at 130 ms against SMOOTH's 228 ms.
@@ -1212,7 +1308,7 @@ QUICK replaced SMOOTH for the highlight because SMOOTH felt late: it reaches 90%
| In | `in, translateY(18px) scale(.9) → 0, b6 → 0` | BOUNCY 572 |
| Dwell | — | 2400 ms |
| Out | `out, translateY(6px) scale(.96), b4` | 180, EASE_IN |
| Replaced by a new toast | `out, s.96, b4`, while the new one comes in over it | 140, EASE_IN |
| Replaced by a new toast | from where it stands (one still rising included) → `out, s.96, b4`, while the new one comes in over it | 140, EASE_IN |
#### 8. Busy orb · `ui/busy.ts`, `controls.css`
@@ -1224,6 +1320,7 @@ The orb is aicss.dev's **Orbs B4 Converge** at its 28 px stage, twice its speed,
| Orb in | `in, s.6 → 1, b5 → 0` | 340 / 70, EASE_OUT |
| Minimum hold | a quick answer waits until the orb is fully in (`BUSY_IN` = 410 ms), so it never flickers | — |
| Answer: orb out / content back | mirror of the above, starting from where each stands | 180 / 340 + 70 |
| Pressed again while the orb leaves | the orb turns back from where it stands, at once | 340, EASE_OUT |
| Orb loop: front dot (7 px) | walks a triangle (top → bottom right → bottom left). It rests 10% at each corner, leaves ease-in (`.55,0,1,.45`), arrives ease-out (`.33,1,.68,1`), and is `scale .72, blur .8` between corners. | 1.8 s, linear keyframe timeline |
| Orb loop: back dot | breathes in the centre: opacity .16 ↔ .32, blur 2.4 ↔ 1.6, scale 1.2 ↔ .98 | 1.8 s, ease-in-out |
@@ -1233,7 +1330,7 @@ The orb starts on the click itself (a 250 ms "only if slow" delay was tried and
The control that copied says so for 1.6 s:
- its icon swaps to a check (POP 544, from `s.6, b3`);
- its icon swaps to a check (POP 544, from `s.6, b3`), and back the same way;
- its "Copy…" label morphs to "Copied" and back;
- a toast says what was copied;
- in the pinned keys, the tooltip glides and rewords to "Copied" (SMOOTH).
@@ -1244,7 +1341,7 @@ On a pick:
- **Edges:** the pill's two edges are driven per frame by `spring.at(t)`. The leading edge (toward the new item) runs on LEAD (396 ms) and the trailing edge on SMOOTH (524 ms), so the pill stretches toward the target and then contracts.
- **Width shares:** items change `flex-grow` 0 ↔ 1 on SMOOTH. Shares of the track, not pixels, so they stay right while the sheet's width changes.
- **Labels:** the old label collapses (`max-width → 0, margin-left −8, out`, 220 ease-out) while the new one blurs in (280 / 70, EASE_OUT), always inside the pill.
- **Labels:** the old label collapses (`max-width → 0, margin-left −8, out`, 220 ease-out) while the new one opens to its width with its item's share (SMOOTH) and blurs in (280 / 70, EASE_OUT), always inside the pill. Picked again half-way, each name goes on from where it stands, one still folding included, over what is left of its way (`labelFade`).
- **What follows:** everything the pick changes `morphInto`s in place (step title, store badge, step 2, the code) and the sheet glides.
#### 11. Kinds picker
@@ -1255,49 +1352,81 @@ The ring does not travel: the old tile's ring fades and the new tile's ring draw
| What | Motion | Timing |
|---|---|---|
| A new QR in the same box | new `in` first (200, EASE_OUT); old laid over it goes `out` (220 / 110, EASE_IN) | the box is never empty |
| A new QR in the same box | new `in` under them all first (200, EASE_OUT); old laid over it goes `out` (220 / 110, EASE_IN); each from where it stands. Nothing changes its place in the stack: a code turned back to fades up again where it lies (200 × what is left), what lies over it goes, and what lies under it goes once it shows whole | the box is never empty |
| A code of the other size (dense ↔ not, e.g. the stand-in link) | the box scales from its size on screen to its own (from its top left, corners kept), the codes with it; the words glide to their new place | SMOOTH 524 |
| The same code for another app (WireGuard ↔ AmneziaWG take one file) | only the words change | — |
| Words beside a code | new `in, b3 → 0` 220 EASE_OUT; old `out, b3` 200 / 90 EASE_IN | — |
| Scan line, another app | app name and each path part morph whole; the OS mark grows or shrinks (`width 0 ↔ 1.05em`, `b3`) | SMOOTH; mark out 220 |
| Words beside a code | new `in, b3 → 0` 220 EASE_OUT; old `out, b3` from where they stand, 200 / 90 EASE_IN | — |
| Scan line, another app | app name and each path part morph whole; the OS mark grows or shrinks (`width 0 ↔ 1.05em`, `b3`) | SMOOTH; mark out 220 × the width it has left, from where it stands |
| Scan line, OS alternation (every 3000 ms while on screen) | the differing word letter-morphs; the old mark `out, scale .5 rotate −40°, b3` (200, EASE_IN); the new one turns in from `scale .5 rotate 40°` | POP 544 / 80 |
#### 13. Waiting for the first connection · `flows/wait.ts`
**While waiting:** the way's light (`way-run`) is a gradient band masked to the dots. It travels from −70% to +70% in the first 72% of a 2 s loop (`cubic-bezier(.45,0,.55,1)`) and rests for the last 28% (≈ 560 ms). Behind it, polls run every 5 s six times, then every 15 s six times, then every 30 s. They skip while the tab is hidden and stop at 10 minutes.
**While waiting:** the way's light (`way-run`) is a gradient band masked to the dots. It travels from −70% to +70% in the first 72% of a 2 s loop (`cubic-bezier(.45,0,.55,1)`) and rests for the last 28% (≈ 560 ms). Behind it, polls run every 5 s six times, then every 15 s six times, then every 30 s. They skip while the tab is hidden and go on until the sheet closes, through the arrival too, so a state that changes again is still seen. They give up at 10 minutes unless the device is connected (the sheet is closing by itself then).
**Arrival timeline**, measured live (t = 0 when the poll sees a fresh handshake):
**Can't finish:** the light turns warn and knocks (`way-knock`, 1.8 s, the same curve): −70% → +34% at 48%, back to +26% at 62% as if turned away, then home to −70%, fading out by 86% and resting to the end. The break at the router flashes on the same beat (`way-break`, 1.8 s): `opacity .25, scaleY .7`, up to `1, 1.15` at 50%, back by 70%. The router's end turns warn over 400 ms. Both loops (the run and the knock) and the break run from the way's first frame; each state fades its own in and the others out over 200 ms (ease-out) where they stand, so none starts over in sight.
**No data:** the green fills the dots as on arrival (700 / 80, EASE_OUT) and the ends turn green (400; the router's 600 later, with no pop). Two packets take turns (`way-drop`, 2.2 s, the same curve, the second 1.1 s behind): each fades in by 8%, runs to 48% of the track at 46%, then drops 16 px past the middle (to 54%), shrinking to `.5` and fading out by 66%. Leaving no data, each packet fades out where it is as it falls on (200, EASE_IN), then goes; back to no data while they fade, a fresh pair sets off.
**Arrival timeline**, measured live (t = 0 when the poll sees data flowing after a fresh handshake; the sub line's fold is read from the code):
| t (ms) | What |
|---|---|
| 0 | The line morphs to "<device> connected" (width glides on SMOOTH, letters lift and rise). Its colour turns green (300 ms). |
| 0 | × and the pinned keys step away (`out, b3, s.9`, 240 ms). The sheet scrolls to the top. |
| 0 → 380 | The sub line folds away, if it still shows (see below). |
| 0 → 200 | The light fades out (200 ms). |
| 80 → 780 | The green fills the dots from the device's end (`clip-path inset(0 100% 0 0) → inset(0)`, 700 / 80 ms, EASE_OUT). The device's end turns green (400 ms). |
| 600 → 1000 | The server's end turns green (400 / 600). Its icon pops (`way-pop`, scale .6 → 1, 420 / 600, on BOUNCY's curve). |
| 480 → 1172 | The server's end turns green (400 / 600). Its icon dips to .6 (`way-dip`, 120 / 480, the way's curve) and springs back (`way-pop`, BOUNCY 572 / 600): it starts and ends at its own size. |
| 410 → 930 | Everything under the way folds shut: height → 0, `out, b4` (520 ms, EASE_OUT), and the way's bottom margin goes 18 → 0. |
| 410 → 2810 | **2.4 s of reading time.** Unchanged with reduced motion: it is not motion. |
| 2810 | The sheet closes (120 ms on a computer, 420 on a phone). |
| ≈ 2950 | The page repaints: the card glides to its new place (SMOOTH), its status morphs to "Connected", and its **green ring fades** over 1.8 s. |
#### 14. Other moments
**Changes of state** (`follow()`), each starting from where things stand on screen, so one turned round half-way never jumps:
| What | Motion | Timing |
|---|---|---|
| Add sheet, error under the field | `in, translateY(−4px) → 0`; a second error morphs its words | 220, EASE_OUT |
| "No connection yet" after 10 min | its line blurs in | 280, EASE_OUT |
| Show key | keys and masks come into focus: `b4, opacity .4 → none` | 320, EASE_OUT |
| Steps fold (same-device layout, the "Not on the X" row) | `height, opacity, blur(0 ↔ 4px)` | SMOOTH 524 |
| The line | letter morph to the new state's words (see 3); its colour 300 ms | — |
| Second line in | `in, b4 → 0`, while the block's height glides open and both lines FLIP to their new centre together | 300 / 60 EASE_OUT; height and FLIP 340 EASE_OUT (the FLIP measured on the glide's first frame) |
| Second line replaced | whole-word morph in place (old `out, b4` 180 EASE_IN, new `in, b4 → 0` 280 / 60 EASE_OUT) as the block glides to the new height | 340 EASE_OUT |
| Second line out | `out, b4` from its current opacity, then the block closes the same way | 180 EASE_OUT, the close from 170 ms, 340 EASE_OUT |
| Sub line folds (every state but waiting) and comes back | `height, margin-top/bottom → 0, out, b4` | 380, EASE_OUT |
| Steps regroup (`same` and `router`: into "Set it up again", "Add the connection again" or "Import the configuration again", and back) | `.setup` height from where it stands to the new one; `opacity .4, b2 → none` | 420, EASE_OUT; 320, EASE_OUT |
| Leaving connected | × and the keys come back (240); what folded unfolds straight into the new shape, the way's 18 px gap with it | 520, EASE_OUT |
| "No connection yet" after 10 min | the line morphs; "Close this and open it again to keep checking." comes in as the second line, or morphs from the one shown; the sub line folds away if it still shows | as above |
#### 14. Caret and selection · `ui/caret.ts`
| What | Motion | Timing |
|---|---|---|
| Caret, typing and the arrows | glides to its place on a per-frame spring of its own: per 16.67 ms frame `v += (target − x)·0.12`, `v ·= 0.62`, `x += v` (90% in ≈ 134 ms, ≈ 2% over, no stretch). At most 2.5 frames per step; after a gap of over 15 frames it is simply there. | one rAF loop |
| Caret, a click | where clicked at once, as macOS does | 0 |
| Caret blink | solid while it moves or they type; 0.5 s after the last key, 0.6 s on / 0.6 s off with soft fades (`caret-blink`); its on/off fade | 1200 ease-in-out loop; 100 linear |
| Selection | grows out of the caret: both edges start where the caret is and ride the caret's spring; the wash and handles fade in. A wash still fading from the last selection turns back instead and glides from its old ends to the new ones. | 140 linear |
| Selection collapses | the wash fades where it stands (no slide), then its ends rejoin the caret | 140 linear, the ends at 160 ms |
#### 15. Other moments
| What | Motion | Timing |
|---|---|---|
| Add sheet, error under the field | in: `in, y−4 → 0, b4 → 0` as the sheet glides open (see 5, *Content glide*); out (they type): `out, y−4, b4` where it stands, then the sheet glides shut; a second error morphs its words; each turns back from where it stands | 220, EASE_OUT; out 180, EASE_IN, the glide from 170 ms |
| Show key / Hide key | the mask and the key cross-fade in place, each from where it stands: in → `none, 1` (320, EASE_OUT); out → `0, b4` (200, EASE_IN), then out of sight. The icon (key ↔ ×) turns the same way, out through `s.6, b3`; the label morphs | 320 / 200 |
| Steps fold (same-device layout, the "Not on the X" row) | `height, opacity, blur(0 ↔ 4px)` from where it stands (a double click turns it back); a row still opening around it heads for the new height | SMOOTH 524 |
| Top edge fade | opacity 0 ↔ 1 at `scrollY > 2` | 200 ms |
| Demo scenario switch | page `out, b4` 160 EASE_OUT → repaint → `in, y6, b4 → 0` 420 EASE_OUT | demo only |
### Shimmer · `ui/shimmer.ts`
Words on their way to the router (a name being saved on its card) shimmer as an assistant's "thinking" line does. A copy of the input's words is laid exactly over them (same font, clipped to the input and scrolled as it is) and the input's own go transparent. The copy is the words' colour (`text`) over a muted base (`text` 38% into `raised`), painted as a gradient clipped to the text: a band 2.2 em either side with a bell falloff (0, .5, .9, 1, .9, .5, 0) crosses it from left to right in 1.8 s, linear, then rests 0.58 s and goes again. It starts solid (the swap shows nothing), dims in 240 ms; stopping, the band holds where it is and the words fade back to their colour around it (480 ms, standard curve), and only then does the copy go. With less motion asked for there is no band: it only dims and comes back.
### Choreographies, end to end (live, demo latency ~0.5–0.75 s)
**Rename:**
**Rename (on the card):**
- 0: busy (content out 180, orb in 70 + 340);
- +513: answer, sheet out 120, orb out;
- +645: repaint, the name letter-morphs;
- +650: "Renamed" toast (BOUNCY).
- 0: Return; the words' copy laid over them dims to the muted base (240, standard curve), the caret steps aside;
- +120: the first sweep sets off (1.8 s across, linear), then again after a 0.58 s rest, for as long as the router takes;
- answer: the band holds where it is and the words fade back to their colour (480, standard curve);
- then: the input gives way to the name (identical, nothing moves), the card is drawn again and its status morphs from the hint, words and colour.
**Reconnect:**
@@ -1327,19 +1456,23 @@ The ring does not travel: the old tile's ring fades and the new tile's ring draw
| Text morph, `morphInto` | Plain text swap, no letters |
| Picker pill | Jumps (uses SMOOTH and t = end) |
| Busy | No 410 ms hold; orb shown as a still frame (front dot sharp, halo behind) |
| Accordion chevron, calendar cascade, way light, way fill, server pop | Off (CSS `@media` blocks) |
| Accordion chevron, calendar cascade, way light (its knock too), way fill, server pop, falling packets | Off (CSS `@media` blocks); the break at the router stands still |
| Caret and selection edges | Jump to their places; the caret stands still (no blink) |
| Second line, steps regroup | Fade only; the heights jump |
| Sub line fold, what folds on arrival, the limit note leaving | Fade out, then gone with their space (back at once, fading in): the way still moves up under the head |
| OS mark alternation | Marks swap instantly (the word still changes) |
| Sheets, menus, toasts | Fade only |
| Arrival reading time (2.4 s) | Unchanged |
CSS hover and press transitions (`scale(.8–.98)`, colours) are not reduced. They are small, direct responses to input.
CSS hover and press transitions (`scale(.8–.98)`, colours, the switch) are not reduced. They are small, direct responses to input.
### Performance notes
- Animated properties are `transform`, `opacity` and `filter: blur` almost everywhere. Layout properties animate only where the layout must truly change: `height`, `width`, `max-width`, margins and radii (sheet height, accordion rows, morph width, folds), `flex-grow` (picker) and `clip-path` (way fill).
- Morphs skip elements that are not on screen. The OS alternation skips while folded. Polls pause in hidden tabs.
- The caret runs one `requestAnimationFrame` loop for itself and both selection edges, writes only `transform` (and the wash's width), and stops once all three rest. Its measuring copy of the text sits out of sight with the input's font, and several events in one frame make one measure.
- Blur radii stay at ≤ 6 px; the edge fade's 12 px backdrop blur is the only large one.
- One animation per property per element at a time: new runs cancel old ones after starting from their computed state.
- One animation per property per element at a time: new runs cancel old ones after starting from their computed state. The exception is a FLIP inside the sheet, which adds to one still under way (`composite: 'add'`).
### Motion do's and don'ts
@@ -1350,7 +1483,7 @@ CSS hover and press transitions (`scale(.8–.98)`, colours) are not reduced. Th
- **Don't** animate Escape, a language change or a reload.
- **Don't** morph a hover readout: it follows the pointer and must be instant.
- **Don't** use `transition: all`, bounces on exits, or travel over ~20 px except the drawer and the FLIP.
- **Don't** re-run an entrance animation on a repaint the person didn't cause (see *Live audit #1*).
- **Don't** re-run an entrance animation on a repaint the person didn't cause: the calendar's days come in when its row is opened, not when a repaint keeps it open.
---
@@ -1360,7 +1493,7 @@ CSS hover and press transitions (`scale(.8–.98)`, colours) are not reduced. Th
- **Buttons are verbs, with no ellipsis:** Connect, Update, Add device, Reconnect, Remove, Cancel, Open securely, Show key, Copy.
- **Statuses are short and fit one line.** The full wording goes in the tooltip: "Settings changed, update needed".
- **Other apps are quoted word for word, in each language:** "+ › Insert › Continue" for AmneziaVPN, "Import Tunnel(s) from File…" for WireGuard.
- **Honest warnings sit where the choice is made:** plain HTTP, the router's own certificate, connected but no data left.
- **Honest warnings sit where the choice is made:** plain HTTP, the router's own certificate, connected but no data left, a device that can't finish connecting or connects with no data (the way says what it likely is, the card says it in one line with why in `title`).
- **Numbers, sizes and dates** follow the page's language (`num`, `bytes`, `toLocaleDateString(locale())`). Times are the router's clock, hours shown in the visitor's time when the offset is known.
- **The language pill switches in place.** The page opens in the kept choice, else the browser's language, else English.
@@ -1373,12 +1506,14 @@ CSS hover and press transitions (`scale(.8–.98)`, colours) are not reduced. Th
- the sheet is `dialog`, or `alertdialog` for questions, with `aria-modal` and `aria-label` = the view's title;
- the menu is `menu` with `menuitem` or `menuitemradio` (`aria-checked`);
- the picker is a `tablist` of `tab`s (`aria-selected`); the kinds are a `radiogroup` of `radio`s (`aria-checked`);
- the LAN Bypass row is one `button` with `role="switch"` and `aria-checked`, named by its title and line;
- accordion heads are buttons with `aria-expanded`;
- the way is `role="status"` with `aria-live="polite"`;
- the menu path has its own `aria-label` naming both systems' words;
- busy buttons get `aria-busy`.
- **Keyboard:** Escape closes the menu, then the sheet, without animation. The phone's back button closes the sheet. Focus returns to the opener. The rename field selects its text on open.
- **Hidden decoration:** icons and glass icons are `aria-hidden`. Morph overlays and ghosts are `aria-hidden` and click-through. An icon-only button has an `aria-label`.
- **Keyboard:** Escape closes the menu, then the sheet, without animation. The phone's back button closes the sheet. Focus returns to the opener. A name edited on its card selects its text as it opens; Esc there puts the name back without closing anything else, and focus returns to the name. When the set-up steps regroup under the way, focus inside them stays in the sheet (see *Set-up sheet → Around the way*).
- **Words only on hover:** a device card's status stays one line, so why a link fails sits in `title` for a pointer and in hidden text right after the status for a screen reader (`.offscreen`). A touch screen shows neither: the trade-off for cards of one height.
- **Hidden decoration:** icons and glass icons are `aria-hidden`. Morph overlays and ghosts are `aria-hidden` and click-through. A field's drawn caret, selection and handles are click-through, and its measuring copy is `aria-hidden`; the input underneath stays the browser's own (typing, IME, its real selection). An icon-only button has an `aria-label`.
- **Contrast:** see the table in *Colors*. `--text-3` and white-on-accent are below AA.
- **Targets:** buttons and fields are 48 px, menu items 40 px. Knobs and pills are 32 px, the pinned keys 38 × 32 and calendar cells 10 px (not interactive). The 32 px controls are below the 44 px touch guideline.
@@ -1390,28 +1525,24 @@ These are observations from the code read and the live run, not changes. Each is
### Motion
1. **The calendar replays on every repaint.** While "Access until" is open, every repaint re-runs `cal-in` on all 49 cells (≈ 700 ms). That includes a Rename, a Reconnect (under the scrim), a device that connects, and a scenario switch. The cells are rebuilt and the CSS rule `.acc-row.open .cal-g i { animation: cal-in … }` fires again. This breaks "nothing blinks". Animate the cells only from the accordion's toggle, or skip when the row was already open.
2. **The phone intro runs out of visual order.** At < 960 px "Your access" is shown first (`order: -1`), but the intro staggers in DOM order. The wave goes crumbs → devices (below) → back up to access. Sort the intro list by on-screen position.
3. **"Show key" ↔ "Hide key" swaps instantly** (`replaceChildren`), against the rule that every in-place text morphs. Same for its icon.
4. **The sheet uses two height animations.** A view swap glides height over 360 ms `cubic-bezier(.25,1,.5,1)` with `cubic-bezier(.2,0,0,1)` cross-fades and pinned keys. In-view changes use SMOOTH (524 ms). Moving the swap onto the spring tokens would make the sheet move the same way however its content changes.
5. **`way-pop` uses BOUNCY's curve over 420 ms** instead of BOUNCY's own 572 ms. The spring is compressed and its 10.8% overshoot comes faster than the token's.
6. **The drawer scrim uses CSS keywords** (`ease-out` 420 / 320) where the dialog's scrim uses SOFT and EASE_IN. Harmless, but it sits outside the token set.
7. **Comments drift from the code.**
1. **The sheet uses two height animations.** A view swap glides height over 360 ms `cubic-bezier(.25,1,.5,1)` with `cubic-bezier(.2,0,0,1)` cross-fades and pinned keys. In-view changes use SMOOTH (524 ms). Moving the swap onto the spring tokens would make the sheet move the same way however its content changes.
2. **The drawer scrim uses CSS keywords** (`ease-out` 420 / 320) where the dialog's scrim uses SOFT and EASE_IN. Harmless, but it sits outside the token set.
3. **Comments drift from the code.**
- `motion.ts` says BOUNCY is "the accordion", and `accordion.css` and `accordion.ts` call it "bouncy". The accordion runs on SOFT (476 ms, 3.9%), on purpose since 2026-10-19.
- `docs/plan-portal-redesign.md` says "one bottom drawer at every width" and "four kinds with a sliding ring". Live, the sheet is a centred dialog from 760 px, and the ring does not travel.
8. **The language switch is a hard cut.** The whole page is rebuilt with no fade. It is consistent with "nothing animates that the person can't follow", but it is the only visible change without a transition.
4. **The language switch is a hard cut.** The whole page is rebuilt with no fade. It is consistent with "nothing animates that the person can't follow", but it is the only visible change without a transition.
### Visual and accessibility
9. **White on accent** (every primary button) is 2.4:1 in dark and 2.9:1 in light. It is below AA even for large text. It is the measured skiper21 look, so it is a decision for the user. Options: a deeper accent fill with the same hue (e.g. `#1d84e6`, the glass tone b) or dark ink on the light fill.
10. **`--text-3` carries meaningful text** at 2.2–2.4:1: the limit note ("You have reached your limit…"), "3 of 4", "Ends Mon 30 Nov", axis dates and the "OR" divider. The limit note and the end date carry information and could move to `--text-2`.
11. **Light theme tone text is thin.** Status lines at 13 px in ok, warn or accent are 3.1–3.3:1 on white. Accent text links in hints are 2.9:1.
12. **`--t-orange` has no light override.** The light block redefines the grey, blue, green and red glass tones, but not orange. Orange glass icons keep their dark-theme stops in light.
13. **Breadcrumb at 375 px:** with the demo chip, both crumbs truncate to "Dawnlin… › U…". The router build has no chip, but a long server name will do the same. Consider letting the person's crumb win (`flex-shrink` on the place first).
14. **Quota tone mismatch:** the "Out of data" notice is red (`bad`) while the cards say "Connected, no data left" in orange (`warn`). Intended (the tunnel is up), but the page shows two tones for one state.
15. **"How to" paths wrap with the separator first:** a wrapped line starts with "›" ("› Pick the file and connect").
16. **The `.conf` block has no edge inside its inset row:** both are `--field`. In light especially, the code floats without a container.
17. **The trash glass icon reads as "pause"** at small sizes: two vertical strokes in a rounded body. The lid separates it at 64 px only.
5. **White on accent** (every primary button) is 2.4:1 in dark and 2.9:1 in light. It is below AA even for large text. It is the measured skiper21 look, so it is a decision for the user. Options: a deeper accent fill with the same hue (e.g. `#1d84e6`, the glass tone b) or dark ink on the light fill.
6. **`--text-3` carries meaningful text** at 2.2–2.4:1: the limit note ("You have reached your limit…"), "3 of 4", "Ends Mon 30 Nov", axis dates and the "OR" divider. The limit note and the end date carry information and could move to `--text-2`.
7. **Light theme tone text is thin.** Status lines at 13 px in ok, warn or accent are 3.1–3.3:1 on white. Accent text links in hints are 2.9:1.
8. **`--t-orange` has no light override.** The light block redefines the grey, blue, green and red glass tones, but not orange. Orange glass icons keep their dark-theme stops in light.
9. **Breadcrumb at 375 px:** with the demo chip, both crumbs truncate to "Dawnlin… › U…". The router build has no chip, but a long server name will do the same. Consider letting the person's crumb win (`flex-shrink` on the place first).
10. **Quota tone mismatch:** the "Out of data" notice is red (`bad`) while the cards say "Connected, no data left" in orange (`warn`). Intended (the tunnel is up), but the page shows two tones for one state.
11. **"How to" paths wrap with the separator first:** a wrapped line starts with "›" ("› Pick the file and connect").
12. **The `.conf` block has no edge inside its inset row:** both are `--field`. In light especially, the code floats without a container. (Inside "Set it up again" both step up and the block shows: `knob` on knob 65%.)
13. **The trash glass icon reads as "pause"** at small sizes: two vertical strokes in a rounded body. The lid separates it at 64 px only.
---
@@ -1421,13 +1552,15 @@ These are observations from the code read and the live run, not changes. Each is
|---|---|
| Tokens, fonts, light theme | `web/src/portal/styles/tokens.css` |
| Reset, type, focus, selection, icons | `styles/base.css` |
| Knob, buttons, orb, field, picker, kinds, badges, hints, link row, QR | `styles/controls.css` |
| Knob, buttons, orb, field (its caret and selection), picker, kinds, option row and switch, badges, hints, link row, QR | `styles/controls.css` |
| Field caret and selection | `ui/caret.ts` |
| Add a device, the LAN Bypass row | `flows/add.ts` |
| Page frame, edge fades, crumbs, columns, notices, single card | `styles/page.css`, `page/frame.ts`, `page/notices.ts` |
| Device cards | `styles/devices.css`, `page/devices.ts` |
| Access rows | `styles/access.css`, `page/access.ts`, `days.ts` |
| Accordion | `styles/accordion.css`, `ui/accordion.ts` |
| Sheet, views, questions | `styles/sheet.css`, `ui/sheet.ts`, `flows/device-actions.ts`, `flows/secure.ts` |
| Set-up | `styles/setup.css`, `flows/setup-view.ts`, `flows/setup-parts.ts`, `flows/wait.ts`, `setup.ts` |
| Set-up | `styles/setup.css`, `flows/setup-view.ts`, `flows/setup-parts.ts`, `flows/wait.ts`, `way.ts` (the way's state), `setup.ts` |
| Menu, toast | `styles/menu-toast.css`, `ui/menu.ts`, `ui/feedback.ts` |
| Motion engine | `motion.ts`; morph `ui/morph.ts` + `styles/morph.css`; busy `ui/busy.ts`; picker `ui/seg.ts` |
| Glass icons, line icons, QR | `ui/glass.ts`, `web/src/shared/icons.ts`, `web/src/shared/qr.ts`, `ui/codes.ts` |