fix(desk): the heid code-review and bug-hunt panels on r2b merge 2, folded

The bug hunt (4/4) and code review (4/4) were both clean on mechanism.
Their shared catch was the one-sided minute check.

Dates:
- The date filters never raise. One clock outside the calendar's range
  500'd the Desk for every booth, because every row renders in one
  response. An unrenderable date now renders nothing.
- "Updated" shows whenever it differs from "created" by a minute or more,
  either way. Copied content is often older than its folder.
- A clock ahead of now shows its date, never "just now".
- A day is 24h ("1d ago" never appeared).
The row:
- The controls are last in the markup, so the booth's name comes first in
  tab order and wipe last. The cluster is placed over the strip from the
  row's box.
The theme:
- A choice made in one tab moves the Booth's other open tabs.
- The theme mark goes only on ask fragments the embed mounted.
Tests, strengthened after the code review:
- the pill is visible at rest;
- keyboard focus reveals the controls;
- the controls act with scripts off;
- Reveal all reaches the doc page;
- the high-contrast check reads tokens that actually differ;
- the art-light extras are written from SVOS, not derived from the
  copies;
- two overstated mutation rows are replaced (one was a runtime no-op, one
  went red through a syntax error).
Contract amended.

r2b.toml 55/55 proved. 799 passed.
This commit is contained in:
vh
2026-09-23 20:03:32 -07:00
parent 436d234ca0
commit 1558a7fa07
9 changed files with 446 additions and 84 deletions
@@ -77,9 +77,14 @@ on mouseover"*.
top-right, which is still picture.
- **Everywhere else (no hover, a coarse primary pointer, or any coarse pointer
present), the cluster is visible and in flow**, on its own line at the
bottom of the row. The mechanism: the strip and the cluster share one
`.desk-media` box. Under a real hover it is the positioning box; otherwise it
dissolves (`display: contents`) and the cluster becomes the row's last line.
bottom of the row.
- **The cluster is LAST in the row's markup**, so the booth's name comes first
in tab order and wipe comes last. Where a real hover exists it is placed over
the strip from the row's own box: the strip keeps to the row's top, 210px
wide from the row's 12px padding.
- Accepted: the hover query uses Media Queries 4 `not (...)`. An engine
without MQ4 drops the whole query, and the failure is the safe
direction: the controls show, in flow.
- Known limit: the touch-LAPTOP branch (a fine primary pointer plus a coarse
one) cannot be emulated, because Chromium's touch emulation makes the
primary pointer coarse. That branch is covered by reading the media query,
@@ -112,9 +117,16 @@ controls (actions). One macro, `_dates.html`, serves both:
(`now` in the context), so every row is measured from the same instant;
- each is a `<time>` with `datetime` (ISO) and its exact local stamp as the
title;
- **updated is left out** within a minute of created: a booth that arrived in
one go has one date, not two that say the same thing;
- a birth time the filesystem cannot give renders NOTHING.
- **updated shows whenever it differs from created by a minute or more,
EITHER way.** Copied files keep their mtimes while the folder is born now,
so content can be older than its booth. Within a minute, one date;
- a content clock AHEAD of now is said as its DATE, never as an age ("updated
just now" would be false);
- an age is in its largest whole unit, a day being 24h;
- a date the filesystem cannot give, or the calendar cannot hold, renders
NOTHING. The filters never raise: the Desk renders every row in one
response, so one unrenderable clock would otherwise 500 the index for every
booth.
## D2 — Reveal all (blur ruling A)
@@ -223,6 +235,8 @@ reading; this is the control the operator uses, which the blur ruling assumed.
- **Mechanism: `data-theme` on `<html>`.** Absent = the OS preference, exactly
today's sheet. An early `<head>` script sets it before first paint, so a
forced theme never flashes the other one.
- **A choice made in another tab moves every open Booth page** (the `storage`
event), as it moves the ask chrome.
- **System is live-following BY CONSTRUCTION.** Choosing System removes
`data-theme`, and the `prefers-color-scheme` media query takes over. A media
query tracks the OS live, so no `matchMedia` listener is needed: JS never
@@ -249,11 +263,15 @@ reading; this is the control the operator uses, which the blur ruling assumed.
old lacked. The committed test checks each re-scoped copy against the
UNMOVED dark block. SVOS's light and dark declare the same 42 properties,
and its dark-hc and light-hc the same 41, so a declaration the transform
drops fails it.
drops fails it. Light declares every dark-block property PLUS the art
layer's four light-only values (the three shadows and the armed glow).
That extra set is written in the test from SVOS, never derived from the
copies, so dropping it from both copies fails too.
- **No JS: no toggle, and the page follows the OS**, as today.
- **The toggle reaches inside verbatim pages** (operator: "theme toggle reaches
inside"). `embed.js` reads the same `localStorage["booth.theme"]` (the same
origin) and marks each `.bk-ask` it injects with `data-bk-theme`. Its
origin) and marks each `.bk-ask` IT MOUNTED (never an author's own element
of that class) with `data-bk-theme`. Its
colours follow that attribute exactly as the Booth's own sheet follows
`data-theme`: forced when set, OS when absent. It follows a change made in
another tab through the `storage` event. It sets nothing on the host page's
@@ -314,11 +332,25 @@ reading; this is the control the operator uses, which the blur ruling assumed.
pressing Light/Dark changes `--surface-base` and survives a reload (new page,
same context); System plus an emulated OS scheme flip changes it WITHOUT a
reload.
- `a_forced_theme_follows_high_contrast`: forced dark + `prefers-contrast:
more` resolves dark-hc's surface token.
- `a_forced_theme_follows_high_contrast`: under `prefers-contrast: more`,
forced dark resolves exactly what OS dark does, and forced light what OS
light does. The check reads tokens that DIFFER between a theme and its
high-contrast variant (`--text-faint`, `--border-default`; `--surface-card`
is the same in both and would prove nothing), and asserts that high contrast
actually changed them.
- `a_forced_theme_and_the_os_theme_are_the_same_declarations`: each light copy
equals the other and declares exactly the dark block's property set; each
light-hc copy equals the other and declares exactly the dark-hc block's.
equals the other and declares the dark block's property set plus the four
art-light values; each light-hc copy equals the other and declares exactly
the dark-hc block's.
- `created_and_updated_are_dated_facts_and_none_says_nothing`,
`updated_shows_whenever_it_differs_from_created_and_a_future_one_says_its_date`,
`a_date_no_calendar_can_hold_renders_nothing_and_never_500s`,
`an_age_is_said_in_its_largest_whole_unit` (D1b).
- `a_rows_booth_name_comes_before_its_controls_in_tab_order`,
`the_pill_shows_at_rest_and_focus_reveals_the_controls`,
`with_scripts_off_a_rows_controls_still_act` (D1).
- `a_theme_chosen_in_one_tab_moves_the_others`,
`the_theme_marks_only_the_ask_fragments_we_mounted` (D3).
## Assertions that change (declared before the code)