Expand description
The order a post’s comments are shown in, and what a comment’s line costs a read.
One copy for the server and every client (CLAUDE.md rule 8): the server lists a thread’s stubs in this order and charges each line what the seed runner renders it to, and the runner renders the comments in it.
Structs§
- Thread
Position - One comment’s place in
thread_order
Constants§
- COMMENT_
LINE_ BYTES - What a full comment’s line costs beyond its author’s name, its parent’s and its body, the same way: its badges, date, id and punctuation
- COMMENT_
LINE_ JSON_ BYTES - The longest a full comment’s JSON gets beyond its name and body
- DETACHED_
NOTE_ BYTES - What a line adds when its comment replies to one not in the read, which it then names
- STUB_
LINE_ BYTES - What a stub’s line costs a read beyond its author’s name and its preview, as the seed runner renders it: its date, reply count, size, id and punctuation, at the deepest indent. Held against the rendering by its tests.
- STUB_
LINE_ JSON_ BYTES - The longest a stub’s JSON gets beyond its name and preview, for a reader
of JSON to plan by. 280 since 0.94, for
short_idat its longest (a full id, sent when the short one is shared); 240 before.
Functions§
- preview
- A stub’s preview: the first
charscharacters ofbody, cut back to the last word boundary when that keeps at least half of them, and marked…when anything was cut. Whitespace is collapsed, so a preview stays on its line. - thread_
order - Depth-first thread order: roots by date, each followed by its replies,
by date, recursively. A comment whose parent is not in
itemsis a root. The sorts are stable, so undated items keep the order they came in.