diff --git a/desktop/src/features/agents/ui/agentSessionTranscriptPresentation.test.mjs b/desktop/src/features/agents/ui/agentSessionTranscriptPresentation.test.mjs index 6ce47891b..ab019c3c1 100644 --- a/desktop/src/features/agents/ui/agentSessionTranscriptPresentation.test.mjs +++ b/desktop/src/features/agents/ui/agentSessionTranscriptPresentation.test.mjs @@ -453,10 +453,7 @@ test("getLatestActivityHeadline prefers latest spine work and scopes by channel" timestamp: "2026-06-14T19:00:20.000Z", }), ]; - assert.equal( - getLatestActivityHeadline(items, "chan-a"), - "Send Message · abc", - ); + assert.equal(getLatestActivityHeadline(items, "chan-a"), "Sent abc"); assert.equal(getLatestActivityHeadline(items, "chan-b"), "Other channel"); assert.equal(getLatestActivityHeadline(items, "chan-missing"), null); }); diff --git a/desktop/tests/e2e/channel-activity-popover.spec.ts b/desktop/tests/e2e/channel-activity-popover.spec.ts index a62d064d7..5b615a606 100644 --- a/desktop/tests/e2e/channel-activity-popover.spec.ts +++ b/desktop/tests/e2e/channel-activity-popover.spec.ts @@ -226,18 +226,61 @@ async function seedChannelActivity( ); await page.evaluate( ({ agentPubkey, channelId }) => { + const now = Date.now(); ( window as Window & { __BUZZ_E2E_SEED_ACTIVE_TURNS__?: (input: { agentPubkey: string; channelId: string; turnId: string; + atMs?: number; + }) => void; + __BUZZ_E2E_SEED_OBSERVER_EVENTS__?: (input: { + agentPubkey: string; + events: Array>; }) => void; } ).__BUZZ_E2E_SEED_ACTIVE_TURNS__?.({ agentPubkey, channelId, turnId: "channel-hover-preview", + atMs: now - 92_000, + }); + ( + window as Window & { + __BUZZ_E2E_SEED_OBSERVER_EVENTS__?: (input: { + agentPubkey: string; + events: Array>; + }) => void; + } + ).__BUZZ_E2E_SEED_OBSERVER_EVENTS__?.({ + agentPubkey, + events: [ + { + seq: now, + timestamp: new Date(now - 2_000).toISOString(), + kind: "acp_read", + agentIndex: 0, + channelId, + sessionId: "channel-hover-session", + turnId: "channel-hover-preview", + payload: { + jsonrpc: "2.0", + method: "session/update", + params: { + sessionId: "channel-hover-session", + update: { + sessionUpdate: "agent_message_chunk", + messageId: "channel-hover-message", + content: { + type: "text", + text: "Updated the channel activity preview", + }, + }, + }, + }, + }, + ], }); }, { agentPubkey: AGENT_PUBKEY, channelId: CHANNEL_GENERAL }, @@ -338,8 +381,8 @@ test.describe("channel activity hover preview", () => { popover.getByTestId(`channel-activity-agent-${AGENT_PUBKEY}`), ).toContainText("Charlie"); await expect( - popover.getByTestId(`channel-activity-agent-${AGENT_PUBKEY}`), - ).toContainText("Working"); + popover.getByTestId(`channel-activity-agent-status-${AGENT_PUBKEY}`), + ).toHaveText("Working · Updated the channel activity preview"); const orderedRows = popover.locator( '[data-testid^="channel-activity-agent-"], [data-testid^="channel-activity-item-"]', );