Files
buzz/desktop/src/app/useChannelActivityProjection.test.mjs
T
klopez4212andGitHub b0c6d6f744 Add channel activity hover menu (#3935)
## Summary
- show relevant unread threads and active agents when hovering a channel
- keep channel-level unread emphasis separate from thread activity dots
- make activity rows navigate to the thread and remove demo-only data

## Test plan
- `just ci` (all stages passed except the final duplicate native check,
which ran out of disk after its earlier clippy pass)
- `cd desktop && pnpm exec playwright test
tests/e2e/channel-activity-popover.spec.ts --project=smoke`

---------

Signed-off-by: kenny lopez <klopez4212@gmail.com>
2026-08-03 09:26:06 -07:00

31 lines
846 B
JavaScript

import assert from "node:assert/strict";
import test from "node:test";
import { resolveChannelActivityFeedItemReadAt } from "./useChannelActivityProjection.ts";
test("channel activity read state folds the item's own message and channel markers", () => {
const markers = new Map([
["msg:reply-general", 100],
["general", 200],
["random", 500],
]);
assert.equal(
resolveChannelActivityFeedItemReadAt(
{ id: "reply-general", channelId: "general" },
(contextId) => markers.get(contextId) ?? null,
),
200,
);
});
test("channel activity read state honors a channel marker without a message marker", () => {
assert.equal(
resolveChannelActivityFeedItemReadAt(
{ id: "reply-general", channelId: "general" },
(contextId) => (contextId === "general" ? 300 : null),
),
300,
);
});