UI design system¶
The web UI is hand-written HTML, CSS and JavaScript with no framework and no
build step. What keeps it consistent is one stylesheet of design tokens and
components (leader/web/templates/shared/theme.css) and one small client
library (shared/ss/, ES modules a page imports as SS:
import * as SS from '../shared/ss/index.js'). This page is the reference
for both. Signed in as an admin, open /admin/ui-kit to see every component
in every state, in whichever theme you have picked. Where page code lives and
how a page module gets its data: UI code structure.
The direction is "quiet console": dark by default, neutral surfaces, one accent (coral) for the one thing you should do next, hierarchy through type and spacing rather than borders and coloured bars.
Principles¶
- One primary action per view, filled coral (
.btn-primary). Everything else is a secondary (.btn) or ghost (.btn-ghost) button. - Hierarchy through surface and type, not outlines. A card is one surface
step up with a hairline border; the coloured left bar only marks a callout
(
.card--callout). - Sentence case everywhere. No letter-spaced uppercase in controls, labels or table headers. Mono is for code, ids, hashes and numbers only.
- Accessible by construction. The tokens guarantee WCAG AA contrast in every theme; components carry their own ARIA; nothing is said by colour alone.
- Nothing below 12 px.
Tokens¶
Three layers. Components and page sheets use only the semantic and component tokens - never raw colours and never the primitives - which is what makes a theme a token swap.
| Layer | Examples | Use |
|---|---|---|
| Primitives | --gray-0…--gray-12, --night-0…--night-5, --coral-1…--coral-12, --blue-*, --green-*, --amber-*, --red-*, --fs-*, --sp-* |
The palette and the scales. Only theme.css references the colour primitives. |
| Semantic | --bg, --surface-1/2/3/4, --sidebar-bg, --border, --border-strong, --border-field, --text, --text-secondary, --text-muted, --text-subtle, --accent, --accent-strong, --accent-solid (+ -hover), --accent-fg, --accent-subtle, --accent-border, --link, --success/--warning/--danger/--info (+ -subtle; -fg for success, warning and danger), --danger-solid, --neutral-subtle, --focus-ring, --selection-bg/-fg, --input-bg, --code-bg, --overlay, --shadow-sm, --shadow-pop, --chart-1…--chart-6 |
What a colour is for. Redefined per theme. |
| Component | --radius-sm/md/lg/full, --btn-h-sm/md/lg, --field-h, --card-pad, --w-form, --w-page |
Sizes of controls. |
Surfaces stack upwards: --bg (page) → --surface-1 (cards) → --surface-2
(menus, modals, toasts) → --surface-3 (hover, secondary buttons) →
--surface-4 (hover on surface-3). A tone colour (--success, …) is for text
and icons on any surface; its -subtle variant is the tint behind it (badges,
alerts); -fg is text on a solid fill of it (--danger-fg on --danger-solid).
For a translucent tint not covered by a token, mix from the ink triplet:
rgba(var(--ink), .06) is a 6% overlay of white in dark and black in light.
Scales¶
| Scale | Tokens |
|---|---|
| Type | --fs-xs 12 · --fs-sm 13 · --fs-md 14 (UI default) · --fs-base 16 (body copy) · --fs-lg 18 · --fs-xl 20 · --fs-2xl 24 · --fs-3xl 30 · --fs-4xl 36 · --fs-5xl 48 (landing) |
| Line height | --lh-tight 1.25 headings · --lh-ui 1.5 · --lh-prose 1.65 |
| Spacing (4 px base) | --sp-1 4 · --sp-2 8 · --sp-3 12 · --sp-4 16 · --sp-5 20 · --sp-6 24 · --sp-8 32 · --sp-10 40 · --sp-12 48 · --sp-16 64 |
| Radius | --radius-sm 4 (inputs, badges) · --radius-md 8 (cards, buttons, modals) · --radius-lg 12 (popovers) · --radius-full (avatars) |
| Controls | --btn-h-sm 32 · --btn-h-md 36 · --btn-h-lg 44 (touch, landing) · --field-h 36 |
| Motion | --dur-fast 120 ms · --dur 160 ms · --dur-slow 200 ms, --ease; all off under prefers-reduced-motion |
Fonts: --font-sans (Inter) for all UI including headings, --font-display
(Space Grotesk) for display only - the landing hero and the docs title -
and --font-mono (JetBrains Mono) with font-variant-numeric: tabular-nums
for code, ids and numeric columns (.mono, .num).
Themes¶
dark (default), light and system. The choice lives in the swarm_theme
cookie, set by GET /theme/{mode} from the account menu. The server writes
<html data-theme="..."> while rendering (web/nav_render.py), so the first
paint is already in the right theme - no flash. system follows
prefers-color-scheme. On top of any theme:
prefers-contrast: morestrengthens borders and lifts muted text;forced-colors: active(Windows High Contrast) draws every tinted boundary as a real border and uses the system highlight for focus and selection;prefers-reduced-motion: reduceswitches off transitions and animations.
The landing page follows the theme too (UI renewal R5). It is never
personalised by the response middleware - / redirects a signed-in visitor -
so public_pages.build_landing_html(theme=...) writes <html data-theme> from
the cookie itself; a first visit (no cookie) gets the dark default. Its
sections sit on one 12-column grid (.l-sec > .l-wrap) with a 96 px / 64 px
rhythm (public/public.css, shared with the business pages), its hero scene
takes its colours from the theme tokens (see Hero scenes), and
its scroll reveal only adds motion: nothing is hidden before the observer
fires, without JavaScript, under reduced motion or in print.
Code highlighting (highlight.js) is coloured from the tone tokens in theme.css, so highlighted code reads in both themes; no highlight.js colour theme is vendored.
The consoles act on the active pool: SS.activePool() returns ?pool=
when the URL names one, otherwise the sidebar's active pool (rendered from the
console's URL or the swarm_pool cookie). Opening a pool page never changes
it; the switcher and the pool page's "Make active" call
SS.activatePool(pool), which keeps the choice in the cookie, and
SS.onPoolChange(fn) tells whoever shows it (the sidebar's chip and console
links, the pool page's badge).
Charts and canvases cannot read CSS directly. Read the token at draw time with
SS.cssVar('--accent') rather than hard-coding a hex value. Categorical
series use --chart-1 … --chart-6 (each 3:1 on the chart background in both
themes); give series a second cue - marker shape or dash - as well.
Shells¶
Every page is one of four shells, chosen by its builder or its entry in
the page table (web/routes.py, PAGES) and written onto <body> as
shell-<name> by shell.render_page(template, shell). One assembly path
builds them all, the consoles included: a template is a fragment - its own
<head> (title, meta, page styles) and its body - and the shell writes the
document around it.
| Shell | Pages | Structure |
|---|---|---|
public |
landing, the /for/... pages, about, trust, press, GPU planner, evaluation, imprint, privacy, accessibility |
top bar (wordmark, the "Who it's for" menu, Docs, a source link only when SILENTSWARM_SOURCE_URL names one, language, Log in and Evaluation or Open app), content, full footer with the provider block |
auth |
login, register, reset, verify, account status | the wordmark above one centred card, language and theme below it, full footer. No sidebar. |
app |
dashboard, pools, buckets, organizations, agents, admin, profile, UI kit | sidebar + main: .page-header, content, a one-line footer: the running version, the legal links and Docs |
console |
training, inference | the app shell at full viewport height; main scrolls on its own; .page-header--compact |
The sidebar collapses to an icon rail on desktop (the swarm_rail cookie,
read by the server so the first paint is right) and becomes a drawer below
1024 px, opened from a mobile app bar. DOM order is the keyboard order: skip
link, sidebar, page header, content (test_shells.py). The admin pages share
a sub-navigation (__ADMIN_NAV__, shell.ADMIN_SECTIONS).
Content width. The app and console content column runs to
--content-max (1760 px, shared/shell.css) beside the sidebar; at 1280 px
a wide screen left a third of itself empty. Forms and reading columns keep
their own measure - .main-narrow, .main-form, the profile's cards - and
the inference console uses the full width, its chat keeping a readable centre
column of its own. Grids inside the column use auto-fit tracks, so a wider
column gives them more tracks rather than wider ones.
Components¶
Buttons¶
| Class | Use |
|---|---|
.btn |
Secondary - the default. |
.btn.btn-primary |
The one primary action of the view. |
.btn.btn-ghost |
Low-emphasis actions, toolbars, icon buttons. |
.btn.btn-danger |
Destructive actions (tinted; solid on hover). Confirm them with SS.confirm. |
.btn-sm / .btn-lg |
32 px / 44 px high. Nothing smaller: 24 x 24 is the WCAG 2.2 minimum (2.5.8), and the smoke test measures it. |
.btn-icon |
Square, icon only - must carry aria-label. |
aria-busy="true" |
Loading: adds a spinner, keeps the label. |
.link-btn |
A button that looks like a link (inline, in text). |
Fields¶
<div class="field">
<label for="pool-name">Name <span class="req" aria-hidden="true">*</span></label>
<input id="pool-name" required aria-describedby="pool-name-hint pool-name-err">
<div class="field-hint" id="pool-name-hint">Shown to members.</div>
<div class="field-error" id="pool-name-err"></div>
</div>
Set aria-invalid="true" on the control and put the message in .field-error
for an inline error. .field-affix groups a control with a prefix/suffix
(<span class="affix">GB</span>) or a button. <input type="password"
data-reveal> gets a show/hide toggle automatically. SS.dropzone(input) wraps
a file input in a drop target without taking away its label or keyboard
behaviour.
SS.field({label, id, type, value, hint, required, options, ...}) builds the
same structure in script and returns {element, input, setError} -
setError(msg) sets aria-invalid and the message, setError("") clears
both. Use it in dialogs instead of hand-wiring label, hint and error ids.
Choices:
- Toggle switch:
<label class="switch-row"><input type="checkbox" role="switch" class="switch"> Open join</label>- a native checkbox, so it keeps its keyboard and form behaviour. - Segmented control:
<fieldset class="seg"><legend class="sr-only">Log level</legend>with<label><input type="radio" name="…"><span>All <b>12</b></span></label>per option - native radios keep the arrow keys.
Layout¶
- Page header:
.page-header>.breadcrumbs,.page-header-row(theh1and a.page-descline on the left,.page-actionson the right). - Card:
.card(surface + hairline),.card--callout(accent bar; addwarning,dangerorinfo),.card--interactive(hover state, for a card that is a link),.card-head(title + actions in one row). - Stat tile:
.stats>.stat>.stat-label,.stat-value,.stat-sub. Two per row on phones, as many as fit on desktop..stats--compactfor dense panels. - Meter:
.meter(withrole="meter"or"progressbar"and itsaria-value*) >.meter-fill;ok,warn,danger,infotones; a.meter-rowabove it carries the label and the number. In a lit-html view,meter({pct, tone, label, now, max})fromshared/ss/meter.jsdraws the bar; without alabelit is decoration (aria-hidden). - Compact page header (console shell):
.page-header.page-header--compactwith a.page-contextline (pool, status). - Person:
.avatar(.is-admintints it) and.user-cell>.avatar+.who>.nm,.em- initial, name and email in one table cell. - Count after a title:
<h1>Users <span class="count">(12)</span></h1>. - Utilities:
.sr-only-sm(visually hidden below 520 px - an icon button's text label),.row,.row-wrap,.row-end,.stack,.spacer,.grow,.mt-*/.mb-*(4/8/12/16/24),.text-sm,.text-xs,.muted,.mono,.num,.nowrap,.break,.maxw-form,.w-auto,.sr-only. Prefer these tostyle=""; inline styles are for JavaScript-toggled state only.
Status¶
.badgewithneutral,info,success,warning,dangeroraccent(SS.badge(text, kind)builds one in sentence case). Always text, optionally an icon - never a colour alone.- One tone per state.
statusKind(state)inshared/ss/status.jsmaps every job, model, node, join-session and account state to its badge tone. Pages used to carry three tables that disagreed; this is the one table now:
| Tone | States |
|---|---|
success |
ready, active, completed, done, exported |
info |
running, training, loading, exporting, checkpointing |
warning |
pending, queued, paused, stopping, recovering, revoked, pending approval, unverified |
danger |
failed, error, disabled |
neutral |
cancelled, offline, expired, and any state the table does not know |
Three were settled on purpose. pending is a warning because it waits on
something (a node, a slot, an approval). checkpointing is info, since it
is normal progress. cancelled is neutral: a decision, not a failure.
- .status-dot with ok, busy, warn, err, idle: a dot and its label.
- .alert with error, success, info, warning for in-page messages
(role="status").
Feedback and overlays¶
SS.toast(message, kind)orSS.toast({title, body, kind}): icon, text and a close button; errors arerole="alert", the restrole="status"; hover and focus pause it; the stack moves out of the way of the focused element.SS.confirm({title, body, confirm, danger})→Promise<boolean>. Use it instead ofwindow.confirm()(there are none left). A destructive confirm focuses Cancel.SS.modal.open(id)/SS.modal.close(id)for a.modal-backdrop>.modalin the page (.modal--sm,.modal--lgfor width).SS.menu(button, items): a popover of actions on the disclosure pattern (aria-expandedon the button, Escape and outside click close it, arrow keys move). Items are{label, icon, onClick | href, danger}or"sep"; put destructive actions last.SS.tabs(container, {hash, path, onChange}):[role=tablist]ofbutton[role=tab]witharia-controls; roving tabindex and arrow keys.hash: truemirrors the selected tab in the URL hash;pathmakes each tab an address of its own (the pool page's/pools/{owner}/{pool}/nodes).SS.dialog({title, description, content, actions, size}): a modal built in script for a flow ("New bucket", "Create token"); actions are{label, primary, danger, submit, onClick(close)}andonClickmay returnfalseto keep it open (validation). Enter submits the primary action.SS.prompt({title, label, value, hint, confirm})→Promise<string|null>, the themedwindow.prompt().- A dialog is also a multi-step flow: the returned
setTitle,setDescription,setContentandsetActionsswap it in place (ask for a label, then show the new secret once) -setActionsmoves focus to the new primary button.onCloseruns however the dialog was closed. SS.announce(text, {assertive}): say something to screen readers without moving focus (a finished reply, a cleared chat).SS.announce(text, {key, every, quiet}): the throttled form, for anything fed by SSE or a poll. Perkey, at most one announcement everyeveryms (default 15 s); text arriving in between replaces what is waiting, so the latest state is what gets said; a repeat of the last text is skipped;quiet: truerecords the text without saying it (the first render is not a change). A region updated by a stream is plain text - neveraria-live,role="status"orrole="log", which would speak on every tick. The training console (swarm status, job status and progress, join session) and the inference model status and load progress work this way.SS.empty({icon, title, body, action}): an empty state with one action.SS.skeleton({lines}): placeholder lines before the first data arrives.SS.codeblock(text, {label})andSS.copyButton(getText, label): code with an always-visible copy button that confirms ("Copied") and announces it.
Data tables¶
dataTable(container, opts) from shared/ss/data_table.js renders a
sortable, filterable table with lit-html. It is the one table component; it
replaced SS.table, keeping its options and handle:
import { dataTable } from '../shared/ss/data_table.js';
const table = dataTable(host, { label: 'Buckets', rows: null, columns, search: true });
table.update(await SS.api('/api/v1/buckets'));
| Option | |
|---|---|
columns |
{key, label, sort, numeric, align, render, sortValue, className}; numeric right-aligns in tabular mono. A column with menu: (row) => items renders the row's actions as an overflow menu (menuLabel(row) names its button); rowHeader: true makes its cells the row headers (<th scope="row">). |
search, searchKeys, searchPlaceholder, filters |
The toolbar - search and filters inline. A filter is {key, label, options, value, valueFor}: valueFor(row) filters on a worked-out value (a status from heartbeat and placement) instead of row[key], and options may be a function of the rows - countedOptions(rows, valueFor, labelOf) lists the values there, most common first, with counts ("Training (16)"). Rows there but none matching show "Nothing matches", not the table's empty. |
onSearch(q) |
Hears every keystroke in the search box, for a search that also reaches the server (the audit log debounces it). |
actions |
Nodes for the right end of the toolbar (the primary action). |
label |
Accessible name of the table and its scroll region. |
maxHeight |
Caps the height and makes the header sticky. |
stack: false |
Opt out of the stacked-card layout below 640 px. |
empty |
Text or a node for the empty state, or a function returning one when the reason varies (the mail outbox: nothing sent yet, or SMTP is off). |
rowKey, onRowClick, isSelected |
Row selection: rows become clickable and keyboard-operable (Enter/Space on the focused row); the selected one gets aria-current. |
initialSort |
{key, dir}: the order before anyone clicks a header. |
pageSize |
Splits the rows into pages. A table of nodes, GPUs or anything that grows with the cluster sets it (25) with search and filters, so it stays one screen - and on a phone one page of cards - at any count. |
tableClass, rowClass(row) |
Classes on the <table> itself, and per row. |
rows: null |
Loading: a skeleton until the first update(). |
The returned controller has update(rows), refresh(), setFilter(key,
value), setQuery(q) and fail(message) (why the rows could not load, until
the next update()). Rows are keyed (rowKey, else row.id), so focus
survives every redraw: the search box (caret included), a filter, or the
focused row or button stays where it was when update() replaces the rows. A
cell's render may return text, a node (SS.el, SS.badge) or an html
template; a node it returns again is kept as it is, so a row of inputs built
once (the quota editor) keeps what was typed. Every table in the app is a
dataTable - the hand-built stack-tables of the admin pages moved onto it
(UI modules UM7), and there is no second stacking style.
Headers are real buttons with aria-sort; below 640 px every row becomes a
card with its column names, so nothing is cropped, and a table with sortable
columns shows its header row as a "Sort by" bar of buttons (a hidden header
row would leave invisible buttons in the tab order). Long values wrap inside
the card (overflow-wrap: anywhere) rather than widening it. A table that
does not stack must sit in a focusable, labelled scroll region
(<div class="table-scroll" tabindex="0" role="region" aria-label="…">);
the smoke test fails on any table cropped at 320 px.
A height-capped table (maxHeight) has a sticky header; its scroller carries
scroll-padding-top, so a row that Shift+Tab scrolls into view is not hidden
under the header (WCAG 2.4.11). Any new sticky or fixed bar needs the same.
Icons¶
Lucide (ISC licence), vendored as one SVG sprite by
scripts/vendor_frontend.py and served from /vendor/icons.svg.
SS.icon(name) returns an aria-hidden <svg> in currentColor; pass
{label} when the icon alone carries meaning. In server-rendered markup:
<svg class="icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<use href="/vendor/icons.svg#database"></use></svg>
The sprite contains only the icons in the script's ICONS tuple; to use a new
one, add its name there and re-run the script. No Unicode glyphs as icons.
Hero scenes¶
Each public page's hero shows an animated 3D schematic of what the page
sells, beside the copy: the landing page a 14B model splitting across the
benchmark's two home PCs, then a question through a coordinator without a GPU
into a ring of the two - for one user one token at a time, each PC bright
while it computes and dim while it waits for the other, for eight users two
batches of four taking turns so both stay busy, with eight answers in the
panel (HA1, round 3 HA33-HA38), /for/heat two houses whose GPU units connect out to one
coordinator, each heat pump reporting its building's heat demand, and the
next job from the compute buyers going to the unit whose building asks for
heat - its GPU works, its water flows, its radiators warm - then, once it
is warm, to the other (HA2, round 2 HA39-HA43), /for/compute a request from your code through your own
coordinator into a ring of three machines in three places - your rack, a
partner's building, a heat unit warming a house, holding 18, 13 and 9 of the
40 layers by their cards' memory - the prompt forward through all three once,
then one lap of the ring per token, the token back to the rack and the word
out from there, at the benchmark's pace for one user (HA3, round 2
HA27-HA31), /for/research a 14B model moving from the 80 GB card a lab does
not own onto the cards of three workstations it does, then one training step
per loop - a batch from the lab's own data, micro-batches forward through
every layer from PC to PC, the gradients back, every card updating its own
layers before the step is counted (HA4, round 2 HA20-HA25), /for/cities a district at 18:00 - the light
falling to dusk as a school's and a library's machines join, a question from
the town hall's speech bubble through the city's server, the school and the
library, the answer back a word at a time, a light round the city boundary
and a cloud outside it that is never used, the school's heat warming its pool
(HA12, round 2 HA13-HA18). /for/everyone and /evaluation show the
landing page's scene. Which page shows which scene, their descriptions for
screen readers and their German are in the platform's web/hero_scenes.py;
the scene code is under the platform's templates/public/.
The look is the diagrams' language with depth, not a showreel: an
orthographic camera at about 30 degrees, faces lit by one soft light,
hairline edges, the accent for work, --chart-4 (amber) for heat, and
--chart-2 for answers, gradients and cooled water - the loop drawing on
/for/heat uses the same colours. Colours are roles, resolved from the scene tokens in theme.css
(--scene-face, --scene-floor, --scene-edge, --scene-route,
--scene-shade) and re-read when the theme changes. Edges, routes and the
working lines clear 3:1 on what they are drawn over.
The motion rules every scene follows:
- a scene's setup - the model splitting, loading - is an
introthat plays once; after it only the steady work loops, so nothing seems to reload (timeline()inpublic/hero3d/timeline.js). Play after a pause starts the story over; - motion at the measured pace where there is one: the landing scene's first word comes 1.4 s after the question, then a token every 1/3.3 s for one user, each lap split between the PCs by their measured 112 and 172 ms, and for eight users two batches of four lap the ring every 8/11.6 s, and the compute scene's first token reaches the panel 1.4 s after the request leaves it, then one token per lap of the ring at 3.3 a second; meters state a figure rather than count up to it, and a counter never runs faster than what it counts is shown happening (the research scene's step rises once per loop, as the cards update - real steps take seconds);
- pulses at constant speed with a short fading trail, so direction reads in a still frame; a stage lights up as a pulse passes through it; easing only on parts that travel;
- one thing moves at a time: a route is drawn while something travels on it,
not before or after, and only a slow background flow (heat) runs under the
story; an intro can grow its links and boundaries (
reveal()) and dim the light from day (light()), back at the scene's own light by the poster; - a slow sway of a few degrees and a little pointer parallax; no orbit, zoom or scroll capture;
- numbers on a scene are the benchmark page's, or say they are an example;
- a figure that is an example stays still: the heat scene's meters show a unit's power and its heat today as fixed values, because a counter racing through kilowatt-hours claimed a megawatt;
- a prompt is what that page's reader would ask of data they would not send
to a cloud, and its answer is short and concrete enough for a 14B model to
give: tax receipts at home on the landing page, a failed deploy's logs on
/for/compute, a day of citizens' mail on/for/cities. The numbers in an answer are the example's, not a claim about the system, and the answer, in either language, finishes typing inside the loop (the test counts it); - labels are HTML over the drawing, so the page's catalogue translates them and they stay 12 px whatever the box's size.
- a scene draws the path the software takes, not a shorter one: the compute
scene's tokens go from the last stage back to the first and out from there,
as
runtime/torch/distributed_inference_server.pysends them, and its panel names the machines where a user sees them (the pool's serving view), not in a reply that does not carry them. A panel line that is not there yet takes no room, live or in the poster. - one conversation has one token in the ring at a time: a pipeline makes a
model fit, not one answer faster, so the landing scene never shows a stream
of tokens for one user. A scene can state such a rule as
invariant(kit)and list intro frames aslabelChecks; the poster script poses the whole timeline and fails on a frame that breaks it or on labels that overlap.
The poster. A page is sent with its scene's poster: the scene's resting
frame as SVG, with the labels as an HTML list. It is the whole scene for
print, phones (below 1024 px the poster stands above the copy), reduced motion
(a Play button starts it), forced colours, Save-Data and browsers without
WebGL 2, and the live scene starts on the same frame and fades it out. The
poster is not drawn by hand: hosted/scripts/render_hero_posters.mjs builds each
scene in Node with its own code at its poster time and writes
public/hero3d/posters/<scene>.html and .css (label places and tints, so
the markup has no style attribute). Faces are painted back to front in
small cells, lines and pulses on top wherever no face covers them. The
script fails when two of a poster's labels overlap.
Loading. public/hero_scene.js is the only part a page loads up front. A
moment after load, when the browser is idle and the box is on screen, it
imports the stage and the scene - and with them Three.js, about 420 KB that no
page preloads (web/module_graph.py versions dynamic imports without
preloading them) - asks for the WebGL 2 context itself, so a browser without
one is not a console error, and starts the scene in steps: build, shaders
(compileAsync where the browser compiles in parallel, otherwise a plain
compile in a task of its own), first frame. It draws at most 30 frames a
second, pauses off screen and on a hidden tab, and a lost context gives the
poster back.
Adding or changing a scene:
- Write
public/hero3d/<scene>.js:build(kit)makes the parts from the kit (box,prism,path,route,pulse,label, ...),update(kit, t, clock)puts each where it istseconds into its timeline (theintro, then theloop) - a pure function of time, so the poster can be drawn at any moment.place()moves a pulse and its trail,glow()lights a stage,reshape()moves a line's points,reveal()draws the first part of one,light()brightens the scene towards daylight.prism()also makes a pyramid roof (top: 0) or, turned and squashed, a pitched one. A panel label withcls: 'bubble'is a speech bubble with a tail, and keeps its answer on a phone. A panel line withsparkpoints (x, y pairs in a 100 x 24 box) is a small curve - the research scene's loss over its whole run - which the poster writes as SVG and the stage moves (sparkPoints());cls: 'chart'sizes that panel. - Add it to
SCENESinpublic/hero_scene.js, and its page, description and German toweb/hero_scenes.py(PAGE_SCENES,SCENE_LABELS,SCENE_DE). - Run
node hosted/scripts/render_hero_posters.mjs(afterpython core/scripts/vendor_frontend.pyandpython hosted/scripts/vendor_three.py, which fetches Three.js) and commit the posters with the scene; CI runs it with--checkand fails on a stale one.
What the tests hold you to¶
tests/unit/leader/web/test_design_tokens.py computes the contrast of every
semantic text/background pair in both themes (4.5:1 for text, 3:1 for field
borders and the focus ring; 3:1 for the chart series where charts draw),
checks that dark and light define the same tokens and that the system theme
equals light, and fails on: a font size below 12 px,
text-transform: uppercase, Space Grotesk outside display use, a colour
primitive or a retired v1 token name in a page sheet. test_ui_kit.py checks
the component library and the /admin/ui-kit page, and
scripts/frontend_smoke.mjs runs axe-core with colour contrast over every page
in both themes, plus the WCAG 2.2 checks from scripts/a11y_checks.mjs:
every pointer target 24 x 24 px or spaced (2.5.8, open menus, toasts and
dialogs included), focus never entirely under a sticky or fixed element while
tabbing forwards and back (2.4.11), and no cropped table at 320 px (1.4.10).
scripts/keyboard_walkthrough.mjs drives the core flow with the keyboard
alone. test_hero_scenes.py holds the hero scenes: one per public page with
its description and pause control, no preload of Three.js, no style
attribute, posters that match their scenes, the landing scene's numbers on the
benchmark page, the heat meter and the city's buildings marked as examples. The
public pages must also load without a console error when the browser has no
WebGL: run the smoke test with CHROME_ARGS=--disable-webgl as well as without. The manual half - screen readers, zoom, Windows High Contrast - is the
release checklist.