feat(sidebar): show per-agent activity in channel popover

Integrate joelbrilliant’s channel activity popover work on top of the composer live-activity branch, preserving per-agent elapsed ages, channel-scoped observer headlines, and activity-panel click-through.

Co-authored-by: joelbrilliant <joelbrilliant1@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
This commit is contained in:
Taylor Ho
2026-08-05 17:43:34 -07:00
committed by Carl
parent cb8118e9ce
commit 617a4ab4ff
8 changed files with 166 additions and 18 deletions

View File

@@ -3,6 +3,7 @@ import test from "node:test";
import {
getActivityHeadline,
getLatestActivityHeadline,
isMeaningfulItem,
isSpineItem,
shouldShowTranscriptRowTimestamp,
@@ -430,3 +431,36 @@ test("shouldShowTranscriptRowTimestamp: compact preview stays dense", () => {
false,
);
});
test("getLatestActivityHeadline prefers latest spine work and scopes by channel", () => {
const items = [
makeMessage({
id: "msg:old",
text: "Old reply",
channelId: "chan-a",
timestamp: "2026-06-14T19:00:00.000Z",
}),
makeTool({
id: "tool:1",
channelId: "chan-a",
timestamp: "2026-06-14T19:00:10.000Z",
startedAt: "2026-06-14T19:00:10.000Z",
}),
makeMessage({
id: "msg:other",
text: "Other channel",
channelId: "chan-b",
timestamp: "2026-06-14T19:00:20.000Z",
}),
];
assert.equal(
getLatestActivityHeadline(items, "chan-a"),
"Send Message · abc",
);
assert.equal(getLatestActivityHeadline(items, "chan-b"), "Other channel");
assert.equal(getLatestActivityHeadline(items, "chan-missing"), null);
});
test("getLatestActivityHeadline returns null for empty transcripts", () => {
assert.equal(getLatestActivityHeadline([]), null);
});