Skip to content

Fix startup inventory duplication and late panel scroll shifts - #160

Merged
wesbillman merged 2 commits into
mainfrom
fix/webkit-startup-panel-races
Sep 23, 2026
Merged

wesbillman merged 2 commits into
mainfrom
fix/webkit-startup-panel-races

Conversation

@loganj

@loganj loganj commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🤖

Summary

  • Keep the message being read in the same place when closing a side panel, even when text sizes finish updating late.
  • Read the local agent inventory once during startup. Relay channel discovery no longer discards those local display names; reconnects still load fresh inventory.

Details

The intermittent failures in PR #141’s first run had separate causes:

  • Initial relay readiness could repeat a completed inventory read. Initial channel discovery also cleared that inventory while a read was pending. Reuse the ready inventory and remove only its clearing from channel-access changes. Disconnect, explicit cache clearing, disposal, and failed-read recovery remain intact.
  • The virtual message list stopped restoring the selected message after its 150ms scroll scheduler expired. Later size measurements could move that message. Reuse the existing list-height observer for the saved reading position, with the same cancellation on reader input and cleanup.

Evidence

  • Inventory ordering and lifecycle tests: 6 passed. Both pending/completed startup cases failed before the complete fix.
  • Full Buzz links file: 8 passed across Chromium and WebKit.
  • Full layout file: 18 passed across both engines; focused timeline/name tests: 88 passed.
  • The existing panel journey now forces a late row-size change after the scheduler window. Before the fix it displaced the selected message by 52px in Chromium and 53px in WebKit; after the fix it passes without changing the 4px tolerance. No browser cases added or removed. Real browser layout is required for this check.
  • Local targeted panel checks: pre-fix failing run about 17s (includes expected assertion timeout); post-fix 7.0s, cases 4.8s/5.4s. These are macOS local diagnostics, not hosted performance claims.
  • Before the final base update, at 5859b9e, the complete local package run passed 86 tool-integration tests, 2,223 Vitest tests and 21 Rust tests. Browsers: 513 passed, 1 failed. Both affected full files passed in both engines, as did all local-only WebKit measurements.
  • The remaining local failure is the emoji fixture’s pointer-selection assertion at emoji.spec.mjs:108. That fixture does not mount the timeline and supplies no host inventory reader. Its focused WebKit run passed 3/3 on both the unchanged base and this head. The cause is not established; this is recorded separately, not counted as a green full run.
  • Hosted CI passed all applicable jobs at 5859b9e: 504 functional browser cases, 7 measurements, all Vitest, Rust/tool integration, and required/security checks. Windows native validation was not run.
  • Local fixture installs use the documented Block registry through a process-only setting. An earlier unrestricted-worker run had one bundled-pages timeout; the final full run passed with the repository’s documented two-worker limit. No timeout, assertion or dependency was changed.

After rebasing onto channel-creation changes in main (fdc8a71), the fixes are unchanged apart from patch context. At current head 027acb8, 110 affected unit tests and all 26 tests in the full layout/Buzz-links files pass across Chromium and WebKit. Hosted CI for this head passes: 2,247 Vitest tests, 506 functional browser cases, 7 measurements, Rust/tool integration and all required/security checks. Windows native validation remains skipped. The earlier full-package result and emoji limitation above are retained rather than presented as a fresh full local pass.

@loganj
loganj force-pushed the fix/webkit-startup-panel-races branch from ebd3fc6 to 5859b9e Compare September 23, 2026 14:16
@loganj
loganj marked this pull request as ready for review September 23, 2026 14:32
@loganj
loganj requested review from a team, comp615 and wesbillman as code owners September 23, 2026 14:32
Larry added 2 commits September 23, 2026 10:35
Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
@loganj
loganj force-pushed the fix/webkit-startup-panel-races branch from 5859b9e to 027acb8 Compare September 23, 2026 14:37

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pinky here, reviewing on Wes's behalf.

No blocking correctness findings at 027acb8; one nonblocking documentation note inline. Inventory invalidation and scroll intent/cleanup remain correctly owned, including an independent scroll review by Carl.

Current-head CI is green: 2,247 Vitest tests, 506 functional browser cases, 7 measurements, Rust/tool integration and required/security checks. Both full affected browser files pass in Chromium and WebKit (26 cases). CI's merge tree matches the reviewed head tree.

No local suites or native GUI validation rerun. Windows native validation was skipped as configured; three documented WebKit measurement cases remain local-only. Approval and merge remain Wes's decision.

);
profiles.clear();
emoji.clear();
agentLibrary.clear();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pinky here, commenting on Wes's behalf.

Nonblocking: update the documented inventory lifetime. docs/agents.md:39 still says session access fences clear the host-local library. This intentional removal means channel-access changes now retain it, while disconnect, explicit cache clearing and disposal still clear it. Please align that sentence so it does not promise an invalidation behavior the implementation deliberately no longer provides.

@wesbillman
wesbillman merged commit 8d999bf into main Sep 23, 2026
12 checks passed
@wesbillman
wesbillman deleted the fix/webkit-startup-panel-races branch September 23, 2026 15:09
zrmarley added a commit that referenced this pull request Sep 23, 2026
…search-send

* origin/main:
  Connect attachments to existing message delivery (#176)
  perf: preserve unchanged thread row identities (#171)
  perf: cache markdown preparation by content (#172)
  Add safe attachment upload groundwork (#150)
  feat: add sampling profiler launch modes (#148)
  feat(channels): remove DMs from the sidebar (#157)
  Distinguish namesake agents and selected recipients (#142)
  feat(channels): move diagnostics into Channel Settings (#163)
  Replace warning banners with shared Base UI toasts (#164)
  feat(shortcuts): add keyboard shortcut settings (#155)
  fix(channels): give floating unread cue an opaque panel surface (#153)
  feat(communities): add BUZZ_DEV_OPEN_RELAY to open the default relay on fresh dev ports (#151)
  Restore recipient avatars beside the composer mention tool (#162)
  Fix startup inventory duplication and late panel scroll shifts (#160)
  feat(channels): add channel creation (#138)
  Standardize Button and IconButton with Buzz design tokens (#145)

Signed-off-by: Zach Marley <zmarley@squareup.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants