Files
buzz/desktop
Leo 2c207987ae fix(desktop): show edited head content in thread panel
The channel top-level timeline renders a message's newest (edited) body,
but opening its thread panel showed the stale pre-edit body until the
async thread-aux backfill landed (and permanently if it raced/missed).

buildIndependentThreadPanel extracted a single head content event by id
from the channel window and built events = [head, ...replyEvents],
discarding the head's aux overlay events (edits kind:40003, deletions,
reactions) that already sit beside it in that same window.
formatTimelineMessages only applies an edit when the edit event is in the
same array as its target, so the head relied solely on withThreadAux to
re-supply the edit — stale whenever that fetch lagged.

Carry the head's non-content aux events (via !isTimelineContentEvent) from
the channel window into the thread head's event array, deduped against
replyEvents by id. This makes the thread head byte-identical to the main
timeline the instant the thread opens, independent of the async aux fetch.
Restricted to non-content kinds so reply content rows never leak in.

Tests:
- Unit regression (independentThreadPanel.test.mjs): fails pre-fix
  ("two PRs"), passes post-fix ("these PRs").
- e2e (thread-head-stale-edit.spec.ts): delays thread-replies aux to force
  the channel-window-vs-thread-aux divergence; asserts the thread panel
  head shows edited content. Red pre-fix (stale head), green post-fix.
- Full desktop unit suite: 5562 pass / 0 fail. biome + tsc clean.

Signed-off-by: Leo <5faf251baee50ee6bcde338aef6acdd70bb3e60115664c2cd490d94a55dfc488@buzz.block.builderlab.xyz>
2026-08-26 11:31:37 -04:00
..
…

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 frontend
  • pnpm tauri dev - run the desktop app
  • pnpm build - typecheck and build frontend
  • pnpm typecheck - TypeScript checks
  • pnpm lint - Biome lint
  • pnpm 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