diff --git a/docs/design/v5/live/after/demo/step-1-1440-light.png b/docs/design/v5/live/after/demo/step-1-1440-light.png
new file mode 100644
index 0000000..e04915a
Binary files /dev/null and b/docs/design/v5/live/after/demo/step-1-1440-light.png differ
diff --git a/docs/design/v5/live/after/demo/step-1-375-dark.png b/docs/design/v5/live/after/demo/step-1-375-dark.png
new file mode 100644
index 0000000..6643eef
Binary files /dev/null and b/docs/design/v5/live/after/demo/step-1-375-dark.png differ
diff --git a/docs/design/v5/live/after/demo/step-2-1440-light.png b/docs/design/v5/live/after/demo/step-2-1440-light.png
new file mode 100644
index 0000000..8e46e2c
Binary files /dev/null and b/docs/design/v5/live/after/demo/step-2-1440-light.png differ
diff --git a/docs/design/v5/live/after/demo/step-3-1440-light.png b/docs/design/v5/live/after/demo/step-3-1440-light.png
new file mode 100644
index 0000000..b1d7d56
Binary files /dev/null and b/docs/design/v5/live/after/demo/step-3-1440-light.png differ
diff --git a/docs/design/v5/live/after/demo/step-4-1440-light.png b/docs/design/v5/live/after/demo/step-4-1440-light.png
new file mode 100644
index 0000000..c72affd
Binary files /dev/null and b/docs/design/v5/live/after/demo/step-4-1440-light.png differ
diff --git a/docs/design/v5/live/after/demo/step-4-375-dark.png b/docs/design/v5/live/after/demo/step-4-375-dark.png
new file mode 100644
index 0000000..55b8b1c
Binary files /dev/null and b/docs/design/v5/live/after/demo/step-4-375-dark.png differ
diff --git a/docs/design/v5/live/after/demo/step-5-1440-light.png b/docs/design/v5/live/after/demo/step-5-1440-light.png
new file mode 100644
index 0000000..27f62d4
Binary files /dev/null and b/docs/design/v5/live/after/demo/step-5-1440-light.png differ
diff --git a/docs/design/v5/live/after/demo/step-6-1440-light.png b/docs/design/v5/live/after/demo/step-6-1440-light.png
new file mode 100644
index 0000000..11a76d9
Binary files /dev/null and b/docs/design/v5/live/after/demo/step-6-1440-light.png differ
diff --git a/docs/design/v5/live/after/demo/step-6-2560-dark.png b/docs/design/v5/live/after/demo/step-6-2560-dark.png
new file mode 100644
index 0000000..0af3868
Binary files /dev/null and b/docs/design/v5/live/after/demo/step-6-2560-dark.png differ
diff --git a/docs/design/v5/live/after/demo/step-6-375-dark.png b/docs/design/v5/live/after/demo/step-6-375-dark.png
new file mode 100644
index 0000000..14e8e75
Binary files /dev/null and b/docs/design/v5/live/after/demo/step-6-375-dark.png differ
diff --git a/docs/design/v5/live/after/demo/step-7-1440-light.png b/docs/design/v5/live/after/demo/step-7-1440-light.png
new file mode 100644
index 0000000..2fb5303
Binary files /dev/null and b/docs/design/v5/live/after/demo/step-7-1440-light.png differ
diff --git a/docs/design/v5/live/after/demo/step-7-375-dark.png b/docs/design/v5/live/after/demo/step-7-375-dark.png
new file mode 100644
index 0000000..11c5a7d
Binary files /dev/null and b/docs/design/v5/live/after/demo/step-7-375-dark.png differ
diff --git a/docs/design/v5/live/after/live-1440-dark.png b/docs/design/v5/live/after/live-1440-dark.png
new file mode 100644
index 0000000..b563371
Binary files /dev/null and b/docs/design/v5/live/after/live-1440-dark.png differ
diff --git a/docs/design/v5/live/after/live-1440-light.png b/docs/design/v5/live/after/live-1440-light.png
new file mode 100644
index 0000000..c316bae
Binary files /dev/null and b/docs/design/v5/live/after/live-1440-light.png differ
diff --git a/docs/design/v5/live/after/live-2560-dark.png b/docs/design/v5/live/after/live-2560-dark.png
new file mode 100644
index 0000000..e1ce2c8
Binary files /dev/null and b/docs/design/v5/live/after/live-2560-dark.png differ
diff --git a/docs/design/v5/live/after/live-2560-light.png b/docs/design/v5/live/after/live-2560-light.png
new file mode 100644
index 0000000..2f4d8b5
Binary files /dev/null and b/docs/design/v5/live/after/live-2560-light.png differ
diff --git a/docs/design/v5/live/after/live-375-dark.png b/docs/design/v5/live/after/live-375-dark.png
new file mode 100644
index 0000000..c7610ab
Binary files /dev/null and b/docs/design/v5/live/after/live-375-dark.png differ
diff --git a/docs/design/v5/live/after/live-375-light.png b/docs/design/v5/live/after/live-375-light.png
new file mode 100644
index 0000000..de59819
Binary files /dev/null and b/docs/design/v5/live/after/live-375-light.png differ
diff --git a/docs/design/v5/live/after/states/down-1440-dark.png b/docs/design/v5/live/after/states/down-1440-dark.png
new file mode 100644
index 0000000..bc4c814
Binary files /dev/null and b/docs/design/v5/live/after/states/down-1440-dark.png differ
diff --git a/docs/design/v5/live/after/states/down-1440-light.png b/docs/design/v5/live/after/states/down-1440-light.png
new file mode 100644
index 0000000..a579bcb
Binary files /dev/null and b/docs/design/v5/live/after/states/down-1440-light.png differ
diff --git a/docs/design/v5/live/after/states/down-2560-dark.png b/docs/design/v5/live/after/states/down-2560-dark.png
new file mode 100644
index 0000000..438c95f
Binary files /dev/null and b/docs/design/v5/live/after/states/down-2560-dark.png differ
diff --git a/docs/design/v5/live/after/states/down-2560-light.png b/docs/design/v5/live/after/states/down-2560-light.png
new file mode 100644
index 0000000..fd5dfaf
Binary files /dev/null and b/docs/design/v5/live/after/states/down-2560-light.png differ
diff --git a/docs/design/v5/live/after/states/down-375-dark.png b/docs/design/v5/live/after/states/down-375-dark.png
new file mode 100644
index 0000000..4685805
Binary files /dev/null and b/docs/design/v5/live/after/states/down-375-dark.png differ
diff --git a/docs/design/v5/live/after/states/down-375-light.png b/docs/design/v5/live/after/states/down-375-light.png
new file mode 100644
index 0000000..53ccb98
Binary files /dev/null and b/docs/design/v5/live/after/states/down-375-light.png differ
diff --git a/docs/design/v5/live/after/states/offline-1440-dark.png b/docs/design/v5/live/after/states/offline-1440-dark.png
new file mode 100644
index 0000000..0f45c36
Binary files /dev/null and b/docs/design/v5/live/after/states/offline-1440-dark.png differ
diff --git a/docs/design/v5/live/after/states/offline-1440-light.png b/docs/design/v5/live/after/states/offline-1440-light.png
new file mode 100644
index 0000000..9250a96
Binary files /dev/null and b/docs/design/v5/live/after/states/offline-1440-light.png differ
diff --git a/docs/design/v5/live/after/states/offline-2560-dark.png b/docs/design/v5/live/after/states/offline-2560-dark.png
new file mode 100644
index 0000000..4ed8209
Binary files /dev/null and b/docs/design/v5/live/after/states/offline-2560-dark.png differ
diff --git a/docs/design/v5/live/after/states/offline-2560-light.png b/docs/design/v5/live/after/states/offline-2560-light.png
new file mode 100644
index 0000000..d5a3569
Binary files /dev/null and b/docs/design/v5/live/after/states/offline-2560-light.png differ
diff --git a/docs/design/v5/live/after/states/offline-375-dark.png b/docs/design/v5/live/after/states/offline-375-dark.png
new file mode 100644
index 0000000..9d6ac93
Binary files /dev/null and b/docs/design/v5/live/after/states/offline-375-dark.png differ
diff --git a/docs/design/v5/live/after/states/offline-375-light.png b/docs/design/v5/live/after/states/offline-375-light.png
new file mode 100644
index 0000000..79fd792
Binary files /dev/null and b/docs/design/v5/live/after/states/offline-375-light.png differ
diff --git a/docs/design/v5/live/after/states/quiet-1440-dark.png b/docs/design/v5/live/after/states/quiet-1440-dark.png
new file mode 100644
index 0000000..bb91e50
Binary files /dev/null and b/docs/design/v5/live/after/states/quiet-1440-dark.png differ
diff --git a/docs/design/v5/live/after/states/quiet-1440-light.png b/docs/design/v5/live/after/states/quiet-1440-light.png
new file mode 100644
index 0000000..46273eb
Binary files /dev/null and b/docs/design/v5/live/after/states/quiet-1440-light.png differ
diff --git a/docs/design/v5/live/after/states/quiet-2560-dark.png b/docs/design/v5/live/after/states/quiet-2560-dark.png
new file mode 100644
index 0000000..e1eb500
Binary files /dev/null and b/docs/design/v5/live/after/states/quiet-2560-dark.png differ
diff --git a/docs/design/v5/live/after/states/quiet-2560-light.png b/docs/design/v5/live/after/states/quiet-2560-light.png
new file mode 100644
index 0000000..8cdc6aa
Binary files /dev/null and b/docs/design/v5/live/after/states/quiet-2560-light.png differ
diff --git a/docs/design/v5/live/after/states/quiet-375-dark.png b/docs/design/v5/live/after/states/quiet-375-dark.png
new file mode 100644
index 0000000..ceca43b
Binary files /dev/null and b/docs/design/v5/live/after/states/quiet-375-dark.png differ
diff --git a/docs/design/v5/live/after/states/quiet-375-light.png b/docs/design/v5/live/after/states/quiet-375-light.png
new file mode 100644
index 0000000..4ebdb61
Binary files /dev/null and b/docs/design/v5/live/after/states/quiet-375-light.png differ
diff --git a/docs/design/v5/live/after/states/waiting-1440-dark.png b/docs/design/v5/live/after/states/waiting-1440-dark.png
new file mode 100644
index 0000000..bab4802
Binary files /dev/null and b/docs/design/v5/live/after/states/waiting-1440-dark.png differ
diff --git a/docs/design/v5/live/after/states/waiting-1440-light.png b/docs/design/v5/live/after/states/waiting-1440-light.png
new file mode 100644
index 0000000..8a83d2e
Binary files /dev/null and b/docs/design/v5/live/after/states/waiting-1440-light.png differ
diff --git a/docs/design/v5/live/after/states/waiting-2560-dark.png b/docs/design/v5/live/after/states/waiting-2560-dark.png
new file mode 100644
index 0000000..95b609c
Binary files /dev/null and b/docs/design/v5/live/after/states/waiting-2560-dark.png differ
diff --git a/docs/design/v5/live/after/states/waiting-2560-light.png b/docs/design/v5/live/after/states/waiting-2560-light.png
new file mode 100644
index 0000000..a5540e3
Binary files /dev/null and b/docs/design/v5/live/after/states/waiting-2560-light.png differ
diff --git a/docs/design/v5/live/after/states/waiting-375-dark.png b/docs/design/v5/live/after/states/waiting-375-dark.png
new file mode 100644
index 0000000..c2c6001
Binary files /dev/null and b/docs/design/v5/live/after/states/waiting-375-dark.png differ
diff --git a/docs/design/v5/live/after/states/waiting-375-light.png b/docs/design/v5/live/after/states/waiting-375-light.png
new file mode 100644
index 0000000..2317e64
Binary files /dev/null and b/docs/design/v5/live/after/states/waiting-375-light.png differ
diff --git a/docs/design/v5/live/after/wall-1440.png b/docs/design/v5/live/after/wall-1440.png
new file mode 100644
index 0000000..e71bd7f
Binary files /dev/null and b/docs/design/v5/live/after/wall-1440.png differ
diff --git a/docs/design/v5/live/after/wall-2560.png b/docs/design/v5/live/after/wall-2560.png
new file mode 100644
index 0000000..2e7dca2
Binary files /dev/null and b/docs/design/v5/live/after/wall-2560.png differ
diff --git a/docs/design/v5/live/before/live-1440-dark.png b/docs/design/v5/live/before/live-1440-dark.png
new file mode 100644
index 0000000..e8f7539
Binary files /dev/null and b/docs/design/v5/live/before/live-1440-dark.png differ
diff --git a/docs/design/v5/live/before/live-1440-light.png b/docs/design/v5/live/before/live-1440-light.png
new file mode 100644
index 0000000..e8f7539
Binary files /dev/null and b/docs/design/v5/live/before/live-1440-light.png differ
diff --git a/docs/design/v5/live/before/live-2560-dark.png b/docs/design/v5/live/before/live-2560-dark.png
new file mode 100644
index 0000000..114fdc0
Binary files /dev/null and b/docs/design/v5/live/before/live-2560-dark.png differ
diff --git a/docs/design/v5/live/before/live-2560-light.png b/docs/design/v5/live/before/live-2560-light.png
new file mode 100644
index 0000000..114fdc0
Binary files /dev/null and b/docs/design/v5/live/before/live-2560-light.png differ
diff --git a/docs/design/v5/live/before/live-375-dark.png b/docs/design/v5/live/before/live-375-dark.png
new file mode 100644
index 0000000..7331e54
Binary files /dev/null and b/docs/design/v5/live/before/live-375-dark.png differ
diff --git a/docs/design/v5/live/before/live-375-light.png b/docs/design/v5/live/before/live-375-light.png
new file mode 100644
index 0000000..7331e54
Binary files /dev/null and b/docs/design/v5/live/before/live-375-light.png differ
diff --git a/public/app.js b/public/app.js
index 68b52ac..ec51513 100644
--- a/public/app.js
+++ b/public/app.js
@@ -1,15 +1,18 @@
-// live.setkernel.com, v3 "Day" (setkernel-live#48; the design is docs/design/v3/day). One sentence on
-// top says who is doing what; under it, the last 24 hours, one lane per engineer, with the Now
-// column at the right edge. Live data comes from /api/state and /api/replay, then the WebSocket
-// (/ws); ?demo runs a sample day through the same reducers as the Durable Object. Everything shown
-// is built with textContent and attributes, never innerHTML, so nothing in a batch can inject markup.
+// live.setkernel.com, v5 (setkernel-live#94): Showcase's page around v3's "Day" (setkernel-live#48;
+// docs/design/v3/day). One sentence says who is doing what; under it, the last 24 hours, a lane for
+// each engineer the feed sends, with the Now column at the right edge. Live data comes from /api/state
+// and /api/replay, then the WebSocket (/ws); ?demo runs a sample day through the same reducers as the
+// Durable Object. Demo mode (the dialog) walks one real public change in seven steps (lib/walk.js).
+// Everything shown is built with textContent and attributes, never innerHTML, so nothing in a batch
+// can inject markup.
import { ENGINEERS, applyBatch, emptyReplay, homeDay, recordReplay, view } from "/lib/state.js";
-import { OFFLINE_AFTER_MS, createAnnouncer, fitHeadline, freshness, headline, plain, todaySince, zoneName } from "/lib/words.js";
+import { OFFLINE_AFTER_MS, clock, createAnnouncer, fitHeadline, freshness, headline, isSilent, plain, todaySince, zoneName } from "/lib/words.js";
import { reviewers } from "/lib/line.js";
-import { BIN, BINS, keyItems, prep, readout, scrubKey, tableRows } from "/lib/day.js";
+import { BIN, BINS, keyItems, lanesOf, prep, readout, scrubKey, tableRows } from "/lib/day.js";
import { fitWall, pageMode } from "/lib/layout.js";
-import { drawNowList, drawTall, drawWide, fillLegend, fillTable } from "/lib/chart.js";
+import { drawNowList, drawTall, drawWide, fillLegend, fillTable, unit } from "/lib/chart.js";
import { busyDay, downDay, quietDay, runDay } from "/lib/demo.js";
+import { mountStepper, steps } from "/lib/walk.js";
const $ = (id) => document.getElementById(id);
const root = document.documentElement;
@@ -28,8 +31,11 @@ let D = null, plot = null, scrub = null, mode = null, drawing = false, tableKey
const offline = () => Boolean(current.lastIngest) && serverNow() - current.lastIngest > OFFLINE_AFTER_MS;
function fillWords() {
- const targets = Object.fromEntries(Object.entries(reviewers(current.agents, current.line, ENGINEERS)).map(([author, reviewer]) => [reviewer, author]));
- const hl = headline({ ...current, now: serverNow(), timeZone: TZ, names: ENGINEERS, targets });
+ // only the engineers the feed sends: no other lane, and no other name in the words
+ const lanes = lanesOf(current);
+ const targets = Object.fromEntries(Object.entries(reviewers(current.agents, current.line, lanes)).map(([author, reviewer]) => [reviewer, author]));
+ const feed = (current.feed ?? []).filter((e) => lanes.includes(e?.agent));
+ const hl = headline({ ...current, feed, now: serverNow(), timeZone: TZ, names: lanes, targets });
root.classList.remove("mood-live", "mood-quiet", "mood-offline", "mood-waiting");
root.classList.add(`mood-${hl.mood}`);
const h1 = $("headline");
@@ -52,19 +58,55 @@ function fillWords() {
// the Halifax day (hq#177, question 5), on the visitor's clock
const now = serverNow();
$("chart-sub").textContent = `Times in ${zoneName(now, TZ)}. Today's counts ${todaySince(now, TZ)}.`;
+ showBanner(hl.mood);
showFresh(hl.mood);
}
+const glyph = (id, g) => $(id).setAttribute("href", `#${g}`);
+
+// The page's own state, above the headline: nothing when the office is at work.
+const BANNERS = {
+ offline: () => ["g-off", false, `Updates stopped at ${clock(current.lastIngest, TZ)}`, "Everything below is the last picture the page had, kept as it was."],
+ waiting: () => ["g-wait", true, "Waiting for the first update", "Nothing has arrived yet. Numbers show a dash until they are real, not a zero."],
+ quiet: () => ["g-info", true, "A quiet spell: nobody is working right now", "The lanes show the day so far. New work appears here by itself."],
+};
+function showBanner(mood) {
+ const b = $("banner");
+ b.hidden = !BANNERS[mood];
+ if (b.hidden) return;
+ const [g, calm, head, text] = BANNERS[mood]();
+ glyph("banner-g", g);
+ b.classList.toggle("calm", calm);
+ $("banner-h").textContent = head;
+ $("banner-t").textContent = text;
+}
+
// "About a minute behind" in place of LIVE (hq#177, question 4): events leave the office 60 s late.
// Offline says only how long ago; waiting, and the demo, say nothing of the office.
-function showFresh(mood = root.classList.contains("mood-offline") ? "offline" : "live") {
+function showFresh(mood = root.classList.contains("mood-offline") ? "offline" : root.classList.contains("mood-waiting") ? "waiting" : "live") {
const fresh = DEMO ? "" : freshness(current.lastIngest, serverNow());
$("fresh").textContent = !fresh ? "" : mood === "offline" ? fresh : `About a minute behind · ${fresh}`;
+ glyph("fresh-g", DEMO ? "g-info" : mood === "offline" ? "g-off" : mood === "waiting" ? "g-wait" : "g-live");
+ $("fresh-g").parentNode.toggleAttribute("hidden", !DEMO && !fresh);
+ showConn(mood, fresh);
+}
+
+// The chip in the top bar: the page's connection in a few words, a glyph beside them, never colour alone.
+function showConn(mood, fresh) {
+ const down = lanesOf(current).filter((n) => isSilent(current.agents?.[n])).length;
+ const [g, bad, words] = DEMO ? ["g-info", false, "Demo: sample data"]
+ : mood === "waiting" ? ["g-wait", false, "Waiting for the first update"]
+ : mood === "offline" ? ["g-off", true, `Offline · last update ${clock(current.lastIngest, TZ)}`]
+ : down ? ["g-silent", true, `Live · ${down === 1 ? "one engineer" : `${down} engineers`} not reporting`]
+ : ["g-live", false, `Live · ${fresh}`];
+ glyph("conn-g", g);
+ $("conn").classList.toggle("bad", bad);
+ $("conn-t").textContent = words;
}
function render() {
if (!$("plot").clientWidth) return; // not laid out (yet): nothing to measure the chart by
- mode = pageMode(innerWidth, WALL);
+ mode = pageMode(innerWidth / unit(), WALL); // in the chart's units: the root font grows with the screen
root.dataset.mode = mode;
const nowS = Math.floor(serverNow() / 1000);
const oldT0 = D?.t0;
@@ -156,7 +198,8 @@ function apply(msg) {
if (msg.t === "batch" && Array.isArray(msg.events)) {
// the page keeps its own copy of the replay buffer up to date, with the same reducer
replay = recordReplay(replay, { events: msg.events }, serverNow());
- announcer.add(msg.events);
+ const lanes = lanesOf(current);
+ announcer.add(msg.events.filter((e) => lanes.includes(e?.agent)));
}
render();
}
@@ -232,6 +275,18 @@ function startDemo() {
}, 2000);
}
+// ---- Demo mode: a full-screen dialog, drawn the first time it opens; focus goes back to its opener
+let stepper = null, opener = null;
+function openDemo(ev) {
+ stepper ??= mountStepper($("steps"), steps(TZ));
+ opener = ev.currentTarget;
+ $("demo").showModal();
+}
+$("demo-open").addEventListener("click", openDemo);
+$("how-open").addEventListener("click", openDemo);
+$("demo-close").addEventListener("click", () => $("demo").close());
+$("demo").addEventListener("close", () => (opener ?? $("demo-open")).focus());
+
// keep "updated N s ago" ticking, and the mood, the window and "Today since" moving when nothing arrives
setInterval(() => { if (!document.hidden) showFresh(); }, 1000);
setInterval(() => { if (!document.hidden) render(); }, 15_000);
diff --git a/public/early.js b/public/early.js
index a6f8577..4214d4e 100644
--- a/public/early.js
+++ b/public/early.js
@@ -1,6 +1,6 @@
// Runs before the first paint (a classic script in
, since the CSP allows no inline
// script): ?wall picks the wall, a fixed 16:9 canvas in one dark theme (hq#177, question 7), so
-// nothing shifts or flashes afterwards. The page itself has one theme and stores nothing.
+// nothing shifts or flashes afterwards. The page follows the system's light or dark and stores nothing.
(() => {
if (/[?&]wall(=|&|$)/.test(location.search)) document.documentElement.classList.add("wall");
})();
diff --git a/public/fonts/ibm-plex-mono-latin-500-normal.woff2 b/public/fonts/ibm-plex-mono-latin-500-normal.woff2
new file mode 100644
index 0000000..090f82f
Binary files /dev/null and b/public/fonts/ibm-plex-mono-latin-500-normal.woff2 differ
diff --git a/public/fonts/manrope-latin-800-normal.woff2 b/public/fonts/manrope-latin-800-normal.woff2
new file mode 100644
index 0000000..b5cd400
Binary files /dev/null and b/public/fonts/manrope-latin-800-normal.woff2 differ
diff --git a/public/index.html b/public/index.html
index 231ddec..3051381 100644
--- a/public/index.html
+++ b/public/index.html
@@ -3,23 +3,24 @@
- setkernel live: four AI engineers at work
-
+ setkernel live: a software team you can watch at work
+
-
+
+
-
-
+
+
-
-
+
+
@@ -29,39 +30,141 @@
-
-
-
setkernel’s engineers are AI agents. They take an idea to production with tests, screenshots and an independent review at every step, and a person signs off every merge. Below is the team right now, about a minute behind.