mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
The channel timeline renders only root-level entries, so agent replies
addressed to a human inside threads are invisible where that human reads
the channel. surfaceReplies projects nested agent replies that p-tag the
VIEWER, collapseSurfacedReplies folds each thread's buried replies into one
representative (the most-recent reply) carrying the group count.
Two constraints keep the projection from flooding the timeline in this
team's threading model, where nearly every message is a nested reply:
- Viewer-only: only replies p-tagging the reader surface, and an
unresolved viewer fails closed (surfaces nothing) rather than falling
back to "any human".
- Per-thread collapse: a busy thread contributes one pill, not dozens.
Each collapsed pill is ATTACHED to its thread-root message and renders as
a pill directly below that root (the same visual grammar as the
thread-summary row), driven from the entry side via buildSurfacedByRoot
keyed by the thread root id. The pill lives and dies with its root: a
surfaced thread whose root is not a rendered entry (off-window, or a
broadcast-rooted subthread whose NIP-10 root marker points elsewhere)
contributes no pill rather than a detached orphan.
The pill is self-explanatory: "{author} replied to you" followed by a
single-line snippet of the most-recent reply (surfacedReplyLabel collapses
whitespace and truncates), with a quiet "· N replies" suffix for a thread
with more than one buried reply. Clicking navigates via
goChannel({messageId, threadRootId}) to the most-recent surfaced reply.
De-dupe stays strict body-match so an agent's unrelated earlier root post
cannot suppress a genuinely new nested reply; agent-to-agent replies are
excluded.
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Buzz
Desktop chat shell with:
- Tauri + React + TypeScript + Vite
- Tailwind CSS
- shadcn/ui-ready shared components
- Biome (lint/format/check)
- Feature-driven frontend structure
Scripts
pnpm dev- run the web frontendpnpm tauri dev- run the desktop apppnpm build- typecheck and build frontendpnpm typecheck- TypeScript checkspnpm lint- Biome lintpnpm format- Biome format (write)pnpm check- Biome check
Structure
src/shared- reusable app-wide code (ui,lib,styles)src/features- feature modules (vertical slices)src/app- top-level app composition