Skip to content

test: keep the held sidebar preferences read alive on slow runners - #1020

Merged
wesbillman merged 1 commit into
mainfrom
carl/fix-sidebar-unread-flake
Oct 14, 2026
Merged

wesbillman merged 1 commit into
mainfrom
carl/fix-sidebar-unread-flake

Conversation

@wesbillman

Copy link
Copy Markdown
Collaborator

Fixes the WebKit flake in sidebar-unread.spec.mjs › "session changes discard the previous sidebar targets and manual unread still participates". It failed twice on main today: run 38483569748 at aria-busy and run 38481637023 at waitForResponse.

Cause

The test holds the secondary community's sidebar-preferences decode, then switches communities, opens channel details, marks the channel unread, scrolls, and finally releases the decode. The app gives each preference read a 10 s budget (AbortSignal.timeout(10_000) in src/features/relay/session.ts). On slow runners, the steps between the switch and the release take longer than that. In the failing CI trace, the held request is aborted after 9.8 s, about 0.3 s before the aria-busy assertion. Once the read is aborted, preferences settle as an error, so the sidebar is never busy. And if the abort lands later, route.continue() never produces the response the test is waiting for. Passing runs of this test already took up to 21 s, so the margin was thin.

Change

Before opening the page, this test replaces AbortSignal.timeout with a signal that never fires. The test then decides when the held read completes, instead of the runner's speed deciding it. App timeouts aren't what this test covers. The change is test-only and limited to this one test's page.

No browser cases added or removed.

Fail-then-pass evidence (local, macOS)

To simulate the slow runner, I temporarily added a 10.5 s wait after the request is held (not committed):

chromium webkit
before ✘ aria-busy never "true" (same failure as CI) ✘ same
after ✓ ✓

Without the wait, the whole sidebar-unread.spec.mjs passes 28/28 (chromium + webkit, --repeat-each 2).

Deferred

  • Hosted CI on this PR.

🤖 Generated with Claude Code

The session-change test holds the secondary sidebar-preferences decode
across several UI steps, but the app aborts preference reads after 10s.
On slow WebKit runners those steps exceed the budget, the read is
aborted, and the test fails at the busy assertion or while waiting for
the released response. Disable app timeouts for this page so the test,
not the runner's speed, decides when the read completes.

Co-authored-by: Carl <32a2e2c9d428ee08902cab75d956da2c1d235a22d4766b0dd4138bf6e2e5db1d@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Wes <[email protected]>

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

🤖 Carl, an automated reviewer, commenting via Wes's GitHub account.

Verdict: no blockers. Not approving; that's Wes's call.

The diagnosis checks out. The preference read combines AbortSignal.timeout(10_000) in src/features/relay/session.ts:1179-1183. The cited WebKit failure in run 38483569748 fails at aria-busy (sidebar-unread.spec.mjs:478) after the 10 s expect wait, which matches a held read that got aborted. The addInitScript override is installed before open(), so it covers the session's signal. The roster-reveal budget this test asserts uses setTimeout (useSidebarStartup.ts:60), so the override doesn't touch it.

Considered and accepted: the override disables every AbortSignal.timeout on this page, not just the preference read. Narrowing it by matching ms === 10_000 would tie the test to a magic number for no real gain. The worst case is that an unrelated hang in this test hits the 120 s test timeout instead of an app timeout error.

Validation: CI is green on ade4b4c except JavaScript (2/2), which is still running, and that includes Flake check (webkit) and Flake check (chromium). No local run, since CI and the PR's fail-then-pass evidence cover this.

@wesbillman
wesbillman marked this pull request as ready for review October 14, 2026 00:38
@wesbillman
wesbillman requested a review from a team as a code owner October 14, 2026 00:38
@wesbillman
wesbillman merged commit 2fa03e8 into main Oct 14, 2026
57 of 59 checks passed
@wesbillman
wesbillman deleted the carl/fix-sidebar-unread-flake branch October 14, 2026 00:40
morgmart added a commit that referenced this pull request Oct 14, 2026
…al-divider

* origin/main: (70 commits)
  feat(inbox): archive conversations and reopen on incoming activity (#677)
  test: wait for keyboard initial focus in agent activity popups (#1019)
  test: keep the held sidebar preferences read alive on slow runners (#1020)
  Polish channel and thread join previews (#828)
  refactor: share the Buzz base prompt and core memory reads across agent plugins (#1008)
  Continue Me chats as one top-level conversation for native agents (#1000)
  feat(release): enable automatic updates for Windows and Linux previews (#1004)
  fix: keep the video fullscreen button clickable above inline controls (#1007)
  Cmd/Ctrl+W only closes tabs; add Ctrl+Tab tab switching (#936)
  Polish workspace surfaces, split controls, and emoji composition (#801)
  fix: wake reading after an exact message reveal (#1006)
  feat(pairing): copy the pairing code from Settings (#1003)
  Ignore .scratch in the Vite dev watcher (#1001)
  fix(client): recover websocket connections across repeated rollouts (#996)
  test: fix six cross-branch CI flakes (#1002)
  feat(agents): run Buzz's own copies of Claude and Codex, kept on the latest release (#949)
  ci: repeat changed Vitest and Playwright tests 10x on pull requests (#890)
  feat(agents): restore agent memory (#982)
  Soften compact dropdown outlines (#991)
  fix(agents): manage providers, models, and agent migrations (#952)
  ...

Signed-off-by: morgmart <[email protected]>

# Conflicts:
#	src/features/messages/Messages.module.css
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.

1 participant