Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| Home says what people did as well as what agents did. Since you were last here now has a People column and an Agents column: who pushed how many commits to which projects, pull requests opened, merged and reviewed, issues opened and closed, docs edited, messages sent and deploys that went out, each line a link to where those are listed, with the agents' acceptance (first time, after review, didn't finish) kept as a row of their column; the sentence under the heading sums it up honestly, and says when a part of g1t could not be read, or that the span was quiet. Landed counts merged pull requests, commits pushed straight to a default branch, production deploys that went live, releases and packages, newest first; Running now adds workflow runs. Behind it, the events service answers an activity digest over a span in one round trip from its existing indexes, every push now records how many commits it carried, and chat counts the messages sent in the conversations you can read. The Home guide defines every line, and says how this scales. | 1 | import { test } from "node:test"; |
| 2 | import assert from "node:assert/strict"; | |
| 3 | ||
| 4 | import { activitySpan, chatActivity } from "./activity.ts"; | |
| 5 | ||
| 6 | const span = { from: "2026-10-08T18:00:00.000Z", until: "2026-10-09T18:00:00.000Z" }; | |
| 7 | ||
| 8 | test("messages, conversations with any, and who said how much, most first", () => { | |
| 9 | const activity = chatActivity( | |
| 10 | [ | |
| 11 | { channel_id: "chn_general", author: "user:usr_ana", n: 70 }, | |
| 12 | { channel_id: "chn_general", author: "agent:agt_margo", n: 15 }, | |
| 13 | { channel_id: "chn_dev", author: "user:usr_bo", n: 30 }, | |
| 14 | { channel_id: "chn_dev", author: "user:usr_ana", n: 5 }, | |
| 15 | // A conversation with nothing in the span is not active. | |
| 16 | { channel_id: "chn_quiet", author: "user:usr_bo", n: 0 }, | |
| 17 | ], | |
| 18 | span, | |
| 19 | ); | |
| 20 | assert.deepEqual(activity, { | |
| 21 | ...span, | |
| 22 | messages: 120, | |
| 23 | channels: 2, | |
| 24 | authors: [ | |
| 25 | { key: "user:usr_ana", messages: 75 }, | |
| 26 | { key: "user:usr_bo", messages: 30 }, | |
| 27 | { key: "agent:agt_margo", messages: 15 }, | |
| 28 | ], | |
| 29 | }); | |
| 30 | }); | |
| 31 | ||
| 32 | test("nothing said is zeros, not an error", () => { | |
| 33 | assert.deepEqual(chatActivity([], span), { ...span, messages: 0, channels: 0, authors: [] }); | |
| 34 | }); | |
| 35 | ||
| 36 | test("a span is two times in order", () => { | |
| 37 | assert.equal(activitySpan(span.from, span.until)?.fromMs, Date.parse(span.from)); | |
| 38 | assert.equal(activitySpan(span.until, span.from), null); | |
| 39 | assert.equal(activitySpan("yesterday", span.until), null); | |
| 40 | assert.equal(activitySpan(null, span.until), null); | |
| 41 | }); |