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.
This commit is contained in:
hART
2026-10-06 21:13:28 -07:00
parent c0bf08ff18
commit 4bd9c1e0d2
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)
);