From 3eb78b61ae90c18a27e0828615f1cea505f223c9 Mon Sep 17 00:00:00 2001 From: "@permadeath.com" Date: Sat, 10 Oct 2026 22:01:24 -0400 Subject: [PATCH] fix(web): carry a scrobble's createdAt as `written`, not `at` The corpus replay already puts its own relative clock in `at`, so its stream rows read as twenty thousand days old. Epoch milliseconds from the record now travel as `written`, which nothing else uses. Co-Authored-By: Claude Opus 5.5 Change-Id: I7d74082f105d37dabd2720ea8dd9cd6e10690974 --- web/app.js | 10 +++++----- web/live.js | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/web/app.js b/web/app.js index 20cb4826..73c159ec 100644 --- a/web/app.js +++ b/web/app.js @@ -511,8 +511,8 @@ // show the whole recency ladder, not a field all lit at once. const said = live ? state.now - : event.at - ? state.now - Math.max(0, Date.now() - event.at) / 1000 + : event.written + ? state.now - Math.max(0, Date.now() - event.written) / 1000 : state.now - 20 - Math.random() * 900; agent.saidAt = Math.max(agent.saidAt, said); agent.emoji = event.emoji; @@ -531,7 +531,7 @@ text: event.text, effort: event.effort, at: state.now, - written: event.at, + written: event.written, }); // Only the mock's page clusters locally; a live page is told its groups. if (!living) workIndex.observe(agent.did, event.text); @@ -539,7 +539,7 @@ // Backlog counts toward the activity strip only when it says when it was // written; the mock's does not, and a strip of invented history would be // a claim about a past nobody watched. - if (live || event.at) hear(event.at || Date.now()); + if (live || event.written) hear(event.written || Date.now()); if (!live) return; state.scrobbleTimes.push(state.now); // An agent's newer line replaces its older one: a small swarm otherwise @@ -826,7 +826,7 @@ saidEl.className = "said"; saidEl.append(whoEl, " ", whatEl); const timeEl = document.createElement("time"); - timeEl.dataset.at = String(event.at || Date.now()); + timeEl.dataset.at = String(event.written || Date.now()); timeEl.textContent = "now"; item.append(emojiEl, saidEl, timeEl); // The rule down the left is the operator's hue, as the agent is drawn. diff --git a/web/live.js b/web/live.js index cb230488..a9c2c51b 100644 --- a/web/live.js +++ b/web/live.js @@ -241,11 +241,12 @@ const Live = (() => { emoji: scrobble.emoji, text: scrobble.text, effort: scrobble.effort, - // When its author says it was written, in milliseconds. What the + // When its author says it was written, in epoch milliseconds; not + // `at`, which the corpus replay uses for a clock of its own. What the // canvas lights an agent by, so a page opened onto an hour of history // shows who is talking now and who stopped an hour ago. Absent or // unreadable is left out, and the canvas treats it as just now. - at: Date.parse(scrobble.createdAt) || undefined, + written: Date.parse(scrobble.createdAt) || undefined, }; } } -- knotmirror 0.0.1