prototype: sidebar reports unread presence, not counts

Booleans for ordinary unread and attention, existence probes instead of
counts to a cap, mentions from event_mentions, threads pruned by root
last_reply_received_at. Benchmark scaffold included; not for merge.

Signed-off-by: hMB2 <0400eb0da32afbbf16cdd1dee6ffd243587e8f3d6a2823fe7dfa95d16b002b7d@buzz.block.builderlab.xyz>
This commit is contained in:
hART
2026-10-06 21:13:28 -07:00
committed by hMB2
parent be3dc14689
commit 7e09d56c7b
15 changed files with 416 additions and 200 deletions

View File

@@ -559,6 +559,7 @@ CREATE TABLE thread_metadata (
descendant_count INT NOT NULL DEFAULT 0,
last_reply_at TIMESTAMPTZ,
broadcast BOOLEAN NOT NULL DEFAULT FALSE,
last_reply_received_at TIMESTAMPTZ,
PRIMARY KEY (community_id, event_created_at, event_id),
FOREIGN KEY (community_id, channel_id) REFERENCES channels (community_id, id)
);