A channel as a list of threads (#242 step 1a) #297

Merged
littlefox merged 3 commits from issue-282-thread-list into main 2026-10-22 20:47:25 +00:00
Owner

Closes #282
Closes #296

#242 step 1a: a channel as a list of threads, chosen in the settings for now ("Visa ett möte: som trådar"), until #286 makes it a choice per channel.

  • One card per thread, latest activity at the bottom; replies get no cards.
  • Each card has the first post cut short and a reply bar: avatars, "N svar · senast <när> ", "N nya" / "1 ny".
  • "Ny tråd" on a new first post. "Inga svar ännu · Svara" on a thread without replies.
  • Live: a reply moves its thread to the bottom.
  • The reply bar opens the thread at its first unread post; the subject opens it at the start.
  • Older threads load as the top comes near. Only cards near the screen are drawn.

Under the hood:

  • Kom::channel_threads: a channel's texts grouped by root, newest activity first, a few threads at a time.
  • The thread index keeps where each text was sent, so thread_unread needs no calls.
  • #296: new-text messages raise the cached highest_local_no.

Verified:

  • thread-list.spec.ts on desktop, Android and iPhone sizes: order, reply bars, Ny tråd, Svara, new thread, a live reply from Anna moving its thread, opening at the first unread and back.
  • Full e2e: 341 passed.
  • Devserver integration tests: 17 passed, including the new channel_threads.
  • Clippy three ways is clean.

Seed: Trådlista and Tilda Trådlista, created last, so no other numbers move.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8

Closes #282 Closes #296 #242 step 1a: a channel as a list of threads, chosen in the settings for now ("Visa ett möte: som trådar"), until #286 makes it a choice per channel. - One card per thread, latest activity at the bottom; replies get no cards. - Each card has the first post cut short and a reply bar: avatars, "N svar · senast <när> <vem>", "N nya" / "1 ny". - "Ny tråd" on a new first post. "Inga svar ännu · Svara" on a thread without replies. - Live: a reply moves its thread to the bottom. - The reply bar opens the thread at its first unread post; the subject opens it at the start. - Older threads load as the top comes near. Only cards near the screen are drawn. Under the hood: - `Kom::channel_threads`: a channel's texts grouped by root, newest activity first, a few threads at a time. - The thread index keeps where each text was sent, so `thread_unread` needs no calls. - #296: new-text messages raise the cached `highest_local_no`. Verified: - `thread-list.spec.ts` on desktop, Android and iPhone sizes: order, reply bars, Ny tråd, Svara, new thread, a live reply from Anna moving its thread, opening at the first unread and back. - Full e2e: 341 passed. - Devserver integration tests: 17 passed, including the new `channel_threads`. - Clippy three ways is clean. Seed: Trådlista and Tilda Trådlista, created last, so no other numbers move. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
One card per thread, latest activity at the bottom like a chat: the
first post cut short and a reply bar (who replied, how many, the latest,
how many are new). Replies get no cards; a new thread says so; a reply
moves its thread down as it comes. Older threads load as the top comes
near, and only cards near the screen are drawn.

Kom::channel_threads walks a channel's texts from the newest back and
groups them by thread root, a few threads at a time. The thread index now
keeps where each text was sent, so a thread's unread count needs no
calls. New-text messages raise the cached highest local number of their
conferences; a channel's newest page missed new texts before (#296).

Chosen in the settings for now (channel-view), until #286 makes it a
choice per channel. Seeded: Trådlista, read by Tilda.

Closes #296
Refs #282 #242

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
Roadmap: #242 step 1a done
Some checks failed
ci / e2e (push) Has started running
ci / desktop (push) Has started running
ci / check (push) Failing after 3m20s
e1455a2eb4
Refs #282

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
Test: names, not letters, in the channel_threads test
All checks were successful
ci / check (push) Successful in 8m55s
ci / desktop (push) Successful in 16m33s
ci / e2e (push) Successful in 33m11s
e8a77ee4e7
clippy::many_single_char_names, which CI checks on all targets.

Refs #282

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
littlefox referenced this pull request from a commit 2026-10-24 13:23:56 +00:00
Sign in to join this conversation.
No description provided.