Skip to content

test(web): bound testing-library async waits at 5 s - #24903

Merged
Git-on-my-level merged 1 commit into
mainfrom
lane/web-flake-timeout
Nov 8, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
lane/web-flake-timeout

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Requested by David

Summary

Raises testing-library's async wait (asyncUtilTimeout) from the 1 s default to 5 s in the shared web test setup. Test-only change, four lines, no product code and no UI change.

Why

Three web tests fail intermittently in the full vitest run, and each failure is TestingLibraryElementError from a findBy that expired, not an assertion about wrong content:

  • DevelopersKeys.test.tsx "shows genuine empty lists": findByText('No API keys created yet')
  • SettingsDailySummary.test.tsx "does not save the settings when the load failed": findByText('Daily Summary')
  • SettingsSubscriptionClarity.test.tsx "shows Plus with its finite meter and records a real checkout selection": findByRole('heading', { name: 'Plus' })

vitest.config.mts sets testTimeout to 15 s, which none of them hit. vitest.setup.ts did not override testing-library's 1 s async default, so a first render slower than 1 s fails under host load. The failing set changed from run to run, which fits a load-dependent timing race.

Verification

  • Full web suite through bin/omi-heavy, same commands as the pre-push hook (bun test scripts/moonshine-smoke.test.ts && vitest run --config vitest.config.mts), at normal MacBook load:
    • run 1: 167/167 files, 1011/1011 tests, 179.5 s
    • run 2: 167/167 files, 1011/1011 tests, 140.3 s
  • The pre-push hook on this branch also ran the full web suite (see the push result).

Scope

Only web/app/vitest.setup.ts. The per-test timeout stays at 15 s. The fix hides nothing and changes no assertion. It bounds an async wait; it does not skip or retry tests.

Ownership

Owner: the home-overlap lane. This PR unblocks the pre-push web gate for lane/pipeline-approved (#24866).

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

findBy and waitFor default to 1 s. Under host load the first render of
the settings and developer pages can take longer, so three tests failed
with element-not-found on a rendered page rather than on wrong content
(DevelopersKeys, SettingsDailySummary, SettingsSubscriptionClarity).
Raise the async wait to 5 s in the shared setup. The per-test timeout
stays at 15 s.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T07:32:12.021755Z 9689ef7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Git-on-my-level Git-on-my-level self-assigned this Nov 8, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

You’re at about 97% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact [email protected].

View guided diff | Turn on auto-fix | Re-trigger cubic

@Git-on-my-level
Git-on-my-level merged commit aa8eee9 into main Nov 8, 2026
50 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/web-flake-timeout branch November 8, 2026 07:36
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