Repository navigation
perf(sidebar): subscribe to selected live and list facts - #1966
Conversation
the sidebar, profile button and sidebar startup subscribed to whole live, solo navigation and channel list snapshots, which are replaced on every message, head update and preview. select only the facts they read: the solo title, the conversation's destination, the roster state and the live status. Co-authored-by: peon <9ac6794b000690b7e814eb1805ad32405d0bec7d52838de3a86cf967565dacc0@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kalvin Chau <kalvin@block.xyz>
wesbillman
left a comment
There was a problem hiding this comment.
🤖 Star Lord’s automated source review via Wes’s account, integrating independent Rocket, Mantis and Groot review.
No actionable findings in the four-file change and its affected call paths. The selected values preserve Solo title/destination updates, profile-refresh inputs, startup readiness and independently subscribed recovery controls. The existing stores supply stable roster references and primitive selector results; the added regression test checks that heads-only updates do not rerender the startup hook.
Reviewed head: 7dc7e67
Base: 561265d
Source-only: no tests, builds or app execution were performed. The PR’s performance measurements and test results are author-reported, not independently reproduced here; native behavior, rendered focus/accessibility and human acceptance remain unverified. Public PR description and commit metadata were inspected; the description contains no attached images. This COMMENT is not an approval or merge authorization.
kazemek21
left a comment
There was a problem hiding this comment.
Kyle reviewed this PR and the Nexus review-tracker notes and approves with no comments.
Posted by Codex (gpt-6.1-sol) on behalf of kylez.
Picks up the month-boundary StatusEditor test fix (#2064). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * origin/main: (56 commits) perf(sidebar): subscribe to selected live and list facts (#1966) feat(desktop): align the sign-in callback page with web branding (#2038) Show linked PRs in Solo headers and move idle huddles to Chat actions (#1968) feat(messages): mark edited messages with "(edited)" (#2020) feat(desktop): bundle the buzz CLI in every package (#2027) feat(plugins): open a plugin page from buzz://plugin links (#2053) feat(plugins): managed plugin sources (#2052) test(browser): prevent sampled clock pause races (#1955) test: fix month-boundary and Sonner mount races in StatusEditor and RelayStaff tests (#2064) test: stop tests leaving temp dirs and a flake-check fixture behind (#1977) fix(messages): release Virtua's held range when scrolling stops (#2032) test(mcp): allow protection checks in bundled help fixture (#2061) fix(emoji): recover transient image failures without reopening chats (#2000) test: wait for dialog focus, reach a reading position, re-sign pair() (#1975) feat(plugins): sign builderlab in through the native fi session in fi builds (#1461) feat(agents): offer bundled Buzz help (#2033) fix(github): show pull request status for anchors and subpages (#2055) fix(dialogs): focus safe controls and task inputs (#2021) fix(composer): truncate workspace names at narrow widths (#2043) AIDA-2287: Refresh public channel search incrementally (#2023) ... Signed-off-by: Alex Rosenzweig <arosenzweig@squareup.com>
…isibility * origin/main: (23 commits) feat(profiles): show NIP-FI verified names (BUZZ-433) (#2005) feat(identity): sign in to the organization when Buzz opens (#2086) perf(identity-names): stop rerunning name policy for live member churn (#2092) fix(sidebar): keep the channel drag preview under the pointer (#2019) fix(identity): use xyz.block.buzz.desktop federated-session keychain service (#2094) perf(relay): read each channel's remote access once per accepted batch (#2091) fix(styles): keep page status :has() on each rule's subject (#2081) fix(navigation): show a notice for invalid deep links (#2054) fix(messages): preserve held readers through equal-height resizes (#1963) perf(sidebar): subscribe to selected live and list facts (#1966) feat(desktop): align the sign-in callback page with web branding (#2038) Show linked PRs in Solo headers and move idle huddles to Chat actions (#1968) feat(messages): mark edited messages with "(edited)" (#2020) feat(desktop): bundle the buzz CLI in every package (#2027) feat(plugins): open a plugin page from buzz://plugin links (#2053) feat(plugins): managed plugin sources (#2052) test(browser): prevent sampled clock pause races (#1955) test: fix month-boundary and Sonner mount races in StatusEditor and RelayStaff tests (#2064) test: stop tests leaving temp dirs and a flake-check fixture behind (#1977) fix(messages): release Virtua's held range when scrolling stops (#2032) ... # Conflicts: # src/bundled/channels/ChannelMemberAvatars.tsx
The sidebar, profile button and sidebar startup no longer re-render on every message, live head update and preview.
Each subscribed to a whole snapshot that the store replaces on unrelated changes:
ScopedSidebarread the Solo navigation snapshot for its title and the channel list for the conversation's destination. Solo regions are rebuilt on every message, and the list on every preview.ProfileButtonread the live snapshot for its roster and status, anduseSidebarStartupread it for the roster state. Live heads change on every message and prefetch.Each now selects only the fact it reads: the Solo title, the conversation's destination, the roster state and the live status. All of these are strings or stable references, so
useSyncExternalStoreskips the render when they are unchanged. The profile refresh effect keeps the same dependency values.Blox workstations, main 561265d against this change: 5 Linux and 5 macOS, production builds, Playwright WebKit 26.6 and Chromium 153, 100 channels with 10 tabs, 200 history rows and 100 thread replies. Each machine ran every cell once per variant, interleaved with three other candidate changes.
Medians of 5 runs over a 20 s idle window with traffic (20 messages, 79 typing/liveness events):
Repeated switch latency over 12 switches per run, 5 runs (55 samples):
Switch latency is unchanged (p50 within 3%), and keystroke, sidebar hover and Tab focus to frame stay within 2 ms.
In a later round with the same setup, this change stacked on #1967 lowered Chromium idle script by 8% on Linux (176 → 162 ms) and 5% on macOS (332 → 314 ms), and script per switch by 5% and 6%.
Validation:
useSidebarStartup.test.tsx: a new test checks that a live heads change does not render the hook again, while a roster change does. It fails on main and passes with this change.pnpm check, and Vitest forsrc/app/shellandsrc/bundled/channels(1128/1128). Full Vitest: 13,941 passed;browser-host/project-git.test.mjsfailed once under full-suite load and passes alone.navigation-sidebar,sidebar-reveal,solo-navigation,solo-rename,account-profile,startup(94 passed).🤖 Generated with Claude Code