fix(desktop): hydrate reactions for Inbox context messages#1596
Merged
Conversation
Reactions added from the Inbox looked like they failed: the optimistic pill appeared, then vanished on the next refetch. The kind:7 event was stored on the relay all along — but the Inbox read path never fetched reactions for thread replies, which the channel-window query does not carry, so the refetch clobbered the pill with reaction-less data. Give the Inbox the same `#e`-referenced reaction hydration the channel view uses (buildChannelReactionAuxFilter), and refresh it after a toggle. The mock bridge now serves `#e`-keyed aux filters across channel stores like the real relay, and emitted mock messages can carry a 64-hex id so they are valid reaction targets in tests. Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Collaborator
Author
wesbillman
commented
Jul 7, 2026
wesbillman
left a comment
Collaborator
Author
There was a problem hiding this comment.
Reviewed on behalf of Wes. LGTM with two non-blocking notes.
Verified:
- Fix reuses the channel view's exact hydration primitives (
fetchAuxEventsByReference+buildChannelReactionAuxFilter, the#e-keyed/no-#hfilter) — the Inbox was the only reaction consumer without this step, so the diagnosis and the fix location line up. - Remove path: kind:5 soft-deletes the reaction server-side, so the awaited
refreshReactions()→refetch()sequence correctly drops the pill; no resurrection from stale cache. - Duplicate merge of
channelMessages+ hydratedreactionEventsis safe:formatTimelineMessagesdedupes presence ontargetId:actor:emoji(covered by an existing unit test). - Merge-base is current main tip.
- CI red is only
scroll-history.spec.ts:1546on Smoke shard 4 — the identical test failed on a plain-main run today (run 28881441134). Pre-existing flake; shard re-run should clear it.
Non-blocking:
fetchReactions's barecatch { return null }— aconsole.error(asrenderScopedReactions.tsdoes) would make the next read-path failure findable; this bug was born from a swallowed error.- The e2e re-select dance is a little magical; selecting a genuinely different item (or a comment) would make the "purely from relay data" assertion more robust.
Separate follow-up (pre-existing on main, not this PR): canReact still allows reacting on kind 45001/45003 summary items while canReply excludes them.
- Log fetchReactions failures instead of swallowing them silently - e2e: switch selection to a genuinely different inbox item before re-selecting, instead of the filter-trigger/Escape dance Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
wpfleger96
approved these changes
Jul 7, 2026
tellaho
added a commit
that referenced
this pull request
Jul 7, 2026
…ivity * origin/main: fix(desktop): hydrate reactions for Inbox context messages (#1596) fix: cleanup old screenshots that my agents committed (#1598) chore(release): release Buzz Desktop version 0.3.46 (#1585) fix(desktop): preserve agent model/provider when persona snapshot fields are blank (#1583) feat(acp,desktop): identify and reap stale agent harness processes (#1582) feat(desktop): active-draft badge, send-from-drafts confirm dialog, thread-deleted state (#1581) fix(desktop): treat baked build env vars as satisfying required agent config (#1580) feat(desktop): add "Copy image" to image right-click context menu (#1579) fix(nest): use buzz-dev symlink name for dev builds (#1587) fix(composer): address image-editor follow-up nits on #1491 (#1565) fix(desktop): render black static boot screen (#1570) feat(agents): group activity tool bursts (#1571) feat(desktop): aggregated overview rail, commit detail page, and full breadcrumbs (#1573) fix(desktop): fetch profiles for reaction actors and thread-reply authors (#1550) refactor(desktop): unify EditAgentDialog styling with PersonaDialog (#1540) feat(desktop): add 10-minute message grouping window (#1578) feat(desktop): unify sidebar section actions into a per-section ⋮ menu (#1577) feat(desktop): emoji avatar picker for agents + reliable picker scroll (#1576) Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
tlongwell-block
pushed a commit
that referenced
this pull request
Jul 7, 2026
* origin/main: docs(readme): add Getting started section routing install paths (#1606) fix(desktop): restrict shared-agent sync to dev data dirs (#1597) feat(desktop): restart-required badge from spawn-time config hash (#1602) feat(desktop): boot-time reconcile of managed agents to relay events (#1601) feat(desktop): canonical <PubKey> component — hover to view/copy full keys, owner "you" labels (#1589) fix(desktop): hydrate reactions for Inbox context messages (#1596) fix: cleanup old screenshots that my agents committed (#1598) chore(release): release Buzz Desktop version 0.3.46 (#1585) fix(desktop): preserve agent model/provider when persona snapshot fields are blank (#1583) feat(acp,desktop): identify and reap stale agent harness processes (#1582) feat(desktop): active-draft badge, send-from-drafts confirm dialog, thread-deleted state (#1581) fix(desktop): treat baked build env vars as satisfying required agent config (#1580) feat(desktop): add "Copy image" to image right-click context menu (#1579) fix(nest): use buzz-dev symlink name for dev builds (#1587) fix(composer): address image-editor follow-up nits on #1491 (#1565) fix(desktop): render black static boot screen (#1570) feat(agents): group activity tool bursts (#1571) feat(desktop): aggregated overview rail, commit detail page, and full breadcrumbs (#1573) fix(desktop): fetch profiles for reaction actors and thread-reply authors (#1550)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Problem
Adding a reaction from the Inbox looked broken: the emoji burst played and the pill appeared, then vanished ~1s later. Nothing seemed stored.
The kind:7 event was stored on the relay all along — the write path is identical to the channel view. The failure was on the read path: reactions carry only an
#ereference (no channel tag), so the channel-window query never returns them for thread replies, and the Inbox — unlike the channel view — had no reaction hydration step. Its post-toggle refetch came back reaction-less and clobbered the optimistic pill.Fix
useInboxThreadContextnow fetches kind:7 events by#ereference for the rendered context messages (samebuildChannelReactionAuxFilterpath the channel view uses) and exposesrefreshReactions.HomeViewmerges those hydrated reaction events into the reaction pass and refreshes them after a toggle, so the refetch confirms the pill instead of clobbering it.Test
New smoke e2e (
inbox-reactions.spec.ts) reproduces the exact reported shape — a thread-reply mention reacted to from the Inbox detail pane — and asserts the pill survives both the post-toggle refetch and a full re-select (all optimistic state dropped). Supporting mock-bridge changes:#e-keyed aux filters are served across channel stores like the real relay, and emitted mock messages can carry a 64-hex id (required to be a valid reaction target).Verified: typecheck, biome check, 1953 unit tests, full smoke suite (391 passed; the 2 failures — channels scroll-intro, custom-emoji edit — fail identically on the parent commit without this change).