Thread index: counts, latest, forks and dates per thread, built once and kept current #243
Labels
No labels
area/ci
area/desktop
area/packaging
area/protocol
area/reading
area/ui
area/web
area/writing
kind/bug
kind/feature
kind/infra
kind/request
needs/user
parked
perf
security
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
littlefox/neokom#243
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Groundwork for #242 (Teams-style channels and threads), decided 2026-10-21 to be done in 0.6 so #242 is affordable on big meetings.
#242 shows things LysKOM can't answer in one call:
The protocol only gives us one text stat at a time, so this needs a thread index in
kom-client.What it holds: per thread root, in a conference:
Per text, it holds its root (the
thread_rootwalk, cached).How it is built:
local-to-global) plus their stats, grouping each under its root. This is also how a page of #242's channel list is made: "the threads touched by the last N texts".How it stays current: updated from async new-text messages, not rebuilt.
Bounded: by count and bytes, like the caches of #236. Possibly kept between sessions later (IndexedDB / a file) so a 3 000-reply thread isn't walked every login. Decide when measuring.
Tests: unit tests on a synthetic tree; a devserver test on the big seeded meeting (#225): counts, latest, forks and subject splits match a full walk; an async new text updates it.
Measure (#225): calls and time for the first page of a channel with a 3 000-reply thread, cold and warm.
Merged in #272 (main #456 green).
Kom::thread_info(t)gives replies, the last text and when, the newest three texts, participants, forks and texts per month for t's thread. It walks the thread once (stats only, 16 at a time), keeps the result per root (500 threads), and new-text messages keep it current with no further calls. Subject splits and grouping a channel into threads stay with #242. Verified: unit test for the counting, devserver testthread_index, clippy three ways.