镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

test(channels): split combined invitation paging test - #829

Merged
kalvinnchau merged 1 commit into
mainfrom
test/split-channel-members-paging
Oct 9, 2026
Merged

kalvinnchau merged 1 commit into
mainfrom
test/split-channel-members-paging

Conversation

@kalvinnchau

Copy link
Copy Markdown
Contributor

Why

ChannelMembersDialog.test.tsx › "pages combined local and relay invitations without losing matches, and resets on query or refresh" timed out on main at 54bd063 (5523ms against Vitest's 5000ms default; run). It normally takes about 3.4s, both locally and in CI, so a loaded runner pushes it past the limit. The test hasn't changed recently. This is a timing-budget flake, not a product regression.

Timing each step locally showed the cost is real work, not waits that could be removed:

  • Rendering up to 96 rows, plus accessible-name role queries: about 2s.
  • Four real 200ms search debounces with waitFor: about 1s.

Limiting the queries to the results region saved only 4–7%. The 96 rows are the minimum for the paging behavior the test proves, so the fixture can't shrink.

Change

The test name already covers two behaviors, so this splits it at that boundary:

  • pages combined local and relay invitations without losing matches: same 65 local + 30 relay + relay page 2 fixture, and every paging assertion unchanged (30/60/90/95/96 rows, relay pages [1] → [1, 2], no "Show more" at the end).
  • resets combined invitation paging on refresh or query change: a smaller fixture with 31 local agents, still more than one page so a reset is visible. It pages through relay page 2 (62 rows, [1, 2]). It then asserts that refresh resets to 30 rows and re-queries page 1 ([1, 2, 1]), and that a query change resets to 30 rows and clearing the search removes the region.

Shared setup moves into a local pagedInvitations helper. No assertions are dropped, and the timeout and retries are untouched.

Evidence (local, macOS, vitest run, base b23fb8752)

runs (ms)
before: combined test 3398, 3344, 3405
after: paging 2424, 2515, 2485
after: reset 2602, 2668, 2722

The slowest test drops from ~3.4s to ~2.7s, so headroom under 5s goes from about 1.5× to about 1.9×. Each test still pays ~1s of fixed setup, typing and debounce.

  • Fail-then-pass: removing setInvitationPage(...) from refreshMembers makes the reset test fail. Restoring it passes.
  • Whole file: 48/48 pass. tsc --noEmit and biome are clean.
  • Not run locally: the rest of the suite, which is left to CI.

Signed-off-by: Kalvin Chau <kalvin@block.xyz>
@kalvinnchau
kalvinnchau requested a review from a team as a code owner October 9, 2026 21:47

@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.

No changes requested: the split preserves paging, deduplication, refresh/query reset, and no-write assertions with isolated fixtures and the existing teardown owner. Hosted CI passes, but the two cases took 4.808s and 4.773s against the 5s timeout, so flake elimination is not established.

Star Lord automated source review via Wes's account; head 67ebc70b1805a394332227551b04c66ae5aa912a, base 0217167f5be8efa3f0bec294f1ad2c6fae3627e4. Source-only inspection plus hosted-log review; no local tests or app execution, and no approval or merge authorization.

@kalvinnchau
kalvinnchau merged commit 829b1ec into main Oct 9, 2026
23 checks passed
@kalvinnchau
kalvinnchau deleted the test/split-channel-members-paging branch October 9, 2026 22:14
johnmatthewtennant pushed a commit that referenced this pull request Oct 10, 2026
* origin/main:
  fix(codex): default agent workspace to ~/.buzz (#831)
  View Codex and Claude sessions started in Buzz (#826)
  feat(codex): run bundled Codex with danger-full-access (#832)
  feat(codex): bundle the Codex agent type by default (#830)
  test(channels): split combined invitation paging test (#829)
  fix(dev): rebuild Vite's dependency cache on every dev start (#823)
  docs(agents): add buzz-specific test-audit skill (#797)
  fix: make inbox detail channel heading open its context (#819)
  fix(agents2): run each agent in one copy of the app (#790)
  Add Codex agents to Agents2

Signed-off-by: Sol <49aa1f65411fd096d2e2ec144f1e7aa36fdc76d1b907cfdf7be000c66f9d3b8e@buzz.block.builderlab.xyz>
wpfleger96 pushed a commit that referenced this pull request Oct 10, 2026
* origin/main:
  fix(me): share Messages sidebar working indicators and activity (#817)
  fix(messages): show typed angle-bracket text instead of dropping it (#803)
  fix(codex): default agent workspace to ~/.buzz (#831)
  View Codex and Claude sessions started in Buzz (#826)
  feat(codex): run bundled Codex with danger-full-access (#832)
  feat(codex): bundle the Codex agent type by default (#830)
  test(channels): split combined invitation paging test (#829)
  fix(dev): rebuild Vite's dependency cache on every dev start (#823)
  docs(agents): add buzz-specific test-audit skill (#797)
  fix: make inbox detail channel heading open its context (#819)
  fix(agents2): run each agent in one copy of the app (#790)
  Add Codex agents to Agents2
  fix(builderlab): complete AgentsNative mock in test (#824)

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>

# Conflicts:
#	src/bundled/builderlab/index.test.tsx
morgmart added a commit that referenced this pull request Oct 10, 2026
* origin/main: (51 commits)
  fix(messages): default nonmember prompt to invite (#825)
  fix(toast): cancel exit-removal timers on unmount (#843)
  fix(me): share Messages sidebar working indicators and activity (#817)
  fix(messages): show typed angle-bracket text instead of dropping it (#803)
  fix(codex): default agent workspace to ~/.buzz (#831)
  View Codex and Claude sessions started in Buzz (#826)
  feat(codex): run bundled Codex with danger-full-access (#832)
  feat(codex): bundle the Codex agent type by default (#830)
  test(channels): split combined invitation paging test (#829)
  fix(dev): rebuild Vite's dependency cache on every dev start (#823)
  docs(agents): add buzz-specific test-audit skill (#797)
  fix: make inbox detail channel heading open its context (#819)
  fix(agents2): run each agent in one copy of the app (#790)
  Add Codex agents to Agents2
  fix(builderlab): complete AgentsNative mock in test (#824)
  feat(teams): edit shared team instructions in their own record (#775)
  Use Sonner for bottom-right app toasts (#813)
  Allow bounded stdin data for fixed plugin host commands (#769)
  Add native Codex agents with CLI defaults (#751)
  Register placeholder Builderlab agent type in Agents2 (#788)
  ...

Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.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