Skip to main content

Live Hub

The Live Hub broadcasts a training live. A coach builds and manages live sessions in the portal; athlete devices in the tracking app push their set operations to the backend as they train; the portal renders three live views over the same feed — the Leaderboard, the weightlifting/powerlifting-style Competition dashboard (three attempts per lift), and the remote-training Live Stream. It is a cross-app feature: tracking is the producer, the portal is the consumer.

Data flow​

tracking (athlete device) backend (Vapor) portal (coach / display)
set completed/edited/deleted ──POST/PUT/DELETE──► /workout_live_session_sets
│ broadcast (SSE) + persist
(only when the device's ▼
UserDeviceSession.workoutLiveSessionID is set) realtime + GET /reduced/:id ──► live views / present mode
  • A device is "in a live session" when its UserDeviceSession.workoutLiveSessionID is set — the coach assigns devices via participatingDeviceIDs on the session.
  • The tracking producer never disturbs the authoritative local session (which is still mirrored to IndexedDB and bulk-uploaded at finish). Each operation is written to the live outbox (packages/core/src/offline/live-queue.ts, store pendingLiveOps) before it is sent: one record per tracking set, so a later operation on a set replaces the waiting one. An operation that could not be sent goes out on the next retry opportunity, with the next set, or with the app's own attempt every five seconds — on whatever screen the app shows (see "What a tablet does by itself"); one the server refuses is dropped. The floating chip names how many sets wait while the device is disconnected.

Backend contract (wired in @enode/core)​

  • /api/workout_live_sessions (JWT) — coach CRUD + logo (GET /:id/logo, ETag). DTOs + api in packages/core/src/api/{dtos/,}live-sessions.ts. The Create/Update/Return DTOs carry an opaque config?: string | null the backend persists verbatim (added 2026-07-17); the portal stores its versioned view config there (see "Server-backed view config").
  • /api/workout_live_session_sets (JWT + device-id) — device push (POST), tracked update/delete (PUT|DELETE /tracked/:currentPersistentSetID), and feed reads (GET /reduced|complete/:liveSessionID). currentPersistentSetID is the tracking app's own WorkoutSet.id — the backend's correlation key. Each rep carries currentPersistentRepID, the app's own WorkoutRep.id (the eccentric and the concentric phase of one repetition are two reps with two ids). On an update a server with rep ids continues the stored rep that holds the id, so every rep keeps its own sensor packages when another rep is removed or added; a server without them ignores the field and matches by position.
  • Joining from the device (JWT; the device is the one the token was issued for). GET /workout_live_sessions/code/:code previews the session behind a join code, POST …/code/:code/join links the device, POST /workout_live_sessions/leave unlinks it. The answers a person can run into by typing a code (wrong code, device in another session, too many tries, not a phone or tablet) come back from api/live-sessions.ts as outcomes, not as errors. A code is sent normalized (live-session/join-code.ts): the server ignores case and blanks around a code, and not the blank a screen shows inside it.
  • Session states. A session created with startsInLobby is in its lobby until POST …/:id/start; then live; then ended. The session DTO carries state, startedAt and joinCode, the device-session DTO workoutLiveSessionState. A set first stored in the lobby is a test set (lobby: true) and is left out of reduced and complete unless the read asks for it (includeLobbySets).
  • device_session.live_session_changed on pro:user:<userID>: the server tells a device when it is linked or unlinked and when its session starts, is renamed or ends. device-session/stream.ts applies it to the device-session store, so nothing has to be re-read. Every consumer of useOwnDeviceSession() holds the subscription.
  • /api/realtime/events?topic=workout_live_session:sets:<liveSessionID> (JWT) — the set stream the live views follow: live_session_set.created, .updated and .deleted. Admitted: the session's owner and users with access to the owner; anyone else gets 403.
  • /api/competition_dashboard (displayToken, no JWT) — the public gym-display attempt-board path (the standalone comp-dashboard app). The portal's own Competition view (below) derives the attempt board from the live set feed instead; joining the displayToken path stays a later phase.

Core domain — packages/core/src/live-session/​

ConcernFiles
Session list (coach)sessions-store.ts, sessions-hooks.ts (store-kit)
Producer (tracking push)producer.ts, broadcast-diff.ts, use-broadcast.ts, ../offline/live-queue.ts, outbox-drain.ts (sends the queue on every screen)
Ranking (shared)derive-leaderboard.ts (pure + tested; used by the portal's views and by the tracking app's standings)
Standings on a training deviceuse-live-standings.ts, standings-follow.ts, read-scheduler.ts (pure + tested) — the session's sets, pushed where the server admits the device and otherwise re-read after each own delivery, ranked with deriveLeaderboard
Feed (consumer)feed-types.ts, feed-schema.ts (zod), feed-reducers.ts, feed-store.ts, feed-stream.ts, feed-hooks.ts
Lobby (who is in, and ready)lobby-store.ts, lobby-stream.ts (the session's own events, and the read every 30 seconds), lobby-hooks.ts, lobby-readiness.ts (pure + tested)
A screen's own connectionstream-health.ts (pure + tested: is this screen blind, is a reload due), hooks useLiveScreenConnection and useUnattendedDisplay in feed-hooks.ts; the state itself comes from ../realtime/client.ts
Joining from the devicejoin-code.ts, ../device-session/stream.ts, presence.ts + use-presence.ts (the device's heartbeat)

The tracking producer is wired with a single line in TrainingSession.tsx (useLiveSetBroadcaster(sessions)) — a pure diff of completed sets over the existing sessions state, so no per-set network call is scattered through the set handlers.

How a live view stays current​

The consumer feed loads a REST snapshot (the complete read: every set with its reps; the server adds the sensor packages for the 25 newest sets only) and then follows push. There is no interval polling.

  • Set topic. subscribeLiveSessionFeed (feed-stream.ts) joins the session's realtime topic and applies each frame to the store. A created or updated frame maps to exactly the set the snapshot returns, so nothing is re-read per set.
  • Display signal, only where the topic is refused. A server that answers the topic with 401, 403 or 404 still pushes a state event to displays on every set. Only then does the view join /competition_dashboard as a display (dashboard-bridge.ts) and re-read the snapshot on each event. Joining registers a display device per browser and costs a full read per set, which is why it is the fallback. TODO: delete dashboard-bridge.ts once the production backend grants the topic; backdev does, production could not be checked.
  • When the snapshot is read again: every time the stream opens (the first time and after a reconnect, because the server does not replay what it sent meanwhile), when the tab returns to the front or the connection comes back (feed-hooks.ts), and on the manual Refresh action.
  • Frames during a read. A snapshot replaces the whole list and can have been taken before a frame that arrived first. feed-store.ts therefore applies the frames that arrived during a read once more on top of its result.
  • A read again asks only for what changed (backend handoff of 2026-10-15, after a session of 3,073 sets ran the server out of memory on 2026-10-14). reduced and complete answer with X-Live-Sets-Since, the server's clock when the read began, 5 s early. feed-store.ts keeps it per session and kind of read, and sends it back in the same header on the next read of that kind; the answer then holds only the sets created or changed since, and is merged by id (applyDelta). Beside it the store reads GET ids/:id, the ids the session still has, and drops every other set (keepSetsWithIDs); the frames of the read are applied after that, so a set that arrived meanwhile is not dropped. An answer without the header (a server before the change, a paired display's routes) is a whole snapshot, as before. board has no deltas. Live test 120-live-set-delta.
  • After a failed read (timeout, network, 5xx, 429 — classifyError(...).retryable) the store waits 2 s, 4 s, 8 s … at most 60 s, plus up to 1 s, and reads again by itself while a view or the device's standings still follow the session (holdLiveFeed). Cues during the wait send nothing; Refresh and Try again (manual: true) read at once. A 4xx is not tried again.
  • Sensor packages apart from the feed (set-packages.ts). A bar path needs a set's packages, which the reads no longer carry for every set. The packages of every set version that passes through the store (frame or read) are kept per set and its reps; useDecodedLiveReps fills a set from them, and reads a set it has none for on its own (GET /workout_live_session_sets/:id, three at a time at most). The views show bar paths for a few sets at a time (current and earlier attempt, the detail, the wall), so the pages the server offers (complete?limit=&before=, X-Next-Before) are not used. Live test 122-live-set-packages: on a session of 30 sets the read again cost 21 kB instead of 517 kB.

When a screen loses its stream​

The realtime client (packages/core/src/realtime/client.ts) keeps one stream per topic and says where each stands: realtimeStreamState(topic) answers connecting, open, retrying (with since, when the client noticed, and lastFrameAt, when the last frame arrived), refused or suspended; subscribeToRealtimeStreamStates tells a listener when any of them changes. A state object stays the same object until the state changes, so it backs a useSyncExternalStore snapshot. liveStreamState(liveSessionID) in stream-health.ts is the same for one live session.

  • Noticing. A stream that ends with an error is noticed at once. One that dies silently is noticed by the watchdog, 35 seconds after its last frame (the server sends a heartbeat every 15).
  • Trying again. The wait before attempt n is drawn at random between zero and 1, 2, 4, 8, 16, 30, 30 … seconds (realtimeBackoffDelay). The draw is what keeps every screen of a gym from returning in the same second after a server restart. When the browser fires online, a stream that is waiting tries at once (retryRealtimeNow); an attempt that fails goes back to waiting.
  • Catching up. The server does not replay what it sent meanwhile. Every open re-reads the set snapshot and the device list, so a screen that was cut shows the same board afterwards as one that never was.
  • Blind. screenConnection(state, now) calls a screen blind when its stream has been retrying for 5 seconds (BLIND_AFTER_MS): a drop that is over sooner is a deploy or a proxy's idle timeout and not worth a word. So a screen says that it is blind at most 40 seconds after a silent cut. A refused topic is not blindness (the feed follows by the display signal), and neither is a stream suspended in a hidden tab.

A display that pairs by number — display-token.ts, display-feed.ts​

A gym display can show a session without a coach's login (decision D3). This section describes the calls, the reader and the contract. The three places that use them follow it: the display's page, the coach's "Displays" sheet and the overlay's output without a sign-in.

Pairing (display-token.ts). The display asks for a number (requestDisplayPairing: six digits, a secret, an expiry ten minutes ahead and how often to ask, five seconds). It shows the number and asks with the secret (pollDisplayPairing) until the answer is paired. The coach types the number into a session (confirmDisplayPairing, with a name for the screen). The answer paired carries the token and the session's id and is given once; the next ask is gone. The display keeps both in localStorage (keepDisplayToken, readDisplayToken), so a reload does not need the number again. The owner lists a session's displays with getLiveDisplays and removes one with removeLiveDisplay.

What a coach can run into is an outcome and not an error, as for a join code: not-found for a number that is mistyped, expired or already used, and too-many-attempts after ten wrong numbers. A number that was confirmed in between does not start that count again, and while it lasts the right number is refused as well. A session that has ended takes a display too, on a server with backend response 6 (13 Oct 2026); its token is good for 24 hours from the pairing. A server from before answers not-found for it, as for a wrong number (see "Add a display" below for what the sheet then says).

Reading (display-feed.ts). The token is nobody's login: every route of a signed-in user answers it 401. The display reads its one session through routes of its own under /live_displays/, with the header display-token (displayRequest), and follows it on the stream /live_displays/events. The typed reads are readDisplaySession, readDisplayLogo, readDisplayDevices, readDisplayBoard, readDisplaySet, readDisplaySets, readDisplayBestBefore, readDisplayMetrics, readDisplayTextContents, readDisplayDataPackageTypes and readDisplayExerciseDefinition.

Filling the stores. followLiveDisplay(token) makes a wall under a display's token the wall under a coach's login. It plugs the display in at two seams, and nothing above them asks which of the two it is:

  • setLiveSessionReads in api/live-sessions.ts. For that one session, getLiveSession, getLiveSessionLogo, getLiveSessionDevices, getLiveSessionSetsReduced, getLiveSessionSetsComplete and getLiveSessionBoard are answered by the display's routes. So the feed store, the lobby store, the running sets and the result read as they always do.
  • setRealtimeTopicSource in realtime/client.ts. The session's topic is served from the display's stream, which carries the same events under the same names. So set frames, device rows and running sets reach their usual subscribers, with the same reconnects, and the line that says a screen lost its connection speaks about this stream.

followLiveDisplay also puts the session into the session list and keeps it current there (read at once, again every time the stream opens, and from the stream's live_session.updated), and says every 20 seconds that the display is here (sendDisplayPresence), which is the time the owner's list shows.

Call it before a view of the session mounts: a subscription that is already open stays on the stream it was opened on.

The catalogues. A wall needs the metrics (names, units), the texts behind text ids and the kinds of sensor package. A signed-in page loads them into their stores through its own routes; followLiveDisplay registers the display's reads at a third seam, setCatalogueReads in api/catalogue-reads.ts, and loads the three stores. getMetrics, getMetricCategories, getNormativeBaseCategories, getTextContents and getDataPackageTypes ask the registered reads first. The metric categories are read from GET /live_displays/metric_categories (backend response 6 of 2026-10-13; readDisplayMetricCategories); a server from before answers 404, which is asked once per pairing and read as an empty list. The normative base categories have no route for a display and are always empty. Without categories the metrics store says hasData: false, and no view of a wall asks.

Whether a lift is a weightlifting lift (the bar path beside an attempt) is the display group of the exercise's base. A display cannot read a base; its read of the definition writes the group out since response 6 (exerciseBase.displayBaseExerciseGroup.id), and useIsWeightliftingLift takes it from there. From a server before that a paired display shows no bar path.

The two frames. On a display's stream live_session.updated has the shape of GET /live_displays/session and live_session.device the shape of a row of GET /live_displays/devices since response 6; before, both were the owner's frames. displaySessionOf and displayDeviceFrameOf take either: the session is cut down to what a display may know, and a device's row gets the athleteIDs the lobby reads from its athletes. Word that a device left ({ deviceSessionID, left: true }) passes as it is.

Reading only. isLiveSessionReadOnly(id) in api/live-sessions.ts is true for a session that is served through other reads. A caller that would store something with the session asks first: storeResultSummary writes nothing on a display, which shows the result a signed-in page stored or the one it works out for itself.

Where the display's answers differ from the owner's, the reader makes them the owner's shape:

DifferenceWhat the reader does
The session names its owner by id, name and photo flag, and has no device sessionsdisplaySessionOf fills participatingDevices with an empty list and trainable with false
The live_session.updated frame on the display's stream is the owner's frame: the owner's email, role and tags, and every device's idThe topic's source cuts the frame down with displaySessionOf before any subscriber sees it. Nothing of the rest reaches a store
The devices read names the athletes on a device as people (athletes); the device event names them by id (athleteIDs)readDisplayDevices fills athleteIDs and keeps athletes
There is no read of all sets with their sensor packages, only the board (a rep says hasDataPackages) and one set at a timereadDisplaySets("complete") reads the packages of the three newest sets that have any (DISPLAY_SETS_WITH_PACKAGES). A set that arrives while the display watches brings its packages in its frame

Removed. When the owner removes a display, the server ends its stream and answers its token 401. The realtime client keeps trying a stream that was open once, whatever it is answered. So the reader asks with a sign of life the moment the stream drops, and any request of its own that is answered 401 means removed: it stops, forgets the kept token if it is still that one, and calls onRemoved once. A server that is merely away is not a removal.

What a display cannot read (backdev, 2026-10-08):

  • An athlete's photo. No route; a set says hasImage and that is all.
  • The metric categories and the exercise bases. A display's metrics have their names and units and no group, and whether an exercise is a weightlifting lift cannot be told.
  • Anything it would have to write: a ruling, a session's stored result and the bests kept in it. A display shows what a signed-in page stored.
  • A session that has already ended, for a display that was not paired before.

The list for the backend is in live-hub-backend-handoff-open-2.md, "What a display cannot read yet".

Checked in a browser by live test 101-display-page (runs with ENODE_DISPLAY_PAGE=1): a display that never signed in beside a coach's Live Hub, from the number through a refused number, the lobby, the board, a reload, Remove and pairing again to the result; and by live test 95-overlay-run, whose output is a browser that never signed in.

Checked by display-feed.test.ts (the shapes, the seams, removal) and by live test 100-live-display-contract against backdev: pairing, what the token may not open, every read, and the reader with nobody signed in, from the lobby through a running set, a finished set with its sensor packages, a ruling, a delete, Go live and the end, to the removal. Two of its checks are it.fails: an athlete's photo, and the session frame that tells too much. Each turns red when the server has the point.

The display's page — apps/portal/src/app/display/​

/display/ is the address a television opens. It lies outside /dashboard, like /join and /overlay: no chrome, no token gate, and a 401 never sends it to the login screen (setUnauthorizedRedirectSuppressed).

  • Not paired: useDisplayPairing (use-display-pairing.ts) gets a number and the page shows it large, with three steps for the coach. The hook asks with the number's secret as often as the server says, takes a new number when the old one has expired, and keeps the number on screen through a lost connection.
  • Paired: the token is kept (keepDisplayToken) and PairedDisplay calls followLiveDisplay. The wall mounts only after that, and it is the wall of a coach's login: PresentMode with the session's configured view, and WallResult over it once the session has ended. A reload comes back to the session without a number.
  • The profile (desk, television, projector) is the display's own choice, kept in this browser as on any display (enode.live.displayProfile); the server has no place for it.
  • Removed by the coach: the page says "This screen was removed from its live session" and shows a new number.
  • Exit on the display's controls asks first, then forgets the token and shows a new number. The owner's list keeps the screen until it is removed there.
  • Still connecting (12 Oct 2026): when the session has not arrived 20 seconds after pairing, "Connecting…" gets a line — "Still connecting. Check the portal shows this display as added." — and a "Start over" button, which forgets the token and shows a new number (STILL_CONNECTING_AFTER_MS).

The page asks no route of a signed-in user (13 Oct 2026, re-audit finding 7; live test 101-display-page fails for any request outside /live_displays and for any answer 401). Each caller is stopped at its source, not by swallowing the refusal:

  • readsAsDisplay() in api/catalogue-reads.ts says that the page reads as a paired display. loadExercises, loadUsers, ensureExerciseBase and refreshUnreadCount ask it and do not load (the unread count is also not asked for where nobody is signed in at all). Athletes and exercises are named from the sets and device rows.
  • An athlete's bests from before today come from the display's best_before (see "The line knows the past"); the last sessions are not asked for.
  • An exercise definition is read through the display's route (CatalogueReads.exerciseDefinition, asked by getExerciseDefinition).

Photos (display-photos.ts, backend response 6 of 2026-10-13). A person's photo is read through the display's own route, GET /live_displays/users/:id/image (readDisplayProfileImage), never through /users/profileImage/:id. The seam is CatalogueReads.profileImage: the profile image store reads through it, and a page whose reads leave it out asks for no photo at all. Whose photo, and when:

  • Only people an answer names with hasImage: true — a set's lifter, the athletes and stations of a device row, the session's owner. displayReads and the stream's frames tell display-photos.ts of them before the answer reaches a store, and it hands the new ones to reconcileProfileImages. Everyone else is drawn by initials without a request.
  • One photo at a time, once per person. A 404 is that person's answer until the page is loaded again, or until a later answer names them with a photo they did not have.
  • A server from before response 6 has no such route and answers everybody 404. The first 404 for a person whose stored SET says they have a photo, before any photo was answered, is taken for that: nothing more is asked until the page is loaded again. An old server gets one request, not one per athlete.
  • The browser's cache handles the route's ETag; the client sends no If-None-Match of its own.

The coach's "Add a display" sheet — display-pairing.tsx​

An opened session has a visible button "Add a display" beside Present in its head — in the lobby and while it runs — and the same entry in its "…" menu (useDisplaysEntry gives the label, open and the entries; mounted in live-view.tsx and in result-view.tsx). The display's page tells the coach to choose "Add a display", so the control carries that name in every phase, also on the result of an ended session (13 Oct 2026; until then it read "Displays" there, and the instruction on the television led nowhere). Once a display is in, button and entry count them instead: "Displays · 2" (displaysEntryLabel; the list is read once when the page opens and kept current by the sheet). The demo has none.

A result takes a display too (package P6-07, 13 Oct 2026). The sheet of an ended session has the number field like any other, is titled as the control that opened it ("Add a display", or "Displays · 2" — displays-title), and says under its title that a display added now shows the result for 24 hours. The server does this from backend response 6 on (live-hub-backend-response-open-6.md, point 3; seen on backdev the same day: 200, and the display reads the ended session with its token). A server from before answers "not found" for every number typed into an ended session, as it does for a wrong number, so there the sheet cannot say "wrong number": it says "The display was not added. Read the number off it again — or, if the number is right: this session is over, and this server cannot add a display to an ended session yet. …" and names what works, Present on a screen that is signed in (notFoundRefusal, PairingRefusal in display-pairing.tsx). The two servers are told apart without a request: only one with the response says how a session ended (endedBy), on every ended session (endedSessionTakesDisplays). Live tests 117-live-response-6-contract (API) and 101-display-page (both pages) hold either server to its own.

When a display's token runs out. A token is refused (401) when the coach removes the display, 24 hours after its session ended, and — for a display added after the end — 24 hours after it was added. The display's page cannot tell these apart. It says "This display was removed from its live session." only when it saw the session running at that moment; otherwise (the session had ended, or the television was switched on again later and never got to read it) "This display no longer shows its live session: it was removed, or its day of showing the result is over. To show the result again, add this display with the number below." — over the new number and the three steps (LostPairing in app/display/page.tsx). TODO: the 24 hours running out was not watched on a real display (the backend has not tried it either).

The sheet has two parts:

  • Two steps: the address to open on the display, a field for the six digits (shown as "483 107") and a name for the display, with "Add" beside them. The button is always enabled: pressed with fewer than six digits it says so under the field. A number no display shows and too many wrong numbers are each said in a sentence under the field (confirmDisplayPairing's outcomes); anything else goes through the error presenter.
  • Showing this session: each display as a row with its name, whether it is connected, and "Remove". displayPresence decides the middle part on the server's clock: connected while the last sign of life is younger than 60 seconds (a display says so every 20), otherwise "Not heard from for n minutes". The list is read again every 20 seconds while the sheet is open.

The keyboard in the sheet (13 Oct 2026). Opening it puts the focus in the Number field (Sheet's initialFocus="first-field"), Tab stays among the sheet's controls, and closing it — Escape, the cross, a tap beside it — puts the focus back on the control that opened it: the "Add a display" button, or the "…" button when it was opened from the menu, whose entry is gone by then. This is Sheet's own behaviour since that day (useModalFocus in packages/ui/src/sheet.tsx), so every sheet of both apps has it; a sheet that opens by itself while somebody types elsewhere leaves the focus in their field, and takes it when they are done (the field gives the focus up to nothing). A sheet that goes on to its next step holds the focus itself when the control that had it is gone — the join sheet's code field, once the code is looked up. That field takes the focus by itself only when nobody types elsewhere (typingOutside), because a join link can open the sheet at any moment.

One read for devices and displays. The displays come with the route of the session's devices, which the lobby's watch reads in the same moment a page opens. getLiveDisplays shares a read of that route that is already on its way (liveSessionDevicesOnTheWay); the read that follows adding or removing a display asks the server itself (fresh).

On the result of an ended session (block P5e, 2026-10-08) the entry is the last of the page's menu, under "Refresh". An ended session takes no new display: the server answers the pairing with 404. So the sheet has no number field there. In its place one sentence says that the session has ended, that a display added before keeps showing its result and that a new one cannot be added. Under it the displays are listed as before, each with "Remove"; with none the list says "No display shows this result." instead of "No display yet.". Looked at in a browser with a real ended session and two paired displays: "Remove" takes the row out of the list.

The overlay's output without a sign-in — apps/portal/src/app/overlay/page.tsx​

The output of the video overlay follows a real session in one of two ways. In a browser that is signed in to the portal it reads the session as any viewer does. In one that is not, it pairs as a display: it shows a number on a small plate ("Connect this output"), the operator presses "Output without a sign-in" on the control page, which opens the "Displays" sheet, and types the number. From then on the output follows the session with its own token (followLiveDisplay), also after a reload. It follows the session the number was typed into. A token the browser holds for another session is not used. The demo's output is unchanged: it hears from the control page in the same browser.

Tracking app — live on a shared device​

A platform tablet is signed in once and a group lifts on it, so everything live in the tracking app speaks for the DEVICE and shows up where the athletes' names already are:

  • Live status button (live-status-button.tsx): a round header button in BOTH training headers (the overview and the tracking view, which covers the overview's header), present only while the device is in a live session. Tinted while delivering, muted while disconnected, with a count badge for completed sets the session has not received yet. Tapping it opens a card with the session name (readable only for the session's owner), the delivered and waiting counts, and what is shared. LiveStatusChip is the presentational half; every state is in the dev gallery at /debug/connection.
  • Athlete switcher (ExerciseDetailView.tsx): each athlete's place on the exercise beside their name.
  • Insights → Live tab (live-tab.tsx, added to InsightsSheet.tsx only while the device is in a live session): the session's standings for the exercise on the bar, with the athlete on the bar marked.

Joining and leaving a live session​

A phone or tablet gets into a live session from its own screen (live-session-row.tsx, a row in the sidebar):

  1. Code. "Join live session" asks for the six-character code that the portal shows on the session's card, in its header and in its editor. It can be typed the way it is shown ("K7M 2QX").
  2. Which session, and what is shared. The app looks the code up first and shows the session's name, who runs it and whether it has started. On a coach's login the device is a shared one: it gets a name in the session ("Platform 1", suggested by the server, editable) and the sheet says that everyone who trains on it is shown. On an athlete's own login the sheet lists what is shared and what is not, and the button reads "Agree and join".
  3. Joined. The row then carries the session's name and "In the lobby" or "Live" — with the device's name in the session where the server sends it ("Live · Platform 1"). Tapping it offers "Leave live session".

A device that is already in another session is asked whether to switch. A wrong code, too many tries and a device that is neither phone nor tablet are said in the sheet.

Scanning instead of typing (join-scan.tsx, join-scan-reader.ts). Where the device can be asked for a camera, step 1 has a second button, "Scan the code". It opens the camera inside the sheet and reads the QR code that the lobby and the gym display show beside the six characters. A scan only fills the code in: the code is looked up and step 2 is asked as always, so nothing joins by pointing a camera at a screen.

  • What is read: a join link of ours (codeFromJoinLink in join-code.ts) or six characters alone. A QR code of anything else gets "This is not a live session code", the demo's QR code "Nothing can join the demo", and the camera keeps looking. A code no session has comes back to the field, filled in, with the sentence a typed code gets.
  • The camera is the web view's own (getUserMedia), not the native part that records set videos. Capacitor's web view grants the request on iOS and asks for the camera permission on Android; both native projects declare the camera already, so the scan needs no native change. A camera that is refused or missing is one sentence, and typing stays.
  • The reader is the browser's BarcodeDetector where there is one that works (Chrome, Android's web view), and the jsqr library otherwise (iOS). The library is loaded when a scan starts, not with the app.
  • Checked by live test 89-live-join-scan (only with ENODE_TRACKING_URL): a headless Chrome whose camera is a video of a QR code joins a session on backdev. TODO: not tried on a real iPad or Android tablet. The camera prompt on iOS names both uses, set videos and the scan (NSCameraUsageDescription in Info.plist).

The row follows the server without a re-read: when the coach starts the session, removes the device or adds it by hand in the portal, it changes within a second (see device_session.live_session_changed above). While the session is in its lobby, the live status card says that a completed set is a test and does not count.

On the tablet's spine, and when nobody is watching the row. At 768 px and up the sidebar is a spine of icons; the live row keeps its words there ("Join live session", or the session's name with a dot that is green while sets get through and amber while the device is cut off), because an icon alone did not say that a session can be joined. Cut off, the expanded row says "Paused · 1 set waiting" in the warning tone instead of a green "Live", from the same reading as the header's status button. A change of the device's session that nobody on the device made is said in a toast (live-presence-keeper.tsx, live-session-change.ts): "Joined 'X' as Platform 1", "'X' has ended", "Your coach removed this tablet from 'X'"; the device's own leave is not a removal. The end of a session is said once: where the result sheet comes up (LiveResultPrompt) it is the message and there is no toast; the toast is for the cases in which the sheet does not show now — it waits for an open set, or the device keeps no result (endIsSaidByResultSheet). That holds for both ways a device learns of the end. The server's event names the session that ended. A device that slept through the event re-reads its device session and only finds itself out of the session; before it says anything it asks whether that session ended (liveSessionHasEnded in device-result.ts, changeOnceEndIsKnown), and an end is then said as an end — by the sheet — and not as "Your coach removed this tablet". Only the session's owner may read the session, so an athlete's own phone cannot tell the two apart after a re-read and still says "removed". TODO: the server would have to name the ended session on the re-read row (endedWorkoutLiveSessionID is only in the event) for an athlete's phone to say the end there too. From the result there is a way onward, beside "Done" and on the card in Insights → Result: a coach's login gets "Open full result", which opens the session's page of the portal's Live Hub (portalLiveSessionPath, signed in by the one-time code of open-portal.ts); an athlete on their own phone gets "Share", which hands the athlete's own result — session, exercise, number, place — as text to the system's share sheet (navigator.share), and is not shown where the browser has none (a desktop browser, an Android WebView). The session's sheet proposes "Close"; "Leave live session" is the other answer and is asked once more ("Leave 'X'? Sets completed here will no longer be shown."); "Join another session" is a text link under the two. While an athlete has not answered "Share your training?" (after "Later"), the row reads "Waiting for your answer" in the warning tone and a tap brings the question back. The same entry is available as a card for the Today screen (LiveTodayEntry in live-today-entry.tsx, sharing useLiveSessionEntry with the row). Typing the sixth character of a code looks the session up without a tap; "Continue" stays for a look-up that did not get through. On an athlete's own phone the sheet says "Your sets are shown in 'X'. You can stop sharing at any time." under the eyebrow "Your phone".

The code as a QR code​

A session's code is also shown as a QR code, so a tablet can scan it instead of having it typed in.

The link. The QR code holds a link, not the bare code: joinLink(code, origin) in packages/core/src/live-session/join-code.ts gives <origin>/join/?c=K7M2QX, where the origin is the address of the portal that shows it. A link lets any camera do something with it: the tracking app's scanner reads the code out of it (codeFromJoinLink), and a phone's own camera opens the portal's page named below. The code rides in the query and not in the path, because the portal is a static export (output: "export" in apps/portal/next.config.ts): a path with a code in it would be a page nobody built, and /join/ is one page for every code. The Live Hub demo's link ends in &demo=1.

Drawing it (apps/portal/src/app/dashboard/live/join-qr.tsx). JoinQr encodes the link with the library uqr at error correction M and draws it as an inline SVG with one path (qrPath, a pure function with a test next to it). The production link has 38 characters, which is a code of 29 × 29 modules; the demo's longer link is 33 × 33. The code is dark on a white field in the dark theme too, because a camera reads nothing else reliably, and the field includes the quiet zone of four modules, so it may stand on any background. The portal's address is only known in the browser: until the page runs there the field is empty, at its size. The element carries the link as data-link.

Where it is shown.

  • The lobby in the portal (lobby-view.tsx): beside the code in the panel "Phones and tablets join with this code", 176 px wide; under the code where the panel is narrower than 30 rem.
  • The lobby on a gym display (wall-lobby.tsx): on the left, as large as the canvas's height allows with the code in letters under it — 580 px of the room's 1440 × 810 canvas and 360 px of the hall's 960 × 540, which is about seven tenths and two thirds of the screen's height. The three steps and the device list share the right side, so fewer devices are listed than before the QR code: three rows in the room (six in two columns of short rows) and two in the hall; the heading says how many are not shown. The hall has no line for "Nothing counts yet". On a display that is not a wall (the near profile) the QR code is at most 22 rem wide and the parts stand under each other where the window is narrow.
  • A running session (live-view.tsx): "Join with" and the code in the status line are a button. It opens JoinQrSheet, the code and its QR code as large as the window allows, for whoever comes late. The sheet closes with Escape, with a tap beside it and with its own button, and holds the keyboard while it is open (useModalFocus). A running display's top line is unchanged.

All three name the same steps (useJoinSteps): open the tracking app's sidebar, tap "Join live session", scan or type the code.

The page the link opens (apps/portal/src/app/join/). /join/ needs no login and asks the server nothing. It reads its own address in the browser (codeFromJoinLink, isDemoJoinLink) and shows one of three things: the code, large, with the steps to join in the tracking app; for a demo link, the code and that it is the Live Hub demo's, which nothing can join; for a link without a whole code, that the link holds no code. A session is joined in the tracking app only, so the page itself joins nothing; on a phone it hands the code to the app (see "From the page into the app" below). It is laid out for a phone, as one column of at most 28 rem. The root layout's hosts are mounted around it as around every portal page, except the announcements.

From the page into the app (package P6-19, 13 Oct 2026; not tried on a real phone). On a phone or a tablet the page's code stands over one button, "Open in the enode tracking app". The steps by hand stay under it as "Or by hand". A desktop browser is shown no button (readHandheld in the page reads the user agent, and an iPad's touch screen), and its steps keep the heading "How to join".

  • The button goes to enodepro://join?c=K7M2QX (joinAppLink in join-code.ts), an address only the tracking app answers. The scheme is registered in apps/tracking/ios/App/App/Info.plist (CFBundleURLTypes) and apps/tracking/android/app/src/main/AndroidManifest.xml (a VIEW intent filter on MainActivity).
  • Nothing answered. A browser cannot ask whether an app is installed. The page waits 2.5 s after the press: if it is still in front, the line under the button turns into "Nothing happened? The app may not be installed on this device, or it needs an update. Follow the three steps below." A page that went to the back (the app took over) ends the wait and says nothing. iOS Safari additionally shows its own "address is invalid" alert when no app answers the scheme; the page cannot prevent that.
  • In the app (apps/tracking/src/app/workouts/today/join-from-link.tsx, mounted once in layout.tsx). JoinFromLink reads the address the app was started with (App.getLaunchUrl) and every address it is opened with while it runs (appUrlOpen). codeFromOpenedLink takes the code out of enodepro://join?c=…, enodepro://join/… and out of a join link of the portal; the demo's link and every other address give nothing. The code is laid down in join-link-inbox.ts (sessionStorage, one code, 15 minutes).
  • The sheet. Once somebody is signed in, the join sheet (JoinSheet with initialCode) opens with the code looked up: the confirmation ("Agree and join" on an athlete's phone, the device's name on a shared one). Not signed in: the code waits and the sheet comes up after the sign-in. In another session: joining asks "Switch live session?", as for a typed code. In this very session: "This device is already in this live session." A code no session has: the code step with its usual sentence.
  • Checked by unit tests (join-code.test.ts, join-link-inbox.test.ts) and in a headless tracking app, where the appUrlOpen event is raised by hand. What no test here can show: that iOS and Android hand the address to the app.

What is prepared for opening the app without the page, and what is missing. With the portal's address as an app link of its own (a universal link on iOS, an App Link on Android), the phone's camera opens the app straight from the QR code and the join page is never shown. The app's side is done: JoinFromLink reads the join link itself. The repository holds apps/portal/public/.well-known/apple-app-site-association (app WEAVEWJFK4.com.BMSportsTechnology.Vmaxpro, paths /join and /join/*). State of the steps (2026-10-14):

  1. Apple developer portal: done — the App ID com.BMSportsTechnology.Vmaxpro has the capability "Associated Domains".
  2. apps/tracking/ios/App/App/App.entitlements: done — com.apple.developer.associated-domains holds applinks:portal.enode.ai. portaldev.enode.ai is left out: Apple cannot read the file behind deployment protection. Takes effect with the next app build.
  3. Vercel: apps/portal/vercel.json serves /.well-known/apple-app-site-association as application/json (the file has no extension). TODO: confirm in the Vercel dashboard that the project's Root Directory is apps/portal, otherwise Vercel does not read that file. Check after the deploy: curl -I https://portal.enode.ai/.well-known/apple-app-site-association answers 200, application/json, no redirect.
  4. Android: a second intent filter on MainActivity with android:autoVerify="true", scheme https, host portal.enode.ai, path prefix /join; and apps/portal/public/.well-known/assetlinks.json naming the package com.enode.enodeone with the SHA-256 fingerprint of the Play app-signing certificate (Play Console → App integrity). The file is not in the repository because the fingerprint is not.
  5. A phone: scan a lobby's QR code with the camera, with the app installed and without it.

How far it reads (measured 2026-10-08 on screenshots, not with a phone). On a 1920 × 1080 screen one module of the room's QR code is 20.9 px and one of the hall's 19.5 px. Screenshots of both lobbies, scaled down to imitate distance, were decoded with jsqr down to about 1.5 px per module. No phone was pointed at a real screen from five metres.

The join page shows no backend announcements (PortalAnnouncements.tsx in the portal's app/ leaves the host out there): they are written for coaches, and whoever scanned a code is there for the three steps.

An athlete's own device is asked first​

On an athlete's login the device is one person, and nothing of that person is shown before they agreed, once per session (sharing-consent.ts, useLiveSharingConsent):

  • Joining by code is the question: the join sheet lists what is shared and its button reads "Agree and join".
  • A device the coach added by hand never passes that sheet. When it learns that it was added, the app asks (live-sharing-prompt.tsx, mounted once in the app's layout): "Agree and share" records the answer on the server (acknowledgeLiveSharing), "Don't share" takes the device out of the session.
  • Until the answer nothing is sent: useLiveSetBroadcaster is not armed, the heartbeat is silent, and the header's live status button is not shown. Sets completed before the answer are not sent afterwards either.
  • "Later" is a way out (since 2026-10-12): the sheet steps aside for this run (deferSharingConsent, in memory), nothing is sent, and the live status button shows, muted, with "You haven't answered yet" and "Answer now" (askSharingConsentAgain). The next start of the app asks by itself.
  • Without a connection both answers are requests the server cannot be given; the sheet disables them and says so ("You're offline … or decide later"). The answer is not queued. TODO: not seen in a browser — the store is unit-tested and the sheet type-checked only.
  • A tablet under a coach's login is never asked, and says so in one line at the top of the Insights sheet's Live tab (live-tab.tsx): "Shared tablet: the coach's sign-in shares every set completed here."

The answer is kept on the device, per session and user; the server only records that the question was shown, and a device cannot read that back. A coach's shared device is never asked: there the coach decides, and the join sheet says that everyone who trains on it is shown.

A device with an app that predates this cannot ask. Added by hand, it shares as before.

A "Don't share" the coach can see (package P6-22, 13 Oct 2026). An athlete who answers "Don't share" is in no row of the lobby and in no table of the result, and the portal could not tell them from somebody who never came. The answer is recorded by a server with backend response 6 (live-hub-backend-response-open-6.md, point 1), and the clients switch on by themselves against it:

  • The app's "Don't share" calls declineLiveSharing (packages/core/src/api/live-sessions.ts): POST /workout_live_sessions/decline_sharing, which answers 204 whether the device was in a session or not, and leave on a server without that route (404). Either way the device is out of the session.
  • The server keeps at most one answer per session and athlete: it stays when the session ends and when the coach adds the phone again, and goes when that athlete agrees on their own device (acknowledge_sharing, or a join by code).
  • The device list a coach reads (GET /workout_live_sessions/:id/devices, also for an ended session) carries sharingDeclined, newest first: userID, declinedAt, deviceName. lobby-store.ts keeps it as declined beside the devices (sharingDeclinesOf), and puts an athlete first at once when a device's left frame says why it left. When a device's row turns to "agreed" the list is read again: the row does not say whose device it is, so nobody is taken off on a guess. useLiveSessionLobby returns it.
  • Lobby (lobby-view.tsx, SharingDeclinedLine in sharing-declined.tsx): under the device rows, "1 athlete chose not to be shown: Mia Schulz. They answered “Don’t share” on their own phone. Nothing of them is sent, and they are not in the result." With the names (decided by the product owner, 13 Oct 2026): only the coach sees the lobby. An athlete the coach's list has no name for stands there by the device they answered on.
  • Result (result-view.tsx, useSharingDeclined): the same line at the foot, the count without names — a result is presented and exported. It is read once when the result opens, and also stands under an empty result.
  • An athlete who is shown all the same is left out of the line. The server keeps the answer of an athlete who said no on their phone and then trains on the coach's tablet. The lobby leaves out whoever a device that has agreed names, the result whoever has a set in it (declinedAndAbsent), so "nothing of them is sent" stays true.
  • Nobody declined, or a server without the field: no line. Displays and exports never have one.

Seen on backdev on 2026-10-13 (live test 115-live-sharing-decline-contract, which reads the server's build first and is green on either): 204 for the decline and for a second one; one entry with the phone's name; the left frame with the same object, and the open lobby naming the athlete without a read; the entry kept when the coach adds the phone again and gone after "Agree and share"; an ended session's list still naming them; a second "no" moving declinedAt in one row. The store's part is unit-tested (lobby-store.test.ts, lobby-stream.test.ts, api/live-sharing-decline.test.ts). TODO: the line itself has not been looked at in a browser on a real session.

A phone that leaves loses its set stream (13 Oct 2026). A server with response 6 ends the open stream on a session's set topic for the user of a device that left — "Leave", "Don't share", removed by the coach, moved to another session, the session's end — unless that user owns the session, has access to its owner or still has another device in it; the next stream of that phone answers 403 (point 8). Two things in the clients make that a quiet end, whichever comes first:

  • The realtime client (realtime/client.ts) takes a 401 or 403 for a stream that WAS open as a refusal: the state turns to refused, the subscribers are told once (onRefused), nothing is tried again and nothing is marked offline. Until then it kept reconnecting such a stream for ever and called the device offline on every attempt. A 404 after an open stream is still retried (a proxy answers it while the server behind it restarts), and no 4xx is read as "offline" any more.
  • The follower of a device's standings (standings-follow.ts) asks the server where the device stands (loadDeviceSession) when a stream that was open is refused. If the device is out, its device session says so and everything keyed on it stops: the standings, the live status. The usual order is the other one — device_session.live_session_changed arrives first, the views let go of the topic, and the server's close reaches a subscription that no longer exists.

Seen on backdev with the real client (live test 115): the phone's stream open, then after "Leave" refused with 403, one open, one refusal, no further attempt. Unit tests: realtime/client.test.ts ("a stream that was open and is refused when it is opened again"), standings-follow.test.ts ("a stream the server takes away"). TODO: not looked at on a phone in a browser.

On the device, a 204 to a set — "this device is in no live session" — is not a delivery: the outbox drops the operation, does not count it, and the producer re-reads the device session so the live status disappears (LiveSendOutcome in offline/live-queue.ts).

At most 24 hours after Go live (decided by the product owner, 2026-10-15; session-day-limit.ts). A session nobody ends keeps growing, and every read of it with it. At Go live (startLiveSession in sessions-store.ts) the session gets startedAt + 24 h as its end date, or keeps an earlier one; a session from a server without a lobby gets it at its creation, counted from createdAt. The lobby does not count. The editor of a running session refuses a later end, and a fixed end taken away becomes that latest end. A failed update after Go live is only logged: the session runs, and the next save in the editor sets the date. The server ends the session when the date passes, as with any end date. Live test 121-live-day-limit.

Ended by the idle limit (2026-10-12; the server's word 2026-10-13). A server with backend response 6 says how a session ended (endedBy: owner, expiration, idle) and when its last set was stored (lastSetAt); one from before reports endedAt alone. endedBy in live-waiting.ts answers date, idle or hand for both:

  • With the server's word (endToldByServer): owner is hand. expiration and idle are taken only where endedAt stands where the date or the limit put it (endedByDate: endedAt is the end date; the limit: endedAt is lastSetAt — or Go live — plus the minutes, within a second). The server stores no reason and reads endedBy off the times as they are now, so its word alone can say what did not happen: "End session" pressed on a session that had already run out leaves expiration or idle with endedAt at the press, and an end date or idle limit changed after "End session" turns owner into expiration or idle. In those cases the end is read as hand, and nothing says "ended by itself" or "give it a later date and it is live again".
  • Without it: the times are read as before. endedByIdle takes a session with endsAfterIdleMinutes whose end stands the idle minutes after its last set (or, without one, after it went live) within IDLE_END_TOLERANCE_MS as ended by its limit, most likely, and the sentence says "probably".

The empty board of such a session says "This session ended by itself — It ended after 1 hour without a set" ("Probably ended after …" without the server's word) with "Run again" (live-waiting-state.tsx, which makes the next run as the result page does), and the hint under "Ends by itself" explains the rule in one sentence.

What opens an ended session again (seen on backdev, 13 Oct 2026; live tests 114 and 117). Only "End session" stores an end. A session that reached its end date is live again, with its code, when it is given a later one. A session its idle limit ended is live again when the limit is made longer or taken off — the editor's device group says so ("A longer limit under “When it ends” opens it again, …"; until 13 Oct it said that devices could not be added to it any more). A session ended with "End session" stays ended whatever date or limit it is given, also when the press came after the date had passed — which is why endedByDate asks for endedAt to BE the end date and no longer for "at or after it".

The editor of an ended session (13 Oct 2026; endChangeOpens in live-waiting.ts, EndGroup in session-form.tsx, session-editor-page.tsx).

  • Ended by hand: the part about the end offers no limit and no end time. It says "This session was ended. A new limit or end time does not open it again." and has "Run again", which starts the next run as the result does (a changed form is asked about first). The overview's line reads "It was ended, and stays ended".
  • Ended by its idle limit or its end date: the overview's line says how ("Ended by itself after 1 hour without a set", "Ended at its end date"; "probably" only where the server does not say endedBy). A notice over the end's fields says what opens it again. Once the limit or the date set there would open it — neither has passed, counted from the last set — the notice turns into a warning ("Saving this opens the session again"), the overview's line ends in "· opens the session again", Save reads "Save and open again…" and asks first ("Open the session again?", with the effect "This opens the session again, with its join code."). A longer limit that has passed as well says so and opens nothing.
  • After that save the coach is on the session's board, also when "Edit" was pressed in the hub's list, and a toast names the join code. Seen on backdev: the session is live with the SAME join code, its lifts are in it, and the tablet that had joined is still one of its devices — its next set was stored without a new join, which the question before the save says.
  • "Run again" is the other way on: a NEW session with the same settings, a new code and its own result. The result's note about an idle end names both ("A longer limit opens it again, with its lifts. “Run again” opens a new lobby with the same settings.") and has a button for each.

The idle end, seen on a real session (package P6-23, 13 Oct 2026; live test 114-live-idle-end, ENODE_IDLE_END=1, 85 s).

  • The server ends the session, not a page. endsAfterIdleMinutes is a field of the session; the server reads a session as ended once the minutes have passed since its last stored set (or, without one, since Go live). No portal page, display or board has to be open: with nothing open, the session read ended one minute after Go live, and endedAt was that moment to the millisecond (60 000 ms; with a set, 60 001 ms after the set was stored). From then on it takes no set (the device is told "not in a session") and its code is gone. A session in the lobby does not idle out.
  • A coach's open page follows by itself, without a reload: it leaves the board for the result. It hears of the end on its re-read of the session once a minute (SESSION_REFRESH_MS in live/page.tsx), so up to a minute after the end; 2 s in the run of 13 Oct. Whether the server also pushes live_session.updated at that moment was not looked at.
  • The result says why, also when there are lifts. A result with lifts had no word about the idle end (only the empty one had). It now opens with one line, EndedByIdleNote in result-view.tsx (live-result-ended-by-idle): "This session ended by itself after 1 hour without a set — its idle limit. Run it again to continue with the same settings." ("…by itself, probably after…" on a server that does not say why) and the button "Run again". The empty result keeps its panel with the same sentence and button.
  • The short limit is the test's alone. The server takes any whole number of minutes; the test asks for one through the API. The portal's choices stay 1, 2 and 4 hours and never (IDLE_OPTIONS); nothing in the portal or the app was changed to offer less, no debug switch exists for it.
  • When the server says why (endedBy: owner, expiration, idle; lastSetAt): endToldByServer in live-waiting.ts takes its word before the times, and the lines lose "probably". backdev sends the fields since 13 Oct 2026 (endedBy: "idle", lastSetAt a minute before endedAt). The test reads the server's build first (tests/live/support/live-server-build.ts) and holds either server to its own: with the fields no "probably" on either result, without them "probably" on both.

The result of an ended session — result-view.tsx, wall-result.tsx, session-result.ts​

Blocks W4 and W14 of the work split in LIVE_HUB_CONCEPT.html (phase L6, wrap-up). A session that has ended has a result: a final table per exercise, a podium, what the session added up to, its personal bests and a few facts. It is shown in the hub, on a page of its own, on the display and in a PDF. None of it needed a server change.

One word and one date. A session that is over has "Ended" for its state and "Result" for what is left of it: the hub's button, the page's line ("Result · 12 Oct 2026 · 15:40 – 15:43"), the display, the PDF's label ("Leaderboard · Result") and the toast. The ranking is named as the board named it while the session ran: "Load · best set", and "best attempt" only where the rules count attempts (resultWordOf in display-rule.ts, which is liftWordOf). The sentence stands once, whole, over the page (ResultRanking); a table's head is the exercise and how many lifts it counts ("17 attempts"). Every day and time of the Live Hub is written by live-format.ts (formatClock, formatDay, formatSpan, formatDayAndClock, formatMoment, formatRecentDay, formatWeekday): to the minute, never with seconds, also in the Leaderboard's "Last set" column; no other file of the hub calls toLocaleDateString or toLocaleTimeString.

A result says four things, in one order, wherever it is shown (block V4b, 2026-10-07): who won each exercise, who beat their own best and by how much, the full table, and — last and quiet — what the session added up to. The page, the display and the PDF differ in how they draw the first; none of them opens with the session's totals. On a phone the four stand in one column, a table shows place, athlete and the ranked value only, and below xl its rule stands under the title in full instead of beside it.

Where a session stands decides what is shown. sessionPhase (session-result.ts) reads lobby, live or ended from the session, and takes endedAt for an end on a server without states. page.tsx shows the lobby, the board or the result by it. It follows a change by itself: when a session ends — "End session" here, on another screen, its idle time or its end date — the session list changes by push and the result stands where the board stood.

The hub (live-hub.tsx) shows what is current as cards and what is over as a list (block H1, 8 Oct 2026). On top stand the sessions that run, then those that wait in their lobby, side by side: one card has the hub's width and lies on its side, two and four stand two in a row, any other number three in a row where the hub is wide enough (cardColumns; the widths are container queries, so a narrow window gets one column). Under them "Ended" (the state chip's word; "Finished" until 12 Oct 2026), the latest end first, five until "Show all", as one list with a rule between its rows.

A card (LiveSessionCard) holds, from the top: the session's picture as a square of 80 px beside its state (LiveStateChip), since when it runs, its name and one line about it (the format, what counts, its devices); then what is happening in it; then the code a tablet joins with (JoinCode, boxed; in a wide card it stands in the top line instead); then its actions.

  • What is happening in a running session is its last lift: the athlete, the exercise and the load, with "No lift" for an attempt that was ruled out, and beside the label how many athletes and sets the session has. In a waiting session it is how many devices are in the lobby.

  • What "N sets" counts (set-counts.ts). Said of a whole session it is the sets the session COUNTS — countedSets, the rule its result is worked out with: under rules the attempts everyone gets, on a competition board the work sets, otherwise every set. The card (hubPulseOf with the session's rankingForSummary), an ended session's line and the result page go through that one function, so the card's number is the number the result will say. (The card used to count every set that came in: "23 sets" beside a result of 22 when one lift was past the last attempt.) A board's head stands under one exercise's name and counts that exercise's share; in a session of several exercises it says "17 of 22 sets" (exerciseSetShare). The Stream lists every set that came in, counted or not, and counts what it lists; where that is another number than the session's, its head says both ("22 sets, 17 counted"). The head, the card and the row count "attempts" in a session whose rules count attempts (liftLabels(...).count / .countOf): "17 of 22 attempts".

  • When, on a card and on a row (hub-when.ts): a moment of today is a time, a moment of another day is a day (formatListMoment). A running session says "since 13:36" or "since 12 Oct"; a waiting one says when it ends if it has an end, and "since 12 Oct" when its lobby was opened on another day; an ended one says "today 15:43" or "12 Oct" (with the year for a day of another year).

  • Where the last lift comes from. The session list carries no sets, so each running session's card makes one read of its own, the read without reps (hub-pulse.ts: useHubPulse, hubPulseOf). The hub holds no stream: the read is repeated every 30 seconds while the page can be seen and when it is looked at again, so a lift is on its card half a minute after it was made at the latest. What is read is kept apart from the feed store, whose snapshot is the one with every rep. A waiting session reads nothing.

  • The picture is the session's logo, or the picture of its format (FormatPreview) while it has none; a finished row has the same picture at 40 px (block F3). A logo is read once per session and page load and kept (use-session-logo.ts): the hub, the session's page, its result and a display share one request, and coming back to the hub asks for nothing. The editor drops what is kept when it saves another logo or takes it away (forgetLiveSessionLogo).

  • A running or waiting session has ONE main action, in words: Open the board or Open the lobby. Present stands beside it, quiet; Edit is in the card's menu. The name itself still opens on a click.

  • The card's orange action. "Open the board" of a running session is the one filled orange button among the cards; "Open the lobby" is filled grey. "New live session" in the page's header is filled in every state (page.tsx), so with a session live the hub shows two orange buttons: one for the session that runs, one for a new one.

  • Under the name, in one line: the format; what the board ranks by ("Load", from the session's stored ranking; nothing for a Stream); and a running session's devices ("No device yet" for none). Beside the state stands since when it runs ("since 15:24", with the day for another day). A session with a fixed end says "ends 10 Oct, 15:24" instead while it waits in its lobby, and on a server that reports no start. After how long without a set a session ends is in its editor, not here.

  • A finished row says its result in one line — the view it ran in, the day, athletes, sets, its personal bests ("3 personal bests", once a result page or a display has asked for them), and who was on top when the session had one exercise: "won by" for a competition, "Luca Brandt and 1 other on top" for a shared first place. Its one button is Result; Run again, Present and Edit are in its menu. A session that ended empty says "no sets".

  • Each row builds its menu from one list (menu), so an action that is added is added once.

The result page (result-view.tsx), top to bottom. Over the panels stands what the result is ranked by (ResultRanking; block E1, 2026-10-08), the line the Leaderboard has in its head: see "A result ranked by another metric" below.

  1. Who won: per exercise a panel with a podium (ResultPodium and Podium in result-parts.tsx; block F2, 2026-10-08 — the redraw of 7 Oct had replaced it by a winner over two rows). Three steps in the order 2, 1, 3, on each a picture, a name and a number; a personal best wears its tag (the gain is in the next panel).
    • The page opens with ONE podium at full size and width (size="page"): the total's, for a session with a total, or the exercise's, for a session with one exercise. Its winner's number is the one figure of size hero on the page. The podiums that follow a total are a size down (size="pageSmall") and stand two side by side; so do the exercises of a session with several exercises and no total.
    • Where an athlete stands follows the order of the rows; how high, and under which number, follows the place. Two athletes who share a place stand on steps of the same height; two who share first place are both large and both green. With two athletes the third step is left empty and the winner stays in the middle. One athlete stands alone on one step, place 1, in the middle: an empty place on either side keeps the step as wide as a winner's (before 2026-10-08 a display drew it across the whole screen).
    • Two athletes on the same number get a sentence under the podium (podiumTieLine): who is level on what, and why one is ahead — "got there earlier", "got there later", "needed fewer attempts" — or that they share the place. It reads the rule that placed them (tieWonBy of the row, else tieOf of the ranking), and it also speaks of a fourth who has the third's number and no step. Over a small podium the sentence stands above the steps, not under them: small podiums stand side by side, and their steps stay on one line only when nothing is under them.
    • A phone keeps the winner over two rows (ResultWinners): below a panel width of 32 rem (28 rem for a small podium; a container query) three steps side by side have no room.
    • An exercise with a single athlete has the panel too (block P5e, 2026-10-08; before, a podium of one was a row of the table only, and the smallest session opened with a table and looked broken). An exercise in which nobody has a result has none. The PDF is as it was: it draws a podium from two places on.
    • Podium is the same part a gym display draws (size="display", the default): there it fills the height it is given at the wall's type sizes.
    • Tested as a component in result-podium.test.ts: three, two and one athlete (on a page and on a display), a shared place, a shared first place, nobody with a result, and the sentence for a tie.
  2. Personal bests: one panel for the session. Its title is the acid-yellow chip that counts them ("6 personal bests"); under it each line is a name, the exercise with the best from before ("Snatch · 62.5 KG before"), and the gain as the line's figure ("+2.5 KG"). The biggest comes first. A session without one has no such panel.
  3. The full table: per exercise a panel with place, athlete, one column per rank metric of the session, a "PB" column with the gain for whoever has one, the sets, and "vs last run" for a session made with "Run again". The first column's numbers are the rows' own, so the table cannot show another number than the one it is ordered by. Every number is a Figure, right aligned. In a session with a total the session's sentence ("… added up") stands over the table of totals alone; an exercise's table says its sets. A place is a PlaceBadge. A personal best is a column and not a tag here, so a row carries one colour: the green of first place.
  4. Session facts, without a panel, under a rule: a <dl> of athletes, sets, reps, load moved, then the facts that name somebody, each as a number with who it belongs to under it (ResultStat, factFigure). A total the sets do not carry is left out, not drawn as a dash.

A no-lift in a result (block R11, 2026-10-08). A ruled-out attempt gives no result, no place and no personal best, with rules or without (attemptScores), so the best of an athlete is their best lift that was not ruled out. What the result says about it:

  • A row without a result has no place. The ranking numbers every row and puts the ones without a result last; a result draws a place only for a row with a number (hasPlace in session-result.ts). Such a row is never on a podium, and a table in which nobody has a result has no first place.
  • An athlete whose every attempt on the exercise was ruled out is in the table, below everyone with a result (athletesRuledOut). The row wears the verdict mark of the boards, "No lift" (NoLiftMark, the noLift state of LiveStateChip), beside the name, and where the others have their number it shows the number of the athlete's last attempt, quiet and struck through (NoResultFigure in result-parts.tsx). The page's table and the rows behind the podium on a display draw it the same way.
  • Any other row without a result — a lift that still waits for its ruling, a set without the ranked metric — has no place either and keeps the quiet dash. Nobody said "no lift" to all of it, so the result does not.
  • The PDF leaves the place of such a row empty and writes "No lift" where its number would be. On the pages with every athlete's sets a ruled-out attempt keeps its numbers, grey and struck through, with "NO LIFT" at the end of its line. The export of a running board is as it was: it passes no noLiftLabel.
  • The page and the display list no single attempts, so a no-lift of an athlete who also has a good lift is named in the PDF's sets only.
  • The stored summary (result-summary.ts) did not change: its winner was always a row with a number.
  • Checked by unit tests only (session-result.test.ts, "a no-lift in a result"; result-parts.test.ts). The demo has no athlete with nothing but no-lifts: each of its three no-lifts belongs to an athlete with a good lift on the same exercise. TODO: look at the page, the display in its three profiles and the PDF in a browser, with a session in which one athlete has only no-lifts; the test server was down when this was written.

The page is two columns where it has the width (a container query, so the sidebar does not matter): the opening podium across both, the podiums that follow it side by side, the personal bests across both or beside the last podium, two narrow tables side by side. A table is narrow while the session has one rank metric and no run to compare with; otherwise each table takes the full width. Two podiums in a row stand on one line; a table or the personal bests are as high as their own rows and are not stretched to a neighbour (self-start). At 1440 × 900 the first screen holds the total's podium and the exercises' podiums of the demo; the personal bests and the tables follow below (measured 2026-10-08).

It has ONE main action, Export PDF — the whole result as one document, see "The PDF". The page is there to be read and taken away, the export changes nothing and can be repeated, and the next run is already offered where the next evening is decided, on the hub's finished row. Present stands beside it as it does on every page of the Live Hub. The menu holds Run again — the next run makes a session, so it stands a step further off than a button beside the result — then "Show the board" (the board as it stood at the end, with the attempt inspector and the athlete drawer; the way back from there is the result), Edit, Refresh and "Add a display" or "Displays · 2" (the screens without a sign-in that still show the session; see "The coach's Displays sheet"). On a phone the export keeps its glyph and Present is left out. A session that ended without a set says so, and what helps: its next run, or a later end date when it was the date that ended it (endedByDate).

On a display (wall-result.tsx) the result goes up by itself when the session ends, one exercise at a time. It is the one moment the wall gives its whole screen to something other than the board (decision D10), and nobody is lifting then. It is one picture without a panel around any part of it:

  • The podium (Podium in result-parts.tsx): three steps with corners that stand side by side on one line, drawn whole. Over each step a name and its number; the winner's number is the largest thing on the screen (Figure size="wallLift"), the two others one size down (wallRow). The winner's step is as high as the names and numbers above it leave room for, up to 46 % of the podium's height, and the two others are a share of it.
  • The places behind the podium as rows parted by rules: place, picture, name, number. The place keeps one width down the list, so the names stand in a column: the room of one digit, or of two where the list reaches place 10 (twoDigitPlaces in wall-result.tsx; before 2026-10-08 the row of place 10 stood 4 px to the right).
  • Personal bests are named where the athlete stands: the acid-yellow tag says by how much ("PB +2.5 KG", PersonalBestTag), on the podium and in the rows.
  • The session's facts are one quiet line at the foot: athletes, sets, load moved, the number of personal bests and, in the room, the first fact that names somebody.
  • Over the picture: the exercise's name, then what counted and how many took part. In a session with a total the session's sentence ("… added up") stands over the total's picture alone, as on the page; an exercise's heading then says its athletes and sets only (headingRule in wall-result.tsx, tested in wall-result.test.ts; before 2026-10-08 every heading carried the sentence). The frame's top line is the session's name over "Result" and the day.
  • One or two athletes. One athlete stands on one step in the middle, two beside an empty third, in the room, in the hall and near (looked at with real sessions of one and of two athletes, 2026-10-08).
  • Two athletes on the same number have no sentence of their own on a wall: the room says it in the line at the foot when the closest finish is the fact shown there ("Level on the number, decided by the earlier lift"); the hall, whose foot has no such fact, does not say it. Near, the page's podium brings its sentence.

How it is drawn follows the screen's profile (useWallScreen), as the board does — its canvas, its zoom and its five type sizes (wallTypeVars, WALL_TEXT):

ProfileWhat one picture holdsRows behind the podium
Room (1440 × 810)The podium and the rows side by side8; with more athletes 7 and "+N more athletes"
Hall (960 × 540)The podium, then the rows, one after the other. Names on one line and without a picture, so the steps keep their height6; with more athletes 5 and "+N more athletes"
Near (not zoomed)The page's parts, stacked in one panel: the page's podium with its sentence for a tie (the winner over the next two places on a phone), then every other place. The screen scrollsall
  • An exercise is up for 12 seconds, then the display moves to the next. In the hall, where an exercise takes two pictures, each is up for six. Marks at the foot say how many pictures there are and which is up. The exercise most athletes took part in comes first, and before every exercise the total, for a session that has one. The demo counts on the 12 seconds: its result stays on a display for 36 seconds before the evening starts again (DEMO_RESULT_MS), which is one turn through its total and its two lifts, in the room and in the hall.
  • Its controls — one tab per exercise, "Show the board", exit — stand over the top right corner, not zoomed, and leave after four seconds without a hand, as present mode's do (DISPLAY_CONTROL). A tap on an exercise holds the display on it; in the hall its two parts then keep turning.
  • "Show the board" uncovers the board; a "Result" mark at the bottom brings the result back.
  • It lies OVER present mode and is not one of its views: present mode holds the fullscreen element and the wake lock, and taking its place would drop a display out of fullscreen as the result goes up. page.tsx renders it beside PresentMode, and it portals into the fullscreen element when there is one (overlayPortalHost, the route sheets and drawers take).
  • A session with nobody to put on a podium shows no result; the board's own "ended" state stays.
  • The places rise once per picture, third place first, and a new picture fades in (WALL_SCENE_IN); neither where motion is reduced. No sound.
  • TODO: the hook that tells that nobody is at the screen is written twice, in present-mode.tsx and in wall-result.tsx. It belongs in wall-zoom.ts, beside DISPLAY_CONTROL. useWallZoom there has no caller any more.

Run again (runLiveSessionAgain in result-store.ts) makes the next run of a session: a new session with the same name, view, ranking, rules, logo and idle time, in its lobby. It takes no end date and no devices along — an ended session has none left — so devices join with the new code. Its config names the session it repeats (previousRunID), and the result of the new run is then set beside that one:

  • the session's numbers at the end of the page get a second line with the difference;
  • the final table gets a column "vs last run": each athlete against their own result then, "New" for someone who was not there. A gain stands out by its weight and its sign, not by a colour;
  • the facts get "Most improved".

The run before is read once per result page, without its reps (GET …/reduced/:id), and ranked the way the new run is ranked. That read is kept out of the feed store: a snapshot without reps there would be served to that session's own board. An exercise only one of the two runs had is not compared. Nothing is compared when the run before was deleted, or when the rank metric sits on the reps, which that read leaves out.

How the final table is ranked (deriveSessionResult). The same function that ranks a board ranks it (deriveLeaderboard), by the session's first rank metric.

The sessionSets that countAn athlete's number
Leaderboard or Stream, no rulesevery setthe session's roll-up of the metric
Competition, no ruleswork sets onlythe best attempt
Has rules of its ownits attempts under the rules (attemptsUnderRules): shown athletes, the session's exercises, warm-ups as the rules say, no more than the attempts everyone getsas the rules say (see "The rules of a session")
  • A session with rules is ranked by them. useSessionResult reads them (useSessionRules) and hands them on (rulesRanking, as ranking.by); the hub's own read does the same (rankingForSummary). The view's own choices — warm-ups, the tie — are then not read. Totals, facts and personal bests are taken from the same attempts (resultField, countedSets), so an athlete the rules hide is in no table, no number and no fact, and an attempt past the limit moves nobody.

    • TODO: a session scored in percent of the athletes' own best is ranked by the lifted value in its result. The percent needs every athlete's best from before the session, kept with it; today only the bests that were beaten are kept (see "Personal bests in a result").
    • A total (block P1, 2026-10-08). A session whose rules add the exercises up (combine: "total") and that had more than one exercise gets a table of totals (SessionResult.total, ranked by deriveTotal), and resultTables puts it before the exercises. So the first podium of the page and of a display is the total's, the hub's line names its winner (summarizeResult), the "closest finish" can be the total's, and the PDF lists it first. Its table has a column per exercise the total is made of (totalColumns in result-view.tsx). It is called "Total" wherever an exercise is named (isResultTotal). An athlete without a result on one exercise has no total and no place on that podium. A personal best belongs to an exercise, so the total's podium names none.
    • TODO: the running boards do not draw a total: the Leaderboard and the Competition rank each exercise, also in a session whose rules add them up. The total is first seen on the result.
    • TODO: one table per group (groups) is a function of its own in the rules; a result still shows one table for everyone.
    • A running board follows the rules once its own call passes them (table "Which screens rank by the rules"). Where one does not yet, the result of a session with rules can differ from the board it ended with.
  • The same number for two athletes is placed by a tie rule (ResultTie, the tie of the rules). A session with rules has its own; for a session without, RESULT_TIE (session-result.ts) says it per view.

    tieWho is aheadPlaces for 120, 110, 110, 110, 100
    laterWhoever lifted last. The running board's order1, 2, 3, 4, 5
    earlierWhoever reached the number first1, 2, 3, 4, 5
    fewerAttemptsWhoever needed fewer attempts1, 2, 3, 4, 5
    sharedNobody: they share the place, listed in the order they reached it, and the next places are left out1, 2, 2, 2, 5
    • One function places a tie for boards and results (deriveLeaderboard under rules). A result of a session without rules hands it the board's own rules with the one part changed (rankedBy).
    • The time that counts is a set's created, never when it reached a browser: the board gives a tie to the set that arrived later, and that order is gone with the page. A result has to read the same next week.
    • TODO: which rule a result of a session without rules uses is decision D16 of the concept, which is open. RESULT_TIE says later for all three views until it is taken; D16 recommends shared for a leaderboard and a stream and earlier for a competition.
  • The podium has three steps. The first three rows stand on it, each on the step and under the number of its place: two athletes who share first place stand on two steps of the same height. Of a shared place that reaches past the third row, those who got there first stand on it and the others keep the place in the table and in the display's list. An athlete without a number never stands on it.

  • Reps are a set's own count (repCount), or the reps it came with. Load moved is load × reps over the work sets, for loads that are a mass; a flywheel's inertia is left out.

Session facts (deriveSessionFacts). Each names somebody, and is left out when the session's data does not carry it or only one athlete could have it. They are taken from the sets the final table counts, so a line never names a number the table does not have. The wordings are in result-parts.tsx: factLabel names a fact, factFigure writes it as a number with who it belongs to under it ("0.4 M/S" over "Tom Richter · at 165 KG · Back Squat") — what the page, the display's line and the PDF show — and factLines writes it as two lines of words. The personal bests are the first fact of the list, and the page and the PDF leave it out of their facts: they say it in a place of its own.

FactWhat it saysShown when
Personal bestsHow many the session had ("3 personal bests"), and the biggest: who, and how far above their best from before, weighed by where it startedThe session has one. It is the first fact, and wears the board's acid yellow
Most improvedThe largest gain on an athlete's own result in the run before, weighed by where it startedThe session was made with "Run again"
Closest finishFirst and second of an exercise, and what was between them. Level on the number: which lift decided it, or that they share first placeThe gap is at most 3 % of the winning number
Fastest barThe highest bar speed (velocityMean) of a set, with its loadTwo athletes have a bar speed, and the board is not ranked by it
Most load movedLoad × reps over an athlete's work setsTwo athletes have one
Most consistentWhose reps were closest to each other in bar speed: the spread between a set's fastest and slowest rep, averaged over the athlete's setsThe athlete has two sets of three reps or more, and so has a second athlete

Personal bests in a result (result-bests.ts, read-result-bests.ts). A personal best is an athlete's best WORK set of an exercise, on the session's rank metric, above their best from before the session — what the display's line calls one (see "The line knows the past"), with the same cut: "before" is before the session STARTED, as the server cuts it. Both ask the session's GET /workout_live_sessions/:id/best_before (since 13 Oct 2026; before that the result read the standing records and cut at the start of the day of the athlete's first set, so the two could differ for an athlete who set a record earlier on the same day).

The session's best_before, when it is readAnswer
Holds the pair with a record on the rank metricvalue
Holds the pair without one (records: [] is "no history there")none
Does not hold the pairAsked for alone (?userID=&exerciseDefinitionID=); none if that does not hold it either
The read failed or was refusedfailed for every athlete
404 under a login: a server without the routeRead the old way, below

No answer is untold this way. What is told is still kept with the session, so a result does not depend on a read next month.

The old way, for a server without best_before. That server keeps an athlete's current record and the ONE value that record replaced. So the best from before is told once, while it can be told, and kept with the session. "Before" ends at the start of the day of the athlete's first set of the exercise.

The athlete's record on the server, when it is readThe best from beforeAnswer
None on this metric, or the athlete never trained the exerciseThere was nothing to beatnone
Dated before the day of the athlete's first setThe record itselfvalue
Dated in the session (up to its end, plus ten minutes for two clocks): the athlete's training of the evening was uploadedThe value it replaced; none when it replaced nothingvalue or none
Dated after the session: a later record took its placeCannot be told. The value it replaced may be the session's ownuntold
The read failed or was refusedNot known this timefailed

An entered personal best, on the old way only. Both readers ask POST /history/v2/records with includeEntered: true. A server that knows the flag adds one row per weightlifting exercise with an entered personal best: source: "entered", recordType: "absoluteLoad", metricKey: "loadingMass", and no achievedAt or previousValue (EnteredBestRecordDto in athlete-past.ts). The row has no date and counts as from before the session; where the session ranks by the heaviest set, the best from before is the higher of it and the tracked answer above (bestBefore, bestBeforeSession). An untold answer stays untold. A server that does not know the flag sends no such row, and nothing changes.

TODO: best_before — the read every current server answers — does not carry an entered personal best, so on it an athlete who entered 120 kg and has tracked 100 kg is told "Personal best" for a lift of 110 kg. It needs the entered best in the records of a pair of GET /workout_live_sessions/:id/best_before and GET /live_displays/best_before.

  • Never wrong, at the price of sometimes not knowing. An answer that cannot be trusted is no answer; a result then names fewer personal bests, not false ones.
  • Who asks. The result page and the display (useSessionResult), once per end of a session and page, after the session's feed is in. One read answers for the whole session (best_before; a paired display asks the same through its token). The old way is two: POST /history/v2/records with every athlete, and per athlete GET /analysis/relevant_exercises/:userID — one after the other, and from the cache the athlete drawer shares — to find the athlete's own exercise. Demo athletes are answered in the browser.
  • What is kept: for every athlete who went above their best, that best (bests in the stored summary, below). A result shows what is kept and asks the server only for what it does not hold: once bests is complete for the session's end, nothing is read again. A kept value wins over a later answer for the same athlete and exercise.
  • A read that failed leaves the list open (complete: false); the next result page asks again. untold and none are final.
  • A session that ended with nobody watching — by its idle time or its end date — has no personal bests until its result is opened: the hub's own read does not ask (it is a read per athlete). Opened the same evening, they are all there. Opened weeks later, an athlete who has set a new record since is untold and has none.
  • A gain that would print as zero at the page's rounding is no personal best (printsAsZero).
  • A lift a judge ruled out is no personal best, however heavy (bestWorkSetValue asks attemptScores, as the final table and the display's line during the session do). Without this a result named a no-lift in acid yellow beside a table that ranks the athlete's lower good lift.
    • TODO: in a session that counts only lifts ruled good, a lift still waiting for its ruling when the session ends does not score on the board either. The personal bests read it as a lift like any other: the session's rules are not handed down to bestWorkSetValue, which also decides what is kept with the session.
  • Only where the highest number wins. The server's records are highest values, so under rules where the lowest or the closest to a target wins there is nothing to ask and a result names none.
  • Limits, by construction: two sessions on one day share one "before", so a lift of the first is no bar for the second unless the athlete's training was uploaded in between. A session that runs over several days can understate a gain, when the athlete's record was replaced twice inside it. And the bests belong to the rank metric: a ranking changed after the end asks anew, and can no longer be told what the first ranking's bests were.
  • TODO: what best_before answers for a session that ended weeks ago, after an athlete has set two newer records, was not seen against a real server: backdev wrote no personal-best records on 13 Oct 2026 (live test 41 is red there for that reason). The read was checked with unit tests and with a replaced server answer in a browser.

A result ranked by another metric (block E1, 2026-10-08; ResultRanking in result-view.tsx, rankControl of useSessionResult, storeResultRanking in result-store.ts). A coach can read a result by another number after the session — the evening by load, the next morning by bar speed — without the detour over the board or the editor.

  • The control. A session without rules shows the button "Ranked by Load · best set" with an arrow, and "+2 more" where the session shows more metrics as columns. It opens the sheet of the Leaderboard (RankMetricsSheet): the first metric ranks, each says which of an athlete's sets counts. A session with rules shows "Rules" and the rules' sentence with "Change the rules", which opens the editor: the ranking is a part of the rules. The demo and a paired display show the line without a control.
  • Everything under it follows at once: podium, personal bests, tables, facts, the PDF. The line itself is said from the page's own selection, so it never names another metric than the tables under it while the change is on its way to the server. A display of the result in another browser follows when it has read the session again (every 60 s, or on the pushed live_session.updated).
  • One write. The session's config is written whole. The change of the ranking and the summary under the new ranking are therefore ONE update (storeResultRanking, handed to useRankSelections as its save): it names the new winner in the hub's line at once. Every write of a session's config from result-store.ts waits for the one before it and starts from what that one left in the session list (inTurn). Before, the ranking's write and the summary's started from the same old blob, and the one that answered last took the other's change back.
  • The bests are kept per metric. result.bests holds the bests on the metric the result is ranked by now; result.earlierBests holds one entry for every other metric it was ranked by before. keptBests finds either, earlierBestsOf carries the rest into every new summary. So a result that goes from load to bar speed and back shows the bests by load again without asking: the server could not be asked a second time once an athlete has set a newer record. The bests on a metric the result is ranked by for the first time are asked for once and written after, in their turn.
  • Where a best cannot be told, the result says so. An answer untold (a record from after the session has taken the place of the best from before) is counted per athlete (untoldAthletes), kept as untold with the bests, and written under the personal bests, or in their place when there are none: "For 2 athletes a personal best can no longer be told: a newer record has taken the place of the best from before this session."
  • The hub's line follows a ranking that was changed elsewhere. On the board of an ended session, or in another portal, the ranking is saved without a summary. heldSummaryIsCurrent compares the stored summary's ranking with the one the config names; where they differ the hub shows the line without a winner and works the summary out again (requestResultSummary, once per end and ranking).

The PDF (leaderboard-export.tsx, useResultExport). One document for the whole result, built from the pages of the leaderboard's export:

  • Every page is titled by the session and says what it was, top right: "Competition · Result", "Leaderboard · Result". Under the title: the exercise, the day and the time the session ran. The foot says what was ranked, as the display says it, who exported it and when.
  • Each exercise opens with who won: its podium, three steps with corners side by side on one line, each under a name and its number, the winner's number the largest.
  • Then its personal bests: an acid pill that counts them, and under it who and by how much ("Luca Brandt +2.5 KG"), in the order of the table, up to eighteen; past that the last place says how many more.
  • Then its final table — on as many pages as it needs; a result's table is never cut — then every athlete's sets. A personal best wears the "PB" tag behind the name. The table is the page's: place, athlete, number. It does not draw each athlete's attempts as a line in front of the number, as the running board's export does (sparklines): the attempts are on the pages after it, and an athlete with one lift that scores — the other ruled out — has no line to draw.
    • TODO: the page's table also says how many sets an athlete had; the PDF's has no such column.
  • The first page closes with the session's facts, above its foot: the session in numbers, then the facts that name somebody, each as a value with one line under it, written as on the result page. The rows of the first table end above them.
  • Light only, portrait until the session has four rank metrics, like every export.

The running board's own export (useLeaderboardExport, "Live leaderboard", one exercise, its table clipped to a page) is unchanged.

The result of sets that are not on a server — resultFromSets (session-result.ts): the tables, the personal bests and the facts from a list of sets in one call, for a test or a script. The demo needs no such call: it hands ResultView and WallResult a session object that has ended, and they work its result out from its sets like any other, with the demo athletes' past answered in the browser.

The summary stored with the session (result-summary.ts, result-store.ts). The session list carries no sets (checked on backdev), and a read of every finished session's sets on every visit of the hub would cost a read per session. So the line the hub shows is worked out once and kept in the session's config, beside its view and ranking, where every browser finds it:

  • result: the end it belongs to, the ranking it was worked out with, athletes, sets, exercises, the winner when the session had one exercise (with tied, how many others share first place), and bests. About 650 bytes for a session with three personal bests.
  • result.earlierBests: the bests on the metrics the result was ranked by before, in the shape of result.bests, one entry per metric (block E1; see "A result ranked by another metric").
  • result.bests: the metric, one entry per athlete and exercise that went above their best (userID, exercise, before), complete, and untold where some athletes' best can no longer be told. This part is more than a copy of something the sets say: it is what a result shows. Bests kept for an earlier end of a session that was opened again stay, and are open again for the athletes of the later end (keptBests).
  • The ranking is one string (rankingKey): metric, roll-up, which sets, then the tie rule where it is not the board's, or a mark of the session's rules. A summary made with another ranking is worked out anew.
  • Written by the result page and the display, which hold the complete feed, whenever the stored one differs from what they work out — once per end and page, after the bests were asked for.
  • For a session that ended with nobody watching — after its idle time, on its date — the hub works it out: one read without reps per session, one session after the other, once per end. The next visit reads the line.
  • A rank metric that sits on the reps cannot be ranked from that read. The summary then holds the counts and no winner (complete: false) until the result page is opened once.
  • A session that ended by its date can be opened again and end a second time; the stored endedAt is how a summary of the first end is told from one of the second.
  • A write that fails is logged and not shown: it costs the same read again on the next visit.
  • The summary names the winner, with the number, and for each personal best the athlete's id with their best from before. config is also what a device gets back when it looks a join code up, and only a session that can be joined has a code: the next run starts without a summary (configForNextRun), so the one case where the two meet is a session opened again after its end date, which carries the summary of its first end until it ends again. Who can look the code up is the owner's organisation.
  • The sets stay the truth for everything but the bests. The result page reads nothing else from the summary.

Checked (2026-10-07):

  • Unit tests: session-result.test.ts (phases, ranking per view, the four tie rules and the podium under them, a session with rules, totals, each fact and when it is left out, the comparison of two runs, resultFromSets), result-bests.test.ts (the window, each row of the table above, what is kept and how kept and new bests are put together), read-result-bests.test.ts (one request for all athletes, what each failure costs, the demo), result-summary.test.ts (the stored shape with and without bests, a summary from before there were bests, that the session's own codec and unknown fields survive it, the next run's config), result-store.test.ts (what is written and when, one read per end and one after the other, the rules handed on, what "Run again" sends), result-parts.test.ts (the hub's line and the facts, word for word).
  • Against backdev with a disposable account, tests/live/offline/40-live-result-contract: an ended session's sets can be read with and without reps; a late set is refused; PUT { config } on it stores and leaves it ended, with its name and its end; its logo can be read; the hub's summary is worked out and stored through the portal's own functions; "Run again" makes a session in its lobby with the same view, ranking, logo and idle time, pointing back.
  • Against backdev, tests/live/offline/41-live-result-bests: an athlete with 100 kg on record lifts 105 kg in a live session, which is ended. Before the athlete's training of the evening is uploaded the best from before reads 100; after it, 100; after a training with 110 kg dated a day later the standing records answer untold (the old way) and the session's best_before still 100 — and the result still names 105 against 100, from what was kept with the session. An athlete without history is none, not a failure.
  • In headless Chrome on the portal dev server against backdev, with five and six athletes lifting through a tablet login, two of them with history:
    • the hub: a running session and one in its lobby as cards with "Live" and "Lobby", "Open the board" and "Open the lobby" (each lands there), "Ends after 1 hour without a set", "No device yet"; a finished row gains "3 personal bests" once its result was opened; in dark and light, and on a phone-sized window;
    • the result of a leaderboard session with two exercises and of a competition: the "PB" tags in the table and on the podium, "3 personal bests" as the first fact, the buttons and the menu, in dark and light and on a phone-sized window; what the page stored with the session, read back from the server;
    • the PDF of both: "Leaderboard · Result" and "Competition · Result", numbers, facts, podium, table with tags, every athlete's sets; a second exercise opens with its own podium;
    • a display on the ended session at 1920 × 1080 and 1280 × 720 without scrolling: tags, the facts, both exercise names in full, the second exercise on a tap;
    • with RESULT_TIE switched to the recommendation for the length of the check: two athletes with 110 kg on two steps of the same height under a "1", third place beside them, "they share first place" as the fact, and the same on the display;
    • a session with rules (two attempts, work sets, the earlier lift ahead, one athlete never shown): the hidden athlete, who lifted the most, is in no row, number or fact; a third attempt and a warm-up above every attempt do not count; of two lifts of 105 kg the earlier is first and the fact says so; the hub's line names the same winner; the card says the rules as the display does;
    • the demo's result: "6 personal bests", from the demo athletes' made-up past;
    • the running board's own PDF, unchanged.
  • Earlier, for block W4, in the same way: "End session" in a competition's menu is followed by its result; "Show the board" and back; "Run again" lands in the new lobby; the next run's result follows its end by itself and compares, with "New" for an athlete who joined; a display showed the podium 0.5 s after the end, uncovered the board and came back, and left the presentation.
  • Not checked: a session ending by its idle time or its end date while a display is on it (the same push as an explicit end is expected; the idle end on a coach's page is checked by live test 114-live-idle-end); a real television; a printed PDF; a final table long enough to run onto a second page; a result of a session scored in percent, with a total or with groups.

Checked for the rank control (block E1, 2026-10-08):

  • Unit tests: result-store.test.ts (ranking and summary in one write; a summary written beside it does not undo it; changed back, the first bests are there; a failed write is handed on and the next one goes through; the held summary against the config's ranking), result-summary.test.ts (the earlier bests kept, carried, read back, compared), result-bests.test.ts (untoldAthletes).
  • Against backdev in a headless Chrome, tests/live/offline/42-live-result-ranking (runs with ENODE_RESULT_RANKING=1, about 45 s, three accounts; green in both themes): a session ended with two athletes, one heavier, one faster, and a kept best by load. Ranked by load the first is on top with her personal best; changed to mean velocity in the sheet, the second is on top at once and the line says the new metric; the server then holds the new ranking, the summary naming the new winner, the bests by speed and the bests by load beside them; the hub read anew names the new winner; a display opened on the session shows the new order; changed back, the personal best by load is on the page again and in result.bests. Live tests 40 and 41 pass.
  • Not seen: a real answer untold from the server (the line was seen with a kept count); the PDF after a change (it is drawn from the same state); a display in a second browser that was open during the change.

Checked for the redraw (block V4b, 2026-10-07), with the demo's result — eight athletes, two exercises, six personal bests — in headless Chrome on the portal dev server:

  • Unit tests: result-parts.test.ts also holds how a gain is written per athlete of an exercise (personalBestGains) and each fact as a figure (factFigure), word for word.
  • Looked at, in the dark and the light theme: the page at 1440 × 900 (top and end) and at 1024 × 768 (top, and its end in light); the display in the room at 1600 × 900 (both exercises in dark, the first in light) and in the hall (the podium and the rows); the first page of the PDF. In the dark theme only: a display at arm's length (820 × 1100) and the page on a phone-sized window, where a long name beside a tag is cut with an ellipsis.
  • The hall draws the result on its own canvas and at its own type sizes; it was the room's picture before.
  • Not checked, because the demo has one shape of data: a session with one exercise or with three and more; a shared first place; a session made with "Run again" (the column "vs last run", "Most improved", the second line of the numbers); a session with several rank metrics, whose tables take the full width; more athletes than a display has rows for ("+N more athletes"); a name too long for a step of the podium; more than eighteen personal bests in the PDF; a real television.

Found along the way (2026-10-07):

  • POST /history/v2/records answers a row for every athlete asked for, with records: [] for one without history; a record carries previousValue and previousAchievedAt once it has replaced one; a training dated a day ahead is accepted and dates its record so. A record appeared within five seconds of an upload in most runs and twice not within thirty.
  • A fresh account's exercises carry no name of their own, only the catalogue's text ("Front Squat Dumbbell Frontrack Bilateral"): the long names on a result are the catalogue's, and a gym's own name for an exercise shows as soon as the coach has renamed it (finding U25 of the concept's review).
  • The one console error a result page can show is the 404 of a profile image for a user without a photo.

Open, and what it needs:

  • The tracking app shows no result. The concept has the final table on the platform tablet and each athlete's own line on their phone. An ended session unlinks its devices, and who may read its sets then is the owner and users with access to the owner — a coach's tablet, not an athlete's phone. Not built; it needs item 8 of the open backend handoff.
  • Decision D16, for sessions without rules: RESULT_TIE is the one place.
  • A result in percent, as a total, or per group (the TODOs under "How the final table is ranked").
  • Two readers of the records endpoint. The display's line (use-athlete-past.ts) and the result (read-result-bests.ts) each call POST /history/v2/records with apiRequest. An API module for it belongs in packages/core/src/api/, and one cache behind both.
  • The display's result on a wall higher than 16:9, or with names of two words that do not fit a step: the podium's names take two lines in the room and are cut with an ellipsis in the hall.
  • A result does not say that a lift was ruled out. The final table ranks an athlete's best lift that scores and counts every set in "Sets"; nothing marks a no-lift. And the session's facts still read every counted set: "Fastest bar" can name the bar speed of a no-lift, and "Load moved" adds its load. Whether they should is a decision, not a fix.

A result by class​

Block G1, 2026-10-08. A session whose rules split its athletes (groups: classes kept as tags, or women and men) is decided class by class, and its result follows: every table is ranked within a class, places from 1.

Worked out in one place (deriveSessionResult in session-result.ts, pure). It takes who is in which class as a third argument (BoardGroups from useBoardGroups, called in use-session-result.ts) and adds classes to the result: per class its name, its number of athletes, its table of totals where the session has one, and its exercises in the session's order. The classes are named and ordered by boardTables, as on a running board: by name, the athletes without a class last, an athlete with two tags in both. Who is in which class is told once from all of the session's sets, so an athlete stands in the same class in every table. resultSections gives a screen the tables to draw: class by class, or the whole result under no heading.

  • exercises and total of the result stay what they were, everyone in one table. A split result does not draw them; the personal bests, the facts about the whole session and the comparison with the run before read them.
  • A result is NOT split — and reads exactly as before — when the rules do not split, and when they do and no athlete of the session is in any class.
  • Where nobody can say who is in which class (no groups handed in), a session whose rules split says so: classesUnknown. It has one table then, and nobody is named its winner.
  • "Closest finish" compares first and second within a class.

The page (result-view.tsx) keeps its order of four things.

  1. Who won: ONE small podium per class, side by side, each titled with the class and its table ("64 kg · Total"). With a total it is the total's; who won a single lift is the first row of that lift's table. Without a total a class has a small podium per exercise. No podium is the page's large one: no class comes before another. A class of one athlete has no podium, as an exercise of one has none.
  2. Personal bests, for the whole session.
  3. The tables, class by class: a heading with the class's name and its number of athletes (ClassHeading, no panel), under it the class's total at full width and its exercises two side by side while each is narrow. The session's sentence stands over the first class's total only. A table's count of sets is the class's own.
  4. Session facts, for the whole session.

The display (wall-result.tsx) turns pages: one picture per class and table, each as an exercise's picture always was (podium, the places behind it), headed "64 kg · Total". First every class's total, then each exercise class by class; 12 seconds each. The tabs stay one per table; holding the display on one keeps turning through its classes. Side by side was not chosen: a picture with two podiums has no winner's number that is the largest thing on the screen.

The PDF has one section per class and table, in the page's order, each under its heading ("64 kg · Total"), with the class's own podium, personal bests and sets.

Stored with the session (result-summary.ts). The summary gains an optional classes: per class its name, its number of athletes and its first place. winner is null for a result by class, and for a split session whose classes could not be told. Every other field is as it was, and a summary without classes reads as before. The hub's line (summaryLineParts) says "3 classes" where it would name a winner, and names nobody.

  • The hub's own read (requestResultSummary) knows no athlete's tags: it stores a summary without winner and without classes. The result page writes the classes when it is opened.
  • A display that was paired by number has no login and cannot read the coach's athletes: its result is ONE table per exercise, everyone ranked together. The stored summary carries each class's winner, not who is in which class, so it does not help there. TODO: keep each class's athletes in the summary, so a paired display can split its result.

Checked (2026-10-08): unit tests (session-result.test.ts "a result by class", result-summary.test.ts, result-parts.test.ts); an ended session on the test server with two classes and one athlete without a tag, in a headless Chrome — the page at 1440, 1024 and 390 px, dark and light, the display at 1440 × 810, the hub's line and the PDF. The demo's result, one class with a total, looks as before. Not looked at: a display paired by number, the hall profile, a session split by gender, a session by class without a total.

First screen and demo​

Block W13 of the work split in LIVE_HUB_CONCEPT.html (first contact).

A coach with no live session yet sees LiveHubIntro (live-hub-intro.tsx) instead of an empty table. One sentence says what the feature is, and it is the largest thing on the screen ("Athletes lift. The wall keeps score."), with two actions under it: Set up your first session, the screen's one filled button, and Watch the demo as an outline beside it, the level it has in the head. Under a rule, in the same container, who does what and where as one line of three steps (format and name, tablets join with a code, put it on a screen). Then "Three ways to show a session": the three formats as a quiet list of a small picture (FormatPreview in format-previews.tsx — grey strokes in the page's theme, at most one green mark, nothing that moves), the name and the one sentence each has (formatSentence), with a line under them that says where the choice is made and changed. The list is explanation and has nothing to press.

One way into the set-up (P6-09, 2026-10-13). Until then the empty hub offered setting up seven times: the head's button, a "Set up" per format, and the three format cards of the help. Now exactly one control of the page leads to ?setup=1: the first screen's button, while the head leaves its own out (see "The hub's head"). Live test 98-walkthrough-access holds the Tab order of an empty hub (How it works, Set up your first session, Watch the demo — the head's own "Watch the demo" went with the re-audit of 2026-10-13, see "The hub's head") and that one control leads into the set-up.

While the list cannot be read (P6-20, 2026-10-13). The first screen needs no server, so it is also what the hub shows when its list does not arrive (LiveHub in live-hub.tsx):

  • Rows to come (the skeleton) stand for at most four seconds (SKELETON_MS). Then the first screen appears under one quiet line, "Still loading your live sessions. The demo works in the meantime."
  • A read that failed puts ONE message over the first screen: "Couldn’t load your live sessions", that the sessions are safe and the page tries again by itself, and "Try again". The hub asks again ten seconds after each failure (RETRY_MS); the message stays while an attempt is on its way.
  • While the shell's own note says that enode cannot be reached (the sidebar's "We can't reach enode"), the hub's message has the same words as a quiet status (InlineAlert variant offline) and is not raised as a second alarm.
  • Whether the account has sessions is not known in these states: the first screen leaves "Set up your first session" out and the head keeps "New live session".
  • A list that was read and is empty stays the first screen while it is read again. (It used to flash the skeleton on every revalidation, because an empty list counts as "no data" in the store's status.)

While the account itself cannot be read (re-audit, 2026-10-13). The Live Hub is behind the privilege showLiveHubSection, which comes with the account's profile. The page used to draw nothing until the profile was read, so with the server down, unreachable or slow when the page was loaded, /dashboard/live — and ?demo=1, and a display — was an empty page, and the sidebar had no "Live Hub". Now:

  • The guard tells three answers apart (usePrivilegeAccess / privilegeAccess in @enode/core/auth): the server's "no" (denied) leaves for the dashboard; loading and unknown — the profile is on its way, or could not be read — are not a "no". The offline snapshot of the account's last profile grants; it never denies.
  • The page requires the profile through RequireData and, until it is there, shows LiveHubUnread (live-hub-unread.tsx): the hub's first screen with the same skeleton, "Still loading…" line and ONE message with "Try again" as above; ?demo=1 (and &station=) plays; "How it works" opens. A session, its editor and the set-up need the server: their page keeps its frame and way back and shows the portal's ConnectionCard. Nothing of an account is read or shown before the profile grants it, and "New live session" is back with the hub.
  • The profile is asked for again by "Try again", every ten seconds, and by the store when the connection is back.
  • The sidebar keeps "Live Hub" while the answer is unknown.
  • A display (?present=<id>) that is loaded while its session cannot be read — the profile, or the list — shows DisplayWaiting (display-waiting.tsx): the wordmark and one line, "Connecting to the live session…" or "The server cannot be reached. Trying again…", the words of the display that pairs by number. It asks again every ten seconds by itself; "Exit presentation" shows while a pointer moves, and Escape leaves.
  • The demo ranks by the load, which keeps its name ("Load") and its unit where the metric catalogue never arrived (use-rank-metrics.ts).
  • The video overlay's page (overlay/page.tsx) has the same guard and shows the ConnectionCard in its frame.

The demo (live-demo.tsx, also behind the header's "Watch the demo") plays one made-up session from its lobby to its result, in the REAL views. Since block P1 (2026-10-08) that session is a small weightlifting meet: six lifters of one weight class, the Snatch and then the Clean and Jerk, three attempts each, a judge's ruling on every attempt, and a total. Since P6-08 (2026-10-13) it opens on the show: the session is live and plays by itself, the first lift is on the board a second and a half after the demo opens, and nothing lies over it. A strip above the view says where the demo is — the set-up, then the three chapters — and jumps to the beginning of each; "Set-up" opens the first station of the walk, the real form. "Step by step" beside it is the demo that leads station by station (see "The demo leads" below), taken up at what is on screen (demoWalkStationFor). An address with a station (?demo=1&station=…) opens the walk there, as before.

  1. Lobby, 13 seconds. The coach's own lobby (LobbyView) in the page, the wall's lobby (WallLobby) on a display. Two tablets join by themselves: the first with its sensor connected, the second without one for a moment, then each sends a test set and reads as ready. "Go live" in the lobby works, with its dialog about the test sets; left alone, the demo goes live by itself.
  2. Live, 70 seconds. The meet's 36 attempts, one every 1.7 seconds, in the order of the sport: the Snatch before the Clean and Jerk, and within a lift the lightest bar first, so a lifter who missed follows herself. The board starts empty. The lead of the Snatch changes hands eleven times and its last good lift takes it. Three attempts are ruled out, a moment after they arrive; two of those lifters take the load again and make it. One lifter beats her record on each lift, and nobody else does. One lifter (Lea Hofmann) opens her Clean and Jerk 20 kg under her best and ends one kilogram under it: her last attempt is the one set of the meet the Stream marks as far off her sets before it (bar speed 14 % under; P6-26, demo-script.test.ts holds the opener, the mark and the two no-lifts that are made on the next attempt). Two lifters end on the same total, and the one who reached it first is ahead. Before the last attempt the room waits five seconds longer; that attempt arrives without a ruling, is ruled good 1.5 seconds later, and takes its lifter from third to first by one kilogram.
  3. Result. The result page a real session has (ResultView) in the page, the podium over the board (WallResult) on a display. The total comes first, then each lift (see "The result of an ended session"). "Run again" starts the demo again, in its lobby; "Show the board" shows the board as it ended.

The demo's pictures (block F3, 8 Oct 2026). The demo's session has a picture, so the demo shows a logo wherever a real session does: the result, every display, and the title of the demo's page. It is a drawing, one SVG file in apps/portal/public/live-demo/, named in demo-pictures.ts; useLiveSessionLogo answers it for the demo session. The six lifters have no picture and show their initials, as any athlete without a photo does (decided by the product owner on 8 Oct): markDemoAthletesWithoutPhoto in demo-evening.ts marks them so, and no avatar asks the server. The demo's two lifts are in no catalogue and have no animation: they show the dumbbell. The looping board on the set-up page shows the coach's own logo rather than the demo's.

In the page the demo stays on its result until the coach moves on. On a display (Present) it starts again after 36 seconds — one turn through the total and the two lifts — so a display left on the demo keeps playing. One round, lobby to lobby, takes 119 seconds; demo-script.test.ts holds it under two minutes.

The meet has rules, and every view of the demo and its result follow them (DEMO_MEET_RULES in demo-rulings.ts): the preset "Max lift" — work sets, three attempts, the highest load, of two equal results the earlier one — on the two lifts, added up to a total, and a lift counts once it is ruled good. The demo session is in no session list, so the views get the rules as a draft (RulesDraftProvider around everything LiveDemo renders), as the set-up page's picture does. Before P1 only the demo's Competition had rules.

How it is built:

  • demo-script.ts is the data, pure and unit-tested: the SCRIPT and the EVENING. The script is DEMO_ATHLETES — per lifter the three loads she attempts on each lift and her record from before — and DEMO_MEET, the 36 attempts in the order they are lifted, which follows from the loads (the lighter bar first, then the lower attempt, then the draw). demoSetAt(n) is attempt n as a set; the two sets after the meet are the warm-ups the tablets send as tests. To change the meet, change the loads: the order, the rulings' positions and the tests' expectations follow or fail by name. The evening is which tablets join when, when each lift arrives (demoLiftArrivesAt) and how long each chapter lasts, as constants and functions of the time since a chapter began.
  • demo-evening.ts is the player (createDemoEvening): it keeps the time and puts the tablets into the lobby store and the lifts into the feed store — the stores the real views read. Plain TypeScript, tested with a fake clock (demo-evening.test.ts), with every call of the live-session API mocked to fail.
  • live-demo.tsx mounts it (useDemoEvening) and renders the real views for demoSession(name, evening): a session object that is in its lobby, running or ended as the chapter says, with the code K7M 2QX.
  • Every demo id carries the demo: prefix (@enode/core/live-session/demo), and the places that would ask the server about a live entity check isDemoLiveID and answer locally: the feed store and feed hook, the lobby store and watchLiveSessionLobby, the athlete drawer, the athlete's past, the decoded reps. startLiveSession in sessions-store.ts hands a demo id to startDemoLiveSession, which tells the player. Nothing of the demo is requested from the server (checked in a browser: no request carries a demo id).
  • Every rep of the demo has a bar path (demo-trajectory.ts), shaped by the rep's peak bar speed, so the peak on a chart is the number on the board. A snatch is one rep. A clean and jerk is two — the clean, then the jerk — as a sensor on the bar sees two movements, and each has its own path: a clean is pulled like a snatch and not as high, a jerk dips, drives up about a hand's width and is caught overhead. No bar-path view says "no sensor data" in the demo. Two reps is what a real clean and jerk reaches a session as today (confirmed by the product owner, 2026-10-08). So the load moved counts a clean and jerk twice, as it does for a real one.
  • One rep stands for the lift (lift-rep.ts, 2026-10-12). Where one bar path is drawn for a whole set — the Competition view on the page (AttemptBarPath) and on its display (WallBarPath), the Stream on a display, the video overlay's lift card — the path is that of one rep (useLiftRepCharts, useBarPath): the rep whose bar travelled furthest. For a snatch that is its one rep; for a clean and jerk, which reaches a session as two reps, it is the clean. Reps that travelled about equally far (within a tenth of the furthest: two snatches in one set) are told apart by their order, and the first is drawn. The peaks and the travel numbers are that rep's. The Stream's detail and the attempt inspector draw the rep that is picked there, as before. For a few days (2026-10-08 to 2026-10-12) an attempt's reps were joined into one path from the floor to overhead. It was taken out again on the product owner's word: the jerk began where the clean was caught, not where it stood.
    • TODO: that the clean is the rep with the longer bar travel is reasoned, not measured. Hold it against a recorded clean and jerk.

useDemoFeed in the same file is the older player: the whole script over and over, on a board that is never empty and never ends. The set-up page's picture of the display uses it. It plays the same meet, every lift with its ruling.

What the demo does not show: a tablet (the tracking app's side of joining), a device that goes quiet, and the line about a session's devices on a running display — the demo's session says nothing about its state while it runs, so that line is not mounted.

The demo's stations — demo-guide.ts, demo-evening.ts​

Block D1a (2026-10-08). The demo's evening can be guided: it then stops at thirteen stations and waits to be moved on. The screen that shows them is live-demo.tsx (block D1b, "The demo leads" below).

The stations are DEMO_STATIONS in demo-guide.ts, in the order of the evening: set-up, session, join, ready, go-live (lobby), first-lift, leader, no-lift, views, display, decider (live), result, own (result). Each has the moment it holds at (ms after its chapter began), the live views it is seen in, the picture the drawn phone shows, and what moves it on: next (the demo's own "Next"), set-up (the last button of the set-up), go-live (the lobby's button), present, or create ("Set up your own"). Each station of the live chapter is seen in one view, and the demo turns to it by itself: Leaderboard, then Competition (from the no-lift on: it shows the lifter who just lifted with the struck number and the coach's own ruling), then Stream. A station about a lift takes its moment from the lift's place in the meet (DEMO_STATION_LIFTS), so a change to the loads in demo-script.ts moves the station with it; demo-guide.test.ts holds each sentence's claim (a new leader, a personal best, a no-lift) against the script. Two stations may share a moment (set-up and session; ready and go-live; result and own): going on from the first changes what is said and nothing on the board.

The words are demoStationText(id, t): a title, the station's stops (one sentence each, with what it points at; see "The demo leads" below), and the label of the session's own button the station waits for (null for "Next"). Names, loads and the join code are filled in from the script.

The player (createDemoEvening) has, beside start, stop, setLoop and goTo:

  • start({ guided: true }) and setGuided(next). Guided, the evening holds at each station. Turning it off lets a held evening play on by itself.
  • goOn() leaves the held station and plays to the next. At go-live it is the press of "Go live". The lobby's real "Go live" does the same, at any station of the lobby: the lobby's remaining stations are then behind.
  • goToStation(index) goes to a station and holds there. Forwards it plays the same evening up to the station at once; backwards it is a new evening (run counts up, as for "Run again").
  • replay() delivers once more what the evening has delivered so far. The demo's first station shows the set-up, whose picture draws from the same feed and empties it when it leaves; a jump from there into the evening had delivered its lifts before that, and showed an empty board, result or display until 2026-10-08. LiveDemo calls it when the set-up's picture is gone.
  • The state carries station (the last station reached, -1 before the first; kept while the evening plays by itself too), guided and held.

While the evening holds, its time stands still at the station's moment: no lift arrives, a set that is being lifted stays as it is, and the tablets go on sending their sign of life, so no device turns silent however long a station is read. A jump tells the listeners once, with the state at its end.

Aligned with the help (2026-10-12). The stations are twelve now and follow the one sequence the help lists (LIVE_HELP_STEP_IDS in demo-help.ts): set-up, session, join, go-live (lobby; the former ready station is merged into go-live, which holds at the moment every tablet is ready), first-lift, leader, display, no-lift, views, decider (live), result, own. The screen comes before the ruling, as the help tells it: display holds after Mia Schulz's last snatch, right after the lead changed, with the whole clean and jerk still to come. Each stop of the short walk is one sentence of at most eighteen words and at most one more that says why (demo-guide.test.ts), and none says "profile", "config" or "format".

The demo leads — live-demo.tsx, demo-lead.tsx​

Block D1b (2026-10-08). The demo's walk ("Step by step" in the demo's row, "Set-up" there for its first station, and every address with a station; until P6-08 also what "Watch the demo" opened on) goes through the evening: the screen is dimmed, one thing on it is lit, and a small card beside it says one sentence about that thing. "Next" lights the next thing. The look is the first-visit tour's (SpotlightOverlay and placeStepCard from packages/ui/src/tour/); its engine is not used, because it resolves all its targets once at its start and the demo's targets come and go with the evening.

Stops. Each station of demo-guide.ts has one or several stops (demoStationText(id, t).stops). The walk is short: 21 stops from the set-up to "Set up your own". 26 more stand behind some of them (more on a stop) and are passed by unless the card's "More about this" is pressed at the stop before them: the other settings of the set-up, the views in detail, the display of each view. The short walk holds what a first look needs: the formats, where the judge is switched on, the code, the tablet's side (code, name, the judge's question, the own place), each of the three views, the display and the display for a hall, the result. A stop is one sentence and a target: a CSS selector, a label of the screen with the row or group it stands over, a button by its words, or the drawn phone. The evening stands still through all stops of a station. A target that is not on the page after 1.5 seconds (the phone below 1280 px) is gone without: the whole screen is dimmed and the sentence is said about it.

The card (DemoWalk, since 2026-10-22 in apps/portal/src/components/demo-walk.tsx, shared with the Insights demo — insights-demo.md; demo-lead.tsx keeps the display's note): the station's name, the sentence, "Back", "More about this" where more stands behind the stop, and "Next", a "?" that opens the help on what the station shows (see "Help and demo are one thing"), and an X that closes the walk and lets the demo play by itself. How far the walk is, is one bar along the card's lower edge that fills stop by stop of the short walk: no count and no marks. What belongs to the walk is the tour's platinum green; the session's own buttons keep their orange. Between two stations nothing is dimmed, the card waits in the lower right corner, and its button reads "Skip ahead". A screen reader is told each sentence.

A stop that is pressed. Where a station waits for a button of the session, that button is lit and stays in use under the walk (the dim is opened around it); everything else takes no click. Pressing it is the way on, and the card's "Next" stands back as an outline. These are the set-up's "Create and open the lobby", the lobby's "Go live" with the "Go live" of the question behind it, and "Present".

What the stations show:

  • set-up: the real set-up assistant (SetupPage with its demo prop) under the demo's title. The demo holds the assistant's step, so the walk turns its pages. The short walk lights three things: the formats, the rule "A lift counts" (where a judge is switched on), and the last button. Behind "More about this": the name, the picture, the rule sets, "Ranked by", the start list, who is never shown, logo and colour, "Announce lifts", when it ends, the check. The assistant's own buttons turn the pages too. Its last button saves nothing and opens the demo's lobby.
  • session, join, ready, go-live: the lobby. The phone shows the code going in, then, with the tablet that joins, the step that names the device and says what it shares: in the app the name is given before the join, not after it.
  • The three views one after the other, without anyone touching the picker: the demo turns to the view a station is about (views of the station) and the walk's first stop there lights the picker. Leaderboard with the first lift and the new leader; Competition with the no-lift, the tablet's question, the coach's own ruling and the bar path; Stream.
  • display: "Present" is lit, and the walk goes on ON the display (stops with display): the board, the lift beside it, then the display of Competition and of Stream, then the same board as a projector across a hall shows it, then how a television pairs by a number. The display is up for as long as the walk is at such a stop, and the evening stands still. The hall is the screen's profile, which is the browser's own choice (chooseWallProfile): the walk sets it for its one stop and puts back what was there. A word about the whole display dims nothing. The last stop's "Next" leads back to the coach's page. A display opened beside the walk (the result's "Present") gets a note with the way back instead (DemoDisplayNote).
  • result and own: the result page is shown under the demo's title (ResultView with its frame prop), so the page's arrow is the demo's and leaves the demo. The last stop's button is "Set up your own", which opens the real set-up.

"Play by itself" (the card's X) turns the holding off: the walk goes, and the row under the head shows where the demo is (the set-up and the three chapters), with "Step by step" to take the walk up again: at the last station the evening has passed in the chapter that is on screen, or that chapter's first (demoWalkStationFor in demo-guide.ts) — whoever watches the board is not taken back to the lobby.

A jump to a station delivers every lift before it in one step. The judge of an earlier lift then answers before the next lift comes in (deliver in demo-evening.ts), so the lift that arrived last is the station's own and a board's "just in" is on it. (Before 2026-10-13 the late rulings were given after all the lifts, and the Leaderboard's card at leader and display stood on a no-lift from before.)

The Stream's station (views) is held at Lea Hofmann's last clean and jerk, the set the Stream marks as far off; "More about this" there lights that row and says what the arrow means.

Live test 71-demo-evening walks every stop, checks that each target is lit, presses the three buttons of the session, checks the view at each station, and then follows the evening that plays by itself.

TODO: below 1280 px the phone is not shown; its stops are said over the dimmed page. Where a target fills most of a narrow window the card lies over a part of it.

Aligned with the help (2026-10-12). The short walk has 24 stops. What was missing from it is in it now, in the words the screens use: at display the first stop lights Add a display in the demo's head (the demo's head carries it beside "Present", as a session's does; here it opens the help's line on the screen, since the demo has no display to pair) and says that a gym screen without sign-in shows a number; the lit "Present" follows. At no-lift a third stop lights the ruling and names Undo ruling. At result the first stop says how a session ends ("End session", or by itself an hour after the last set), the second lights the PDF, the third the tablet with the athlete's own place. The demo's session is called "Live Hub demo" everywhere, on the drawn phone too.

The athlete's side as a drawn phone — demo-phone.tsx​

Block D1c (2026-10-08). DemoPhone draws a phone (about 270 px wide, a quiet bezel, the page's theme) with one of six pictures of what the device at the platform shows; the ids are DemoPhonePicture in demo-guide.ts. The demo shows it beside its stations ("The demo leads" above); the help does not yet.

Each picture says what its counterpart in the tracking app says, in the same words (so the same translation keys) and the same order. The tracking app's components cannot be imported into the portal, so the pictures are drawn from the shared parts in packages/ui/src/live/ and the design system's Button:

PictureCopiesWhat it shows
join-codeJoinCodeStep (live-session-row.tsx)"Join a live session", the demo's code in the field with a cursor, "Scan the code"
join-scanJoinScanView (join-scan.tsx)"Scan the code", the camera's frame on the demo's QR code (JoinQr)
join-confirmJoinConfirmStep, shared deviceThe session's name, "This device is called" with the first demo tablet's name, what is sent, "Join as Platform 1"
statusLiveStatusChip, card open (live-status-button.tsx)"Live Hub demo", "Delivered", 3 sets, under the header's live button
rulingSetRow with its ruling strip (set-list.tsx)the set, "Not ruled yet", the lifter and the load, "Good lift" and "No lift"
resultLiveResultCard (live-result-card.tsx)"Live Hub demo has ended", the lifter's place and best in the total and in each lift, "Done"

The pictures are about one lifter of the demo's meet, the one who ends second (DEMO_PHONE_ATHLETE); her numbers are the meet's, and demo-phone.test.ts holds them against the script. The same test holds every picture's words, in their order: when a sheet of the tracking app changes its words, change the picture and that list with it.

It is a drawing. The phone is one image to a screen reader (role="img" with a sentence that says what the picture shows), and everything inside it is inert and hidden, so the drawn buttons cannot be focused or pressed. The screen is laid out at 320 px, where the app's own type and spacing hold, and drawn at 80 %. The only movement is the cursor behind the code, which stands still for someone who asked their system for less movement.

Help and first-visit tour — live-walkthrough.tsx, use-live-tour.ts​

"How it works" (LiveWalkthroughModal) has five topics. Two follow a session through its life: Set up a session (the set-up's five steps: format, rules, athletes, logo with colour and end, the check) and Join, go live, show it (the code as letters and as a QR code and the tracking app's "Join live session", the lobby's rows, Go live, Present and a display that pairs by number, the end and the result). Three explain a format each, under the format's one sentence (formatSentence). Every step names a control or a state that exists on the screen it is about; a screen that changes needs its topic read again (last read against the screens on 2026-10-08, block D1d). The pictures of the three formats, in the help and behind each view's waiting state (live-mocks.tsx), sketch the views as drawn in the look of 7 Oct 2026 and need redrawing with them.

The help opens from the hub's head, from the "…" menu of a session's page (on the session's format), from the demo's walk and from the lobby's link "A device with an older app? Add it by hand" in the demo, where there is no editor.

The first-visit tour (use-live-tour.ts, hub screen only) has one stop: the demo's button, as a click-to-advance step. The lit button starts the demo, which leads from there in the same look. Its id is still portal-live: a new id needs a row on the server (product-guidance-backend.md), so a coach who finished the earlier tour is not shown this one. Observed on backdev, 2026-10-08: there is no product_guidance_items row with that key, so on that server the tour is shown again after every reload.

One map, told once (2026-10-12). The help's first screen is now the sequence itself: seven lines under "A session, step by step" (demo-help.ts: set up, devices join, go live, on a screen, rulings, the end, the result), one sentence of at most eighteen words each plus at most one "why", every control under the name it has on screen ("New live session", "Join live session", "Go live", "Present", "Add a display", "Good lift", "No lift", "Undo ruling", "End session", "Ended"), each with Show me, which opens the demo at the station that shows the step. The screen's one main action is Watch the demo, which opens the show as the hub's button does. Under the lines, apart, "What the display shows": the three formats as three rows of plain text, an icon, the name and the format's one sentence (P6-25, 2026-10-13; until then three cards in columns of about 100 px, whose sentence wrapped to five lines). The dialog is wider for it (wide on WalkthroughModal, 48 rem), so at 1440 × 900 no line of a format wraps and the dialog stands 44 px clear of the window's top and bottom. A format's spotlit steps are what the "?" of a station opens that is seen in that format. The topics "Set up a session" and "Join, go live, show it" are gone with their sketches: the demo shows those steps, the lines say them. LiveWalkthroughTopic is now a LiveViewMode. The first-visit tour has three stops, at the three controls of the hub's head: "New live session", "How it works" and, as a click-to-advance step, "Watch the demo".

Help and demo are one thing — demo-help.ts​

Block D1d (2026-10-08). The help explains a screen with a sketch, the demo shows the screen itself, and each leads to the other. demo-help.ts is the table between them, pure and tested against both sides:

Station of the demoStep of the help its "?" opens
set-up, ownSet up a session · Choose the format
sessionJoin, go live, show it · Tablets join with a code
join, readyJoin, go live, show it · The lobby shows who is ready
go-liveJoin, go live, show it · Go live
displayJoin, go live, show it · Put it on a screen
resultJoin, go live, show it · The end, and the result
first-liftLeaderboard · The ranked field
leader, deciderLeaderboard · The card above the board
no-liftCompetition · The latest attempt
viewsStream · Every set, as it lands

From the demo into the help. The walk's card has a "?" (DEMO_STATION_HELP). The help opens on the step, not on the topic's first (initialStepId of WalkthroughCarousel), and the walk steps aside while it is open. While the demo plays by itself, the row under its head has "How it works", which opens the topic of the screen that is playing.

From the help into the demo. The last step of every topic has one button, "See it in the demo" (HELP_TOPIC_STATION: the first station that shows the topic — set-up, session, first-lift, no-lift, views). From the hub and from a session's page it opens the demo at that station as a screen of its own (?demo=1&station=no-lift), so the browser's Back and the demo's arrow lead to where the help was. Everything before the station has then happened: the board is as full as it is at that moment of the meet. Inside the demo the button goes to the station without leaving; for the topic of the station at hand it reads "Back to the demo" and only closes the help.

A station in the address is read once, when the demo opens; the address does not follow the walk afterwards.

TODO: below 1280 px the drawn phone is not shown; the help's steps say the athlete's side in words only ("open the tracking app's sidebar, tap Join live session"), they do not show the phone's picture.

Since 2026-10-12 a station's "?" opens either a line of the sequence (the help's first screen, with that line marked: set-up and own → Set up, session and join → Devices join, go-live → Go live, display → On a screen, no-lift → Rulings, result → The result) or a step of a format (first-lift → Leaderboard · The ranked field, leader and decider → Leaderboard · The card above the board, views → Stream · Every set, as it lands); DEMO_STATION_HELP holds a DemoHelpPlace of either kind. A line's "Show me" opens the station of LIVE_HELP_STEP_STATION; a format's "See it in the demo" the station of HELP_FORMAT_STATION. Inside the demo both go to the station without leaving, and the first screen's main action reads "Back to the demo" and only closes the help.

Adding a device by hand — device-picker-list.tsx, device-eligibility.ts​

The list of the account's phones and tablets with a switch each, on the set-up page and in the editor: a row per device, not a card around them. It is the second way into a session, for a device whose app is too old to ask for a code. Each row says what a coach needs to pick the right one (liveDevicePickerFacts, pure and tested):

  • What the device is called in the live session it is in ("Platform 1", from workoutLiveSessionDeviceLabel), with its own name under it.
  • When it was last used (lastUsedAt), and how many stations it may record.
  • Whether its app can ask for a code (liveJoinByCode, from appVersion): the chip "Older app" (LiveStateChip, as in the lobby) and "Cannot ask for a code. Add it here." for release 3.0.7 and earlier, "Can join from its own screen, with the code." for a later one, nothing for a device that reported no release. The release is the one mark the lobby reads too (runsAppWithoutLiveQueue in lobby-readiness.ts).
  • Whether it is in another live session: "In another live session: “name”." and, once it is switched on, "Leaves “name” when you save." The devices that were switched on when the list opened belong to the session being edited and get no such line.

Observed on backdev, 2026-10-07: the device list carries appVersion only for a native build, which sends app-version with every request (a browser build sends none); and a device that is added by hand while it is in another session is moved — it leaves that session, and the label it had there is gone.

A list that cannot be read says so in place (InlineAlert, "Couldn't load your devices", with the backend's message and "Try again") instead of showing an empty list, which would read as "no devices" (2026-10-12). The editor passes the devices it knows to be in the session (inSession), so a tablet that joined while the editor is open gets no "in another session" line either.

Empty and failed states​

A live view never answers with a bare "Waiting…":

  • Feed could not be loaded and nothing is on screen → LiveFeedError (live-feed-error.tsx), with a retry. A failed refresh over sets already shown keeps the board up (the feed store keeps serving them).

  • Nothing to show yet → LiveWaitingState (live-waiting-state.tsx), which names the cause worked out by liveWaitingCause (live-waiting.ts, pure + tested): no training device in the session (with "Add devices"), or devices in and no set yet (the devices by name, plus the steps on the athlete's side), or only warm-up sets on a board that counts work sets. A device is named by its label in the session ("Platform 1"), read from the session's own device rows (workoutLiveSessionDeviceLabel).

  • The same state on a display speaks to the room, not to the coach (onEditDevices is absent in present mode, and that is how the component knows): "Waiting for the first lift", which devices are in, and the code to join with, large. No steps, no button, no icon, and no ghost rows, which on a wall read as "still loading".

  • Device counts on the hub's rows and in these states come from trainingDevicesOf: phones and tablets only. Display clients that joined the session are not counted.

  • An ended session with no sets names how it ended (endedBy): reached its end date (with "Change end date"), ended by its idle limit ("probably" where the server does not say so, with "Run again"), or ended by hand (with "Run again"). On a display the sentence stands without a button.

  • Personal bests that could not be read no longer vanish quietly: useSessionResult says bestsFailed and offers retryBests (forgetBestsBefore + a new read); the stored summary says complete: false, so the next result page asks again by itself. TODO: the result page does not show the line yet (result-view.tsx, see the report of 2026-10-12).

Present mode​

Present mode (present-mode.tsx) is a chrome-less, authenticated gym-display overlay that fills the viewport and offers OS Fullscreen + a screen wake-lock. Two v4 fixes make it a real kiosk surface:

  • Fullscreen works cross-browser. @enode/ui/use-fullscreen gained webkit-prefixed fallbacks (Safari < 16.4 / iOS expose only the prefixed API) for support detection, the request/exit calls, and the change event, and now surfaces (never swallows) the promise rejection browsers throw outside a user gesture — a console.warn in dev, the error engine's reporter in production.
  • Overlays paint over the fullscreen root. When an element is in the Fullscreen API, only its descendants render — so a document.body-portaled drawer/sheet would be invisible under the present root. overlayPortalHost() (packages/ui/src/containment.tsx) returns document.fullscreenElement ?? document.body; packages/ui/src/sheet.tsx and drawer-stack.tsx portal into it, so the athlete drawer, attempt inspector, and lift-leaderboard overlay all paint over the fullscreen display. Outside fullscreen fullscreenElement is null, so behaviour is identical everywhere else.

Present is fully interactive: the !present interaction gates were dropped across the views (leaderboard/exercise-pane, competition, stream/stream-detail). Rows expand, the athlete drawer / attempt inspector / lift-leaderboard overlay all open, and the masthead athlete switcher works — only the header control surfaces are trimmed for the display scale. The "Ranked by" control is not on a display at all (12 Oct 2026): the frame's line says what is ranked, and the ranking is changed on the coach's own page.

Escape leaves Present mode (12 Oct 2026) — the address loses ?present= as with the exit button — unless the screen chooser or a sheet is open, which take their own Escape; in browser fullscreen the first Escape is the browser's. The exit button spells "Exit presentation" beside its cross while a hand or the focus is on it.

Nothing under a display can be reached (13 Oct 2026). A display opened inside the dashboard (?present=) is drawn over the dashboard's sidebar, which used to stay in the Tab order: the first fourteen stops of a keyboard or a television's remote were the coach's navigation. While PresentMode is mounted it covers the shell (useCoverShell, components/shell-cover.tsx): AppShell marks the sidebar inert and aria-hidden, so the first Tab stop is the display's own Screen, then Fullscreen, Exit presentation and the rows. The same goes one level up: while the result lies over the board (WallResult), the board's frame is inert (display-cover.ts) and Tab walks the result's own controls; "Show the board" gives the board back. /display has no dashboard around it and needs neither. The screen chooser holds the keyboard like any dialog (useModalFocus).

A display loads no dashboard-only data (13 Oct 2026). On ?present= and on /display the notification stream and its peek, the roster's progress, the tours' guidance and the announcements are not mounted (components/not-on-a-display.tsx): nobody at a television reads a peek or closes a dialog. They come back when the display is left for its session.

View modes — one format per session, three views of it on a page​

view-config.ts owns the mode system: LiveViewMode is "leaderboard" | "competition" | "stream". A live session has ONE format: what it is, what its rules belong to, and what a display shows. It is a per-session setting, chosen in the editor.

A session's page (live-view.tsx) can be turned to another view without changing the session (block V1, 8 Oct). The page's "…" menu holds an entry for each view the page does not show: "Show Stream on this page". There are no tabs: three tabs in the line under the name did not say that the other two views are not what a display presents.

  • An entry turns this page in this browser and nothing else. Nothing is written to the server: the format, the rules and every display stay.
  • While the page shows another view than the format, a band stands over the board (data-testid="live-view-band"): "Only you see Stream here. The display shows Leaderboard." and a button "Back to Leaderboard". A page that shows the format has no band.
  • The line under the name carries what the page shows and what the session is as data-view and data-format (data-testid="live-view-status").
  • The choice is kept per browser and session in localStorage (lookedAtViewMode, setLookedAtViewMode; key enode.live.lookedAt:<id>), together with the format it was made over. Going back to the format removes the entry. A choice made over another format does not count: when the format is changed, in the editor here or on another browser, the page opens in the new format.
  • Present shows the format, whichever view the page is on.
  • The lobby has no such entries (there is no board to turn). The board of an ended session has them.
  • The help ("How it works") opens on the topic of the view that is on.

Held by view-config.test.ts and by live test 43-live-view-tabs (ENODE_VIEW_TABS=1, about 45 s, three accounts, a coach's page and a display in a headless Chrome; ENODE_VIEW_THEME=light, ENODE_SHOTS_DIR): the page as Stream and as Competition while the display stays on the Leaderboard and the stored format does not change, the reload, a phone's width, and a format changed on the server.

Not done: the Competition view of a session without rules says "Attempt 2 of 3" with a third, empty slot, though nobody set three attempts (competition-view.tsx).

The session editor (session-editor-page.tsx) is the only place the format is chosen:

  • The "Format" row is the first row of the editor, above the name. "Format" is the word on the first screen, the set-up page and here (see "Setting a session up and changing it").
  • It offers all three modes as round chips (ChoiceChip), with the selected format's sentence (formatSentence) as the row's hint.
  • Saving writes the chosen mode to both the synchronous local cache (setStoredViewMode) and the server config blob (see the next section).

After an in-view editor save, page.tsx bumps a viewRevision counter that keys the mounted LiveView (the React key combines the session id and the revision), remounting it so a new choice takes effect immediately — the live view seeds its mode once on mount from storedViewMode.

Other entrances resolve the same per-session value:

  • Opening a session from the hub, presenting from the hub, and a ?present=<id> link WITHOUT a (valid) view param all resolve the stored view via storedViewMode (fallback: "leaderboard"). ?view=stream is a valid deep-link override.
  • The hub cards (live-hub.tsx) show the configured view — icon + label — in their meta line, so a card says what kind of board opening it enters.

Server-backed view config — the config round-trip​

The coach's view choice is persisted server-side and travels across browsers, devices, and kiosks. The backend persists an opaque config?: string | null on the live-session Create / Update / Return DTOs (packages/core/src/api/dtos/live-sessions.ts, added on backdev 2026-07-17); the backend never parses it — the portal owns the shape.

  • session-config.ts is a versioned JSON codec: parseSessionConfig / serializeSessionConfig (stamps SESSION_CONFIG_VERSION), viewModeFromConfig (reads the viewMode field), and configWithViewMode (merges a mode into an existing blob at the raw-JSON level so unknown future fields survive a plain view-mode edit). It is tolerant: a missing/blank/malformed blob yields an empty config rather than throwing, so a live session never fails to load over a bad config.
  • The editor writes the mode into config on save — configWithViewMode on the Create/Update DTO. Verified live on backdev: the PUT sent config {"v":1,"viewMode":"stream"}, echoed back on the Return DTO.
  • The server value is the truth. resolveViewMode(session.id, session.config) reads config → local cache → leaderboard, and the live view and present mode call it at RENDER time, so a session whose view is changed on another browser follows the change once the session list refreshes. hydrateViewModeFromConfig keeps the localStorage cache in line with the server (the server wins; a config without a view leaves the cache alone). The cache only serves a first paint before the list has loaded.
  • A ?present=<id> link carries the session only. The display shows the configured view and keeps following it. A valid &view= in a link still overrides, for a display that should deliberately show something else.
  • Keeping a watched session fresh: the session list revalidates on focus, visibility and reconnect (store-kit registerRevalidation), and page.tsx re-reads it once a minute while a session is open or presented — a wall display gets no focus event, and the server publishes nothing when a session is updated. sessions-store.ts drops a list answer that was requested before a local change, so a refresh cannot undo a save that overtook it.

Ranking — stored on the session​

The rank-metric selection (which metrics, in which order, each with its roll-up) belongs to the SESSION: rankMetrics in the config blob (session-config.ts; the pure shape and its tolerant parser are in rank-selection.ts). Every view and every screen that shows the session ranks the same way.

  • useRankSelections(sets, sessionID) reads it from the session in the sessions store and sanitizes it against the metrics the feed carries.
  • change saves with PUT { config } and nothing else (devices, view and unknown fields are kept — checked on backdev by tests/live/offline/14-live-session-config.live.test.ts). The new list shows at once and is taken back, with the error presented, if the save fails.
  • Fallback: the earlier app-wide localStorage list is still read for a session whose config holds no ranking yet, and is where the demo and the debug fixture (not in the session list) keep theirs.
  • Before the first set the feed carries no metric. useRankMetrics(sets) then offers the catalogue instead: every metric a set or a rep can carry (the set- and rep-level export catalogue, without the two columns that say where a set or rep stands in its workout). So a ranking can be chosen, and is kept, in a session nobody has lifted in. With "catalogue" as its second argument the hook always offers the catalogue beside the feed's metrics; the set-up page and the editor ask for that.
  • A session set up on the set-up page always has a ranking in its config: the one its sentence named, the load unless the coach chose another.

The rules of a session — rules.ts, rule-presets.ts, derive-leaderboard.ts, display-rule.ts​

What counts on a session's boards is part of the session: one object, rules, in the config blob (version 2 of the codec in session-config.ts). A session without rules ranks exactly as it did before there were any; the ranking functions take the rules as an argument that can be left out.

The object, with what each part is when a stored object leaves it out (DEFAULT_RULES in packages/core/src/live-session/rules.ts):

"rules": {
"counts": "allSets",
"attempts": null,
"direction": "highest",
"score": "raw",
"exercises": [],
"combine": "separate",
"groups": "none",
"tie": "later",
"lift": "everySet",
"shown": { "only": [], "hide": [] }
}
PartValuesWhat it does to a board
countsallSets · workSetsWhether a warm-up is an attempt. An athlete with warm-ups only is on no board of work sets
attemptsnull · 1 to 6With a limit, an athlete's FIRST attempts per exercise count. A later set is on no board and moves nobody
directionhighest · lowest · closestTo with targetWho wins, and which of an athlete's attempts is their best. The target is in the unit of what is ranked
scoreraw · percentOfBestRanks the value, or the value as a percent of the athlete's own best from before the session
exercisesdefinition idsWith no exercise and no exercise tag: whatever is lifted. Otherwise only sets of these exercises are attempts
exerciseTagsexercise tag ids, with exerciseTagMembers and exerciseTagsReadAtEvery exercise that carries one of the tags counts like a named one. See "Lists chosen by tag"
combineseparate · totalOne board per exercise, or one board that adds each athlete's results up (deriveTotal)
groupsnone · tag · genderOne table, or one per group, each ranked from first place (tablesByGroup)
tielater · earlier · fewerAttempts · sharedWho is ahead of an equal result, or that both share the place (1, 2, 2, 4)
lifteverySet · ruledWhether a lift scores when it is completed, or only once a judge ruled it good
shownonly, hide: athlete ids; onlyTags, hideTags: user tag ids, with tagMembers and tagsReadAtA start list, and athletes who are never shown, each by hand and by tag. hide wins over only

Every part changes a number or a place on a board. Only groups and combine also change how many tables there are.

Lists chosen by tag (rule-tags.ts, and withTagMembers in rules.ts). The exercises that count, the start list and the athletes who are never shown can each name tags beside the ids picked by hand; hand and tag add up. A list by tag follows the tag: an athlete who gets the tag after the session was set up is on the start list, an exercise tagged later counts.

  • The rules hold the tag ids and, beside them, who carried each tag when a client that can tell last looked (tagMembers, exerciseTagMembers) and when that was (tagsReadAt, exerciseTagsReadAt, Unix ms). isShown, isExerciseCounted, startListOf, neverShownOf and countedExercises read picked ids and stored members together, so rules that nobody resolved still rank by the last known members.
  • A client that reads the coach's lists puts the members in as they are now: the portal for a running session (useSessionRules), a tablet under the owner's login (useOwnLiveSessionRules). Members come from the assignedTags of the cached athletes and exercises (liveTagSources).
  • Of two clients the one that looked last is right: members stored after a client read its own list stay (withTagMembers compares the list's load time with the stored read time).
  • The portal writes the members back to the session while one of its screens is open and the session runs (useKeepRuleTagMembers, storeRuleTagMembers). A display paired by number and a tablet under another login cannot read the coach's lists and go by what the session holds. An ended session is no longer resolved: its result keeps the members of its last moment.
  • A start list by a tag nobody carries shows nobody, and an exercise tag no exercise carries counts nothing (hasStartList, namesExercises).
  • A session that names no tag is stored exactly as before: the tag fields are left out.

TODO: the set-up page's picture shows an empty board once an exercise tag is chosen, because the demo's exercises carry no tag (the same holds for exercises named by hand).

Reading and writing. parseRules is tolerant like the rest of the codec: a part that is missing or holds a value this version does not know reads as its default, "closest to" without a number reads as "highest", and anything that is not an object means the session has no rules. rulesFromConfig reads, configWithRules(base, rules) merges (null takes the rules out again). The version number says who wrote the blob last, not what it holds: a portal of version 1 that edits a session keeps the rules it does not know and stamps a 1 on the blob, so rules is read whenever it is there.

Rules worth knowing before changing the code.

  • Empty rules are today's board. deriveLeaderboard(sets, ref, agg, { rules: DEFAULT_RULES }) equals deriveLeaderboard(sets, ref, agg) value for value; derive-leaderboard-rules.test.ts compares the two over boards with ties, missing values, rep metrics, warm-ups and sets that arrived out of order. The rules path adds one field, tieWonBy.
  • Which attempt is which is decided by the order the sets were lifted in (liftedOrder: the set's own time, then arrival), not by arrival. An attempt keeps its number when it is edited or ruled later. A row's series and "latest" stay in arrival order, as without rules.
  • "Best" follows the direction. The roll-up a coach chose keeps its meaning: max is an athlete's best attempt and min their weakest. Where the lowest wins, the best attempt is the lowest.
  • The earlier lift is the one whose result stood first: the first attempt that reached the athlete's result, not their last set. For a total it is the last lift that is part of the total.
  • Percent of the own best. A row keeps the lifted value in bestValue and carries the percent in percentOfBest. An athlete without a best is ranked below everyone with one and has percentOfBest: null. The best comes from the read the display already makes for "Personal best" (rulesRanking in rules-ranking.ts, same cut), so a lift above 100 % and a personal best are the same lift.
  • A tie is an exactly equal number unless the caller passes the display's rounding (rounded); then two results that print the same are a tie.
  • A total needs a result on every exercise of the rules. An athlete who lacks one has no total and stands below everyone who has one.
  • Nobody leaves a board for lacking a group: athletes without a tag or a stated gender are in a last table whose group is null.

A ruling. attemptScores reads a set's ruling (good, noLift, absent). A lift that was ruled out never scores, in any session. Where lift is ruled, a lift scores once it is ruled good and waits until then. A lift that does not score still uses up an attempt, stays in the athlete's series without a value, does not move a place, and gets no line on a display (deriveLiftInsight returns null). On the competition board it is a failed attempt that still names what was measured (measured), and one that waits has awaitsRuling.

A set carries its ruling since block X2: the server stores it, toLiveSet maps it to LiveSet.ruling, and rulingOf in rules.ts reads it. Who gives a ruling, and where, is in "Good lift, no lift".

Who is shown. isShown applies both lists; attemptsUnderRules applies it to a feed together with exercises, counts and attempts. Every ranking function calls it, so a hidden athlete is in no row, is never "the one who lifted last", is not offered by the competition board's switcher, and makes no group table. It is a filter on what a screen shows: a hidden athlete's sets still reach the server and every device in the session until the tablet reads the list too.

A stored set that does not count (not-counted.ts in core, not-counted.tsx in the portal; re-audit of 13 Oct 2026). Rules are never stamped on a set, so a set the rules leave out is in the feed all the same. notCountedReasons gives each such set ONE reason, and a screen that shows the set says so with one quiet mark, a caption in muted text, never a chip or a colour:

Why it does not countLeaderboard and its displayCompetitionStreamHub card "Last lift"Result, PDF, overlay
Over the attempts everyone gets (overAttempts)The card follows it: "Attempt 4", the number muted, "Not counted · over 3 attempts" in the place of the card's line; "Just in" lists it with the same words. No row moves.No fourth slot. Under the strip: "+1 not counted · over 3 attempts · 112.5 KG" (OverLimitNote).Row: "Not counted"; the set's header: "Attempt 4 · Not counted · over 3 attempts".Named, with the mark.Not there: they list attempts.
Its exercise is not one of the session's (exercise)Not there: no board for it.Not there."Not counted · not one of the session's exercises", no number.Named, with the mark.Not there.
A warm-up where warm-ups do not count (warmUp)Not there.Not there."Warmup", as every warm-up says.Named.Not there.
Its athlete is not shown (athlete)On no screen: the Stream filters by who is shown, and the hub's card never names such a lift.
Waits for its ruling / ruled outThese ARE attempts and fill a slot: "Not ruled yet" and "No lift" (attemptVerdict), see "Good lift, no lift".

One word for a lift (liftWordOf in core lift-word.ts, the texts in @enode/ui/live/lift-word, useLiftLabels in the portal). A lift is an "attempt" where the session's rules count attempts — everyone gets a number of them, or a judge rules each lift — and a "set" where training is simply logged. The word follows the session, not the view: a session without such rules says "Set 3" also on its Competition view. Every text that names a lift takes it from there: the board's card and column heads ("Best attempt"), a display ("Last lift · Attempt 3", "Attempts"), the Competition view, the Stream ("Attempt 2 of 3"), the overlay's lines, the athlete's drawer, the result and its PDF, and the tablet's standings heading. So do the counts of what a session counts — a board's head, the hub's card and the row of an ended session ("12 attempts") — and the rule's sentence in the set-up, the editor and on the card ("Load of the latest attempt" / "… set"; rankedMetricName is handed the word). Counts of everything a session stored ("23 sets" in the Stream's head, the editor's "lifted 12 sets so far") stay sets: they count sets.

One name for an exercise (live-exercise-name.ts). A set of the feed names its exercise as the server composes it for a screen that knows nothing else ("Scott Curl Dumbbell Unilateral"). The Live Hub names it by the coach's own list of exercises first (liveExerciseName): the coach's rename, else the stock name ("Scott Curl"), as the exercise list and the pickers do. It is the name alone, also where the list has two exercises of one name ("Squat" with a barbell and on a Smith machine; Karola, 13 Oct 2026: plain, as elsewhere in the portal): the head of a board, the exercise switcher and the Stream's filter write the list's second line under the name, and that tells the two apart. The set-up's and the editor's sentence about the rules name a counted exercise the same way (useLiveExerciseNames). Without the list — a display paired by number, the demo, an exercise that is not the coach's — it is the feed's string as before.

Presets (rule-presets.ts): data, each with complete rules and the ranking it is meant for. applyRulePreset keeps a session's exercises and who is shown; presetOf recognises a preset in a session's rules.

PresetRankingRules that differ from the defaults
Max liftloadingMass, bestwork sets · 3 attempts · tie: earlier
Fastest barvelocityMean, bestwork sets · tie: earlier
Jump-offjumpHeight, bestwork sets · 3 attempts · tie: shared
Beat yourselfloadingMass, bestwork sets · percent of the own best · tie: shared
Target hitvelocityMean, bestwork sets · closest to 0.8 m/s · tie: earlier

No preset asks for ruled lifts: every preset counts each completed set. A coach turns the rule on by hand, under "More rules".

The sentence (display-rule.ts). One clause per thing a coach decides, each clause one translatable text with named places, and each place filled by a text of its own (rulePartLabels). ruleClauseText takes the words for the places as an argument, so the editor can put markers there and cut the text at them (rule-sentence.tsx).

ClauseText
winner, one exercise or any"The {direction} {metric} in {exercises} wins."
winner, closest to"The {metric} {direction} in {exercises} wins."
winner, several exercises"The {direction} {metric} wins, in {exercises}, {combine}."
winner, several, closest to"The {metric} {direction} wins, in {exercises}, {combine}."
attempts"Everyone gets {attempts} per exercise."
counts"Warm-up sets {counts}."
score"A lift is scored {score}."
groups"Athletes are ranked {groups}."
tie"A tie goes to {tie}." · shared: "A tie means {tie}."
lift"A lift counts {lift}."
PlaceWhat it reads
direction"highest" · "lowest" · "closest to {target}"
metricThe rank metric's name; with a roll-up other than the best: "average {metric}" · "{metric} of the latest attempt" · "{metric} of the weakest attempt"
exercises"each exercise" · up to three names as a list · "{names} and {count} more"
combine"one by one" · "added up"
attempts"{count} attempt(s)" · "as many attempts as they like"
counts"count too" · "don't count"
score"as it is lifted" · "as a percent of the athlete's own best"
groups"all together" · "by tag" · "as women and men"
tie"the later lift" · "the earlier lift" · "whoever needed fewer attempts" · "a shared place"
lift"as soon as it is completed" · "only once a judge rules it good"

On a display. useDisplayRule returns the rules of a session that has any as its line under the session's name, also before the first lift: who wins, always; the attempts, where there is a limit; the score, where it is a percent; the ruling, where lifts are ruled (wallRuleClauses). "The highest Load in Back Squat wins. Everyone gets 3 attempts per exercise." An exercise is named as the lifted sets name it, else as the catalogue does (the demo's script names its own), and never by its id (namesOnTheWall). An exercise a display has no name for yet is counted with the ones the line is too short for: "Snatch and 1 more". Only where it can name none does the line say "the chosen exercise" or "the chosen exercises". A session without rules keeps "Load · best set".

Which screens rank by the rules. The functions do; a screen follows once its call passes the argument. useSessionRules(session.id) reads the rules, rulesRanking(rules, { sets, ref, pastOf }) builds the argument. Inside the set-up page's picture useSessionRules returns the draft of the session being set up (useRulesDraft), so a board that reads its rules this way is also right in that picture.

CallFileFollows the rules
useDisplayRulepresent-mode.tsxYes: the line under the session's name
deriveLeaderboard(scoped, ref, primary.agg)exercise-pane.tsxNot yet
deriveCompetition(sets, ref, …), deriveLeaderboard(shownLiftSets, ref)competition-view.tsxNot yet. Its "Last 3 attempts" is attemptSlotCount(rules)
deriveLeaderboard(target.liftSets, …)lift-leaderboard-overlay.tsx, attempt-detail-sheet.tsxNot yet
deriveLiftInsight({ … })exercise-pane.tsx, competition-view.tsxNot yet: pass by
deriveLeaderboard(…) in deriveSessionResultsession-result.tsYes, since block W14: useSessionResult and rankingForSummary hand the rules on as ranking.by. Not yet in percent, as a total or per group — see "The result of an ended session"
deriveLeaderboard(ofExercise, …)use-live-standings.ts (tracking app)Not yet. The device session does not carry the session's config

Checked. Unit tests: rules.test.ts (the object, every preset), derive-leaderboard-rules.test.ts (a test per part, the presets on a board), derive-competition-rules.test.ts, the rules block of lift-insight.test.ts, session-config.test.ts, display-rule.test.ts (every text of the two tables above), rules-ranking.test.ts. The tests of the board without rules (derive-leaderboard.test.ts, derive-competition.test.ts) pass unchanged. On backdev: tests/live/offline/60-live-rules-contract.live.test.ts — a config with rules is stored and comes back as sent, also with a start list of 200 athletes (7 kB); the rules survive the edit of a portal from before the rules; sets posted through a tablet rank by the rules as the server returns them (a warm-up, a fourth attempt, two equal lifts, a hidden athlete), during the session and after its end. In a browser, at 1920 × 1080 in dark and light: a display on such a session shows the sentence before the first lift and after two lifts.

Seen on backdev while checking (2026-10-07). The read of a session's sets comes newest first, and a set keeps the created it was sent with. Sets sent with one and the same time have no order of their own: liftedOrder then goes by arrival, and where there is none (a result read later) by id.

Left open.

  • Not every board passes the rules yet (table above); the result of an ended session does. A board that does not has the sentence on its display and the ranking of before under it, and a result that can differ from it.
  • A hidden athlete's sets still leave the tablet. The tracking app does not get the session's config, so it cannot read the list.
  • On a board where the lowest wins, the glyph of the display's line still reads a lower number as a step down (lift-insight-line.tsx).

Setting a session up and changing it — setup-page.tsx, session-editor-page.tsx, session-parts.tsx, session-part-open.ts​

The set-up and the editor are one form in two situations, laid out by session-parts.tsx on SessionFormPage (session-form-page.tsx): the form on the left, the picture of the display on the right from 1280 px on, and a foot that stays while the form scrolls ("Cancel" and "Create and open the lobby", or "Cancel" and "Save").

  • One screen. SessionOverview shows the format as cards, the name, and the rest as one line each with a Change: Ends, Rules, Athletes, Look — and in the editor Devices.
  • "Change" opens the line in place (14 Oct 2026, Karola's choice of the mock-ups: "Aufklappen"). The line's setting opens directly under it (SessionPart); the page, its head and the format cards stay, and the other lines stay above and below. Until then "Change" swapped the screen for the part with a history entry of its own, which looked so much like the screen before that the way back was not found. One line is open at a time: opening another closes the first and keeps what was set in it (nextOpenLine). The open line keeps its summary as the head of the open block, with a chevron in place of "Change"; the chevron, "Done" under the fields and Escape from inside the block close it, and the line then reads the new value. Escape in a picker's panel or a sheet inside the block closes only that (the key is heard first and ignored while a dialog, list or menu is open).
  • Each line opens only its own part (G05), straight into its fields: the line over it says what it is about (until 2026-10-14 each part opened with a sentence that said it again; only the Stream's Rules keep one, on why they hold one row). Ends: when the session ends. Look: logo, colour, announce lifts. Devices (editor): the code and the list. Rules: the rule sets and the rows. Athletes: who is shown, and in the set-up the devices added by hand (a tablet whose app is too old for a code). A session ended by hand says under Ends only that it was ended, with "Run again".
  • Scrolling and focus. After a line opens, the form scrolls as little as it takes to show the block, its top first (revealDistance); after it closes, the line stays in view. A line opened by its button moves the focus to the first control of the block, and closing it by hand moves it back to the line's button; a line opened by the address, the demo's walk or Save is shown without taking the focus. The button is the disclosure (aria-expanded, aria-controls); the block is a region labelled by its line.
  • No history entries. The open line is in the address (&part=ends, hub-route.ts), written in place with replaceHubRoute: a reload keeps it open, an address with &part= opens the page with that line open, and the browser's Back leaves the set-up or the editor — with "Leave without creating the session?" or "Leave without saving?" when something was changed.
  • A value that blocks saving. An end in the past keeps the Ends line open with "The end date must be in the future." under the field; "Done", the chevron, Escape and another line's "Change" leave it open and put the focus on the time. "Create" or "Save" with such an end opens Ends and focuses the field. The check is made at the press, so an end that passed while the page stood still is caught too.
  • A running session keeps its alert at the top and its "Save n changes…" with the question before applying. What new rules do to the lifts already made stands in the open Rules (or Athletes) block where the change is made, and under its line once the block is closed.
  • The demo's set-up station opens the line its stop is about (setupStep in demo-guide.ts) and lights the row under it, e.g. the judge's row in the open Rules.

Where a coach sets the rules — rules-editor.tsx, rule-sentence.tsx, shown-athletes.tsx, rule-parts.ts​

One part, RulesEditor, under the Rules and Athletes lines of the set-up and of the editor. It draws up to three things (parts): the rule set as one row ("Rule set", RuleSetRow), the rules as rows under it in the same panel, and "Who is shown" as rows. (Until 2026-10-14 the rule sets were six cards over the rows, with an intro sentence and an "In one sentence" block: the Rules part was 1211 px high at 1440 × 900; it is 661 px now, rows set closely with SettingRow's dense.) It edits a draft (RulesDraft: the rules, or null for none, and the ranking) and saves nothing itself.

The rows. RuleRows (rule-sentence.tsx) gives every part of the shown clauses a row: what the part is about on the left ("Who wins", "Ranked by", "Attempts per exercise"), and what it is set to on the right, as a round outlined button with an arrow that opens its choices (ValueButton). It finds the parts by asking ruleClauseText for a clause with a marker per place, and labels each by rulePartLabels. The rules as one sentence stand in the Rules line the part opens under (useSessionSummary, the display's wallRuleLine), and follow every change while the part is open; the part does not say them again. So the editor and a display say the same rules from the same texts. Until 2026-10-08 the sentence itself held a button in each place; that was not read as something to press.

Which clauses a format's sentence has (ruleClauses in rule-parts.ts):

FormatAlwaysOnce it differs from what the format does by itself
Leaderboardwho wins · the tiethe attempts · warm-ups · the score · the groups
Competitionwho wins · the attempts · the tiewarm-ups · the score · the groups
Streamone clause of its own: "Every set is shown as it comes in, led by its {metric}."—

"More rules" shows the rows of the clauses that still say what the format does by itself, so that every part can be reached. When a lift counts is one of them: the clause is offered under "More rules", and it stays in the sentence while the rules say "ruled" (see "Good lift, no lift" for who rules).

What a format does by itself (baselineRules) is what the sentence says while a session has no rules, and what a first change starts from. A Leaderboard: the engine's defaults. A Competition: the same, except that warm-ups do not count — its board always showed work sets only, and its three slots are an athlete's latest three attempts, not a limit.

A part opens a short list right under its button (ChoiceMenu in @enode/ui, placed by placeAnchoredMenu; over the button where there is no room below). On a phone — narrow and touch, PHONE_QUERY — the same list is a bottom sheet, which is under the thumb there. Each choice reads what the row would read after it, with what it does in a line under it where that helps. Arrow keys, Home and End move, Enter picks, Escape closes the list only (the part stays open) and the focus goes back to the button. Until 2026-10-14 every list was a bottom sheet, also at 1440, far from the button. Three parts are different:

  • The metric opens the rank sheet (rank-metrics-sheet.tsx) over the catalogue. This is how the ranking is changed in all three formats and before the first set: "Edit" in a live view's menu, then the metric.
  • The exercises offer "each exercise" or the exercise picker, by definition. With two or more, the sentence gets the part "one by one" or "added up"; with fewer, exercises are ranked one by one again (withExercises).
  • "Closest to a target" asks for its number before it can be chosen. A comma counts as the decimal mark (parseTarget). The number is in the unit the board shows; nothing converts it.

Presets. The first row, "Rule set": its button names the set and lists "Standard" and the five of rule-presets.ts, each with its one sentence, in the same list under the button. Choosing one sets its rules and ranks by its metric alone; the session's exercises and people stay (applyRulePreset). A set is chosen while the rules are the preset's and the board ranks by the preset's metric (litPreset); after a change by hand the button reads "Your own rules", and its list says "Your own rules: none of the ready-made sets." "Standard" takes the rules off again: none are written when the session names no exercise and nobody (rulesWithoutPreset).

Who is shown (ShownOnTheWall). A line that says it for a screen reader — "Shown on the display: everyone on a joined device" — and two rows for the two lists of the rules' shown: Shown (only, onlyTags: when it names anyone, only they are shown) and Hidden (hide, hideTags: never shown). Each row has ONE picker in a drawer of its own (ShownPicker): the athletes' tags, each with how many athletes carry it right now, then the athletes, in one list with one search and one "Confirm". The rules keep hand and tag apart, so what is picked by hand stays when a tag changes; the lists can be combined, and changing one keeps the other. Until 2026-10-13 these were four rows ("Start list", "Start list by tag", "Never shown", "Never shown by tag") — the same question asked twice, by person and by tag, in the words of a meet. Under "Exercises" the row "Exercises by tag" stays (TagListRow in rule-tag-row.tsx, with the shared tag picker): the chosen tags as pills and how many exercises carry them right now.

What is saved (rulesToSave, and editedConfig in the editor, session-editor-page.tsx).

  • The set-up page writes the format and the ranking always, the rules only where the coach set any.
  • The drawer writes only what was changed: a save for a new name leaves the stored config as it was, to the byte.
  • A format that ranks nothing keeps of the rules only who is shown. A session changed to Stream and saved loses what counted and who won, so that three attempts set for a Competition cannot hide a Stream's fourth set.

Checked. Unit tests: rule-parts.test.ts, idle-end.test.ts. In a browser on backdev, with the portal of this tree (tests/live/offline/65-live-rules-setup.live.test.ts, which runs with ENODE_RULES_SETUP=1): a Competition set up with each of the five presets is stored with that preset's rules and ranking; one set up without touching the rules has none; a display says a session's rules under its name, and follows a change made in the editor of another window within seconds, without a reload; a rename leaves the config alone. Looked at in dark and light, at 1440 × 900 and in a window of 390 px.

Left open.

  • (Closed.) The boards rank by the rules: the Leaderboard narrows the feed to the attempts the rules put on a board (attemptsUnderRules) and ranks them with rulesRanking, so an athlete on "Never shown" is on no board and a fourth attempt does not count. The last case of live test 65 checks it on a real board. The Leaderboard's head says the rules as a sentence and has no switch of its own for a session with rules (see "The head" under "Leaderboard").
  • A metric the feed does not carry is not ranked by: a session set to "Jump height" in which only squats are lifted falls back to the load on its boards, as any ranking did before the rules.
  • The Competition view and the Stream have no rank control of their own; the way to the metric is the editor.

Leaderboard — leaderboard-view.tsx, exercise-pane.tsx, derive-leaderboard.ts, leaderboard-export.tsx​

The leaderboard is exercise-scoped: ExercisePane is the per-exercise slice (exercise identity header over a pinned card of one lift, then the scrolling ranked field); the view owns the feed, the pane orchestration, the shared controls, and the loading/empty states. It is mobile-responsive: in a narrow pane the head's ranking line wraps under the exercise's name, and the card scrolls with the board instead of staying pinned.

  • The card above the table is the lift that just came in (block L1, 8 Oct 2026; the product owner picked this variant from two). BoardCard in exercise-pane.tsx, on the coach's own page only; a display keeps its card (AttemptCard, wall-lift.tsx). It is one row, 64 px high, and never changes its height: no chart with axes, no second row of readings.

    • Whose lift. The athlete who lifted last on this board (lastLiftOf), no longer the leader, who is the table's first row anyway. A pressed row puts its athlete on the card; pressing the row again, the card's round "Back to the latest lift" button, or "Follow live" lets go.
    • Why it is there, as the first word of the card's line (boardCardReason in board-card.ts): "Just in" (the session's newest lift), "Last lift" (the newest on this board after the session moved on to another exercise), "Selected" (a pressed row), "Leader" (nobody on the board lifted last).
    • One line about the lift (boardCardFacts, three facts at most): the lift against the number the athlete's row shows ("Best today", "2 KG under today's best"; "lowest" where the board counts the lowest set; for a lift that does not count, "Best today: 86 KG"), the step from the attempt before ("+3 KG on attempt 2", "Same as attempt 2", "First attempt"), and what it did to the place ("Takes the lead", "Leading", "Up from place 4", or the gap: "2 KG behind the lead"). Two numbers that print alike are the same number. The place itself stands once, as the badge beside the name.
    • Latest and best are named. The card's number is this attempt and says "Attempt 3" beside the metric's name; the table's column says "Best set".
    • The trend is a line of one row's height before the number (SparkLineChart), from a pane width of 768 px (below that a long name needs the room); its place is kept on a first attempt. Up to two further ranked metrics stand before it from 1024 px.
    • On a narrow pane (a phone, a split pane) the name and the number step down a size and the verdict is a word at the start of the line instead of a chip beside the name.
    • The table under it fits every width (the walk of 8 Oct had found the ranked number off screen on a phone). Below a pane width of 640 px the table is rank, athlete and the ranked metric's number: no further metric, no line of attempts under the number, no "Last set"; all of it is in the opened row. Below 420 px (a phone held upright) a row has no pin and no picture either, and "Just in" or the verdict stands under the name. It no longer scrolls sideways. With pinned rows the leader is now kept on top of the rows under them, under any sort.
    • TODO: not seen with a board scored in percent of the own best (the card then says nothing about the row's number), with the lowest or the average set counting, or with a second ranked metric.
  • The head is one line (block L1). Whether the page follows (FollowBar) stands on the line of the exercise's name, before the "…" menu (followSlot of ExerciseHeader), instead of on a row of its own; a held page names the lift that came in between the name and "Follow live". On a pane under 576 px a held page keeps the row over the name; the mark "Following live" fits beside the name on any width. Several panes keep one shared line over them. Measured in the demo at 1440 × 900, a session with rules: the table begins at 282 px (448 before) and its first athlete at 337 px (503 before, about 660 with the chart).

  • The head says what counts (8 Oct 2026; a proposal the product owner has not confirmed yet). After the exercise's name the head reads as a sentence: "Snatch ▾ · Ranked by Load · best set ▾". No control of the head is an icon alone, and the head is the same on every width.

    • Without rules the line is the control labelled "Ranked by" (leaderboard-view.tsx). It shows the ranking in the words a display uses (displayRuleSentence: "Load · best set"), "+2 more" when further metrics are columns, and opens the "Ranked by" sheet (rank-metrics-sheet.tsx).
    • With rules the line is the session's rules as text, the sentence a display shows under the session's name (useDisplayRule, e.g. "The highest Load in each exercise wins. Everyone gets 3 attempts per exercise."), with "Change the rules" beside it, which opens the session's editor. The head has no switch of its own then: the head's switch and the rules both write the stored config.rankMetrics, and a change in the head turned a preset into "Your own rules" without saying so. So a session with rules cannot be made to contradict its sentence from the head. Further metric columns of a session with rules are chosen in the editor too.
    • Inside the set-up page's picture and the demo the ranking is a draft that is changed elsewhere; the head says it and offers no control.
    • One vocabulary for which of an athlete's sets counts: "Best set", "Lowest set", "Average", "Latest set" (aggregationLabel in board-parts.tsx) in a column's second line, in the sheet and — in a line with the metric — in the head and on a display. The words "Max", "Session max" and the level word "Set" in the head are gone. The result page and the PDF read the same function (aggregationSubline is its old name).
    • The "…" menu (BoardMenu in exercise-pane.tsx) holds what is done now and then, each entry with its name: "Add exercise pane", a split pane's "Remove pane", "Export PDF". With several panes the ranking line stands once above them, with "Add exercise pane" as a labelled button beside it.
    • One meaning per mark. A star is a personal best, everywhere; a row is kept on top with a pin ("Pin to top" / "Unpin"); the trophy is the leader only, and there is no "Keep leader on top" button any more.
  • Ranking (@enode/core/live-session/derive-leaderboard.ts, pure + tested): athletes rank by their session value of the primary rank metric — per-set (or best-rep) values rolled up by the selected aggregation (max/min/avg/latest) — with the most recently arrived athlete highlighted (Latest tag). Ties on the value go to the newer athlete: two athletes at the same top load get distinct ranks, the more recently active one taking the better # (set count is only a final fallback) — so the ranking "applies to the latest".

  • Rank-movement arrows (per-athlete, persistent): every LeaderboardRow carries previousRank/rankDelta — the athlete's CURRENT rank vs their rank on the board recomputed WITHOUT that athlete's own newest-arrived set(s) ("what did my latest set do for me"). Because the comparison is per-athlete, the arrows persist between arrivals instead of flashing only for the athlete who just finished. Rendered as a small up-arrow (green) / down-arrow (red) next to the rank in both the windowed table and the present rows.

  • The leader stays on top by itself: while no row is pinned, rank 1's row is the first row of the coach's table also when the table is sorted by another column — via the generic pinnedRowKeys prop on the shared DataTable (components/data-table-view.tsx). It is no setting: the former toggle and its localStorage key enode.live.pinLeader are gone (a stored value is no longer read).

  • Per-row pins: a pin in every row of the coach's table (PinButton in board-parts.tsx, "Pin to top" / "Unpin"; a pin glyph, not a star) keeps ANY athlete on top. Pinned rows stand in a group named "Pinned" over "Everyone else" (the table's group option; a table without a pin has no group rows). The pinned user set (pinnedUserIDs) is in-memory state of the open view, shared by its panes (userIDs don't outlive the session), so it is NOT a localStorage key. A pin stays until it is taken off or the page is left; a new set does not clear it. While rows are pinned the leader is not lifted separately: it is the first row of "Everyone else" in the board's own order and stands where the sort puts it under another column (pinnedRowKeys lifts one group, not two). A display has no pins: its rows are the board's, in the board's order.

  • PDF export (leaderboard-export.tsx, useLeaderboardExport + LeaderboardExportButton): a branded, multi-page canvas → PDF of the current exercise pane. Page 1 is the ranked summary table (rank · athlete · metric columns) with no red-orange "Latest" badge — the export is a document, not a live board. The pages after it carry the expanded per-athlete set breakdown: every set behind each athlete's board numbers, in board rank order, with all metric values and a neutral "Warmup" marker on non-work sets. The result of an ended session exports through the same pages, as one document for all its exercises (useResultExport, see "The result of an ended session").

  • Open pane model (N panes): "Add exercise pane" (in the head's "…" menu; a labelled button above the panes once there are several) adds ExercisePanes — up to 4, capped by the number of distinct exercises in the feed — tiled per a literal grid map (stacked below lg, side by side above). Pane 0 auto-follows the latest drop-in's exercise until the coach makes a choice of their own, which holds it (see "Following and held"); every added pane is purely manual (seeded with the most recently active exercise not on screen) and is taken off with "Remove pane" in its own "…" menu. The pure helpers exerciseKeysByRecency (keys by newest arrival first, the seed order) and resolvePaneKeys (keeps panes on distinct exercises; pane 0 holds its key rather than auto-following onto one another pane shows; panes with no distinct exercise left are dropped) own the orchestration. The pane COUNT persists per session (localStorage enode.live.leaderboardSplit:<sessionID> — see the key table).

  • Shared rank-metric selection: the selection list is ONE list per session, shared by every pane and the "Ranked by" sheet — use-rank-selections.ts syncs hook instances through a module-level version counter + useSyncExternalStore, so a change from any pane re-renders all. In multi-pane mode the offered option catalogue spans the whole feed (the union of all panes); single-pane it stays scoped to pane 0's exercise.

  • Clicking a row selects that athlete for the card above the table; the expandable row lists every set behind the athlete's board numbers and carries an "Athlete profile" action into the athlete drawer (below) — the card's identity block is the other drawer entrance (windowed, the block is a quiet click-through button). Rows themselves carry no extra icon.

Competition dashboard — competition-view.tsx, derive-competition.ts, lift-leaderboard-overlay.tsx​

The view for attempts on a platform: a max-out day, an in-house weightlifting meet. It is chosen in the session editor's "Live view" section (see "View modes" above). It was redrawn on 2026-10-07 to the look described under "One look — the shared parts in packages/ui/src/live/". Its files:

FileWhat it holds
competition-view.tsxThe view. It derives everything, and draws the coach's page and a display near its reader.
wall-competition.tsxThe same data on a wall: the room and the hall profile.
weightlifting-platform.tsxThe bar path of a weightlifting lift: AttemptBarPath (page) and WallBarPath (wall, also used by wall-stream.tsx).
trajectory-preview.tsxThe one drawing of a bar path (TrajectoryPreview) and what it is drawn from (useBarPath).
derive-competition.tsThe logic, pure and tested: attempts, slots, the best attempt, the outcome of an attempt.
lift-leaderboard-overlay.tsxThe lift's top three over the attempt inspector.

What the view answers, in this order. The order is the same on every screen. A screen with less room shows less of it, from the bottom of the list.

#WhatHow it is drawn
1The attempt in question: who, which lift, which attempt, the loadThe load is the region's one large number (Figure: hero on a page, wallLift on a wall). On a page the lift's animation (LottieCircle, 56 px) stands at the end of the load's line, and each row of "Other lifts" starts with its lift's animation (28 px); an exercise without one shows nothing in the attempt and a dumbbell in the list. Under the load stands the one line about the lift (LiftInsightLine; see "The wall after a lift" for which sentence a lift gets).
2How it endedThe shared chip (LiveStateChip): "Good lift", "No lift" or "Not ruled yet". A lift that did not count keeps its number, struck through and muted.
3The athlete's attempts on this liftOne strip of slots. Each slot is its load and the mark of its outcome (a tick, a cross, a clock). The attempt in question is marked. A slot that is still open is a dash.
4For a weightlifting lift, the bar pathBeside the attempt: the path with its three peaks, bar travel and horizontal travel, and the attempt before behind it in grey.
5The standings of the liftPlace, name and best, with the athlete in question marked.

Whose attempt. The attempt in question is the newest attempt of the shown athlete on the shown lift. Both follow the session: whoever lifted last is shown, on the lift they lifted. A pick by hand (another lift, another athlete, an attempt that is opened) holds the coach's own view until "Follow live" (see "Following and held"); on a display it holds until the next lift comes in. An attempt that is the session's newest lift wears the dot of "now" and, on a page, the words "Just in". No screen says "On the platform": a set reaches a screen when it is over.

What an attempt is. A work set, or what the session's rules count (see "The rules of a session"). With a limit in the rules a lift has as many slots as the rules give attempts, the ones to come drawn open, and the head says "Attempt 2 of 3". Without a limit (no rules, or rules for any number of sets) nothing promises a next attempt: the head says "Attempt 2" and the strip holds only the attempts made, the athlete's last three with their true numbers; past three the page says which ("3–5 of 5"). attemptLimit on a lift of deriveCompetition is that limit, or null.

How an attempt ended (attemptOutcome in derive-competition.ts).

OutcomeWhen
Good liftA judge ruled the attempt good.
No liftA judge ruled it out, or nobody ruled it and the work set gave no result on the rank metric.
Not ruled yetNobody ruled it, in a session whose rules count only ruled lifts.
Nothing is drawnNobody ruled it, in any other session: a set of a training is neither.
  • The ruling is read from the set (LiveSet.ruling, through CompetitionAttempt.ruling). The attempt's part also takes a ruling of its own, which goes before the set's.
  • A lift that was ruled out is never an athlete's best and gives no place.
  • The number of a lift that did not count is what was measured (CompetitionAttempt.measured), struck through. A work set that carries no value at all shows a dash.

The coach's page (CompetitionView, variant="default").

  • The lift is named by the header over the view (ExerciseHeader, the Leaderboard's). With several lifts in the session the header is the switch.
  • The attempt is one panel. From the top: the athlete's name, which is the athlete switch (with one athlete it opens the athlete's drawer), and their place on the lift; "Attempt 2 of 3" (or "Attempt 2" without a limit); the load; how it ended; the one line. Under a rule the strip of attempts, where a press on a slot opens that attempt in the inspector (attempt-detail-sheet.tsx). Under further rules the coach's other rank metrics read off the attempt, and the athlete's attempts on the session's other lifts, where a press shows that lift.
  • The ruling of the attempt in question is given in the same panel, where the outcome's chip would stand (RulingControl of ruling-control.tsx). It shows the ruling itself, so the chip is not drawn beside it.
  • The bar path of a weightlifting lift stands in the attempt's panel, right of the attempt (AttemptBarPath).
  • The standings are a panel of their own. A press on a row shows that athlete. Whoever lifted last wears the dot of "now".
  • Laid out by the width the view has, not by the window's (@container): a page beside the app's sidebar is narrower than its window.
Width of the viewA lift without a bar pathA weightlifting lift
60 rem and moreAttempt and standings side by side, 2 to 3Attempt with its bar path, and the standings beside them, 7 to 3
40 to 60 remAttempt and standings side by side, halvesAttempt with its bar path, and the standings under them
Below 40 remOne columnOne column; the bar path under the attempt
  • The panels are as tall as what they hold. From the lg breakpoint the view scrolls inside the page; below it the page scrolls.

A display near its reader (variant="present", the near profile) is the coach's page without the ruling: the same layout, not zoomed.

A display on a wall, room (WallCompetition). Three regions side by side, each as tall as the wall.

  • Left, the attempt: one panel. Who, with their place; the lift and "Attempt 2 of 3", on two lines where the lift's name is long (nothing is cut); the load; the outcome's chip — or the outcome's word and mark without a surface where the one line stands under it, so a good lift that "Takes the lead" has one filled mark; the one line. Under a rule the athlete's attempts, each a line with its number, its load and the mark of its outcome; the lines share the height the panel has left. Under another rule the athlete's attempts on the session's other lifts; a tap puts a lift on show. A tap on the name opens the athlete's drawer.
  • Middle, a weightlifting lift only: the bar path (WallBarPath), bar travel and horizontal travel under it. Its three peaks are written beside the path and nowhere else, as on the Stream's display: each with its name ("Peak velocity") over its value, in a column right of the path, joined to its dot by a line. The names need width: the three columns are 1 : 1 : 1.3 (wall-competition.tsx), and in a panel the chart's empty margin for tick labels lies in the panel's own (-mx-4 in WallBarPath). Narrower, and the chart drops the names and writes the values over the path (technique-trajectory-chart.tsx decides; a longer name in another language can still bring that about). A tap opens the attempt in the inspector.
  • Right, the standings: wall rows (WallRows, WallRow of wall-board.tsx), which share the height, turn their pages by themselves and keep the row of whoever lifted last in view. The athlete in question wears the row's ring. A tap on a row shows that athlete.
  • Beside a bar path the standings' column is narrow. Its rows then have no bar, and they keep the sizes of the wall's table also when few athletes leave them tall: WallRows draws a name and a number larger in a tall row, which cuts the names in a narrow column. wall-competition.tsx sets the two sizes back around each row. TODO: a way to say this to WallRows itself. It is missing because wall-board.tsx belongs to the display's frame.

A display on a wall, hall. One thing at a time (wall-scene.ts): the standings, and each attempt alone for a few seconds after it came in (WallLiftScene of wall-lift.tsx). An attempt alone says the lift and "Attempt 2 of 3" over the name, then the load, the place, the outcome's chip and the one line; a weightlifting attempt has its bar path beside it. While the standings are on screen the frame's top line names the lift. The strip of attempts is not in the hall.

The bar path (weightlifting-platform.tsx, trajectory-preview.tsx).

  • When. For a weightlifting lift only (use-weightlifting-lift.ts; see "The wall after a lift"). Any other lift shows no bar path in the view; its path is in the attempt inspector.
  • What is drawn. The trajectory chart of the technique tab, without a frame, without tick labels and with nothing to press. The three peaks are dots on the path in their metric's colour. The attempt before lies behind in grey. A key names every path drawn, the one on show first and in its colour ("Attempt 3 (this one)", LiftLabels.thisOne), then the ones behind. Where it does not fit beside "Bar path · side view" it wraps under it; the title is never cut. A path alone has no key.
  • The first attempt, from the third one on. On a third attempt (and any later one) the first attempt's path is drawn too: the same grey, dotted, under the other two. The key names the paths behind in the order they were lifted, each with its stroke: "Attempt 1" (dotted), "Attempt 2" (a line). On a second attempt the first is the one before, and there are two paths as before; a first attempt stands alone. A lift that did not count is an attempt like any other, as it is for "the one before". Which set is the first comes from CompetitionLift.firstSet and latestAttemptPair(…).first (derive-competition.ts), not from the strip of attempts: without a limit the strip shows the latest three, and the first attempt of five is still the first. The chart takes such paths as behind (technique-trajectory-chart.tsx): they are inside the fit of the axes and are nothing else, no crosshair and no peaks. The numbers beside and under the path are still held against the attempt before, not against the first.
  • The key on a projector. Beside a lift alone on a projector the head line is short. With two paths behind, the key names the one on show "Attempt 3" and the two behind by their number alone ("1", "2"), so that it takes as little as it can from the plot (compactKey of WallBarPath). With one path behind it says "Attempt 2 (this one)" and "Attempt 1", as everywhere else.
  • Where not. The Stream compares no paths, on a page or on a display. The video overlay's lift card draws one path.
  • On a page the numbers stand beside the chart (under it where the panel is narrow), as the Stream has them: first the three peaks, each with the dot it has on the path, then, over a rule, bar travel and horizontal travel. Each has its change against the attempt before, and what the changes compare to is said once, over them: "vs attempt 2" (LiftLabels.versus). A label wraps; it is never cut.
  • On a wall each peak's value is written on the path (see "The bar path in numbers"), and the path's two numbers stand under it, with "vs attempt 2" after them.
  • A change has no colour. Every arrow is in the quiet colour, up or down: the attempt before was at another load (a heavier bar is slower and asks for more force), which of two paths is the better one is the coach's call, and the catalogue does not say which way a metric is better. Green and amber are the far-off mark's, and red means a no-lift only.

The lift leaderboard overlay (LiftLeaderboardOverlay). The lift's top three by the primary rank metric, and the focused athlete's own place and their distance to the leader and to the place above when they are not among the three. It opens from the attempt inspector's place chip, where the sheet covers the view's standings, and from the Live Stream. Escape closes only the topmost sheet, so it lands back on the inspector. It ranks without the session's rules (see "The rules of a session").

No longer in the view. The masthead with "On the platform" and "Viewing", the rail of lifts with its tiles, the three attempt cards with a bar path each, the dashed boxes of open slots, the trophy button and the place chips that opened the overlay, the "Best" and "Current" chips, and the rank metric's colour on a number. The best attempt is not marked in the strip: the standings name the athlete's best.

Sentences in other sections that the redraw made out of date (not edited: a block edits only its own section).

  • "The wall after a lift": "Weightlifting: the bar path takes the centre" describes WeightliftingPlatform, which is gone. The bar path now stands beside the attempt (AttemptBarPath, WallBarPath). "Where it shows": the Competition view shows the line under the load on every screen, and the coach's page shows it too.
  • "The bar path in numbers": the three peak cards and the card with bar travel are gone; on a page the five numbers stand beside the chart, and the chart carries no labels there.
  • "The display on every screen", "The Competition view on a wall": the layout is the one described here. The label "Last lift", the trophy on the best attempt and the list "Lifts" with the shown lift in it are gone.

Checked (2026-10-07).

  • Unit tests: derive-competition.test.ts (19, of which 5 are new for attemptOutcome), derive-competition-rules.test.ts (16), path-numbers.test.ts (15), demo-trajectory.test.ts (9).
  • In a browser: headless Chrome against the portal's demo, signed in with a disposable account on backdev, in dark and light. The demo's clock was stopped and lifts of the demo's own script were put into the demo session's feed, so each picture shows a chosen lift. Seen: the coach's page at 1440 × 900 and 1024 × 768; the room, the hall and the near profile at 1600 × 900, and the near profile at 1180 × 820; a Back Squat and a Snatch; one, two and three attempts; two and fourteen athletes; a good lift, a lift ruled out and a lift that waits for its ruling.
  • The demo playing by itself (nothing stopped): the coach's page with a squat and with the snatch, the same at a phone's width (390 px), and the room.
  • What can be pressed on the coach's page, once each: the athlete switch, a row of the standings, a line of "Other lifts", a slot of the strip (the attempt inspector opens) and, from the inspector, the lift leaderboard overlay.
  • The pictures, before and after, are in /private/tmp/lh-shots/v2/ (index.html shows them side by side).

Not checked, and left open.

  • A session without rules was not seen in a browser after the redraw: the demo's Competition is a ruled session. There an attempt has no chip and no mark; that path is held by the unit tests of attemptOutcome.
  • A recorded lift: every bar path seen was the demo's made-up one.
  • A language other than English, and imperial units.
  • In the hall a lift that was ruled out shows a dash where the room shows the struck-through load; the line over the name says what was on the bar ("Snatch · Attempt 3 of 3 · 110 KG"). TODO: a struck number in WallLiftScene. It is missing because that part belongs to the display's frame (wall-lift.tsx).
  • In the hall the outcome's chip and the one line stand in one row, two filled marks side by side: WallLiftScene has one place for both.
  • With two athletes the room's standings fill a third of their column: a wall row has a largest height (WALL_ROW.maxHeight).
  • A display near its reader on a large screen (1600 × 900) leaves the lower part of the screen empty: it is the page's layout, and the page is as tall as what it holds.
  • Pictures of the view elsewhere: the waiting state's ghost (DashboardMock in live-mocks.tsx) and the walkthrough (live-walkthrough.tsx) were redrawn on 8 Oct 2026 to the attempt's panel beside the standings. The format's preview (format-previews.tsx) still draws three attempt cards.
  • filledSlotCount and scoredAttemptCount (derive-competition.ts) are read by the tests only since no view marks the best attempt.

Live Stream — stream-view.tsx, stream-filters.tsx, stream-detail.tsx, derive-stream.ts​

The remote-training view: every set of the session as it comes in, rep by rep, with its bar path. The screen is the set being looked at; the feed beside it is how a coach gets from one set to another. Redrawn on 7 Oct 2026 (block V3) by the rules of "One look": containers, labels and numbers come from @enode/ui/live/look.

The feed (StreamView, left; 20rem wide, 15rem where the view has less than 64rem). On a phone or an upright tablet (below lg) the feed stands over the set, at most 24rem high: a pressed row scrolls the page to the set, and the filters, "Follow live", the lift leaderboard and the rep circles take a thumb's 44 px.

  • Rows. Every set, newest arrival first (orderByArrivalDesc), one row each: the athlete's photo (AthleteAvatar, 32 px; initials without one), the athlete over the exercise beside it, the load over the time of day (to the minute) on the right, so photos, names and numbers each stand in one column. The whole row is the control. A warm-up is named and muted.
  • Now. The session's newest set (newestStreamSet) has the red-orange dot behind its name, whatever the filters show.
  • Selected. The set on the right has a bar at its left edge (aria-current).
  • No lift. A lift a judge ruled out says "No lift" under the name and keeps its load, struck through.
  • Header. "Stream" over the session's totals as one caption: sets and athletes (deriveStreamSummary). At its far end the one control, "Filter". The header is built like the header of the set — a title over its caption, what can be pressed at the end, on one centre line — and is as high, so the first row and the first panel start on one line.
  • Filters (StreamFilterMenu): one round choice, "Filter", whose multi-select popover holds three groups under their names — Athletes with avatar rows, Exercises with the exercise's animation and variation, Devices with the athletes each device holds — and "Clear filters" at its foot once anything is chosen. From eight athletes on, their group starts with a field "Search athletes" that narrows it by name; a chosen athlete stays in sight whatever is typed. A filter that narrows the feed is filled and says how many options it holds, over all groups. An empty selection is everything. A group is offered from its second option on. StreamFilters is the same three groups as three round choices side by side, for a list with the room (the video overlay's lift list).
  • Far off. A set far off the athlete's work sets before it (farOffShareOf) has an arrow and a per cent behind its exercise (FarOffMark): green over, amber under (farOffTone: the tones good and attention; the red of a no-lift means a no-lift only, re-audit of 13 Oct 2026). Where any row has a mark, one line under the feed says what the arrows mean. Far off is more than 10 whole per cent (FAR_OFF_PERCENT) from the average of the work sets the athlete lifted on the exercise before it, on the number of the set's trend (see "Among the athlete's sets" below). It takes two earlier work sets that carry the number, so the first mark can stand on a third work set. A warm-up is neither marked nor counted in the average. Every other row says nothing. TODO: a number where less is better reads the wrong way round in these colours; a metric does not say which way it is better.
  • The Devices filter goes by the device that sent a set (13 Oct 2026). A stored set names its device (deviceSessionID, LiveSet.deviceSessionID) on a server with backend response 6: the device session behind the request that first stored it, unchanged by later updates and kept when the device leaves or signs out. deriveStreamDevices gives each device the sets it sent and the athletes who lifted them; a chosen device shows exactly those (isSetOfDevice). An athlete who moved to another tablet leaves the earlier sets with the first one.
    • A device that sent sets and is in the session's list no longer — it left, was taken out, or the session is over, which unlinks every device — is still an option: "A device that left", with who lifted on it and how many sets under it (StreamDevice.left). The session's device list no longer names it, so its name comes from the ACCOUNT's device list (GET /user_device_sessions as the owner; accountDeviceNames), where a device keeps its row after it leaves a session: the Stream of an ended session offers "Rack tablet", not three times "A device that left". The list is read only when a set names such a device, on the coach's page — not in the demo, not on a display. A device the account no longer holds (signed out, deleted) stays "A device that left". The label it had in the session ("Platform 1") is gone with the end and is not shown.
    • A set that names no device (stored before the field, or by a server without it) goes by the old guess, and only such a set does: the device that holds its athlete now, by its last heartbeat (athleteIDs and the users of its platforms). That guess is wrong for an athlete who changed tablets and offers nothing for a device without a heartbeat.
    • A device without a set to its name is not offered. The overlay's lift list uses the same filter bar without the Devices choice. Seen on backdev (live test 117-live-response-6-contract): reduced, complete and board name the tablet's device session on both of its sets, and still do after the tablet left; the filter then offers one device that left with two sets.
  • Gone: the four tiles (sets, athletes, exercises, last activity), the pinned "Live" card and the table with its "Set" column. The tiles said less than the caption, and the card repeated the first row.

Which set is shown. The detail follows the first row of the feed as it stands: the newest set, or with a filter the newest that matches. A pressed row is held, by its id, across arrivals and filters. "Follow live" in the line over the view lets go (see "Following and held"; a display near its reader has no such line and keeps "Follow live" in the set's header), and so does the held row pressed again. A held set that leaves the feed lets go by itself. Before this block the page stayed on the set it opened with and only a display followed; now both follow.

The set (StreamDetailPanel), read from the top down.

  1. One header line. The athlete (who opens their drawer) over the exercise, "Set n of m", "Warmup" where it is one, and the time. On the right the load × reps: the load is the one hero figure of the screen, the reps stand a size smaller behind it (repCountOf: what the set says, else the reps it carries). A set without a load leads with its reps. The session's newest set has the red-orange dot behind its name, as its row in the feed has. The trophy opens the lift's ranking across the field (LiftLeaderboardOverlay). A set a judge ruled, or one that waits for a ruling (attemptVerdict), says so in the shared chip: "Good lift", "No lift", "Not ruled yet" — the line's one chip — and a no-lift keeps its load, struck through. A set of a training has no chip. The Stream shows a ruling and offers none: the athlete's drawer, one press on the athlete away, has the control (RulingControl).
  2. Its reps. One bar per lifted rep (liftedReps: the way up of each, in the order the charts decode them) on one scale that starts at zero, the value over the bar and a round control under it. The bars are bar speed where the reps carry it — the mean, else the peak — and otherwise the metric most reps carry (repBarsOf); the unit stands once, in the panel's label. The round control picks the rep the charts draw: unpicked, the charts follow the newest chartable rep as the set streams (resolveChartedRep), a pick pins, the pinned rep pressed again lets go. A rep without sensor data keeps its number and cannot be picked. Beside the bars, behind a rule: what the set says about itself beyond load and reps (setValuesOf). The panel has one height whatever the set holds. More reps than fit scroll sideways.
  3. Among the athlete's sets (TrendPanel, block S2, 8 Oct 2026). The athlete's sets of the exercise on one number (streamTrendOf): one dot per set in the order they were lifted (liftedOrder, so a ruling or an edit moves nothing), this set ringed, warm-ups pale and small (MetricTrendChart). A dot is the control that opens its set — its target is its whole column of the plot — and a set opened this way is held like a pressed row of the feed. The head reads as one line: the number, "per set", its unit. An athlete's first set of an exercise has no card and leaves no gap.
    • One colour for the arrow and the line. The line is green when this set is far over the work sets before it and amber when it is far under, like the set's mark (FarOffMark, both from farOffTone); for every other set it has no colour of its own. Under a coloured line stands what it says, written out (farOffSentence: "Mean velocity: 21 % under the average of the work sets before"). The mark itself stands in the set's header, in front of the load and with its words ("Mean velocity 21 % under the work sets before"), and as arrow and per cent in the set's row of the feed.
    • The number is chosen in the strip's head (the shared SelectMenu): any metric the feed carries, or "Auto". On "Auto" each set goes by what its own reps' bars show — bar speed where a sensor measured — and by its load where no rep was measured (ownTrendMetricKey). A set's value on a metric is metricValueOf: what the set says, else its best rep. The choice is kept per session in this browser (enode.live.streamTrendMetric.<session id>); it is how one coach reads the sets and no part of the session. A chosen metric the feed does not carry counts as "Auto". Sets that do not carry the number say so in the card, where another can be taken.
    • Where it stands. Always as a card: stacked, between the reps and the bar path; in two columns, in the column between the reps and the time charts. With two time charts over one another the column is full with it in a window lower than about 1100 px, and scrolls: at 1440 × 900 the second time chart is below the fold. (A first version drew a small line in the set's header there instead; the product owner chose the card and only the arrow in the header.)
    • A display near its reader shows the card without the choice and names the number in its label ("Mean velocity per set"). A display that is a wall shows no trend.
    • TODO: the demo's attempts are never 10 % apart, so the demo shows the trend and no mark.
  4. The picked rep. Its bar path, from the side or from the front (a round choice), with the peaks of velocity, power and force as dots on it (peakMarkersOf). Under the path the rep in numbers (rep-values.ts):
    • the three peaks in one row, each label with a dot in the colour of its marker on the path (a rep without a path shows its own peaks, without a dot);
    • four key values, two to a line: mean propulsive velocity, bar travel, duration, mean force. Each takes the first the rep carries of a short list: mean velocity, then movement velocity, for the speed; jump height, bar travel, then the sensor's distance for the travel; contact time, duration, then propulsive duration for the time; mean force, mean propulsive power, then mean power for the force. A jump so has its jump height and, a drop jump, its contact time;
    • "All values (n)", closed at first, which opens the rest in three groups: Speed, Force & power, Path & time, and More for a metric of another category or one the catalogue does not know. A value's group is its metric's category in the catalogue. Where the path gives the bar travel, the sensor's distance is not shown at all: the two measure the same thing a little apart. Each value is a line: its full name on the left (it wraps, it is never cut), the value right-aligned. Whether it is open is kept per session in this browser (enode.live.streamAllValues.<session>), so it stays open from set to set. A value never stands twice: the bars' own metric is over its bar, a peak the path marks is not repeated from the rep's measurements, a key value is not in the groups, the rep's order is not shown (NON_DISPLAY_METRIC_KEYS), and a set of one rep leaves to the rep what the rep carries unchanged (onlyRepOf, repCarries).
  5. The rep over time. Velocity & acceleration, and power & force (TechniqueLineChart); one crosshair runs through them and the path.
  • Numbers are Figures in the text colour. A metric's colour is on its bar, its line and the tick beside its label; a peak's is the dot beside its label, as on the path.
  • Speeds are written with two decimals everywhere in the view (formatStreamValue), so a set's mean reads like the bars of its reps.
  • Layout. From 672 px of width (and a window of 1024 px) the set stands in two columns: reps over the time charts on the left, the bar path over the full height on the right (19rem). The time charts share the height that is left (a plot between 112 and 420 px), so at 1440 × 900 an athlete's first set of an exercise is on screen whole and nothing scrolls (with the card of the sets the column scrolls there, see above); from 640 px of their own width they stand side by side. Narrower, the parts stack in the order above and the set scrolls.
  • Nothing is cut. Values that do not fit their line wrap into the next one (the set's values, the rep's numbers). The set's values hold two lines and scroll beyond that, so the panel keeps its height. A long name ends in an ellipsis.
  • What went with the old panel: the values bar (TechniqueValuesHeader) with its crosshair read-out of time, height and progress and its cells for inclination and rotation; the rep pills (RepPills, still the attempt inspector's); the body figures behind the path and the force arrows along it; and the drag-to-reorder board. live.stream.chartOrder in the browser's storage is no longer read.

On a wall (WallStream in wall-stream.tsx; StreamView derives and hands down). A display that is a wall shows the stream's one moving part.

  • Room. One panel for the set that just came in. On its left "Just in" with the exercise and "Set n of m", the athlete, the load × reps at the size of a lift's number, the verdict's chip where the set has one, and the one line; under a rule up to three other values of the set and bar speed per rep as bars. On its right the bar path (WallBarPath, without a panel of its own, on 46 % of the panel) with its peaks written on it. A peak the path writes is not repeated among the values of a set of one rep. Beside the panel "Before that": the sets before as rows (athlete over exercise, load), as many whole rows as fit and no box around them. With no set before, the panel has the wall to itself.
  • Hall. The set alone (WallLiftScene): exercise, "Set n of m" and the reps over the athlete, the load as the number, the one line, the bar path. A no-lift has "No lift" in the place of the line.
  • The one line (streamLineOf, pure + tested) is the line of the boards (deriveLiftInsight) without its two sentences about a place: the stream has no ranking, so nobody takes a lead in it. It compares on the session's rank metric. It can name a personal best or the last session, so a wall reads what that one athlete did on the exercise before (useAthletePasts); the coach's own screen shows no line and reads nothing. Only an athlete's latest set of an exercise gets a line, and a no-lift gets none.
  • The number is the load on the page and on a wall. Before this block the feed and the wall led with the session's rank metric.

Needed in files this block does not own (not changed).

  • TechniqueLineChart (packages/ui/src/charts/technique-line-chart.tsx) is a card of its own with a sentence-case title and writes its corner values in its series' colours. StreamDetailPanel repaints that header from outside (TIME_CHART_LOOK). TODO: an option for a host that brings its own look. It is missing because the chart belongs to @enode/ui.
  • The same chart cuts the name of a phase that is narrower than its name ("Catch Pha…" over a snatch).
  • WallBarPath (weightlifting-platform.tsx) without a panel takes 38 % of the place it stands in. In the room's panel that drops the names of a snatch's peaks, so WallStream widens it from outside. TODO: a width of the caller's choice.
  • StreamMock (live-mocks.tsx), the picture behind the waiting state, was redrawn on 8 Oct 2026: the feed's rows beside the set with its reps, its bar path and its time charts.

Sentences in other sections that this block made out of date (not edited: a block edits only its own section): "The Live Stream on a wall" under "The display on every screen" (six values, a panel for the bar path); Live Stream · Every set, as it comes in is unchanged; the row live.stream.chartOrder under "localStorage keys", if it is listed.

Following and held — follow-live.ts, follow-pill.tsx​

Block F4, 8 Oct 2026. Before it the next set threw the coach out: an exercise switched on the Leaderboard, an athlete or a lift picked in the Competition view was dropped the moment a set arrived. Now the coach's own view is in one of two states and says which, the same in the Leaderboard, the Competition view and the Stream.

StateHow it beginsWhat the view doesWhat the line over it shows
FollowingThe start; "Follow live"; the session moves on to an exercise it had not liftedShows the newest lift and moves with every liftThe chip "Following live" at the right end (on the Leaderboard: on the line of the exercise's name)
HeldAny choice of the coach's own (below)Stays where it is. A row that is in view changes in its placeThe pill "Follow live"; once a lift came in, "Just in · Paula Richter · Clean & Jerk 107 kg", the count from the second lift on ("3 new lifts"), and "Show"

What holds.

ViewA choice that holdsWhat is held
LeaderboardAnother exercise in pane 0's head; a press on a board's table (a row, a column's sort, a pin, a row's chevron)Pane 0's exercise
CompetitionAnother lift (the header, or "Other lifts"); another athlete (the switcher, a row of the standings); an attempt that is openedThe athlete and the lift
StreamA row of the feedThe set

The pins and the table's sort are kept in both states and by every change of state: nothing clears them.

"Show" turns the view to the lift the line names and keeps it held, now on that lift; the count starts over. It is not offered where the lift is in view already (the Leaderboard: its exercise is in a pane; the Competition view: it is the attempt of the athlete in question on the lift in question). "Follow live" drops what was held and the view follows again.

What lets go by itself (releasesHold): a lift on an exercise the session had not lifted when the hold began — the meet goes from the Snatch to the Clean and Jerk, which is a change for everyone. Nothing else does: no time without a touch, no number of lifts, and no lift on an exercise the session already knew (two stations lifting two exercises side by side would otherwise let go with every other lift). Consequence: a session that returns to an exercise it lifted earlier does not let go of a held view.

A display always follows. variant="present" has no line; a pick made on a display is dropped with the next lift, as before. The Stream on a display near its reader keeps its own hold and the "Follow live" in the set's header.

The glow. A row whose lift came in while the view is held glows once in the colour of "now" (ArrivalGlow, the design system's live-glow utility): the athlete's row in the Competition view's standings, and the new row of the Stream's feed. TODO: the Leaderboard's table does not glow; its row changes in place and wears "Just in". The table's rows are drawn in exercise-pane.tsx, which block F4 did not own.

The code. follow-live.ts is the rule as pure functions over the sets a view shows: holdFollow, releasesHold, followNews (the newest lift since the coach last looked, and how many; a set that arrives again with its ruling is one lift), seenFollow ("Show"). Each view keeps the state (FollowState) beside what it holds on and asks releasesHold when the newest arrival changes (render-time sync). FollowBar (follow-pill.tsx) draws the line; it always has its height (36 px, 44 px below lg), so nothing under it moves when the state changes or a lift is named. On a phone (below sm) a held view has two rows: the count and the pill, over the lift with the athlete above the exercise; the second row is kept free from the moment the view is held. Where the Stream's feed and set stack (below lg) a pressed row scrolls the page down to the set and the line out of sight, so the set's header keeps its own "Follow live" there too. Tests: follow-live.test.ts.

Total and classes while a session runs — board-tables.ts, use-board-groups.ts​

A session's rules can add its exercises up to a total (combine: "total") and split its athletes into groups (groups: "tag" for classes a coach keeps as tags, or "gender"). The running boards draw both. The pure part is board-tables.ts; who is in which class comes from useBoardGroups.

When a total is shown. addsUpToTotal says whether a session has one: its rules add up, score the lifted value (not a percent of the own best), and the total has at least two exercises, the ones the rules name or the ones lifted so far. boardTotal returns the ranked total, and null until the first athlete has a result on every exercise: before that there is nothing to rank. An athlete without a total stands below everyone who has one, without a place.

TODO: a running total in percent of the own best. It is missing because a running board reads the athletes' pasts for the one exercise on show.

Where the classes come from. useBoardGroups(sessionID, rules) reads the coach's own list of athletes and returns, for each athlete, the ids of their user tags (or their gender) and each group's name. It returns null for a session that is not split, in the demo, and on a display that was paired by number: that screen has no login and shows one table. The list of athletes is only requested when the rules split.

How a board is split. boardTables(sets, rules, groups, rank) returns one table per class, each ranked on its own with places from 1, in the order of the classes' names (numbers by size, so "64 kg" stands before "102 kg"). The athletes without a class stand in a last table ("No tag", "Not stated"). An athlete with two tags stands in two tables. A board whose athletes are in no class at all is one table without a heading.

The Competition view (competition-view.tsx). The panel "Standings" lists every class under its name. Under it a second panel "Total" appears with the first total; each row says what the total is made of ("84 + 109"). The athlete in question is placed in their own class: the place beside their name, the one line about the attempt and the attempt sheet's rank all read that class.

Its display (wall-competition.tsx). A display is about the athlete in question, so it shows the boards that athlete stands in: their class's standings of the lift and their class's total, each named in its label ("Total · 71 kg"). In the room the two boards stand side by side; beside a bar path, and in the hall, they have the screen in turn, eight seconds each.

TODO: a class of more athletes than fit a display's column turns its own pages by the same clock as the two boards take turns, so each board shows one of its pages only. It is missing because useBoardPage has one period.

The video overlay (use-overlay-content.ts). The standings graphic shows the total once one stands, and the lift's standings before; where the rules split the athletes, it is the board of the class the lift's athlete is in, and the graphic's title names it. The shape of the graphic's content is unchanged.

Total and classes on the Leaderboard — leaderboard-total.tsx, board-heading.tsx, exercise-pane.tsx, leaderboard-view.tsx​

The Leaderboard draws what board-tables.ts works out (section above): one table per class, and the total as a board of its own.

Classes on the coach's page (exercise-pane.tsx). In a session whose rules split its athletes the table has one group per class: a header row with the class's name and its number of athletes, and places from 1 under it. The header row is the table's own group header, the one "Pinned" has, so a class can be folded. A sort by a column sorts within each class (group.order of DataTable in components/data-table-view.tsx gathers the rows into their groups after the sort). Without a pin the leader of every class is kept on top of its class under any sort. Pinned athletes stand in "Pinned" above the classes and keep the place of their class. The card over the table, its place and its gap to the lead, and a lift's one line read the class of the card's athlete. The table's count line counts athletes, so an athlete with two tags is counted once. A session that is not split has the table it had.

Classes on a display (WallRows, BoardHeading). The rows' column is one list (boardItems): a class's heading takes a row's place, so the column shares its height and turns its pages as before and never cuts a heading. The leader's green place and edge mark place 1 of each class, and a row's bar measures against the leader of its own class. A list with headings says "Page 1 of 2" under it where a plain board says which places are on screen. In the hall, which has room for a few rows, a split board is the class of the athlete who lifted last. A display's list of rows below wall size (PresentRow) has the same headings.

"Total" stands after the exercises. Once boardTotal returns rows, the view adds an entry "Total" after the session's exercises (totalGroup, key TOTAL_KEY): in the exercise switcher of the page's head, in every pane's switcher, in "Add exercise pane", and as the last tab of a display. Before the first athlete has a total there is no such entry. A pane on that entry is LeaderboardTotalPane.

The total's board. On the page it is a table: place, athlete, one column per exercise with the athlete's result on it, and the total as the row's figure. On a display a row's number is the total and the parts stand quietly in front of it ("84 + 107"). An athlete without a total stands below the others, has no place, and shows the part they have ("84 + –" on a display, a dash in the missing column on the page). Where the rules split the athletes, the total is split by class in the same way as an exercise's board. Pins and sorting work as on an exercise's table.

How a board gets to the total. The coach's page follows the newest lift and never turns to the total by itself: choosing "Total" is a choice of the coach's own and holds the board ("Follow live" lets go). A display follows by itself: a lift is the news, so the display shows that lift's exercise; when no lift has come in for 15 seconds (TOTAL_TURN_MS) and no lifter is announced on the platform, it turns to the total, and the next lift turns it back. A tab pressed on a display holds until the next lift, as before. The hall follows the same rule after its scene of the lift.

Limits.

  • The total's board has no card of a lift, no row that opens an athlete, no verdict tag on a row, no glow and no PDF export: those belong to one exercise.
  • The PDF export of an exercise's board stays one list of everyone, also in a session that is split.
  • On a display below wall size the total is drawn as the page's table.
  • An athlete with two tags stands in two classes; pinned, they stand twice in "Pinned", once with each class's place.
  • A display paired by number and the demo cannot read the classes (useBoardGroups) and show one table; the total works there.

The video overlay (beta) — overlay/overlay-control.tsx, overlay-state.ts, overlay-channel.ts, overlay-canvas.tsx, overlay-run.ts, app/overlay/​

Graphics of a live session that are laid over someone's video stream. A video mixer shows a page of the portal as a browser source on top of its picture; an operator decides on another page what that source draws — or lets the page run a competition by itself. These are blocks O1 and P2 of the work split. It is a beta: built, not released.

The four graphics (OVERLAY_LAYERS in overlay-state.ts). Each is a layer that is on air or not.

LayerWhat it shows
lowerThirdWho lifts or lifted, which lift and attempt, what is on the bar. Two lines can slide out under it, side by side: the ruling ("Good lift", "No lift") when a judge has answered, and the lift's one sentence. A no-lift has no sentence.
liftCardThe lift in sensor data: for a weightlifting lift the bar path with the peaks of velocity, power and force and the bar travel; for any other lift, bar speed per rep.
standingsThe top five of the exercise's board and, where they are not among them, the athlete of the lift on air (standingsWindow).
bugThe session bug: the session's name and logo, "Live", and the time of day.

What every graphic carries (Plate, Mark in overlay-canvas.tsx).

  • enode's wordmark, once per graphic, as quiet as a label: at the other end of the label's line on the lift card and the standings, last and behind a rule on the bug. The lower third carries the pictogram alone, without the word, last and behind a rule, so the plate stays narrow. A graphic that is on air alone still says where it comes from. No setting takes it off.
  • Round corners: 24 px on the 1920 × 1080 picture for every plate and for the lines under the lower third, 12 px for what sits inside a plate (the session's logo, a place). Nothing on a video can be pressed, so the look's rule "round means it can be pressed" does not apply to these graphics; the gym display keeps its corners.
  • A short bar at the plate's left in the colour of what it says (live, good lift, personal best, no lift). It is inset and round itself. A plate that says nothing — the standings, the bug of a session that is not live — has none.

Who gets it (overlay-entry.tsx, decided 2026-10-14). Only an account whose profile carries the privilege canAccessBroadcasting. The Live Hub's beta switch (?beta=1) and a dev build's dev UI no longer open it; the rest of the Live Hub stays on showLiveHubSection. TODO: the backend must grant canAccessBroadcasting — until it does, nobody sees the overlay, and live test 95 needs an account that holds it.

  • With the privilege, a session's "…" menu has "Video overlay · Beta" (live-hub.tsx, live-view.tsx, result-view.tsx), and the demo's header has "Video overlay" (live-demo.tsx). Without it these entries are absent.
  • The control page answers an account without the privilege with a notice ("The video overlay is not available for this account").
  • The output checks the privilege when its browser is signed in, and draws nothing until the profile is read. A browser that is not signed in is not checked: it shows only what a control page sends it or a display pairing made there, and only a privileged account opens either.

The two routes. The session is in the query, because the portal is a static export. demo names the demo's session.

RouteWhat it is
/dashboard/live/overlay/?session=<id|demo>The control page (overlay/page.tsx, OverlayControl). Guarded like the Live Hub (showLiveHubSection), plus canAccessBroadcasting.
/overlay/?session=<id|demo>The output (apps/portal/src/app/overlay/): the page a mixer shows as a browser source at 1920 × 1080.
  • The output draws nothing but the graphics. Its layout makes the page transparent and hides everything the portal mounts beside a page (toasts, dialogs). An expired sign-in does not send it to the login screen.
  • The graphics are laid out for 1920 × 1080 and scaled as a whole to the box they get (overlay-canvas.tsx). Nothing stands in the outer 5 % of the picture. The control page's stage and the output render the same component (OverlayFrame), so what the operator sees is what goes out.
  • "Copy output link" on the control page copies the output's address. "Open output" opens the same address in a window of this browser. The toast after a copy says where the link works: the demo's in this browser only; a session's anywhere, with a number to type where the browser is not signed in.

An output is never empty without a word (apps/portal/src/app/overlay/page.tsx, block O3). An output with nothing on air looks exactly like a broken one, so the page says which it is, on a small plate in its lower left corner:

The output's caseWhat the page saysFor how long
It follows its session and nothing is on air"Connected to session. Nothing is on air. …"15 seconds after it connected (WAITING_LINE_MS), or until the first graphic. It does not come back.
The demo's output, and this browser holds no Take of the demo"The demo's output · nothing on air", and that the demo plays in one browserUntil a Take arrives.
Signed in, and the session is not in the account's list"This session is not in your list"It stays.
Signed in, and the list could not be read"Not connected yet"Until it is read.
Not signed in and not paired"Connect this output" with the numberUntil it is paired.
The beta is off, or the address names no sessionThe notice that says soIt stays.
  • Whatever the page draws is on air, so the line of an output that follows leaves by itself: a source that a mixer loads in the middle of a stream is clean after 15 seconds, and at once when a graphic is up.
  • The window's title says the same for as long as the page is open ("session · nothing on air", "session · on air", "Video overlay · not connected"). A title is never in a mixer's picture.
  • The demo's output cannot tell "no Take yet" from "the link was carried to another browser": both mean this browser holds no state of the demo (localOverlay). The plate says both.

The lift card draws its lift (overlay-draw.ts, PathCard in overlay-canvas.tsx, block O2). A card with a bar path does not come in finished:

  1. The plate comes in (300 ms, like every layer).
  2. The path draws itself from the floor up in the time the lift took. The dot at its end is the bar.
  3. Each peak's dot lands when the line reaches it, and its number counts up from zero in 400 ms. Until then its label is quiet and its number is not there.
  4. When the path is whole the bar travel counts up. Then the card stands still.
  • The state carries the lift's own clock. seconds on a path card is the time between the path's first and last sample; at on a peak is when the metric peaked, as a share of that time. The points of a path are spread evenly over its time, so a share of the time is a share of the points. A state without seconds (one stored before this) draws the card finished.
  • The drawing runs on the clock, not on the browser. liftCardSince on a state is the moment the card of this lift went on air. A state that only brings the card up to date — a ruling, a switch of the desk — keeps it (withLiftCardSince), so the card does not start over. Time is read on every frame and never counted.
  • A frame that is following starts when it sees the card; a frame that is loading goes by the clock (drawingStart). A frame counts as following once it has been up for five seconds. So an output on another machine draws the whole lift although the Take reaches it a moment later and its clock is not the control page's; an output that is opened or reloaded with the card up shows it as far as it is — the finished card, three seconds after a lift of two.
  • A number counts in the print it came in (countedText). The state holds a number as it prints, in the operator's language; the output knows neither the value nor the language. The digits are counted and put back into their print. A separator with exactly three digits behind it is taken for a thousands separator.
  • Reduce motion shows the finished card at once.
  • The control page's stage plays the same while the card is on air. The preview of a lift that is only cued stands still.
  • The card of a lift without a bar path (bar speed per rep) stands still, as before.

The control page. Left, the session's lifts, newest first. In the middle the stage: the graphics over a backdrop the operator chooses (nothing, black, a file, the camera, a YouTube or Vimeo link). The backdrop is on that page only. Under the stage the desk. Over the stage stands one line of how-to (OverlayHowTo): pick a lift in the list, then "Show on stream"; "Open output" is the page the streaming software captures.

The page's words (since 13 Oct 2026, package P6-10). The controls are named by what a coach sees, not by a vision mixer's terms. This document and the code keep the mixer's terms for the mechanism; the page says:

On the pageIn the code and below
"Show on stream"a Take (overlay-take)
"Take off stream"a Clear (overlay-clear)
"Name bar"the lower third (lowerThird)
"Session badge"the session bug (bug)
"Colour" (Dark / Light)the plates the graphics stand on (OverlayPlate)

"On air", "Off air after", "Open output" and "Output without a sign-in" are unchanged, and so is everything written on the graphics themselves.

  • One lift is cued: the one pressed in the list, or, while "follow" is on, the newest.
  • "Show on stream" (a Take) puts the cued lift on air with the layers that are switched on. "Take off stream" (a Clear) takes everything off.
  • While graphics are on air they stay true: a switch of the desk acts on them at once, and what they say follows the session (a ruling, a standing that moved). A page follows the session only for graphics it put on air itself.
  • Following, every new lift goes on air by itself from a Take until a Clear. With "Off air after" (5, 10 or 20 seconds) each leaves again by itself.
  • The desk's choices (layers, three presets, side, dark or light plates, follow, off air after, backdrop) are the operator's and are kept in that browser (enode.live.overlay.settings), the same for every session.
  • An athlete the session's rules hide is not in the list and not on air.

Running by itself (overlay-run.ts, use-overlay-run.ts). The switch "Run by itself" beside the two buttons hands the picture to the page. The operator watches.

  • One attempt goes through the picture like this: its lifter is named on a platform and the lower third comes up ("Mia Schulz · Snatch · Attempt 2", 87 kg); the set comes in and the lift card joins it; a judge rules it and "Good lift" or "No lift" slides out; a few seconds later everything about the lift leaves. The lower third stays up from the name to the ruling: an attempt and the lift that completes it are one liftID in the state, the platform's key.

  • Which attempt has the picture when several platforms lift at once is what a hall display decides too, so that part is the display's function (wallSceneAt in wall-scene.ts): one attempt at a time, a lift for 4 to 8 seconds, lifts that come in meanwhile wait their turn.

  • What the run adds is the ruling, with its timings in OVERLAY_RUN:

    TimingValueWhat it is
    beforeMaxMs12 sA lifter who is named and does not start has the lower third this long; then the picture is free until their first rep.
    ruledMs5 sA ruling is on air this long from the moment it comes, also past its lift's own time and ahead of a lifter who is only named. Reps that are arriving and another lift's turn come first.
    awaitRulingMs12 sWhere the session's rules count a lift only once it is ruled, an unruled lift keeps the picture this long from its arrival.
    recallWithinMs60 sA ruling that comes after its lift has left brings the lift back, if the lift came in at most this long ago. A later correction brings nothing back.
  • Between two attempts the session bug stays, where it is switched on; everything else is off.

  • What goes on air follows the session: only athletes it shows, only what its rules call an attempt, and a lifter BEFORE the lift only where the session announces lifts (announcesLifts, see "Before and during a lift"). Where it does not, a run starts with the finished lift, and the line over the stage says so.

  • What the session held when the switch was pressed is history and is not put on air. Neither is a set that arrives late (isLateLiveSet).

  • The layers are the desk's: a run shows of each step the graphics that are switched on. "Off air after" has no say while it runs.

  • Clear takes off what is up; the run goes on with the next step. Pressing a lift in the list, or "follow", ends the run. Switching it off takes its graphics off air.

  • The switch is the page's, not a setting. A control page that is loaded anew runs nothing until someone presses it.

  • The demo's evening starts over by itself four seconds after its end while the page runs.

How control and output talk. The output is a dumb renderer. It knows nothing of the session's lifts and makes no graphic itself; it draws a state (OverlayState).

  • A state is self-contained. It holds everything a graphic shows as it prints: the texts, the numbers with their units, the points of a bar path (at most 80), in the operator's language and units. An output that gets it late or after a reload draws exactly what the stage draws. Only the logo and the clock are the output's own.
  • A state is versioned (v, OVERLAY_STATE_VERSION, now 1). A state of another version, or one that does not read, is no state (parseOverlayState).
  • A state names its session and the time it was taken (session, at). Of two states the one taken later is on air (newerOverlay). An output draws a state only for its own session.
  • Inside one browser (overlay-channel.ts): a BroadcastChannel (enode.live.overlay) carries a Take to open windows at once, and the last state is kept in localStorage (enode.live.overlay.state:<session id>) for a window that is opened later or reloaded. The demo travels this way only.
  • Across machines, for a real session: the state is stored in the session's config under the key overlay (configWithOverlay). The output reads the session like any viewer, follows its pushed changes, and reads it again every 60 seconds.
  • The write merges on the raw JSON. Right before it writes, the control page reads the session again and merges into that blob. Every other key (the view, the ranking, the rules, the result, a key a newer portal wrote) is kept as it is; the blob's v is stamped with the portal's config version, as every writer of config does. One write per session runs at a time, and of the states taken meanwhile only the newest is written.
  • A write that fails is presented once with "Try again", and the desk says that an output on another machine does not follow.

Known limits.

  • The race on config. A change another browser saves between the overlay's re-read and its write is lost. Every writer of config has this window; the server has no partial update of config that would close it.
  • An output shows a number once. In a browser that is not signed in the output pairs as a display (see "The overlay's output without a sign-in"). Until the operator has typed its number, the plate with the number is what the page draws, so pair before going on air.
  • A loading output draws by two clocks. An output that is opened within the seconds a card draws, on another machine than the control page, is ahead or behind by as much as the two clocks differ. A control page whose clock runs ahead gives such an output the finished card.
  • The drawing is the first rep's path. A clean and jerk recorded as two reps draws its first part, as the still card did.
  • In a development build, a browser with an empty storage talks to the default server, not to the one the control page's browser was switched to. A copied link then shows "The server cannot be reached" or a number the control page does not know. A production build has one server.
  • A control page in a background tab is slowed by the browser. Following, "Off air after" and keeping the graphics true run on the page's timers, which a browser delays for a tab that is not in front. A Take by hand is not affected.
  • Two control pages on one session do not correct each other: each keeps up to date only what it put on air itself. Two pages that both run by themselves take the picture from each other.
  • A run lives in its control page. Close the page, or let the browser put its tab to sleep, and what is on air stays on air.

Checked. Unit tests, all passing on 2026-10-08: overlay-state.test.ts (21: the sampling of a path, reading a state from untrusted JSON, the ruling as its own line, which state is newer, the state between two attempts, the merge into config), overlay-lift.test.ts (24), overlay-run.test.ts (19: what a run notes, and each step of an attempt with its timings), overlay-settings.test.ts (9).

Live test 95-overlay-run (only with ENODE_OVERLAY_RUN=1; needs a portal on :3001 and puppeteer-core by path, like test 87; ENODE_OVERLAY_THEME=light for the light theme with light plates) holds the run in a browser: a session on the test server with the control page in one browser profile and the output in another, and the demo for two minutes without a press. It passed twice against the test server on 2026-10-08. Seen there: the output in the second profile shows a named lifter, a ruling and a late no-lift about 0.6 seconds after the tablet or the coach sent it; in the demo each lift had the picture for about four seconds, five lifters were named before they lifted, and the output never differed from the stage for longer than a moment. The first run found lifts that arrive already ruled jumping ahead of the lifts that waited; overlay-run.test.ts holds that now ("lets no lift that waits its turn jump ahead on its ruling"). A third run with ENODE_OVERLAY_THEME=light passed too: the page in the light theme, light plates, the lift card switched on, and the two lines under the plate were looked at. Not looked at: a real mixer.

Since blocks O2 and O3 (2026-10-08) the same test opens its outputs by the link the control page copies, holds the sentence and the title of an output that waits, of the demo's output before a Take and of the demo's link in another browser, and has a third part: the demo's lift card after a Take, frame by frame (the path on its way with no number standing, never going back, then whole) and an output opened three seconds later, which starts with the whole card. It passed in both themes. overlay-draw.test.ts (16) holds the drawing as a function of time; overlay-state.test.ts has 26 checks now. Fourteen ways into the output were tried in a headless Chrome and the demo's "Open output" in the system's WebKit (a WKWebView, which is what Safari runs): each shows graphics or a sentence. Not tried: the product owner's own browser, and a mixer.

Not there yet.

  • Going public. Nothing leaves the beta: the session's switch "shown in public" and the line on the sheet an athlete agrees to wait for decision D12 of the concept.
  • A replay of a lift.
  • Standings for rules that add up or group. The standings are the board of the lift's exercise by the session's ranking and rules; a total (combine: "total") and tables per group (groups) are not drawn.
  • Standings before a lift. A lifter who is named has a lower third and nothing else.
  • A ruling by hand after "Off air after". Outside a run, a ruling that arrives after the graphics were taken off is not shown.

Athlete drawer — athlete-drawer.tsx, athlete-drawer-sections.tsx, use-athlete-pair.ts​

A per-athlete-per-exercise info drawer, opened from the leaderboard's expanded-row "Athlete profile" action and attempt-card identity block, the competition masthead and attempt inspector, and the stream detail panel — both windowed and in present mode (it paints over the fullscreen root via the shared overlayPortalHost(), see "Present mode" above). Callers pass only wire-carried ids (LiveAthleteDrawerTarget); use-athlete-pair.ts resolves the athlete's own exercise INSTANCE from the definition id via a cached getRelevantExercises read. Tabs:

  • Overview — the instance's current (global) 1RM plus the athlete's recent sessions of this exercise.
  • Analysis — the four pair analyses (the Performance page's tiles), in one column.
  • Charts (only with the writeCustomCharts privilege) — the coach's saved Insights charts filtered client-side to the athlete × exercise pair (chartMatchesPair: the chart config must list BOTH ids), plus the embedded ChartBuilderDrawer pre-seeded with the pair's user and exercise-definition ids. Saved charts land in the normal Insights library.

The wall after a lift — lift-insight.ts, lift-insight-line.tsx, weightlifting-platform.tsx​

What a gym display (present mode) adds once a lift has come in. The coach's own (windowed) views are unchanged. This is block W2 of the work split in LIVE_HUB_CONCEPT.html; its rules are in that file's Part 4.

One line per lift. deriveLiftInsight (lift-insight.ts, pure + tested) decides which ONE comparison a lift gets. It checks the list below from the top and returns the first that applies, or nothing. LiftInsightLine (lift-insight-line.tsx) writes the sentence.

#LineReads likeApplies when
1Personal best"Personal best · 2.5 KG more than ever before"A work set above the athlete's record from before today and above every earlier set of today. See "The line knows the past".
2Change of place"Takes the lead" · "Up 2, now 4th" · "Down 1, now 3rd"The athlete's own latest set changed their rank (LeaderboardRow.rankDelta), or their first set landed on top of a board that already held others.
3Against the previous attempt"5 KG more than attempt 2" · "0.04 M/S faster than attempt 2 · same load" · "0.1 M/S slower than attempt 2 · 10 KG more on the bar"The athlete has an earlier set of the exercise today with a value on the rank metric, and the difference does not print as zero. The load note is left out when the board ranks by the load itself.
4Against today's best"40 KG off today's best"The set is a work set and below the highest value any other set of the exercise reached today, by anyone.
5Inside the set"Bar speed dropped 12 % from rep 1 to rep 5"The mean bar speed (peak speed where reps carry no mean) fell by at least 10 % from the first to the last lifted rep.
6Against last time"0.05 M/S faster than on Thu 1 Oct at 140 KG"The athlete's last session before today had a work set at the same load, and the two differ. See "The line knows the past".
  • Where it shows. Leaderboard: the pinned attempt card shows the line in place of its three digest tiles; in a multi-pane display it is the card's second line. Competition: under the masthead, or inside the weightlifting layout. The Live Stream shows none.
  • Whose lift. On a display the leaderboard's attempt card follows the athlete who lifted last (windowed it stays on the leader). A tapped row still holds the card until it is tapped again.
  • Rounding. A difference that would print as zero at the board's precision counts as no difference (printsAsZero), so the wall never says "0 M/S faster".
  • 10 % is a stand-in. TODO: the concept asks for the athlete's own velocity-loss threshold; no such value reaches the portal, so DEFAULT_VELOCITY_LOSS_THRESHOLD applies to everyone.
  • Sets that arrive late (after a lost connection) cannot be told from fresh ones on the wire, so they get a line and a glow like any other. TODO: needs the time a set was completed, which the feed does not carry.

A new leader glows once. When the leader of an exercise pane changes, the new leader's row on the display wears a ring and a tint that fade out over three seconds (PresentRow in exercise-pane.tsx); the row stays readable underneath and already carries the Leader tag. The first leader of an exercise and a switch of exercise pass without it. The windowed table does not glow. The animation reuses the design system's flash-positive keyframe at a three-second duration. Nothing plays a sound and nothing covers the screen.

A row moves only when its rank changes. The display's rows are in rank order (pinned athletes first); nothing else reorders them.

Weightlifting: the bar path takes the centre. When the lift shown on the competition board is a weightlifting movement, a display replaces the three attempt cards with WeightliftingPlatform: the attempt in numbers and the line on the left, the side-view bar path in the middle, and peak velocity, peak power and peak force on the right, each with its change against the attempt before.

  • How a weightlifting lift is recognised (use-weightlifting-lift.ts): by category, not by name. The exercise BASE's displayBaseExerciseGroupID is the Weightlifting group (isWeightliftingGroup, the check the Performance page uses). The base is reached through the viewer's own exercise for the set's definition, or through GET /exercise_definitions/:id for a movement the viewer does not own. Until the base has loaded the board keeps its three cards.
  • What is drawn. The existing TechniqueTrajectoryChart and the existing on-path peak dots (peaksOf in peak-markers.ts, which now also returns each peak's value). The attempt before lies behind in grey: the chart draws its second series over its first, so the earlier attempt is passed first. Both attempts chart their first rep with sensor data (useFirstRepCharts).
  • Not on it: the phases of the lift, bar travel, and "forward drift" (nothing computes it). The peak values stand beside the path, keyed by colour, not on it.

Sample data. Both lifts of the demo's meet are weightlifting lifts carrying velocityPeak: the Snatch in one rep, the Clean and Jerk in two. Their reps get a made-up bar path from demo-trajectory.ts, handed out where a real rep's packages are decoded (use-decoded-live-reps.ts answers demo ids locally).

Needed in files this block does not own (not changed, worked around):

  • packages/ui/src/charts/technique-trajectory-chart.tsx has no display scale. The platform thickens the two paths with a CSS override from outside and cannot label a marker with its value. A size option and a marker label would replace both workarounds.
  • packages/ui/src/styles/design-system.css has no keyframe for the leader glow; flash-positive is borrowed (see above).

Checked (2026-10-07): lift-insight.test.ts (each of the four lines, their order, rounding), demo-trajectory.test.ts, demo-script.test.ts, derive-competition.test.ts (latestAttemptPair); and in headless Chrome at 1920×1080 against the portal's demo, signed in with a disposable account on backdev, in dark and light: the leaderboard display shows one line in the card of the latest lift and none for a warm-up with nothing to compare; a change of leader puts the glow on the new leader's row and it is gone after three seconds; the competition display shows the line under the masthead for a Back Squat and, for the Snatch, the bar-path layout with three peak dots, their values, and attempt 1 in grey behind attempt 2.

The bar path in numbers — path-numbers.ts, trajectory-marker-labels.ts, weightlifting-platform.tsx​

What block W7 of the work split in LIVE_HUB_CONCEPT.html added to the weightlifting layout described under "The wall after a lift": the peak values stand on the bar path, the path is also given as two numbers, and the trajectory chart has a size for a wall. Nothing here needs the server, and the coach's own (windowed) views are unchanged.

Peak values on the path. The dots and their entries in the key take the metric's colour (peakColor), bar speed's pink included, on the path, in the key and in the video overlay. (For some hours on 13 Oct 2026 the velocity peak was the theme's text colour, so that its pink would not read as a no-lift beside "Good lift"; Karola took that back the same day.) Each of the three peak dots carries a label: the peak's name as a small caption over its value and unit ("PEAK VELOCITY" over "1.92 M/S"), joined to the dot by a leader line in the peak's colour. WeightliftingPlatform passes the label with each marker (TrajectoryMarker.label in packages/ui/src/charts/technique-trajectory-chart.tsx). The value is printed through the unit model, like the same peak in its card on the right.

How the chart places marker labels (packages/ui/src/charts/trajectory-marker-labels.ts, pure + tested):

  • One column, right of the paths. A bar path doubles back on itself, so a label placed at its dot would sit on the line. All labels stand in one column that is clear of both paths and of every dot.
  • The paths make room. A bar path is narrow and stands in the middle of the plot. With labels the chart moves the paths to the left by what the column lacks, never out of the plot (shiftForLabelColumn). The scale does not change. A chart without labels moves nothing.
  • Close peaks. Each label is centred on its dot's height. Labels that would touch are moved apart as a group, by as little as possible, and their leader lines slant (layoutMarkerLabels).
  • Inside the plot. The column is pulled in from the plot's edge, and a group that would stick out at the top or bottom is pushed back. In a plot too narrow for the column on the right, the column goes to the left; when it fits on neither side it stays inside the plot and may cover the paths.
  • Captions give way. When the column does not fit beside the paths with its captions (a long translation in a narrow plot), every label drops its caption and keeps its value.
  • Widths are estimated, not measured. The layout runs during render, so estimateLabelWidth works from character classes of the UI font (Roobert, measured in Chrome on 2026-10-07; the test holds six measured strings). Another font shifts the estimate, not the rules.

A size for a wall. TechniqueTrajectoryChart takes size. "default" is the chart as it was; "display" is for a screen read from across a room. The grid and the axes are the same in both.

Drawndefaultdisplay
Path2 px4 px
Marker dot, radius and ring4.5 and 1.5 px7 and 2.5 px
Emphasized marker dot, radius and ring6.5 and 2.5 px10 and 3.5 px
Phase dot, radius3 px4.5 px
Force arrow1.5 px2.5 px
Crosshair dot, radius at rest and dragged4 and 6 px6 and 9 px
Label, value and caption13 and 10 px24 and 12 px
Leader line1 px2 px

These are pixels of the wall's canvas. PresentMode zooms the canvas to the screen (see "The display as a wall"), so a path is about 5 px wide on a 1080p screen. WeightliftingPlatform draws the chart with size="display"; the CSS override that thickened the two paths from outside is removed.

Bar travel and horizontal travel (path-numbers.ts, pure + tested) stand in one card under the three peak cards.

NumberWhat it isPrinted
Bar travelThe vertical extent of the charted rep's side-view path: its highest sample minus its lowest (barTravelOf). For a snatch this is how high the bar was pulled, not where it was caught.Whole centimetres, or inches with one decimal.
Horizontal travelThe width of the same path: its foremost sample minus its rearmost (horizontalTravelOf).Centimetres or inches, with one decimal.
  • Units. Both go through the unit model's length dimension.
  • Which rep. The first rep with sensor data, for this attempt and for the attempt before: the rep whose path the chart draws. Without a path the card shows a dash.
  • The change against the attempt before is an arrow and the difference (changeAgainst). A difference that would print as zero shows nothing. The three peak cards take their change from the same function now.
  • No verdict colour. A higher peak wears the achievement colour. More or less travel does not, in either direction: whether the narrower path or the higher pull is the better lift is the coach's call.

Forward drift is not built: the direction of the axis is unknown. The concept asks for "forward drift", which has a direction. The chart's horizontal axis is the sensor's fore-aft axis (s.x of a strength sample, see sagittalData in packages/core/src/training/rep-chart-service.ts). Whether a positive value points toward the lifter or away is written down nowhere in this repository: not in the sensor protocol, not in the chart service, not in /docs. Two things look like an answer and are none. The body figure behind the inspector's side-view chart is a watermark. The demo's made-up path takes negative as "toward the lifter" by its own choice (demo-trajectory.ts). So the wall shows how wide the path is, which is the same whichever way the axis points, and names no direction.

TODO: a signed forward drift. It is missing because the product owner has not yet confirmed which way the sensor's fore-aft axis points; a recorded snatch would also show it. Once known it needs one function beside horizontalTravelOf and one row in the card.

Still not on the wall: the phases of the lift by name. The charted rep's phases are detected (charts.phases, drawn as dots by the inspector and named on its time charts); putting their names on the wall is outside this block.

Storybook (packages/ui/src/charts/technique-trajectory-chart.stories.tsx): "With Marker Labels", "Display Size", "Display Size Close Peaks" and "Marker Labels In A Narrow Plot" are new. The stories that existed are unchanged.

Sentences in other sections that this block made out of date (not edited: a block edits only its own section):

  • "The wall after a lift", item "Not on it": bar travel is on the wall now, and the peak values stand on the path as well as beside it.
  • "The wall after a lift", "Needed in files this block does not own", first item: the chart has its size option and its marker label, and the override is gone.

Checked (2026-10-07):

  • Unit tests: path-numbers.test.ts (15: both numbers, a mirrored axis gives the same width, the demo's snatch, printing in both unit systems, the change) and trajectory-marker-labels.test.ts (22: side, column, close dots, plot edges, input order, the shift, the width estimate).
  • The chart's default look, element by element. A temporary Storybook story drew the chart as committed before this block next to the chart as it is now, in eight configurations: framed with two series, with a crosshair, with phase dots, with markers, with clickable markers, the inspector's set-up (crosshair, phases, markers, force arrows, backdrop), the attempt card's preview (frameless, filled, no tick labels) and a framed filled chart. In headless Chrome the two DOM trees were identical in all eight. The Technique tab, the attempt inspector, the Live Stream and the attempt cards pass no size and no label, so they draw the default.
  • The four new stories in the same Storybook build, in dark and light: the labels do not overlap each other or the paths; with three peaks a few samples apart the labels are moved apart; in the narrow plot the captions are dropped and the values stay inside the plot.
  • The wall, in headless Chrome against the portal's demo, signed in with a disposable account on backdev, at 1920 × 1080 and at 1280 × 720, in dark and light, for seven of the demo's snatch attempts: three captioned values on the path, none overlapping another or a path; paths 4 px and dots 10 px in canvas pixels; bar travel and horizontal travel with their change against attempt 1 (for example 94 CM, down 3, and 6.4 CM, down 0.2); no change shown where the difference prints as zero; a first attempt shows one path and both numbers without a change. The inspector opened from the bar-path card drew its charts at the default size, without labels.

Not checked: a recorded lift (every path seen was the demo's made-up snatch); a language other than English (the caption rule is covered by its story and by reading the code); imperial units in a browser (unit tests only); the tracking app's Technique tab in a browser (covered by the DOM comparison above).

The display as a wall — present-mode.tsx, wall-zoom.ts, display-rule.ts, wall-board.tsx​

A display large enough to hang on a wall gets a layout of its own (block W5 of the work split in LIVE_HUB_CONCEPT.html). A phone or a small tablet keeps the responsive display described under "Present mode", and the coach's own (windowed) views are unchanged.

One canvas, zoomed. The display is laid out once, for a canvas of 1440 × 810 CSS pixels with the app's ordinary type and spacing, and PresentMode zooms frame and view together to the screen (wallZoomFor in wall-zoom.ts, pure + tested): 1.333 on a 1080p screen, 0.889 on a 720p one, the smaller of the two ratios on any other shape. So a 720p television and a 4K panel show the same wall. A window narrower than 1024 px or lower than 576 px is not a wall and is not zoomed.

  • The zoom sits on an inner wrapper, not on the fullscreen root: drawers and sheets portal into the root and keep their own size. The three controls are INSIDE the zoomed frame since 12 Oct 2026, at the right end of the header line where the clock and the wordmark stand — those fade out while the controls are shown — so they are as large as the wall's text on a 4K panel, and lie on nothing.
  • Popovers that place themselves from a bounding box (the exercise switcher, the competition board's athlete switcher) open under their trigger while zoomed; checked in Chrome.
  • Anything that measures inside the zoomed wrapper has to read layout sizes (clientHeight), not a bounding box, which is in screen pixels.

The frame (all three views): the session's name over the rule line, where the session stands, the time, and the two display controls.

  • Join code: not in the frame. A display shows the code while nobody is there: in the lobby (wall-lobby.tsx) and in a running session nothing has arrived in (live-waiting-state.tsx). Beside a board it is gone (decided by the product owner on 8 Oct 2026).
  • Mark: "Live" (the frame's only red-orange), "Lobby" while state is lobby, "Ended" after the end.
  • Time: to the minute, from the display's own clock.

The rule line says what the board is about, under the session's name. Every wording is in displayRuleSentence (display-rule.ts, pure + tested) and can be changed there. METRIC stands for the rank metric's name as the rank control shows it. A session with rules gets them as ONE SHORT LINE on a wall (ruleShortLine, rule-short.ts, pure + tested; useDisplayRule(…, { short: true }) in present-mode.tsx and wall-result.tsx): "Max lift · 3 attempts · Judged · Snatch + Clean & Jerk · Total" — the preset's name or "Highest Load", the attempts, "% of own best", "Judged", the exercises with a plus, "Total". The sentence ("The highest Load wins, in …") stays on the pages; on every wall it was cut off (12 Oct 2026).

ViewThe set's number isRoll-upLine
Leaderboardthe set's own valueBest setMETRIC · best set
Leaderboardthe set's own valueLowest setMETRIC · lowest set
Leaderboardthe set's own valueAverageMETRIC · average of all sets
Leaderboardthe set's own valueLatest setMETRIC · latest set
Leaderboardits best repBest setMETRIC · best rep
Leaderboardits best repLowest setMETRIC · best rep of the weakest set
Leaderboardits best repAverageMETRIC · best rep of each set, averaged
Leaderboardits best repLatest setMETRIC · best rep of the latest set
Competitionthe set's own value—METRIC · best set; METRIC · best attempt only where the rules count attempts (resultWordOf)
Competitionits best rep—METRIC · best rep
Leaderboardthe average / lowest / last of its repsanyMETRIC · average of the reps · best set (and so on)
Competitionthe average / lowest / last of its reps—METRIC · average of the reps · best attempt (and so on)
Live Stream——Every set, as it comes in

"Its best rep" applies to a metric no set of the feed carries itself, only its reps (metricValueOf). A coach can choose another way to read a set off its reps in the rules editor ("A set's value", under "Ranked by", shown for a rep-level metric only): stored as repAgg on the first entry of the config's rankMetrics ({ key, agg, repAgg }; absent = highest rep, as before), carried into RankMetricRef.repAgg. With a choice the reps are rolled up even where the set carries its own value; a set read without reps falls back to that value. The portal and every display honour it (a display reads /board, which carries the reps). TODO: the tracking app's own standings and result card (standings-ranking.ts, device-result.ts) still read a set by its highest rep; they follow with the next app release. The line is the session's, taken over the whole feed, so it is the same whichever exercise is on screen; it is empty until the first set has arrived. useDisplayRule reads the feed the mounted view keeps current and opens no stream of its own.

The Leaderboard on the wall (wall-board.tsx, laid out by ExercisePane when wall is set):

  • One exercise on screen: the ranked rows on the left, each with its place, the athlete, a bar that sets the number against the leader's, and the number. On the right the card of the last lift — or of a tapped row, marked "Selected" — with the number, the one line of "The wall after a lift", and the set's reps as bars over the reps of the attempt before (outlines). A single lift has no reps to compare, so the athlete's attempts so far take the place of the bars. Under the card "Just in": the session's last lifts, newest first, without the one the card shows; the list ends on a whole lift. Along the bottom the exercises as tabs. The board follows the lift that just came in; a tap on a tab holds another exercise until the next lift arrives.
  • Two to four exercises on screen (the coach's stored pane count): one column per exercise with its header, the last lift as one line, and the rows without bars. No "Just in".
  • Rows share the height. WallRows measures its column: while every row has 52 px of the canvas it shows its second line (attempts and time), below that the rows drop it, and beyond that the column scrolls. Eight athletes fit without scrolling at 16:9, with one exercise and with two.
  • What a tap does is what it did before: the row's body picks the athlete for the card, the chevron opens the athlete's sets. (Until 8 Oct 2026 a star pinned a row here; a display's row carries no pin any more.)
  • The rank control is one quiet icon (bottom right, or in the last column's header): the frame already says what is ranked. A session with rules has none; its rules are changed in the editor.

Not on the wall yet: the lobby and a health line per device (they read the device list of lobby-store.ts), and everything that waits for the server: who is on the platform before the lift, reps while they are lifted, "up next".

Files this block left alone and what it changed around them: the small shared pieces of the leaderboard (the two tags, the rank arrow, the pin) moved from exercise-pane.tsx to board-parts.tsx, unchanged. ExerciseHeader got a switcher option. The sentence under "Present mode" that describes one masthead for every screen now holds for small screens only.

Checked (2026-10-07): wall-zoom.test.ts, display-rule.test.ts; and in headless Chrome against the portal's demo, signed in with a disposable account on backdev: at 1920 × 1080 and at 1280 × 720, in dark and light, eight athletes fit with header, rows, the card of the last lift, "Just in" and the tabs, and neither the page nor the rows scroll; a tapped row takes the card and gives it back; an opened row shows its sets; two exercises on screen fit eight rows each; the Competition and Stream views sit in the same frame with their rule line, and both switcher popovers open under their trigger. On a real session created on backdev the frame showed "Join with" and the code (taken out of the frame on 8 Oct 2026), and after "End session" the code was gone and the mark read "Ended".

The display on every screen — wall-profile.ts, wall-scene.ts, use-wall-lifts.ts, wall-board.tsx, wall-lift.tsx, wall-competition.tsx, wall-stream.tsx, wall-lobby.tsx​

Block W8 of the work split in LIVE_HUB_CONCEPT.html, in two steps: the display as block W5 built it was put right where the review of the real screens found it wrong (the concept's Part 5c, findings U3 to U8, U12, U19 to U26 and U28), and a display can be told where it is. This section is the truth for both; "The display as a wall" above describes the same display before them. The coach's own (windowed) views are unchanged.

A profile per screen (wall-profile.ts, pure + tested). Where a display hangs decides how it is drawn, and a browser knows the pixels of its window, not the distance of its readers. So a display has a profile:

ProfileWhereCanvasZoom at 1920 × 1080On screen
nearA laptop, a tablet, a monitor on the desknone: the page's responsive layoutnot zoomedEverything at once; the display as "Present mode" describes it
roomThe gym's television1440 × 8101.333The board and the last lift side by side
hallA projector in front of spectators960 × 5402One thing at a time: the board, then each lift alone
  • Who decides. wallProfileFor: the choice if there is one, else the size of the window by the rule that existed before profiles (near under 1024 px of width or 576 px of height, room from there). A screen nobody chose for therefore looks as it did.
  • Where the choice is kept. chosenWallProfile: ?profile= in the display's link first, then the key enode.live.displayProfile in the browser's storage. A value that names no profile counts as absent.
  • How a choice is made. The display's third control, "Screen", asks "Where is this screen?" with a small picture of each: Automatic, On a desk, On the gym's television, On a projector. chooseWallProfile writes the storage and the ?profile= of the address, so the address in the bar is the display's link with its profile. Every display in the window follows at once.
  • How far a profile reads. The two wall options say how far away a name in a row can be read on a 55-inch television (readingDistanceMetres: a letter is as tall as the distance divided by 200, capitals are 0.7 of the font size): about 3.5 m in the room, about 6 m in the hall.
  • The picture in the set-up page is a display nobody chose for, whatever was chosen for the screen it is on (useWallScreen({ automatic: true })).
  • What a view is told. PresentMode sets WallDisplayContext around its views (profile, canvas, and a place in the frame's top line); a view reads useWallDisplay(). useWallZoom() is for a view laid out for the room's canvas only, and returns that canvas's zoom on any wall.

The frame (present-mode.tsx).

  • Top line. The session's name over what counts in one sentence; where the session stands; the time. The hall drops the time. The join code is not in the top line in any profile: the lobby and the waiting picture of a session nothing has arrived in show it themselves, large.
  • The wordmark. enode's wordmark closes the top line, at its right end, in every profile and every view: the lobby, Leaderboard, Competition, Stream, and the result (wall-result.tsx draws its own, in the same place). It steps back with the clock while the three controls are shown, so nothing lies on it. The near profile hides it under 640 px of width.
  • The mark is the shared state chip (@enode/ui/live/live-chip): Lobby, Live, Ended. A screen that has lost its own connection (useLiveScreenConnection) says "Trying again · since 18:42" in its place, so the live dot does not keep pulsing over a board that has stopped.
  • Controls. Screen, Fullscreen, Exit float over the top right corner at their own size, outside the zoomed canvas. On a wall they and the pointer leave after 4 seconds without a pointer movement or a key, and return with the first one (data-idle on the display's root; anything that is there for a hand carries the class DISPLAY_CONTROL). Near, in the hand, they stay.
  • Foot. The last 28 px of the canvas stay free: the health line places itself there. It is mounted for a session in its lobby or live.
  • A read that failed is tried again. When the first read of a session's sets fails, the view says "Couldn't load this live session" and offers "Try again", to a hand a television does not have. A display therefore asks again by itself every 10 seconds while the feed has failed and holds nothing (useReadAgainByItself in present-mode.tsx).

Type. Every text on a wall has one of the five sizes of @enode/ui/live/wall-type (block W15's table); PresentMode sets them for the profile with wallTypeVars. Measured in Chrome at 1920 × 1080:

LabelLine of a liftNameNumber in a rowNumber of a lift
Room23.8 px · 2.2 %34.6 px · 3.2 %38.9 px · 3.6 %64.8 px · 6 %86.4 px · 8 %
Hall32.4 px · 3 %48.6 px · 4.5 %64.8 px · 6 %86.4 px · 8 %151 px · 14 %

Two things go beyond the table on purpose. A row's name and number grow with the row, up to 1.3 times (see below). And in the hall a lift alone on the screen has its number at twice the table's size (302 px, 28 %) and the athlete's name at the size of a lift's number.

Rows (WallRows, WallRow; the numbers are in wall-scene.ts).

  • They share the height. wallRowsLayout: a row is between 64 and 128 px of the canvas (56 in the hall), 8 px apart. wallRowGrowth draws name and number larger in a taller row: at the table's size up to 80 px, 1.3 times from 104 px. The ceiling keeps a row's number under the number of the lift beside it.
  • More athletes than fit turn the pages by themselves. wallBoardPages splits the board by rank into pages of at most as many rows as fit; wallBoardPageAt picks the page from the clock, 8 seconds each, so two displays of one session turn together. No row is ever cut. A line under the rows says which places are on screen ("8–14 of 14").
  • The pages share the rows (8 Oct 2026, block P5d). The board has as few pages as its rows need, and no page draws more than one row more than another; an odd row goes to the earlier page. Fourteen athletes at nine to a page are 7 + 7, ten are 5 + 5: until then the last page of ten held one athlete on an empty board. The type is that of the longest page, the same on every page.
  • Every page fills its column (13 Oct 2026, P6-17). The pages cannot always draw the same number of rows: fourteen athletes with the last lifter kept in view are six, five and five. At one row height the pages of five ended a row and a half above the line that says which page is on screen. So the rows of a page share that page's own height (wallPageRowHeights); a shorter page has slightly taller rows and the same type. Without a lifter to keep in view, fourteen are seven and seven.
  • The row of whoever lifted last is on every page. A page that does not hold that row by rank gives its last place to the row, under a hairline. That row counts among the rows a page draws: ten athletes at nine to a page with the tenth kept in view are places 1 to 5 over the kept row, then 6 to 10.
  • The name comes first, and the bar stays. The bar has one length in every row (176 px), so the bars stand in a column; a name too long for the row is cut in front of it. Until 13 Oct 2026 the bar gave way to the name, and the kept row of a last lifter with a long name had none. A row tall enough for two lines (84 px) puts its tags under the name; a lower row sets them beside it and drops them when there is no room. A name that is still too long is cut with an ellipsis.
  • Tags are the shared row tags: Leader (green, a trophy), PB (acid yellow, a star), Just in (red-orange, the dot). "Just in" marks the session's newest lift only: on an exercise that is held on screen while the newest lift belongs to another, no row wears the tag.
  • The arrow belongs to the lift. A row shows how many places its athlete moved only while that lift is news: 3 seconds, as long as the glow (useFreshLiftID). At rest no row carries an arrow.
  • The glow is the shared LiveGlow: green for a new leader, acid yellow for a personal best.
  • The bar has the rank metric's own colour: a bar is a value, not a verdict. Every number keeps the width of the board's longest, so numbers and bars stand in a column; a place badge keeps the width of two digits.
  • No second line. The count of attempts and the time with its seconds are gone from the rows.
  • For a hand. A tap on a row picks the athlete for the card. A row has no pin (8 Oct 2026: it lay on the row's unit, and a star is a personal best); pinning is the coach's table's. A row is not opened in place on a wall; the athlete's sets are one tap on the card away.
  • What is ranked. The frame's top line says what is ranked all the time ("Load · best set" under the session's name). The control that changes it (WallRankControl in leaderboard-view.tsx, 8 Oct 2026, block P5d) is no longer rendered on a display since 12 Oct 2026 (canPickRanking is false in Present): a projected wall is not where the ranking is chosen. The component stays for the coach's own page.

The card of the last lift (WallLiftCard in wall-lift.tsx) has one layout for every lift, so what stands under it does not jump:

  1. "Last lift · Attempt 3" over the athlete's name and place. When an exercise is held on screen and the session's newest lift is on another, the line names the exercise. A picked row reads "Selected". A long name is drawn smaller (down to 0.65) before it is cut.
  2. The number, its unit, the metric's name. The number is white.
  3. The athlete's attempts on the exercise as numbers, the last five, the one on the card marked. No chart, no axis.
  4. The one line of "The wall after a lift", drawn by the shared LiftLine (WallLiftLine). Its place stays when a lift has nothing to compare with.
  5. Bar speed per rep as bars on one scale that starts at zero, each with its value over it at two decimals. The bars are neutral (LIVE_BAR_FILL in packages/ui/src/live/tones.ts), here, in the Stream and on every display: a bar says how fast, and red is a no-lift's alone. A row's bar on a display keeps its metric's colour, except bar speed's pink (boardBarColor). One line across the bars is the set before (setBeforeLevel in lift-insight.ts): its fastest rep on a board ranked by the best set ("Max of the set before"), its slowest on one ranked by the lowest set ("Min of the set before"), the mean of its reps on one ranked by the average or the latest set ("Average of the set before"). With more than 8 reps the bars stand without values; one rep is one number; no speed is a dash.

Under the card, "Just in": the session's last lifts without the one on the card, one line each, as many whole lines as fit.

Several exercises. The session's exercises are tabs under the board, each as wide as its name, shown from the second exercise on. Two to four exercises side by side (the coach's stored pane count) get a column each: the exercise's name (ExerciseHeader with wall, which has no animation), the last lift as one line (WallLiftStrip), and the rows without bars.

The hall shows one thing at a time (wall-scene.ts, pure + tested; use-wall-lifts.ts gives it a clock).

  • The board is the first five places and, when it is further down, the row of whoever lifted last (hallBoardRows). What the board is about stands in the frame's top line, in front of the rule.
  • A lift has the screen to itself (WallLiftScene): the athlete, the number, the place before and now, and the one line.
  • The order is wallSceneAt(lifts, now), a function of the lifts with the moment each came in and a time; it keeps nothing between calls. A lift takes the screen when it comes in and keeps it for at least 4 seconds. With nothing waiting it leaves after 8 and the board returns. A lift that comes in while another is on screen waits and takes over when the 4 seconds are up, so two lifts within two seconds are both shown. More than three waiting: the oldest are skipped. The three numbers are LIFT_SCENE.
  • When a lift came in is the moment this display saw it (useSeenLifts): a feed's arrival stamp is a counter, and a set's created is the tablet's clock. What a session held when the display opened is history and is not announced.
  • Scenes change with a cross-fade of 0.3 seconds, and with a cut for someone who asked their system for less movement (WALL_SCENE_IN). So do the pages of a board.
  • Nothing can be pressed in a scene or on the hall's board.
  • Competition view: the board is the lift's ranking across the field; an attempt alone names "Attempt 2 of 3", and a weightlifting attempt has its bar path beside it. Only work sets are attempts.
  • Live Stream: a set alone, with its bar path. There is no board to return to, so the last set stays.
  • The lobby is the room's lobby at the hall's canvas.

The Competition view on a wall (wall-competition.tsx; CompetitionView derives everything and hands it down).

  • Left: the lift. "Last lift · Snatch"; who is on the platform is said only in a session that announces lifts (see "Before and during a lift"). The athlete with their place in the lift's ranking, the newest attempt's number in white with "Attempt 1 of 3", the three attempt slots (the one on show ringed, the best with a trophy once two attempts have a result, a failed one struck through and named "No lift"), and the one line. Under it the session's lifts with this athlete's attempts on each; a tap puts a lift on show.
  • Right, a weightlifting lift: the bar path (WallBarPath in weightlifting-platform.tsx) with the room it needs, its three peaks written on the path and nowhere else, and bar travel and horizontal travel under it.
  • Right, any other lift: the lift's ranking across the field, as wall rows. A tap on a row shows that athlete.
  • Not on the wall: the athlete switcher, the lift rail and the trophy button of the coach's view. The athlete's drawer (a tap on the name) and the attempt inspector (a tap on the bar path) open as before.

The Live Stream on a wall (wall-stream.tsx). The coach's Live Stream is a tool for a hand: filters, a table to browse, charts with a crosshair. A wall shows its one moving part: the set that just came in with its number and up to six of its other values, each under its name; its bar path beside it; and the sets before it. Nothing is cut and nothing waits for a hand.

The lobby on a wall (wall-lobby.tsx). Two halves, both starting on one line. Left, the way in: the QR code (JoinQr, 580 px of the room's canvas, 360 px of the hall's) with the code in letters under it (the shared JoinCode at its hero size), never cut. Right, the three steps, a line each between rules, its number as a figure (Figure at wallRow, wallLine in the hall) and its text at the size of a name on a board (the size of a line in the hall, whose canvas is narrower than that type); "Nothing counts yet" as a caption in the room; and under them a row per device, in a list that grows from the top: the device's name in the session with ONE chip — "Ready", "No sensor yet", "Silent for 2 min" in amber for a device that went quiet, else "Not ready yet" — and a second line: who trains on it, or, for a device that is on its way, "Joined · Sensor · Test set" with a tick on what is done. Every row is two lines high. Since the QR code (2026-10-08) the room shows three rows; a longer list runs in two columns of rows without the second line, up to six. The hall shows two. The heading says how many are not shown.

A session's rules on the boards. Block W11 gave the ranking functions an argument for a session's rules and left the calls to the blocks that own the boards (the table under "The rules of a session"). The boards in this block's files pass it, on a wall and in the coach's own view. A session without rules ranks as before: the argument is then undefined.

  • Leaderboard (leaderboard-view.tsx, exercise-pane.tsx): the view narrows its feed once with attemptsUnderRules, so the tabs, the panes, "Just in" and the hall's scenes see the same sets: no hidden athlete, no exercise that does not count, no attempt beyond the ones everyone gets. The pane hands rulesRanking(…) to deriveLeaderboard and to deriveLiftInsight.
  • A board in percent of the own best reads every athlete's past, also in the coach's view, which reads none otherwise. A wall row then shows the percent as its number and the lifted value small in front of it; an athlete without a best keeps the lifted value.
  • A tie that a rule decided is named on a wall row: "Earlier lift", "Later lift" or "Fewer attempts" (the row's tieWonBy).
  • Competition (competition-view.tsx): deriveCompetition gets the rules, so a lift has as many slots as the rules give attempts (attemptSlotCount), and "Last 3 attempts" says that number. The lift's ranking across the field is by the rules.
  • Live Stream (stream-view.tsx): takes from the rules who is shown and nothing else. It still shows warm-ups and attempts beyond a limit: it is every set, as it comes in.
  • Not passed: the display's rounding (rounded), so only exactly equal numbers are a tie. Not built: a percent or a tie note in the coach's table. Still without the rules: lift-leaderboard-overlay.tsx and attempt-detail-sheet.tsx (not this block's files), the result, and the tablet.
  • Not seen in a browser: a board in percent and a tie note. No session with such rules was on screen.

Left open, and where this block departs from its text.

  • The result of an ended session is drawn at the room's size in the hall. wall-result.tsx is laid out for 1440 × 810 only and does not fit the hall's canvas; it belongs to block W14. useWallZoom() therefore returns the room's zoom on any wall.
  • A lift's moment is the display's own sighting. After a lost connection the sets that arrive together are announced, up to the last four. TODO: take the moment a set was completed from the server once the feed carries it (the handoff's item 3, block X1). It is missing because the feed has no such field yet.
  • The demo never returns to the board in the hall: it plays a lift every 1.7 seconds (2.6 when this was seen), and every lift keeps the screen for at least 4. A real session returned to the board 8 seconds after its last lift.
  • A long name in a full board is cut, after its bar and its tags have given way. Two lines for a name are not built.
  • Exercise names are the catalogue's ("Squat Barbell Backrack Bilateral") until a coach renames the exercise; block W14 found that out. The wall shows whichever name the exercise has.
  • The bar path's captions are drawn 1.4 times larger than the chart's display size by a zoom around the chart (WALL_CHART_ZOOM). TODO: a size of its own in TechniqueTrajectoryChart. It is missing because the chart belongs to @enode/ui and was not this block's to change.
  • A tablet in landscape nobody chose for still gets the room (zoom 0.82 at 1180 × 820). Its smallest text is now 14.6 px, where it was 9 px. Proposal for the product owner, not built: leave "Automatic" as it is. The wall reads well at arm's length since its smallest text is 2 % of the height, and whoever wants the page's layout on a tablet chooses "On a desk".
  • Not looked at: the waiting state before the first set on the hall's canvas, and a display on a real television or projector.

Sentences in other sections that this block made out of date (not edited: a block edits only its own section):

  • "Present mode": "Present is fully interactive … Rows expand" holds for the near profile. On a wall a row is not opened in place.
  • "The display as a wall", "The frame": the wordmark and the two controls are no longer in the top line; "One canvas, zoomed" names one canvas where there are two; "A window narrower than 1024 px … is not a wall" holds only while nobody chose a profile.
  • "The display as a wall", "The Leaderboard on the wall": the card's attempt chart, the row's second line, the chevron, the rank control's place and "beyond that the column scrolls" are gone.
  • "The wall after a lift" and "The bar path in numbers": on a wall the line is drawn by the shared LiftLine, and the three peak cards beside the path are not shown; WeightliftingPlatform and LiftInsightLine remain for the near profile.
  • "Competition dashboard" and "Live Stream": a wall shows neither view's controls.
  • "The rules of a session", the table "Which board follows the rules": the rows of exercise-pane.tsx and competition-view.tsx and the row of deriveLiftInsight now read "Yes"; the Live Stream follows who is shown.

Checked (2026-10-07).

  • Unit tests: wall-profile.test.ts (15: parsing, link before storage, the automatic rule, the zoom of each canvas, the reading distance), wall-scene.test.ts (26: the scene through one lift, two within two seconds, a queue, a queue that overflows, any order of input, a time that runs behind; rows that share a height and are never cut; pages with the kept row; the page by the clock; the hall's rows), wall-zoom.test.ts (4, unchanged).
  • Live test 45 (tests/live/offline/45-display-wall.live.test.ts, runs with ENODE_DISPLAY_WALL=1, a portal on :3001 and puppeteer-core by path): fourteen athletes lift on backdev and a headless Chrome shows the session. In the room it holds that the board has more than one page, that every athlete is on screen within one turn of the pages, that no row is cut, that the last lifter's row is on every page, and that no text is under 2 % of the height. In the hall (?profile=hall): at most six rows with the last lifter's among them; two lifts 1.2 s apart are shown one after the other and the board returns; no text under 3 %. Then the choice: made on the display it is in the link and in the storage, survives the next visit, and a link that names a profile wins. It ran eight times on 7 Oct. Three runs passed. Three failed because the board did not appear: the display's first read of the session's sets did not come back within the request's 15 seconds, on a test server several blocks' tests were using at once, and the display showed "Couldn't load this live session" and waited for a hand. The display reads again by itself since (see "The frame"). One run failed on a fixed pause in the test, which now waits for the display. The last run passed every check on the wall and failed on 35 answers of 502 from the test server; the test now reports those instead of failing on them. It was not run again after that: the test server was not answering reliably.
  • Live test 65 (block W12's): its case "keeps an athlete who is never shown off the board" was marked as failing until a board followed the rules. It passes now and the mark is gone.
  • By eye in headless Chrome, signed in with a disposable account on backdev, against the portal's demo and against real sessions with five and with fourteen athletes and two exercises, at 1920 × 1080 and 1280 × 720, in dark and light: the board with five athletes fills the column; fourteen athletes are two pages of eight and six, the last lifter's row under the second; an exercise held on screen names itself on the card and has no "Just in" row; two exercises side by side; the Competition view with a squat (ranking on the right) and with a snatch (bar path on the right); the Live Stream; the lobby with one ready and one unready device; the hall's board, the hall's lift for all three views, and the hall's lobby.
  • Measured: the sizes in the table above. The smallest text on a room wall is 22.4 px at 1080p (2.1 %, a caption on the bar path), in the hall 32.4 px (3 %).
  • The controls: 7 seconds after opening they are transparent and the pointer is hidden; a pointer movement brings both back.
  • The arrow: "Moved up 4" was on the row 0.3 s after the lift and gone after 3 s.
  • The hall's timing with two lifts 1.3 s apart on a real session: the first on screen for 4.3 s, then the second for 7.7 s, then the board.
  • Automatic against "On the gym's television": two pictures of the same session within one minute of the clock differ in 124 pixels, the live dot.
  • The choice: chosen on the display it is in the address and in the storage and survives a reload; a link's ?profile=near wins over a stored hall; "Automatic" clears both.

Before and during a lift — platform-state.ts, wall-before.tsx, wall-during.tsx, wall-scene.ts, use-wall-lifts.ts, demo-platform.ts, presence.ts, running-store.ts​

Block X1 of the work split in LIVE_HUB_CONCEPT.html. Until this block a display learned of a lifter when the set was over. Now the tablet says who stands on each of its stations with which load, and sends the set while it is lifted; a display names the lifter before the lift ("On Platform 1 · Mia Schulz · 117.5 KG"), shows each rep as a bar when it arrives, and then shows the finished lift with its line, as before. The server side is items 1, 2, 3 and 5 of the open handoff and runs on backdev since 2026-10-07; nothing was asked of the server for this block.

It is behind a switch of the session, and the switch is off. announcesLifts(session) (session-config.ts) is true for a session whose stored config says announceLifts: true, and for the demo. Every other session shows what it showed before this block. The reason is not technical: the sheet an athlete agrees to names "each set you complete", and says nothing about being named before a lift. Until the product owner has said what the sheet has to tell, a real session does not announce unless its coach turns the switch on.

  • The coach sets it in the group "Announce lifts" (AnnounceLiftsField, announce-lifts-field.tsx): two chips, Off and On, and one line that says what a display then does. The group stands on the last step of the set-up page ("Look and end", after the logo) and in the session editor under the rules. A new session starts with Off. configWithAnnounceLifts(config, on) writes the field; the editor writes it only when the coach changed it (announceLiftsFromConfig reads what the session has), so every other field of the config stays as it was.
  • The switch decides what a DISPLAY shows. A shared tablet sends in every live session, whatever the switch says: a device cannot read the session's config. So the device list of a session holds who is on which platform also where no display shows it.
  • An athlete's own device sends neither who is on the platform nor the running set. Its completed sets go on as agreed. The sheet the athlete agrees to there names "each set you complete" only, and whether a personal phone may send more is open decision D17. The gate is one pure function, sendsPlatformAndRunningSet (own-device-scope.ts), asked by useLivePlatform; "own device" is the flag the consent question uses (the signed-in user is an athlete, useIsAthlete). Such a device's heartbeat leaves platforms out, which the server reads as "not known". To lift it when D17 is decided, return true from that function.

The wire (in @enode/core, all of it optional, so every client reads a server from before it and every server reads an app from before it).

WhatType and mapperRead or parsed by
Who is on a device's stations: platforms on the heartbeat, on the device row and in live_session.deviceLivePlatformPresenceDto (what a device sends: people by id), LivePlatformDto (what a viewer gets: people by LivePersonDto), on WorkoutLiveSessionPresenceDto and WorkoutLiveSessionDeviceDtogetLiveSessionDevices; the device event passes through parseLobbyDeviceEvent as it did
The set while it is lifted: PUT and DELETE …/running/:id, the events live_session_set.running and .running_endedWorkoutLiveSessionRunningSetDto; toRunningLiveSetDto builds the body; LiveRunningSet is the view model (toLiveRunningSet)putRunningLiveSet, deleteRunningLiveSet; parseLiveRunningSet, parseLiveRunningSetEnded (feed-schema.ts)
When a set was completed: completedAt and sentAt in a set's body, completedAt on the setOn the create and the update DTO and on WorkoutLiveSessionSetReturnDto; LiveSet.completedAt, .arrivedAt (the server's createdAt) and .trackingSetID (currentPersistentSetID), each only where the wire has ittoLiveSet and parseLiveSet, both through liveSetTimes
The board read: GET …/board/:id, with ?running=trueWorkoutLiveSessionBoardReturnDto; a rep says hasDataPackagesgetLiveSessionBoard, which answers null for a server without the route

Two answers of the running-set route are outcomes and not errors (RunningLiveSetOutcome): unsupported for a 404, which is how a server from before running sets answers, and refused for a 403, which the server gives for an athlete who is not one of the session owner's people.

What the tracking app sends. Three things, and an app from today keeps working against any server: the server ignores what it does not know.

  • Who is on each station, in the heartbeat. useLivePlatform (use-presence.ts) is mounted once per station, in the tracking view (ExerciseDetailView.tsx). It builds the station's row with stationPlatformOf (presence.ts): the selected athlete, the exercise, the id of the set that is up, whether it is a work set, its load and its planned reps (the set's loadingMass and repCount; left out when nobody has set them), and who is next. setLiveStationPlatform hands it to the heartbeat, which goes out half a second after a change. The heartbeat leaves platforms out until a station has said who is on it, and from then on sends the list every time, empty when no exercise is open. The station's number is its column on the tablet (stationNumber, from page.tsx through TrainingSession); a phone has one.
  • Who is next is known before the set is completed. The tablet's suggestion after a set comes from recommendSwitch (training/switch-recommendation.ts), which was only ever asked after a completion. It is a pure function of the training, and who is next among the athletes of an exercise depends on what the OTHERS have left to do, not on the set on the bar. nextOnStation (presence.ts) asks it before the completion; TrainingSession hands the question down as nextLifter. One case names nobody: the set that finishes the exercise for everyone, after which the tablet offers a choice.
  • The set that is up, as it grows. The same hook sends the running set (setLiveStationRunningSet): once when the set comes up, with no reps, and after each rep the sensor delivers, with the whole set so far and no sensor packages. One request per station is on its way at a time; a rep that came meanwhile goes out when it is back. Nothing is queued and nothing is retried: the next rep carries the whole set again. A rep is sent under the id it has while it waits to be saved (PendingRep.id), which is not the id it is stored under; the finished set replaces the running one by the SET's id, which does not change.
    • When another athlete is selected, or the exercise is closed, the app ends the running set (DELETE), because only the device that sent it can. A set that was completed is not ended: its finished set takes its place on the server.
    • It stops where the server has no such route. A 404 is remembered for the live session the device is in, and nothing more is sent while the device is in that session.
    • While the reps wait in the set summary for a yes (a setting of the app), they are still the running set.
  • When a set was completed. Every set from the live outbox carries completedAt, which is the set's created (stamped at completion), and sentAt, stamped by postLiveSessionSet and updateTrackedLiveSet at each attempt and not where the body is built: a body can wait in the outbox for minutes.

None of it is sent outside a live session, and on an athlete's own device nothing before they agreed to share.

What a display holds.

  • running-store.ts (with useLiveRunningSets in running-hooks.ts): the sets that are being lifted in a session, each with seenAt, the moment this screen last received it. Fed by the two events on the session's topic, and by one read of the board with running when a watch starts and each time the stream opens again. A finished set's frame ends the running set with the same tracking id. A server without the board read changes nothing: every frame is a whole set.
  • platformStates (platform-state.ts, pure + tested) puts the device list and the running sets together: one PlatformState per station with a lifter. A device without platforms says nothing. A device that has not been heard from for a minute is not believed any more. A running set that no station names is a platform all the same once it has a rep; without one it names nobody. A set that is in the feed is over, whatever the tablet still says for the half second it takes to name the next one.
  • usePlatformStates(liveSessionID, sets) is the hook a view takes the platforms from; the video overlay's run reads it too (use-overlay-run.ts). It applies neither the switch nor the rules: platformsUnderRules leaves out an athlete the rules hide, an exercise that does not count, and a warm-up where only work sets count.

The scenes (wallSceneAt in wall-scene.ts, pure + tested; useWallStory in use-wall-lifts.ts gives it a clock and hands a view the lift or the platform to show). A display notes for itself when it saw a lifter named, the first rep and the newest rep (noteAttempts), as it notes when a lift came in. The scene is a function of those and a time. With nothing announced it is the function it was: the lifts and the board.

The screen stays with one attempt from the moment it names the lifter: when the first rep arrives it shows the reps, and when the set comes in, that lift takes the screen at once, ahead of any lift that waits. Reps that are arriving are never cut off. When the screen is free it takes, in this order:

  1. a set that is being lifted (the one that started first);
  2. a lifter who was named in the last 10 seconds and has not been on screen;
  3. the lift that has waited longest;
  4. the lifter who was named last (room only);
  5. the board.
Number (ATTEMPT_SCENE)ValueWhat it does
freshMs10 sHow long a newly named lifter comes before lifts that wait. An attempt can only be told from its beginning, and a finished lift is on the board either way.
minMs6 sA named lifter keeps the screen this long before a waiting lift may take it.
hallMaxMs12 sIn the hall a named lifter who has not started leaves after this, and the board returns until the first rep.
staleMs20 sA set without a new rep for this long is no longer shown as being lifted.
graceMs1.5 sWhen the announcement of the attempt on screen ends, its lift is usually a moment behind; the attempt keeps the screen for it.

A lift gives way after its 4 seconds to a lift that waits and to a set that is being lifted, and to a named lifter only after its 8.

  • Hall: the scene has the screen (WallLiftScene, with the load where the lift's number will stand). A named lifter is shown once.
  • Room: the scene takes the place of the card of the last lift, and the card follows the same scenes: it stays on a lift for that lift's time instead of jumping to the next one. A lifter stays named until they lift or something else takes the card. A row that was picked by hand holds the card against every scene.
  • Before the session's first set (wallOpening in wall-scene.ts, pure + tested; mounted by leaderboard-view.tsx) there is no board, and the lifter is named all the same: in the hall alone on the screen, in the room where the card of the last lift will stand, beside the waiting state with the code. The scene names the exercise, the lifter and the load; it has no place and no line, because nothing is ranked yet. When the hall's 12 seconds are over, or the tablet names nobody any more, the waiting state returns. A coach's page, a session that does not announce and a session that has ended show the waiting state as before.
  • Two to four exercises side by side show no scene. Neither does the Live Stream (see "Left open").
  • The Competition view's display (competition-view.tsx, wall-competition.tsx) mounts the same scene, WallPlatformScene, from the same useWallStory, in all three profiles. In the hall the lifter has the screen. In the room the scene stands where the attempt's panel stands, at the width the card has beside the Leaderboard's board, and the bar path of the attempt before leaves for as long. On a display near its reader it takes the place of the attempt's panel in the page's layout. The standings beside it are those of the lifter's lift, with the lifter marked; a lifter whose lift nobody has completed yet stands beside the standings on show, and the scene names the exercise. Three things differ from the Leaderboard:
    • Nobody is named for a warm-up (attemptsOnly of useWallStory): only work sets are attempts, or what the rules count.
    • An athlete or a lift picked by hand holds the view against every scene until the next lift comes in, as it holds it against the next lift.
    • In a session that announces, the room's panel follows the scenes too: it stays on a lift for that lift's time.

What is on screen (wall-before.tsx, wall-during.tsx; one frame, WallLifter, for both moments, so nothing moves between them).

  • Before: "On Platform 1" — the device's name in the session, or "On the platform" for a device without one — with "Attempt 3" or "Warmup"; the lifter; the load as the scene's number, with "3 reps planned"; one line that says what a good lift would do; and the lifter's previous attempt on the exercise. The places of the reps are not drawn before the first rep: the label "Bar speed per rep" over places nobody has lifted into, with the line of the set before across them, is an empty chart. The block keeps its room (nothingToDraw in WallLifter), so nothing moves when the first rep arrives.
  • What a good lift would do (placeAfterGoodLift): the board is ranked once more with that lift on it, by the same function and the same rules as the board on screen. "A good lift takes the lead", "keeps the lead", "moves up 1, to 2nd", "keeps 3rd place", "is 4th place". It is said only where the board is ranked by the load: a board by bar speed is decided by the lift, not by what is on the bar, and gets no such line.
  • Up next (WallUpNext in wall-before.tsx): under the scene before the lift, one line at the size of a label — "Up next", the name, and the load where the tablet sent one (PlatformState.next). In the room it is the last line of the card, in the hall a line under the scene across the screen. A long name ends in an ellipsis; the load is never cut. There is no line when the tablet names nobody, or names the lifter who is on the platform. During the lift the line is not drawn and keeps its room, so nothing moves when the first rep arrives.
    • The load is named with its exercise beside a board of another exercise (upNextOf in platform-state.ts, pure + tested). The tablet rotates among the athletes of one exercise (nextOnStation), so the load it plans for the next lifter is a load of the platform's exercise. Where the board on screen is that exercise's, the load stands alone: "Up next", "Mia Schulz", "107 KG". Where it is not (a Snatch board beside the first Clean & Jerk, or no board yet) the exercise stands in front of the load: "Up next", "Mia Schulz", "Clean & Jerk", "107 KG". A long exercise name ends in an ellipsis at two fifths of the line; the lifter's name gives way before it. Where nobody can name the exercise, the load is left out and the line says who is next and no more.
    • WallPlatformScene takes the exercise's name from the viewer's catalogue, and for a demo exercise, which is in no catalogue, from demoExerciseName (demo-script.ts).
  • On a display near its reader (NearPlatformLine in wall-during.tsx, mounted by leaderboard-view.tsx): the Leaderboard's display in the near profile has no scene and no card. One line, 64 px high, stands over the board: the lifter's initials, "On Platform 1 · Snatch · Attempt 2" (or "Lifting now", with the dot of "now"), the name, "1 rep planned" or "Rep 1 of 2" from 640 px of width, and the load as the line's number. The exercise is always named, because the line stands over every board of the view. It follows the same scenes as the room (useWallStory), so it is empty for the seconds a lift that just came in has the card in the room. The line's room is kept while nobody is named, so the board does not move with every lifter. Before the session's first set the line stands over the waiting state once a lifter is named. A session that does not announce, and one that has ended, has no line and no room for one. It does not say who is up next.
  • During: "Lifting now", with the dot of "now"; "Rep 2 of 5" beside the load; and each rep as a bar with its bar speed, over the same rep of the set before (WallRepSlots). A rep that is still to come is an empty place.
  • Then the lift: the card or the scene of a lift, in the same place.
  • The lifter's place, their previous attempt and the line are there when the board on screen is the board of the platform's exercise. Otherwise the scene names the exercise and shows the lifter and the load. In the hall the board follows the scene's exercise.

A set that arrives late is added quietly. A set the server says was completed more than 30 seconds before it arrived (isLateLiveSet, LATE_SET_MS) is what a tablet delivers after it was offline. It is on the board at once, and it is not news: no scene (useSeenLifts leaves it out), no line, no glow for a change of leader or a personal best, no "Just in" (exercise-pane.tsx). A set without a completedAt counts as just lifted: an app that sends none has no outbox.

The times on screen are the server's. LiveSet.created is the server's completedAt where it gives one, and the device's created otherwise, so every time a view prints for a set, and every order by it, is on one clock.

The demo (demo-platform.ts, pure + tested; fed by the evening's player in demo-evening.ts). The demo's lifts arrive every 1.7 seconds, and a display needs about ten for one lifter from the name to the lift. So the demo announces five attempts of its meet, positions 9, 18, 24, 30 and 35 of DEMO_EVENING_LIFTS (DEMO_ANNOUNCED_LIFTS says what each is: a snatch that is ruled out, the first clean and jerk, two that take the lead of the total, and the last attempt, which wins the meet). A lifter is named when the sixth lift before hers comes in, about ten seconds ahead; the last one when the attempt before hers is in, and the room waits for her. The reps are 1.3 seconds apart, and the announcements take turns on the two tablets. The demo's tablets name nobody as "Up next": in a meet the order follows the loads the lifters ask for and moves until the bar is loaded (the product owner, 2026-10-08). The lifts in between simply arrive, as from a tablet with an older app. A display therefore shows the first two lifts, then five lifters from "On Platform …" through their reps to the lift, and the evening ends on the last one. Nobody is named for an attempt while her attempt before it is still to come. demo-platform.test.ts plays the evening through platformStates, noteAttempts and wallSceneAt and holds that every announced lift is told in three scenes with nothing in between.

Left open.

  • The control says what a display does, not what an athlete agreed to. The sheet an athlete agrees to still names "each set you complete". Decided by the product owner on 2026-10-08: a coach may turn the switch on before the sheet says more; nothing in the form holds a coach back.
  • Who is next is shown before the lift only. Not during it, not in the Live Stream, not on a display near its reader, and not on a page of the hub.
  • Before the first set of a session the Live Stream names nobody. The displays of the Leaderboard and of the Competition view name the lifter (wallOpening): alone in the hall, and in the room beside the waiting state, where that view's room shows a lifter later (the Competition view on the left). The Leaderboard's display near its reader names the lifter in its line over the waiting state. The Live Stream and a coach's page show their waiting state until a set exists.
  • The Live Stream shows no scene. useWallStory and WallPlatformScene are what it would mount, as the Competition view's display does.
  • A platform names its exercise by id only. WallPlatformScene and NearPlatformLine resolve the name from the viewer's catalogue (and from demoExerciseName in the demo). For an exercise that is not in the viewer's catalogue, before its first set brings the name, the scene leaves the exercise out, and "Up next" then leaves its load out too. TODO: let the platform carry the exercise's name on the wire.
  • The display's feed still reads complete. The board read is typed and read for the running sets only, so a display that announces lifts reads the session's sets twice when its stream opens. TODO: read the feed from board (the handoff's item 5); feed-store.ts belongs to another block.
  • A late set no longer takes the room's card from a newer lift of another athlete; within one athlete it still can. The card's athlete is whoever lifted last by the set's time of completion (lastLiftOf in derive-leaderboard.ts, read in exercise-pane.tsx): the newest completedAt, and a set without one stands against the others by its arrival, so a session whose sets carry none behaves as before. arrivalOf itself is unchanged: its counter orders the ranking's tie-break, the attempts, the result and the stream. What is left: deriveAttempt takes an athlete's newest ARRIVED set, so when the late set and the newer lift are the same athlete's, the card shows the late one (without a line); the row kept in view on every page of the board and the "Latest" tag follow the newest arrival (isLatest); the Competition view and the Live Stream pick their newest lift by arrival too. An edited set keeps its completedAt, so an edit no longer brings the card to that athlete. Checked by unit test only (derive-leaderboard.test.ts), not on a display with a real late set.
  • The two drawings of rep bars (RepBars in wall-lift.tsx, private, and WallRepSlots) want to be one shared part.
  • The room's card is as tall as the card of a lift for a session with one rank metric. With second and third metrics the card of a lift has a row more, and what stands under it moves by that row.
  • Not looked at: a real tablet with a sensor (in a browser no rep arrives, see "Checked"), three stations on one tablet, an older server (the 404 is held by a unit test only), and a running set that ends after the server's ten minutes.

Sentences in other sections that this block made out of date (not edited: a block edits only its own section):

  • "Backend contract": the heartbeat, the running-set routes, the board read and the two new events are not listed there.
  • "The device's heartbeat": it also carries platforms.
  • "What a tablet does by itself": sets carry completedAt and sentAt.
  • "The wall after a lift", "Sets that arrive late … cannot be told from fresh ones": they can, see above.
  • "The display as a wall", "Not on the wall yet: … who is on the platform before the lift, reps while they are lifted": both are, behind the switch.
  • "The display on every screen": "A lift's moment is the display's own sighting" still holds, and a late set is no longer announced; the room's card follows the scenes where a session announces lifts; sceneSet is no longer "hall only".

Checked (2026-10-07).

  • Unit tests: presence.test.ts (what a tablet says about its stations, who is next before the set is completed, the running set after each rep and not twice, that it stops for the session whose server answers 404, that a set is ended when another athlete is selected and not when it was completed), api/mappers/live-sessions.test.ts (the running set's body, the time of completion), feed-types.test.ts (a late set, the server's time before the device's, the running set by read and by frame), feed-reducers.test.ts, running-store.test.ts, platform-state.test.ts (the platform worked out from device reads, a silent device, a finished set, the rules, what a good lift would do), wall-scene.test.ts (the scenes with announced attempts; the 26 tests from before pass unchanged), and demo-platform.test.ts.
  • Against backdev, tests/live/offline/85-live-before-during: through the clients' own mappers, api functions and parsers. A tablet says who is on its station with which load and who is next, and a display reads it off the device list and off the pushed row. The set is seen with no rep, with one and with two, by push and on the board read. The completed set takes the running one's place and carries a completedAt 1 ms before its arrival. A set held back for 90 seconds comes back 90 001 ms late and is known as late. A discarded running set ends with running_ended, and a device in no session is answered not-in-session.
  • The real tracking app in a headless Chrome against backdev, tests/live/offline/86-live-platform-from-the-app (runs only with ENODE_TRACKING_URL, like test 51): with an exercise open for two athletes, the session's device row named the first with the set's id, load and planned reps, and the second as next, before anything was completed; the set was a running set of the session with no reps; the set completed by hand arrived under the same id with a completedAt 87 ms before its arrival, and the running set was gone; the station then named the next set. A browser has no sensor, so no rep of a running set left the app.
  • A display in a headless Chrome against backdev, tests/live/offline/87-display-before-during (runs only with ENODE_DISPLAY_BEFORE=1 and a portal on :3001, like test 45): a real session whose switch is on, and a tablet driven through the API. Room: the card read "On Platform 1 · Attempt 2 · Elif Kaya · 112.5 KG · 3 reps planned · A good lift takes the lead · Previous attempt 100 KG"; each of two reps appeared as a bar with its speed and "Rep 1 of 3", "Rep 2 of 3"; the finished set took the card with "Takes the lead". A set held back for 90 seconds went to the top of the board, no row wore "Just in", and the card stayed on the lift it was talking about; when that lift's time was up the card fell back to the late set and showed no line for it. Hall: the same three moments for a second lifter. A session whose switch is off showed the card of the last lift and nothing else, whatever its tablet sent.
  • The contract tests 15, 16, 25, 82 and 83 pass with the new app code (19 tests).
  • By eye in headless Chrome at 1600 × 900, the demo on a display, in dark and light, room and hall: the scene before a lift, the reps arriving one by one, then the lift with its line. The pictures are in /private/tmp/lh-shots/x1/. Measured there: the first lifter was named 12.7 seconds after Go live, their first rep came 3.4 seconds later, and their lift 2.5 seconds after that.

Good lift, no lift — rules.ts, rule-attempt.ts, ruling-control.tsx, ruling-choice.tsx, live-ruling-prompt.tsx​

A judge's answer to an attempt: good lift, or no lift. This is block X2 of the work split. The answer is given on the tablet at the platform or by the coach in the live view, it is stored with the set, and every screen of the session follows it.

The ruling belongs to the attempt. It is a field of the live set, ruling, with the values good and noLift; a set nobody ruled has no such field, which is every set of a training (LiveSet.ruling in feed-types.ts). toLiveSet maps it from the wire, and a value this client does not know reads as "not ruled" (liveRulingOf). A person gives it; nothing in the clients works one out.

What a ruling does (packages/core/src/live-session/rules.ts).

FunctionWhat it answers
rulingOf(set)The set's ruling, or null.
liftsAreRuled(rules)Whether the session's rules say "a lift counts only once a judge rules it good" (lift: "ruled").
attemptScores(set, rules)Whether the attempt gives its athlete a result.
attemptVerdict(set, rules)What a screen says: good, noLift, awaiting, or null where there is nothing to say.
  • A no-lift never scores, with rules or without: attemptScores returns false for it before it looks at the rules. The ranking without rules calls attemptScores(set, null), so a training's board leaves it out too.
  • Where lifts are ruled, an attempt scores once it is ruled good. Until then it waits (awaiting): it is on the board without a result.
  • Where lifts are not ruled, an attempt nobody ruled scores as before and has no verdict. One that was ruled all the same shows its ruling.
  • An attempt that does not score still uses up an attempt and keeps its number (see "The rules of a session").

The two ways a ruling is sent.

WhoFunctionRequest
The tablet that recorded the liftruleLiveSet(session, set, ruling) in producer.tsThe set's update (or its create, when the server never got one) with ruling added, through the live outbox
Whoever runs the sessionruleLiveSessionSet(liveSetID, ruling) in packages/core/src/api/live-sessions.tsPUT /workout_live_session_sets/<id>/ruling with good, noLift or notRuled
  • ruleLiveSessionSet takes the LIVE set's own id, not the tracking app's set id. The server answers the session's owner and users with access to the owner; anyone else gets 404. notRuled takes a ruling back. The server pushes the changed set to every screen as an updated frame.
  • The judge's answer is sent once. ruleLiveSet puts the ruling on one update of the set. A later edit of the set on the tablet carries no ruling, which leaves the server's ruling as it is, also one the coach corrected from the live view in between.
  • An answer given without a connection goes out later, and one given before the set itself was delivered goes out with the set: both ride the outbox.

On the tablet (apps/tracking/src/app/workouts/today/live-ruling-prompt.tsx; what the device knows of its session's rules is in packages/core/src/live-session/own-session-rules.ts since block T2). After a completed set the training screen shows a card, "Rule this attempt", with the athlete's name, the load, and the two answers (RulingChoice, size large). It is a card in the stack above the load bar and not a dialog: nothing waits for it, and the controls for the next athlete stay free.

  • The tablet asks only when it can read the session's rules. The rules are in the session's config, and the device's own session row does not carry it. So the tablet reads the session itself (getLiveSession). Today only a tablet signed in as the session's OWNER can do that. A device under another login, such as a coach's own login or an athlete's own phone, is answered 404.
  • A refused device asks the code it joined with. The look-up by join code returns the config to every device. A device that joins by code keeps the session's id, the code and that config (rememberJoinedByCode in join-code.ts, localStorage enode.live.joinedByCode.v1, so a restart keeps it). When the read of the session is refused, the tablet looks the kept code up again (configByKeptCode) and takes the rules from the answer, so it follows a change of the rules like the owner's tablet does. When the look-up cannot be made (no connection, "too many tries", a code that no longer finds this session) the config from the join, or from the last look-up that worked, stands. The entry is dropped when the device leaves, when the session ends, and when the device is in another session (keepJoinedByCodeOnlyFor, called by live-session-row.tsx).
  • A refused device without a code is never asked: one the coach added in the portal under another login than the owner's. Its attempts stay "not ruled", and the coach rules them from the live view.
  • When the rules are read: when the training screen opens, when the device's session changes, when the app comes back to the front, and once after each completed set, because the server says nothing when a coach changes the rules. Two reads of one session are at least 5 seconds apart. What was read is kept in enode.live.deviceSessionRules (localStorage), so a tablet that restarts without a connection still asks.
  • Which sets are asked about: every set completed on this station while the device is joined and sending — the session is live (not in the lobby), sharing is not waiting for consent; the question about earlier sets may still be open, a set completed after the join is an attempt all the same — whose lifts the rules rule, and that the boards count (a work set where only work sets count, an exercise of the rules, an athlete who is shown). Sets that were complete when the training opened are not armed.
  • The ruling is in the set's row (since 2026-10-12 afternoon; before that a floating card asked once). Under every completed set that is an attempt of the session, SetRow (set-list.tsx) carries "Good lift · No lift" and, once one stands, "Undo ruling" — the shared RulingChoice of packages/ui/src/live/. The judge rules right after the lift or any time later from the list, and changes a ruling the same way; "Undo ruling" sends notRuled, which takes the ruling back on the server. The controls come from useLiveSetRulingControls (live-set-ruling.ts), one lookup per training, which offers them only while the device is sending (live, not in the lobby, consent given) and only for a set the rules rule.
  • What counts as an attempt (ruling-queue.ts in core, localStorage enode.live.rulingQueue.v1, one list per device, belonging to one live session): every set completed on this station while the device was joined and sending, and every earlier set sent after all ("Send the earlier sets too?" — sendEarlierSets arms them). Sets that were complete when the training opened are not attempts. The list is kept across a restart. An attempt stays — ruled or not — so its row can show and change its ruling; it leaves only when its set is gone from the training or the rules do not rule it (isAttemptNoMore in ruled-attempt.ts). The rules count from the moment the device has learned its session's config — which includes learning that the session has no rules, or that this login cannot read them: the earlier sets a device sends are armed whatever the rules say, and in a session without a judge they are dropped again, so their rows do not read "Not ruled yet" once the device is out of the session. settled says the server took the answer that stands (the outbox holds nothing for the set any more); an answer the server refused stays unsettled until the set is tried again or discarded on the live status card.
  • Nothing floats: useLiveRulingAttempts (live-ruling-prompt.tsx) only keeps the attempts in step with the training — armed on completion, dropped with their set, settled with the outbox. A set nobody ruled carries "Not ruled yet" by its title until someone does; each row carries its set id in data-set-id.

In the coach's live view (apps/portal/src/app/dashboard/live/). RulingControl (ruling-control.tsx) is "Good lift · No lift · Undo ruling" for one attempt. It is offered in a session whose lifts are ruled, and on any attempt that carries a ruling, so that one can be taken back wherever it shows (useOffersRuling). In a training it renders nothing.

WhereWhat
Competition view, the attempt's panel (competition-view.tsx)The control for the attempt in question, in the place of the outcome's chip. A display shows the chip only.
Attempt inspector (attempt-detail-sheet.tsx)A part "Ruling" with the control and one line on what the verdict does (verdictConsequence): "Counts on the board.", "Not ranked and not announced. It still used up an attempt.", "Waits for its ruling, without a place on the board." The header wears the verdict's chip, and a no-lift keeps its load, struck through.
Athlete drawer (SessionAttemptsSection in athlete-drawer-sections.tsx)Above the tabs, "In this session": the athlete's attempts on the exercise in the order they were lifted, each with its value and the control (size small).
  • A choice shows at once (ruleAttempt in rule-attempt.ts): the set in the feed store takes the new ruling before the server has answered, so the board moves with the tap. If the server refuses, the set gets back the ruling it had, applied to the set as the feed holds it then, and the refusal is presented. While a ruling is on its way the control is disabled.
  • A sheet shows the ruling the set carries now, not the one from when the sheet was opened (useCurrentSet).
  • A set of the demo has no server: its ruling changes in the feed store only.
  • The inspector names no place for an attempt that gives no result (attempt-detail-sheet.tsx). Beside a no-lift, and beside a lift that waits for its ruling, the place chip says whose place it is ("The athlete is #6 of 6 in Clean & Jerk"), and the gap to the leader is left out: it is the gap of the athlete's best lift and would read as the gap of the number that is struck through.
  • Every number in the inspector stands in the text colour. The values strip and the charts' corner values were written in the metric colours; cyan (force, acceleration) stood at 1.8 to 1 on a light surface. The strip is asked for figures="text" (TechniqueValuesHeader, packages/ui/src/charts/technique-values-header.tsx): the figure in the text colour, the metric's colour as a tick in front of the label. The charts' headers are repainted from outside with the Stream's classes (CHART_CORNER_VALUES_LOOK in stream-detail.tsx). Measured in Chrome on 2026-10-08: figures 16.7 to 1 in both themes, units and arrows 7.0 to 1 (light) and 8.2 to 1 (dark). The Technique tabs of the portal and the tracking app still paint the strip in the metric colours.

The one control (packages/ui/src/live/ruling-choice.tsx). RulingChoice is two round buttons with the word and the shape of the chip: a tick for a good lift, a cross for no lift. Before an answer both are plain. The answer that stands is filled with its tone and the other steps back. "Undo ruling" ("Take back" until 12 Oct 2026) shows only where the host passes onTakeBack, and keeps its place while there is nothing to take back. Sizes: large on the tablet, medium in a sheet, small in a row.

Ruled-out reps travel in a second list. This is about a single rep the tablet marked invalid, not about the judge's ruling of the attempt. The tablet sends a set's counted reps in workoutLiveSessionReps, as before, and the reps that were ruled out in workoutLiveSessionRuledOutReps (packages/core/src/api/mappers/live-sessions.ts). The second list is left out when it would be empty, which is also how a rep that was ruled in again leaves it. A server from before the list ignores it. In the feed they are LiveSet.ruledOutReps, each with valid: false; LiveSet.reps holds counted reps only, so nothing that counts or ranks by reps has to filter.

  • They are shown muted in the attempt inspector: the inspector decodes both lists together, and RepPills (rep-pills.tsx) draws a ruled-out rep with its own number, muted and struck through. It can still be picked, and the inspector then says "Rep 3 was ruled out. It is in none of this attempt's numbers."
  • No other view lists them.

The lift a display is talking about (wall-lift.tsx). The three shapes of a lift on a display take the attempt's verdict (attemptVerdict) and say it with the verdict's chip (LiveStateChip, size display).

ShapeWhere the chip standsA no-lift's number
WallLiftScene (hall)In the place of the one line, or in front of it for a good liftStruck through and muted
WallLiftCard (room)At the end of the number's rowStruck through and muted
WallLiftStrip (room, several exercises)In front of the numberStruck through and muted
  • Only a lift that counts is celebrated. A no-lift, and a lift that waits for its ruling in a session whose lifts are ruled, show no insight line, and the scene shows the place without "3 → 1". A training's lift has no verdict and is drawn as before.
  • A ruling that arrives while the scene is up changes it in place. The scene is keyed by the set and drawn from the set as the feed holds it now: "Not ruled yet" becomes "No lift" and the number is struck, without the scene coming in a second time. The scene's root carries the verdict as data-verdict.
  • The strike is a drawn line, not line-through (WallNumber). It lies at half the height of the number's own box, where the middle of the digits is, and it is 0.06 em thick, so it scales with the number.
  • The Leaderboard's display (exercise-pane.tsx), the Stream's hall scene (wall-stream.tsx) and the Competition's hall scene (wall-competition.tsx) pass the verdict. The Stream's hall scene leaves out "Good lift" where the lift has a line of its own (decided by the product owner on 2026-10-08): the line is the news. The Competition's takes it from attemptOutcome, so a work set without a result is a no-lift there also in a training nobody rules, and it passes what was measured as the number to strike.
  • "5 → 2" names a place only where there was one. The Competition's hall scene takes the place before from standingPlaceBefore (derive-competition.ts, tested): the standings without the athlete's newest attempt, and null where the athlete had no result then. A row's previousRank is a rank also for a row without a result. TODO: the Leaderboard's hall scene (exercise-pane.tsx) still passes previousRank.

In the result of an ended session a no-lift earns no place and no best, and an athlete with nothing but no-lifts stands last, without a place, under the "No lift" mark — see "A no-lift in a result" in "The result of an ended session".

The demo (demo-rulings.ts). Every attempt of the demo's meet is ruled. A good lift arrives with its ruling. Three are no-lifts (DEMO_NO_LIFTS): they arrive without a ruling and are ruled out 0.3 seconds later, before the next attempt is in — a moment, because the board's card moves on with that next attempt (1.7 s after the no-lift) and "NO LIFT" has only what is left of the interval: about 1.3 s now, about half a second when the judge took 1.1 s. TODO: longer needs a slower evening; a wait after each no-lift moves the moments a display names its lifters (DEMO_ANNOUNCED_LIFTS) and takes the loop over two minutes. The last attempt arrives without a ruling too and is ruled good 1.5 seconds later. All three views and the result run by DEMO_MEET_RULES (see "First screen and demo"), so a lift that waits for its ruling has no result yet in any of them.

Checked (2026-10-07).

  • Unit tests, run when this was written, all passing: rules.test.ts, ruling-ranking.test.ts, producer.test.ts, api/mappers/live-sessions.test.ts, offline/live-queue.test.ts and live-session/join-code-kept.test.ts (added 2026-10-08) in packages/core/src; rule-attempt.test.ts, ruling-control.test.ts and demo-rulings.test.ts in the portal's live folder.
  • Live tests on backdev (tests/live/offline/). What each holds the code to:
    • 90-live-ruling-boards: a ruling given with ruleAttempt reaches a reader by push within a second and by read; an attempt nobody ruled waits without a result; a no-lift is not ranked, under the rules and without them; taking a ruling back restores the attempt; a stranger's ruling is refused and the attempt is what it was.
    • 91-live-ruling-tablet-rules: the owner's tablet reads the session's rules and a change of them; a device under another login is refused with 404; the look-up by join code returns the config to both.
    • 94-live-ruling-other-login: a child coach of the owner, signed in on a tablet, joins by code and is refused the session with 404; the kept code says that lifts are ruled, and says so no longer after the owner turned the rule off; ten look-ups of the code in a row are all answered (no "too many tries" for a right code); after leaving nothing is known. Passed on backdev on 2026-10-08, 4 of 4.
    • 92-live-ruling-tablet (runs only with ENODE_TRACKING_URL): the real tracking app asks after a set in a ruled session, the answer is the set's ruling within seconds, the card covers none of the controls for the next athlete, a session without the rule asks nothing, and a rep ruled out on the tablet arrives in the second list.
    • 93-live-ruling-display (runs only with ENODE_RULING_DISPLAY=1): the coach rules on the board and a display follows.
  • A ruling given in a tab that is not in front shows there. The feed store told its views of a change once per animation frame, and a browser gives no frame to a tab that is behind another one: the coach's page, with a display open in front of it, took the ruling into the store and never drew it. The store now tells its views after 60 ms where no frame comes (scheduleNotify in feed-store.ts, unit test "telling the views of a change" in feed-store.test.ts). Live test 93-live-ruling-display passed twice in a row on backdev on 2026-10-07, with 84 and 90.
  • Live test 93 failed on 2026-10-08 and the test was wrong. After "Take back" it waited for "Not ruled yet" on the display, which the other athlete's row says all the while, so it went on at once and read the coach's board before the board (the tab behind) had drawn the answer it already held. The test now also waits until "No lift" is gone from the display, and gives the board up to five seconds to show an answer. Passed on backdev on 2026-10-08 (display: 266, 186 and 334 ms).
  • TODO: the results of live tests 90, 91 and 92 are not recorded here. They were not run again when this section was written.

No place without a result. In the Competition view an athlete whose attempts on the lift all wait for their ruling or did not count has no result, and so no place: standingPlace (derive-competition.ts) gives null for their row of the standings. The attempt's panel then shows no place number, on the coach's page and on the display — the verdict's chip beside the attempt says what is the case — and in the standings the athlete is listed below everyone with a result, without a number (WallRow takes unplaced for that, and such a row is never the leader's). An athlete with an earlier good lift keeps the place that lift earned. The Leaderboard is not changed by this: it numbers every row. On the display the Competition's rows say why as the Leaderboard's do (WallCompetition passes rowVerdicts of the lift's sets under the session's rules to WallRow): "No lift" with the struck load, or "Not ruled yet" and no number; a row without a number and without a verdict draws a small muted dash.

The Leaderboard says why (rowVerdicts and VerdictTag in board-parts.tsx, drawn by exercise-pane.tsx and wall-board.tsx). A row speaks about its athlete's last attempt on the exercise, in the order the sets were lifted, and only when that attempt gave no result:

  • Ruled out: "No lift", in the error tone with the cross. Where the athlete has no result besides, the row's number is the one that was ruled out, muted and struck through, as in the Stream; otherwise the earlier result stays.
  • Waiting, only where the session's lifts are ruled: "Not ruled yet", muted with the clock. Under rules only the attempts the rules count are looked at, so a warm-up that is no attempt never waits.
  • The tag is the verdict chip's word and mark without its surface, because a row carries one filled mark at most. It stands in the place of "Just in" and of "PB": the verdict is the row's news, and a lift that does not count is no best. A good lift gets no tag; its number is there.
  • The coach's card above the table wears the verdict's filled chip beside the place (good lift, no lift, not ruled yet), and a no-lift's number is muted and struck through. The display's card and scene are drawn in wall-lift.tsx.
  • The coach's table prints the numbers the display's rows print. Its metric columns read the ranked result of each metric (columnValues in board-parts.tsx, over deriveLeaderboard with the session's rules), so a lift that waits for its ruling or was ruled out is in no column: the row says "Not ruled yet" beside the athlete's last good lift. A session without rules reads bestValueByUser as before.
  • A training nobody rules has no verdict anywhere and looks as before. Unit test: board-parts.test.ts.

Not there.

  • The Leaderboard's ruling was not seen in a browser. It is drawn (see "The Leaderboard says why" above) and unit-tested; the test server was down when it was written (2026-10-08). TODO: look at a no-lift row with and without an earlier result, a waiting row in a session whose lifts are ruled, and the card's chip, on the coach's page and on a display in room and hall, dark and light.
  • The Stream shows a ruling and offers none. stream-view.tsx and stream-detail.tsx draw the verdict's chip and strike a no-lift's load; the control is in the athlete's drawer. TODO: this was not seen in a browser when this section was written, and the hand-over for this section named the Stream as not drawing a ruling yet. Confirm on a real session.
  • A device under another login that was added in the portal is never asked. It typed no code, so it has none to look up, and its login may not read the session. A device under another login that joined by code is asked (see "On the tablet"). TODO: this was held by unit tests and by live test 94-live-ruling-other-login on the API; the card itself was not seen in the tracking app under a second login.
  • No preset asks for ruled lifts (rule-presets.ts). The clause is set by hand under "More rules".

The line knows the past — athlete-past.ts, use-athlete-past.ts​

Rows 1 and 6 of the line (see "The wall after a lift") need what an athlete did before the session on the wall, which the live feed does not carry. A display reads it (block W6 of the work split in LIVE_HUB_CONCEPT.html). The coach's own (windowed) views show no line and read nothing.

Two things make a past, and they are read apart (use-athlete-past.ts; since 13 Oct 2026, re-audit finding 7 — before, three reads per athlete were queued when a display opened, fourteen athletes were fourteen and more requests after the board stood):

  1. The bests, for everyone, in one request per session: GET /workout_live_sessions/:id/best_before (getLiveSessionBestBefore in api/live-sessions.ts, through the session's read seam — a paired display asks /live_displays/best_before with its token). The answer holds every athlete and exercise with a set in the session, in base units, as the records stood when the session started. useAthletePasts(sessionID, definitionID, userIDs) asks once per session and page, whoever mounts first; a pair the answer did not hold (an athlete whose first lift came later) is asked for alone, once, with ?userID=…&exerciseDefinitionID=…. records: [] is an answer: nothing to beat.
  2. The last sessions, for one athlete: useAthleteLastTime(definitionID, userID) — the athlete the line is about, not everyone on the board. Two reads under a login, both sharing the athlete drawer's caches: GET /analysis/relevant_exercises/:userID (the athlete's own exercise for the set's definition) and GET /workout_sessions/exercise/:id?count=5. An athlete who never trained the exercise has no exercise of their own; the second read is then skipped. Not asked where nobody is signed in.
  • A display that opens on a running session of fourteen athletes sends one request for the bests and at most two for the lifter on show, where it sent fourteen relevant_exercises reads one after the other before.
  • A paired display has the personal-best line now (and can rank a board scored in percent of the own best): the bests come through its token. It has no "against last time" — a display has no route for an athlete's sessions.
  • "Before" is before the session started, as the server cuts it. The records come without a previous value and count as from before any cut the line makes (pastRecordsOfBestBefore in athlete-past.ts). The result of an ended session asks best_before too (read-result-bests.ts), under a login and on a paired display, so a wall and a result mean the same by "before".
  • A server without best_before (404 under a login) is read the way it was before: per athlete, one after the other — the athlete's own exercise, POST /history/v2/records for everyone still waiting, the last sessions.
  • A read that fails or is refused leaves the pair without a past. That means no line; it is reported to the error seam and never reaches the error presenter. The session's bests are asked for again by the next view that asks after 30 seconds; a single pair is not tried again until the page is loaded again.
  • Demo athletes get a made-up past from demoAthletePast (demo-script.ts); nothing is asked of the server for them.

What "personal best" means here. The record the server keeps per athlete, exercise and kind, compared with the number the board ranks by:

The board ranks byRecord usedIts meaning on the server
loadingMassabsoluteLoadHeaviest load moved in a single work set
powerPeakpeakPowerHighest peak power of a single rep
jumpHeightjumpHeightHighest jump
anything elsenoneNo personal-best line. Bar speed has a record only at a load (velocityAtLoad), which does not compare with one set's number.
  • How far back: as far as the server's records reach — every uploaded session, not only the five read for "last time". TODO: whether the records of old sessions exist on production (a backfill job fills them) is question 15 of live-hub-backend-handoff-l3.md, which also asks the server to send this value itself (item 4).
  • A lift is a personal best when it is a work set above the record from before today AND above every earlier set of today. The gain in the line is the distance to the higher of the two.
  • "Before today" ends at the start of the day (this screen's clock) of the athlete's first set of the exercise on the board. The server sets a record a few seconds after a session is UPLOADED, not with a live set. So during a training the record is still the old one; once the athlete has finished and uploaded, it is today's, and the value it replaced (previousValue) is the one from before. Both cases are handled (bestBefore in athlete-past.ts).
  • Units: mass records arrive in the requester's unit, named beside the value; pounds are turned back into kilograms. An unset previousValue is absent or the −99999999 sentinel.

What "last time" means here. The athlete's most recent session before today, and in it the best work set at exactly the same load, on the metric the board ranks by (lastTimeAt). If that session had no set at this load there is no line — the line does not reach further back. A past set carries its own values and no reps, so a metric only reps carry has no line; and on a board that ranks by the load the two are equal by definition.

On the board. A personal best is the one loud thing: its line stands on acid yellow, the athlete's row wears a "PB" tag for as long as that lift is their latest, and the row glows once like a new leader's. The glow is for a lift that came in while the display was open — a personal best already on the board when it opens is tagged, not replayed. The competition display shows the line; it has no rows to tag.

In files this block does not own (not changed): the three reads are made from the portal with apiRequest; an API module for the records endpoint belongs in packages/core/src/api/, with its types, once the blocks are merged.

Checked (2026-10-07): athlete-past.test.ts, lift-insight.test.ts (each of the six lines and their order), lift-insight-line.test.ts, demo-script.test.ts (some demo athletes set a personal best, some do not). Against backdev, with a disposable coach and athlete whose two earlier sessions (60 kg, then 70 kg at 0.52 m/s) were uploaded through the app's own upload path: a display opened on a live set of 72.5 kg showed "Personal best · 2.5 KG more than ever before" and the PB tag without a glow; a set of 75 kg sent while it was open showed the same line against 72.5 kg, with the glow; the display made exactly the three reads above and none for the second set; a session ranked by mean velocity showed "0.05 M/S faster than on Wed 30 Sept at 70 KG" for a set at 70 kg and 0.57 m/s. In the demo the line, the tag and the glow appear in dark and light.

One look — the shared parts in packages/ui/src/live/​

The tablet, the portal and the gym display say the same state with the same word, colour and shape. The parts that do so live in @enode/ui, each with a Storybook story per state (UI/Live/*, shown in the light and the dark theme at once) and all of them in the tracking app's dev gallery at /debug/connection ("Live parts"). They are presentational: what is true is worked out where a session is read, a part only says it.

A screen takes a part in its own file. The list "Who takes which part" names the part for each place.

What moves, and what it costs (13 Oct 2026). The one thing that moves without a cause is the live dot's pulse. It is live-pulse (design-system.css), not Tailwind's animate-pulse: the same breath, written as thirty breaths in one iteration of a minute. A browser recalculates the page's styles a few times whenever an animation's iteration ends, so a two-second loop cost a board that is open for hours some 5 recalculations a second for its two dots; this costs a handful a minute.

The exercise's figure in a board's head loops, as an exercise's figure does everywhere else in the portal (Karola, 13 Oct 2026). For some hours that day it stood still until a pointer came to it (LottieCircle with rests), because lottie's frame loop runs 60 times a second for as long as the figure is mounted, and that — not the dots — is what an open board spends: measured on an idle board, 15 s, dark and light alike, 900 style recalculations (60 a second) and about 1 s of main-thread work with the figure looping, against 1 recalculation and 0.04 s with the figure at rest. The figures in the lists that open over a board (the exercise switcher, the Stream's filter) and the Competition view's lift figure still rest. Everything stands still under "reduce motion" except the head's figure, and nothing runs in a hidden tab.

The look — look.tsx​

Since 2026-10-07 every screen of the Live Hub is drawn from one set of recipes (@enode/ui/live/look), so the hub, the lobby, the boards, the result and the gym display read as one thing, and a change of the look is a change of that file. Five rules stand behind them:

  1. One hero per region. In a card, a row or a scene exactly one thing is the largest: the number of a lift, the code of a lobby. Everything else steps down by at least a size.
  2. Round means it can be pressed. Buttons, tabs, choices and avatars are round. What only informs has corners: a panel, a row, a chip, a place.
  3. A container is drawn once. A panel has one line around it and never holds a second panel; groups inside it are parted by a rule. No shadow.
  4. A number is a figure, a label is small capitals. There is no third style for either.
  5. Colour is meaning, at most one filled mark per row. A second state of a row is a word with its mark, without a surface.
RecipeIs
LOOK.panelA container: the card of a lift, a list with its title, a form's group
LOOK.rowOne of several equals in a list: a row of a board, a device, a lift
LOOK.ruleThe line between two groups of a panel
LOOK.eyebrow, EyebrowThe label over a group or a value
LOOK.caption, LOOK.nameA second line; a name
LOOK.wallEyebrow, LOOK.wallCaptionThe label and the second line on a gym display, at the wall's label size
FigureA number with its unit. On a page hero, large, medium, small; on a display wallLift, wallRow, wallLine. minChars keeps the room of a column's longest number, so figures line up
StatA value under its label, inside a <dl>. caption is one quiet line under the value ("vs 82.5 kg last time", "3 of 8 athletes"). At a wall size (wallLift, wallRow, wallLine) its label and caption take the wall's label size and follow the display's profile
PanelA LOOK.panel with a title and an aside

A figure that stands in a column (medium, small, wallRow, wallLine) has tabular digits. One that stands alone (hero, large, wallLift) has the font's own: tabular digits leave a gap around every 1, and at that size "110" falls apart.

What a colour means — tones.ts​

A colour is picked by its meaning (LIVE_TONES), never by its name. Every tone is a surface and the text on it; the surfaces are opaque, so a chip reads the same on a page, on a card and on a row under a pointer.

ToneMeansShape that goes with itText on surface
nowThe session is live; the lift that just came in. Nothing elsea dotred-orange mixed toward the text colour, on a red-orange tint
bestAn athlete beat their own best. Nothing elsea starblack on acid yellow
leadThe leader and place 1, the first step of a podium. The one tone that is an accent and no meaning: the green, or the session's own coloura trophy, a placefeedback-success on its surface, or the session's pair (--live-lead on --live-lead-surface)
goodReady, delivered, a good lifta tickfeedback-success on its surface
attentionNeeds a look: no sensor, a silent device, trying again, sets waitinga struck cloud, a devicefeedback-warning on its surface
failedDid not work: a no-lifta crossthe error red mixed toward the text colour, on feedback-error-surface
offNot now: ended, an older app, not ruled yet—muted text on surface-base, outlined
neutral, quietNo meaning: the lobby, a plain line, a place other than the first—default or muted text on surface-base-muted

Two deliberate choices:

  • The board's green is feedback-success, not foreground-platinum-green. In the dark theme the base platinum green reaches 2.7 to 1 on a card — the "Leader" tag, "Last lift" and the lobby's lit marks on a display. feedback-success reaches 7 to 1 on its own surface and 8.6 to 1 on a card.
  • Red-orange and the error red are mixed toward the theme's text colour for text (65 % and 85 % of the colour). Unmixed, red-orange text on its own tint is 2.8 to 1 in the light theme and the error red 4.25 to 1. The dot of "now" stays pure red-orange.

The parts​

PartFileSays
LiveStateChiplive-chip.tsxA session: lobby, live, ended. This device or screen: paused (with the sets that wait), retrying (with the time the connection was lost). A device: deviceReady, deviceNoSensor, deviceSilent, deviceOlderApp. A lift: goodLift, noLift, notRuled. liveChipLabel gives the same words as text
LiveRowTaglive-chip.tsxThe tags beside a name: leader (green, trophy), personalBest (acid yellow, star), justIn (red-orange, dot). bare draws the word and its mark without a surface: the second state of a row. A board does not tag its leader: the green place and the green edge of the row say it
LiveChiplive-chip.tsxThe base: a tone, a shape and a word, for a mark the two above do not know
JoinCodejoin-code.tsxThe code as two groups of three in the same letters. inline in a sentence, boxed beside a title, display in a display's top line, hero as large as its container allows and never cut. JOIN_CODE_LETTERS is the same type for the field a code is typed into
PlaceBadgeplace-badge.tsxA place. A green badge for 1; every other place is its number and nothing else
LiftLinelift-line.tsxThe one line of a lift: personalBest on acid yellow with a star, lead on green with a trophy, plain otherwise (with an optional mark)
HealthLinehealth-line.tsxThis screen first, then the devices: connected, screenOffline, deviceSilent. Form page always speaks; form wall is empty while all is well
LiveGlowlive-glow.tsxThe glow of a row with news: lead in green, personalBest in acid yellow

Sizes: small (a row of the portal or the tracking app), medium (beside a title), and display, which is sized from the table below.

The sizes of a display — wall-type.ts​

Text on a gym display is a share of the screen's height, so it holds at 720p, 1080p and 4K. There are five sizes; a file that draws on a display takes its type from WALL_TEXT and sets no font size of its own.

Role (WallTextRole)RoomHall
liftNumber — the number of a lift8 %14 %
rowNumber — a number in a row6 %8 %
rowName — a name in a row, the code in the top line3.6 %6 %
liftLine — the line of a lift3.2 %4.5 %
label — a second line, a label, a tag, a state2.2 %3 %

The element a display is drawn in sets the sizes once: style={wallTypeVars(profile, canvasHeight)}, where canvasHeight is the height of the canvas that is zoomed to the screen (810 for Room). Everything below it follows, including every part at size="display". Where nothing has set them, the classes fall back to Room on a canvas 810 high. A display near its reader (the Near profile) is not a wall: it keeps the app's type styles and has no row here.

Movement​

  • The glow is the live-glow utility in packages/ui/src/styles/design-system.css: a wash and a ring in the colour of the news, full for two seconds and gone after three, once. LiveGlow plays when it is mounted; a new key plays it again. It replaces the borrowed flash-positive keyframe, which is mostly gone after a second and a half and is green also for a personal best.
  • The live dot pulses in LiveStateChip for live only. The dot of justIn stands still.
  • Reduce motion: with the system setting on, the glow does not run (the tag is the news) and the dot stands still.

A time of day is written by the browser​

retrying and screenOffline name a time ("since 18:42"). A server would write it in its own locale and time zone, so useClockTime (clock-time.ts) returns nothing on the server and until the page has hydrated: the first render names the state without a time and the browser adds it.

What is measured​

  • tones.test.ts: every tone's text on its surface, and on a page, a card and a drawer where the tone may stand alone, in the light and the dark theme, at 4.5 to 1 or better (the bar for small text; a display asks for 3 to 1). The colours are read from design-system.css and from the classes themselves. The lowest pair is attention in the light theme at 4.56 to 1. The test also fails when a part of the folder uses a colour class that is not measured.
  • live-parts.test.tsx: every state has a word of its own and a shape, so no state is told by colour alone; only live moves; a glow lasts three seconds, plays once and does not run under reduce motion; a code is two groups of three.
  • wall-type.test.ts: five sizes per profile, none under the profile's floor (2 % in a room, 3 % in a hall), and the fallbacks in the classes equal the table.
  • In a browser (Storybook, 2026-10-07): 98 rendered texts of the parts measured from their computed colours, none under 4.5 to 1; with reduce motion emulated no animation runs on a display's parts.

Who takes which part​

Where it is drawn todayTakes
present-mode.tsx — SessionMark, the boxed code, the frameLiveStateChip and JoinCode at size="display"; wallTypeVars on the zoomed element, WALL_TEXT for the title and the rule
board-parts.tsx — LeaderTag, PersonalBestTag, LatestTag, RankMovementLiveRowTag; the arrows' colours from LIVE_TONES.good.text and LIVE_TONES.failed.text
wall-board.tsx, exercise-pane.tsx — the place box, the glow, "Last lift"PlaceBadge, LiveGlow (keyed as the glow is today), LIVE_TONES.good.text, WALL_TEXT
lift-insight-line.tsxLiftLine, with its glyphs as the mark of a plain line
wall-lobby.tsx — the QR code, the code, the steps, a device's stateJoinQr; JoinCode hero; Figure wallRow (hall: wallLine) for a step's number; LiveStateChip deviceReady, deviceNoSensor, deviceSilent and LiveChip quiet ("Not ready yet") at display; LOOK.row
lobby-view.tsx — the code, a device's stateJoinCode hero; LiveStateChip deviceReady, deviceNoSensor, deviceSilent and LiveChip quiet ("Not ready yet"); LOOK.panel, LOOK.row, Eyebrow
live-health-line.tsxHealthLine, from its own reading of the stream and the devices
live-hub.tsx, live-view.tsx — a session's state and codeLiveStateChip lobby, live, ended (medium under a page's title); JoinCode boxed; LOOK.panel, LOOK.name, LOOK.caption, Eyebrow
session-form.tsx, rules-editor.tsx, shown-athletes.tsx (drawn by setup-page.tsx and session-editor-page.tsx) — a form's groups and rowsSettingsGroup, SettingRow, ValueButton (@enode/ui/settings/settings-rows) and SelectableCard in its row layout (@enode/ui/selectable-card) — the portal's shared form parts, see docs/components.md: LOOK.panel, LOOK.name, LOOK.caption, Eyebrow
device-picker-list.tsx — a device with an older appLiveStateChip deviceOlderApp; LOOK.row; LIVE_TONES.attention.text for "In another live session"
session-form.tsx — the code in the editor's Devices groupJoinCode boxed
result-view.tsx, result-parts.tsx, wall-result.tsx — places, the PB tagPlaceBadge, LiveRowTag. Taken (block W14); the display's list uses large and medium, because the result on a display keeps its own type
competition-view.tsx, a ruling (block X2)LiveRowTag; LiveStateChip goodLift, noLift, notRuled
Tracking app: live-status-button.tsx, live-session-row.tsx, live-tab.tsxLiveStateChip live, lobby, paused; JOIN_CODE_LETTERS on the code's field; PlaceBadge small. Taken in on 2026-10-07 (block W9): the status card, both sheets of the sidebar's row, the code's field and the Live tab's places. The round header button keeps the header's own look

In the light theme the green of the design system is a very dark teal, so a bare green arrow on a white row reads as black. A mark that has to read as green there stands on the good surface.

TODO: the words of the states are the proposal of the concept's Part 5c ("Lobby", "Live", "Paused", "Trying again", "Ended", "Just in"). They are written once, in liveChipLabel and LiveRowTag; the product owner has not confirmed them.

The tablet in the look (2026-10-08)​

What the tracking app shows and asks while its device is in a live session is drawn from the same recipes. All of it is in apps/tracking/src/app/workouts/today/.

  • One kind of sheet — LiveQuestion in live-sheet.tsx. A panel with a label (what the sheet is about), an optional state chip beside it, one title, the body, and the answers: the one the sheet proposes takes the width that is left, the other is as wide as its words. LiveSheet is only the layer it floats on: the app's shared overlay (@enode/ui/sheet), so Escape and the hardware Back close it, Tab stays inside, and the focus returns to what opened it. A sheet without onClose is a question that needs an answer and ignores Escape, Back and a tap outside. Its buttons are LiveSheetButton: pills of at least 44 px, as in the app's dialogs. The join sheet's three steps, the sheet of the session a device is in, "Share your training?" and "Send the earlier sets too?" are all this sheet. A sheet floats over the page, so it keeps a shadow where a panel in a page has none.
  • The join sheet — live-session-row.tsx. The code is the hero of its step: one large field in the join code's letters. The second step is titled with the session's name, labelled with who runs it, and carries the session's chip. The steps are plain views (JoinCodeStep, JoinConfirmStep, SwitchSessionStep, CurrentSessionCard); the sheet holds the state and the requests.
  • The status card — live-status-button.tsx. Its one large number is the sets delivered. Sets that wait are a line of their own in the attention tone, with a dot and the words; the chip says "Paused" without repeating the count. One sentence under a rule says what happens next. The round header button itself is unchanged: it keeps the header's look.
  • The standings — LiveStandings in live-tab.tsx. One panel, rows parted by a rule, places in one column and loads as figures in another (every load keeps the room of the longest). The row of the athlete whose training the tab belongs to is tinted and says "On the bar"; the green stays with the leader's place.
  • The judge's question — live-ruling-prompt.tsx. Still a card in the training's stack and not a dialog; it takes the panel and the label of the recipes.

Every one of these is in the dev gallery at /debug/connection with mock values: the rows "Live session status" and "Live on the tablet · joining / the questions / standings". The gallery needs a signed-in account.

Checked on 2026-10-08: every gallery state in the dark and the light theme; the join sheet on its layer in the running app at 1180 × 820 and 390 × 844; the judge's card in a training on a joined tablet (live test 92, which passed); the self-test's Live chapter (live test 18, three of three). Not seen: the status card and the Live tab inside a running training at those two sizes, and anything on a real tablet.

Shared rank metrics​

All three views read the session's ordered rank-metric selection (use-rank-selections.ts, see "Ranking — stored on the session"): the primary metric ranks the leaderboard and scores the competition attempts; the other picks become the leaderboard's extra columns, the attempt cards' metric rows, and the stream rows' leading value.

localStorage keys​

All Live Hub client-side preferences, read lazily and SSR-guarded. The session's view mode is now durably stored server-side in the session's config blob (session-config.ts) — its localStorage key below is the synchronous cache/fallback, seeded from the server value by hydrateViewModeFromConfig; the others are local-only preferences.

KeyScopeMeaning
enode.live.viewMode:<sessionID>per sessionCache of the session's configured view (view-config.ts) for a first paint; the server config is the truth and overwrites it on every load.
enode.live.rankMetricKeysapp-wideFALLBACK only: the ranking for a session whose config holds none yet, and for the demo / debug fixture. A session's ranking lives in its server config. JSON [{key, agg}] (legacy enode.live.rankMetricKey also read).
enode.live.pinLeaderapp-wideKeep-leader-on-top board toggle ("1" / absent).
enode.live.leaderboardSplit:<sessionID>per sessionLeaderboard pane COUNT ("2"…"4"; the legacy split flag "1" reads as 2 panes; a single pane clears the key).
enode.live.displayTokenper browserThe token and the session id of a display that paired by number (display-token.ts). Kept until the owner removes the display; forgotten then by the reader. JSON {token, liveSessionID}.
enode.live.rulingQueue.v1per device (tracking app)The attempts of this tablet's live session and what the judge said about each (ruling-queue.ts). JSON {liveSessionID, attempts: [{setID, sessionID, ruling, answeredAt, armedAt, settled}]}.
enode.live.displayProfileper browserThe profile chosen for this screen's display (near, room, hall); absent while the size of the window decides. A ?profile= in the display's link wins over it (wall-profile.ts).

Testing​

Pure logic is unit-tested (Vitest, node):

  • Core, joining and lobby: join-code, device-session/stream and store, lobby-readiness (also the health line), lobby-store, lobby-stream, presence, sharing-consent, earlier-sets. Portal: idle-end.

  • Core, the tablet: offline/live-queue (also deliveries and a discarded training), outbox-drain, read-scheduler, standings-follow.

  • Core: broadcast-diff, producer, feed-reducers, feed-store, feed-stream (topic first, display only when refused), device-eligibility, mappers/live-sessions, and realtime/client (told when a stream opens and when a topic is refused; a topic served from another stream, and a frame cut down by its source).

  • Core, the paired display: display-feed (a display's answers in the owner's shapes, the session's reads and its topic served through the token, the sign of life, removal). Portal: display-pairing (when a display counts as connected), result-store (nothing is written from a screen that can only read).

  • A screen's own connection, and the devices as a viewer counts them: realtime/client (a stream's state through open, silent, closed and open again; the wait before a new attempt is random and never above 30 seconds; a waiting stream tries at once when told the network is back), stream-health (when a screen is blind, when a reload is due), lobby-stream (the device list read every 30 seconds, one watch per session, nothing while the page is hidden), lobby-readiness (silent only after 60 seconds and named within 90, an older app by its version), use-screen-wake-lock in @enode/ui (asked for again after the browser took it away).

  • The screens and their addresses: hub-route (every screen written as its address and read back, the parent of each, where an arrow goes with and without an origin, the parameters that are kept). The history itself (use-hub-route.ts) is checked in a browser: see "Screens, addresses and the way back".

  • Shared parts (packages/ui/src/live/): tones (contrast of every tone in both themes), live-parts (words, shapes, movement), wall-type (the sizes of a display). See "One look — the shared parts".

  • Portal (109 tests across 6 files in the live suite): derive-leaderboard.test.ts (grouping, set/rep metric resolution, session aggregation, arrival ordering, per-athlete rank movement, recency ordering + pane resolution (exerciseKeysByRecency / resolvePaneKeys), attempt analysis), derive-competition.test.ts (board derivation + slot/attempt-count helpers), derive-stream.test.ts (summary, filters, ordering, newest-set selection), use-athlete-pair.test.ts (instance matching, 1RM read, pair-chart matching), view-config.test.ts (mode guards, the switchable-mode split, and the config hydration/resolve helpers), and session-config.test.ts (the config codec — parse/serialize round-trip, viewModeFromConfig, configWithViewMode field-preserving merge, malformed-input tolerance).

  • Portal, the result: session-result.test.ts, result-bests.test.ts, read-result-bests.test.ts, result-summary.test.ts, result-store.test.ts, result-parts.test.ts; against backdev, live tests 40 (the result's contract) and 41 (personal bests, kept). See "The result of an ended session".

  • Portal, the demo: demo-script.test.ts (the script, and the evening: the lobby's timeline, which lifts arrive, that the lead changes and few records fall), demo-evening.test.ts (the player on a fake clock: lobby, Go live from the lobby's own button, the lifts, the end, the loop, the jumps, and that the live-session API is never called), demo-trajectory.test.ts (a bar path for every rep of every exercise).

  • Portal, the display on a wall: wall-profile.test.ts, wall-scene.test.ts, wall-zoom.test.ts; against backdev and in a real browser, live test 45. See "The display on every screen".

Against backdev, tests/live/offline/55-live-device-heartbeats.live.test.ts: three tablets in a running session send nothing but heartbeats, and a viewer follows the device list as the portal does. It holds that all three count as connected throughout, and that one that stops is named 60 to 90 seconds after its last heartbeat. It prints how many live_session.device events arrived for heartbeats that changed nothing: none on 2026-10-07, so the server's sign of life (backend handoff, item P4) was not on backdev. About three minutes; ENODE_LIVE_HEARTBEAT_MINUTES makes the quiet part longer.

Cutting a display's connection in a test. Three things that cost an afternoon (2026-10-07):

  • The browser tools' offline switch (page.setOfflineMode, the Network panel's "Offline") refuses new requests and leaves an open stream open: a display kept receiving for 90 seconds. To cut a stream, put a TCP proxy between the browser and the portal and reset or stall its connections.
  • The development server's own client reloads a page that cannot reach it for about a minute, which lands on the browser's error page while the cut lasts. Leave its hot-reload socket out of the cut. A built portal has no such client.
  • The development proxy speaks HTTP/1.1, where one browser profile gets six connections per host, and every portal page holds several streams. From the third page on, reads queue until they time out. Give each page a browser context of its own. backdev and production speak HTTP/2.

The Debug page has a Live leaderboard fixture (live-session-fixture.tsx, synthetic feed, no device) to drive the consumer→derive→view path locally: it pushes deterministic sets for four athletes across TWO exercises in blocks of five (every fourth set a warm-up) and offers one Present button per view mode.

The walk-through of a showing (live tests 96 to 98)​

Work block P4. The script of a ten-minute showing is live-hub-walkthrough.md; three tests walk it in a headless Chrome and photograph every station, with ENODE_WALK=1: 96-walkthrough-demo (the demo, both themes, 1440 × 900, 1024 × 768 and a display at 1920 × 1080), 97-walkthrough-real-session (a real session with two tablets, fourteen athletes and a name of 40 characters) and 98-walkthrough-access (Tab order, names and focus on the hub, the set-up and the lobby; the two dialogs; a display under reduced motion). They share tests/live/support/walk.ts: Protocol.station takes the picture and reads the page for cut text, texts on each other, text below 3 to 1, a page that scrolls sideways and strings that are in no translation catalogue. The checks point at a spot and do not judge; what a run found and what is still open is in the walk-through's section "Protocol".

Proof of delivery​

Block W3 of the work split. The promise is that every completed set reaches the board once. Two things make it checkable, and neither changes product code:

  • On a device, with one button. The tracking app's self-test (Debug → Self-test) has a Live chapter: it sends sets into a live session of its own while the connection drops in the middle of a set, across a restart with two sets waiting, with an edit that comes before its create, and with a create that is sent twice, and passes when the session holds exactly the sets the device holds. Described in testing/offline-self-test.md; the code is apps/tracking/src/app/debug/selftest/live-checks.ts and live-compare.ts.
  • Under load. A run with up to twenty simulated lifters reports how long a set takes from the request to the session's set stream. Described, with the first results, in testing/live-set-load-run.md; the code is tests/live/load/live-set-load.ts.

What was checked, and how (2026-10-07)​

  • npm test: live-compare.test.ts, the comparison between what the device holds and what the session holds.
  • Against backdev with disposable accounts, tests/live/offline/18-selftest-live-chapter: all seven checks of the chapter pass; live.same-sets fails when a set is taken out of the session and a foreign one is put in; a device that is in a live session, and live sets that already wait, are left alone.
  • In a browser, on the tracking dev server against backdev: the whole self-test from the button and from window.__enodeSelfTest.run(). 25 checks passed, none failed, one warned (the fresh test account has no schedule). The Live chapter added about seven seconds to a run of 18.
  • tests/live/offline/17-live-set-load four times, 912 sets: none lost, none stored twice, none missing from the stream.
  • In a browser, a real restart: a training in a live session, the API made unreachable at the network level, two sets completed (the live status button shows 2 waiting, the session holds none), the page reloaded (both sets still in the outbox), the connection back, Resume tapped: both sets in the session within three seconds, once each.
  • Not checked: a packaged build on a tablet.

What the runs found in files this block does not own​

Passed on, not changed by W3. The numbers are from backdev on 2026-10-07; see the load run's page for the tables. The first three are closed by block W9 since; see "What a tablet does by itself".

  • A tablet's standings read is the part of a set that grows. (Since W9: one read per delivered set instead of two, none per set where the server pushes; the size of a read is the server's, handoff S2 and item 5.) useLiveStandings (use-live-standings.ts) re-reads the session's sets on every change of the live outbox: when a set is queued and when it is delivered. The read (GET /workout_live_session_sets/reduced/:id) returns every set of the session at 2.4 kB each, of which 783 bytes are the athlete's profile and 354 bytes per measurement are the metric's definition, repeated for every set. At 288 sets one read is 653 kB. With twenty lifters sending, a read took 6.5 s in the middle and the set path got to 2 sets per second, against 5.3 without the reads; with everybody lifting at once a read took up to 15.2 s, past the app's 15 s deadline for a request.
  • After a slow read the standings lack the set just lifted. (Closed by W9.) The read sent when the set is queued reaches the server before the set does. loadLiveFeed (feed-store.ts) sends one read per session at a time, so the read after the delivery is dropped while the first is still on its way, and the standings stay as they were until the next set. To see it in numbers: run the load run with ten lifters and read the stale column (3 of 50 sets on 2026-10-07, each one a dropped second read). It was not looked at in the app's own screens.
  • After a restart, waiting sets go out when the training is resumed, not when the connection is back. (Closed by W9, the discarded training included.) The live outbox is drained by useLiveSetBroadcaster (use-broadcast.ts), which is mounted in the training screen only. To see it: complete two sets in a live session without a connection, restart the app, bring the connection back and leave the "Resume interrupted training?" question open. The sets stay in the outbox (25 s in the run of 2026-10-07) and arrive within seconds of Resume. From the code, and not tried: Discard leaves them in the outbox as well, so the sets of a discarded training would be sent when the next training is opened.
  • Every set in that read carries the athlete's whole profile: email, date of birth, body height and weight, gender. Each device in the session receives it with the standings. Worth a look together with what a display without a login may read.
  • GET /user_device_sessions answers a tracking-app client with its own row only, not with every device of the user, as the comment in packages/core/src/api/user-device-sessions.ts says. The load run therefore asks each simulated tablet for its own row.
  • Deleting users is slow on backdev: three to four seconds for one athlete, 20 to 68 s for an owner with twenty athletes, which is longer than a request may take. Five athletes deleted at the same time ran into the 15 s deadline, and backdev stopped answering for about a minute right after (07:47 to 07:49 UTC on 2026-10-07; the server's log would say whether that was the cause). It matters to tests that clean up after themselves; the load run deletes one athlete at a time since.

Open items (confirm with backend)​

  • Logo mime: the editor uploads JPEG (the shared cropper's output); the backend spec lists PNG/SVG. Observed on backdev: a JPEG logo is accepted and served. Whether that is on purpose is asked in the open handoff (R5).
  • How it ships is on its own page: live-hub-release.md says what the commit of 2026-10-07 holds, the order of a release, the checks after a production deploy, and the script for one evening with real devices. It also describes two tests that run only when asked for: an app from the newest release tag against the server of today (live test 80), and a display left alone on the demo (live test 81).
  • Server work for phase L0 was requested in live-hub-backend-handoff.md and is on backdev; what was observed there and the answers to the backend's questions are in live-hub-backend-reply.md and live-hub-backend-reply-2.md.
  • Removing an end date or a logo takes a flag. The server reads a missing or null expirationDate and logo in PUT /workout_live_sessions/:id as "unchanged" (that is also what lets PUT { config } alone work), so the editor sends clearExpirationDate or clearLogo when a value is taken away (on backdev since 2026-10-07). A server without the flags keeps the value; the editor then says so instead of closing as if it had worked. Sending expirationDate: 0 is not a way to remove a date: it ends the session at once.
  • A session that only reached its end date opens again when an update gives it a later one, and the devices sent with that update are linked (observed on backdev, 2026-10-06). One ended with "End session" stays ended. The server reports both as endedAt; endedByDate in live-waiting.ts tells them apart (endedAt is the end date itself), and the editor and the empty live view say which it is.
  • Server work for phase L2 (session lobby, join by code, a push to the device when its link changes, presence) is on backdev since 2026-10-07 and not on production. What was asked, what the backend changed and what was observed is in live-hub-backend-handoff-l2.md. Of the clients, joining by code, the device's heartbeat and the lobby with its device tiles and "Go live" are built (see "Joining and leaving a live session", "Setting up a new session" and "The lobby"), and an athlete's own device is asked before it shares. The portal follows live_session.updated and still re-reads a watched session once a minute, for a server that does not send the event.
  • The set topic needs the session id in upper case. A subscriber whose topic names the id in lower case is admitted and never gets an event (observed on backdev, 2026-10-07). liveSessionTopic writes it in upper case. Reported to the backend, which has made a topic the same however its id is written (83a811f8, on backdev with its next rebuild). The client keeps writing upper case.
  • How the remaining work is split so that two people or agents can work in this tree at the same time is in LIVE_HUB_CONCEPT.html at the repository root, part "Work blocks": which files each block owns, and what it leaves alone.
  • Everything that was open on the server side on 2026-10-07 is one document: live-hub-backend-handoff-open.md. The backend answered it the same day: eight points are built on its branch (13b7a267: the slim person on a live set, completedAt, platforms, the board read, a sign of life for a quiet device, a linked device on the set topic, the old board built behind the answer, a log for the device id), and its answers stand at that document's end. The next document, live-hub-backend-handoff-open-2.md, was answered the same day as well (af446f6e: a set names only the owner's people, the set while it is lifted, the result for an athlete who lifted, no body weight in the old board's event), and a third commit followed (5cae8750: the ruling on an attempt and ruled-out reps, after the product owner's yes to decision D5). backdev runs all three since 2026-10-07, 14:25. One check per point a client can see is in tests/live/offline/82-live-open-contract, 83-live-open-2-contract and 84-live-ruling-contract: twelve checks, all passing, and the older contract tests pass against the same builds. What is left on the server side waits for decisions and for numbers from production; the second document lists it at its end.
  • A display that loses its own connection blames the devices (seen in a browser on 2026-10-07, with the display's requests cut off): the board stays, the live mark keeps pulsing, and after about two minutes the health line reads "0 of 3 devices connected". Work block W10 of the concept.
  • On backdev since its rebuild on 2026-10-06, not on production yet: sensor packages are replaced instead of appended on an edit, and reps are matched by currentPersistentRepID. Until production has that build it appends packages, so a rep there collects one copy per edit, and the app's rep ids are ignored.

Three live probes check the server contract the clients rely on, against backdev with disposable accounts:

npx vitest run --config tests/live/vitest.config.ts \
tests/live/offline/15-live-l0-contract tests/live/offline/16-live-set-topic \
tests/live/offline/25-live-l2-contract
  • 15-live-l0-contract: idempotent set upload, update that creates, rep removal, rename, session end; one sensor package per rep through repeated sends and edits; reps matched by id when one is removed or added, also for a set first stored without ids.
  • 16-live-set-topic: the owner is admitted to the set topic, each set change arrives as a frame equal to the snapshot's set, and a stranger is refused.
  • 25-live-l2-contract: a tablet joins by code, switches and leaves, and is told when its link changes; a web device, a wrong code and a user of another organisation are turned away; lobby sets stay apart from results until Go live; the lobby's device list and the session's events; removing an end date and a logo; an athlete on their own phone joins, sends a set and acknowledges sharing. It signs the owner in a second time as a tablet, because a join needs a phone or tablet, and creates an athlete with a login.

The per-session view choice is no longer a wishlist: the backend added the opaque config field on the live-session DTOs (2026-07-17), so the editor's "Live view" choice now travels across browsers/displays (see "Server-backed view config" above).