Make it clearer multiple people have spoken in a thread

merged…
osebo46d ago

I’d love to know if multiple people have spoken in a thread when I scroll through threads list

5 repliesoldestnewest
Osebotfable-5-146d ago

Today each row in the thread list shows only the creator's avatar + login, and the reply bubble counts posts — so a thread where three people (and Claude) have replied looks identical to one where the author talked to themselves.

Plan:

  1. lib/data.ts listThreads: add a participants extra — the distinct authors of a thread's posts (humans by user id, guests by name, Claude as one entry) in order of first post, with login/image, plus a total count. One correlated subquery like replyCount/lastPost, no extra round trip.
  2. GET /api/threads returns it alongside creator, so the live-filtered list has it too.
  3. components/thread-list.tsx: replace the lone creator avatar in the meta line with a stacked avatar group of the participants (max 4 overlapping avatars, then "+N") followed by a short label — "osebo" when only the author has spoken, "osebo, mira & Claude" / "osebo + 3 others" when several have. Applies to both the Titles and Last reply views.
  4. CSS in app/globals.css for the avatar stack; mockup screenshot to check it at phone/desktop widths.
Osebotfable-5-146d agothreadide@5c57394

Done — pushed to thread/10951de9 (5c57394).

What changed

Each row in the thread list (home + workspace pages, Titles and Last reply views) now shows a stack of overlapping avatars of everyone who has posted, creator first, with a label naming the people:

  • only the author has spoken → osebo (looks like before, plus Claude's "C" in the stack if a run happened)
  • two people → osebo & mira
  • more → osebo, mira +3; the stack shows up to 4 heads then a +N disc

The label turns from grey to the text colour once more than one person is in the thread, so the busy threads stand out while scrolling. Hovering the stack lists everyone (title).

How

  • lib/data.ts listThreads: new participants extra — one correlated subquery like replyCount/lastPost, grouping posts by user id (guests by typed name, Claude as a single entry), ordered by first post. No migration.
  • GET /api/threads returns it so the live filter/search list matches the first render.
  • components/thread-list.tsx: Participants replaces the creator-only block in ThreadMeta; falls back to creator if participants is missing.
  • app/globals.css: .avatar-stack (−5px overlap, 1.5px surface ring so heads read as separate).

Verified: tsc clean; ran listThreads() against a seeded sandbox Postgres 17 (dedupes repeat posters, orders by first post, guest counted, empty thread → []); mockup screenshots attached (900px light, 390px dark).

Open question if you want a tweak: Claude is in the avatar stack but not in the name label (I read the request as being about people). Easy to flip either way.

Thread list at 900px: avatar stack (creator first, Claude's "C" included) + label "osebo", "osebo & mira", "osebo, mira +3"
Thread list at 900px: avatar stack (creator first, Claude's "C" included) + label "osebo", "osebo & mira", "osebo, mira +3"
Same rows at 390px in dark mode
Same rows at 390px in dark mode
oseboasked Osebot46d ago

Could you actually not show Claude in the face pile?

Osebotfable-5-146d ago

Sure — dropping Claude from the face pile. Simplest fix at the query level: listThreads' participants subquery will only return human posters (users + guests), so Claude never reaches the UI and the Participant type loses its "agent" variant. The stack and label then only show people; if nobody but Claude has posted (can't really happen — the creator always posts first) the row falls back to the creator avatar. Type cleanup in components/thread-list.tsx, then tsc + a quick query check.

Osebotfable-5-146d agothreadide@ab596d3

Done — Claude is out of the face pile. Pushed ab596d3 to thread/10951de9 (PR #77 is already merged, so this lands as a new small PR).

What changed

  • lib/data.ts listThreads: the participants subquery now only counts posts with author = 'human' (users deduped by id, guests by name, creator first). The Participant type drops its "agent" variant.
  • components/thread-list.tsx: Participants no longer has the "C" disc branch; avatars, the "+N" disc, the label and the hover title all come from the same people-only list.

The rest is unchanged: osebo / osebo & mira / osebo, mira +2, label darkens once more than one person has spoken.

Verified: tsc clean; the SQL is the #77 query (checked against a seeded Postgres then) plus one author = 'human' predicate — 'human' is a value of the author_kind enum. No migration.