Skip to content

test(hotkeys): Give the property tests a 60 s timeout for loaded CI runners - #313

Merged
KevinVandy merged 1 commit into
mainfrom
test/invariant-timeouts
Nov 26, 2026
Merged

KevinVandy merged 1 commit into
mainfrom
test/invariant-timeouts

Conversation

@KevinVandy

@KevinVandy KevinVandy commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

🎯 Changes

  • Each of the eight files in packages/hotkeys/tests/invariants/ now sets vi.setConfig({ testTimeout: 60_000 }). Two per-test timeouts that are now redundant, 30 s and 60 s, are removed. The two 120 s ones stay.
  • Why. These tests take well under a second each locally, and the whole core suite takes about 10 s. In CI the suite takes about 195 s, because Nx runs five packages' tests at once on a 4-vCPU runner. Tests that differ from run to run then exceed the 5 s default:

Notes

This only gives the tests more time to finish. A hung property test now takes 60 s to fail instead of 5 s. Lowering Nx parallelism in CI would fix the cause, but it slows every CI run.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with pnpm run test:pr, or these tests do not apply to this pull request.
  • I fully understand the code in this pull request, including any code generated with AI assistance.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Tests
    • Extended time limits for hotkey invariant tests that can run slowly under CI load. This reduces timeout-related test failures while leaving the tested behavior and assertions unchanged; no user-facing application changes are included.

…unners

The invariant and fuzz tests take well under a second each locally, but
CI runs several packages' tests at once on a 4-vCPU runner, where the
core suite runs about 20 times slower. Tests that differ from run to run
then pass the 5 s default, as on main's Release run and on #312.
@changeset-bot

changeset-bot Bot commented Nov 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c19402c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

@pkg-pr-new

pkg-pr-new Bot commented Nov 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

@tanstack/alpine-hotkeys

npm i https://pkg.pr.new/@tanstack/alpine-hotkeys@313

@tanstack/angular-hotkeys

npm i https://pkg.pr.new/@tanstack/angular-hotkeys@313

@tanstack/angular-hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/angular-hotkeys-devtools@313

@tanstack/ember-hotkeys

npm i https://pkg.pr.new/@tanstack/ember-hotkeys@313

@tanstack/hotkeys

npm i https://pkg.pr.new/@tanstack/hotkeys@313

@tanstack/hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/hotkeys-devtools@313

@tanstack/lit-hotkeys

npm i https://pkg.pr.new/@tanstack/lit-hotkeys@313

@tanstack/octane-hotkeys

npm i https://pkg.pr.new/@tanstack/octane-hotkeys@313

@tanstack/preact-hotkeys

npm i https://pkg.pr.new/@tanstack/preact-hotkeys@313

@tanstack/preact-hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/preact-hotkeys-devtools@313

@tanstack/react-hotkeys

npm i https://pkg.pr.new/@tanstack/react-hotkeys@313

@tanstack/react-hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/react-hotkeys-devtools@313

@tanstack/solid-hotkeys

npm i https://pkg.pr.new/@tanstack/solid-hotkeys@313

@tanstack/solid-hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/solid-hotkeys-devtools@313

@tanstack/svelte-hotkeys

npm i https://pkg.pr.new/@tanstack/svelte-hotkeys@313

@tanstack/svelte-hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/svelte-hotkeys-devtools@313

@tanstack/vue-hotkeys

npm i https://pkg.pr.new/@tanstack/vue-hotkeys@313

@tanstack/vue-hotkeys-devtools

npm i https://pkg.pr.new/@tanstack/vue-hotkeys-devtools@313

commit: c19402c

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Eight hotkey invariant-test files now configure 60-second Vitest timeouts. The layouts tests use this default for the recorded-chord test instead of its previous 30-second timeout. Review records are updated to describe the timeout changes.

Changes: Hotkey invariant-test timeouts

Layer / File(s) Summary
Configure invariant-test timeouts
packages/hotkeys/tests/invariants/*, .intent/review-state.json
Eight invariant-test files set a 60-second Vitest timeout. The layouts tests remove the recorded-chord test’s explicit 30-second timeout. The review records classify these updates as test-timeout changes. The keyup invariant retains its explicit 120-second timeout.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related PRs

  • TanStack/hotkeys#298: Changes several of the same invariant tests and adds a 30-second timeout to the layouts recorded-chord sweep.

Suggested reviewers: schiller-manuel

Merge Risk: Minimal · up to c1940

This is a test-only timeout change that gives property tests more time to finish on loaded CI runners. It has no runtime or release impact and carries minimal merge risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the hotkeys invariant property tests receive a 60 s timeout to avoid failures on loaded CI runners. It uses the conventional test(scope) prefix and is specific enough …
Description check Passed The description follows the template. It has the Changes section with motivation, the Checklist with all three items checked, and the Release Impact section with the docs/CI/dev-only option checked. I…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the hotkeys invariant property tests receive a 60 s timeout to avoid failures on loaded CI runners. It uses the conventional test(scope) prefix and is specific enough for a teammate scanning history.

Full details: Description check

Explanation

The description follows the template. It has the Changes section with motivation, the Checklist with all three items checked, and the Release Impact section with the docs/CI/dev-only option checked. It also adds a Notes section on the trade-off of the longer timeout. The template does not require a Notes section, so its presence is not a defect.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks the clocks in flight
Sixty seconds mark each test
Fuzzing hops through day and night
Chords now share the suite’s timeout
The keyup keeps its longer rest
I nibble greens and call it right

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 97b7b01 and c19402c.

Files selected for processing: 9

  • .intent/review-state.json
  • packages/hotkeys/tests/invariants/event-fuzz.test.ts
  • packages/hotkeys/tests/invariants/layouts.test.ts
  • packages/hotkeys/tests/invariants/matching.test.ts
  • packages/hotkeys/tests/invariants/parse-fuzz.test.ts
  • packages/hotkeys/tests/invariants/recorder-layouts.test.ts
  • packages/hotkeys/tests/invariants/recorder-match.test.ts
  • packages/hotkeys/tests/invariants/round-trip.test.ts
  • packages/hotkeys/tests/invariants/sequence-fuzz.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

@KevinVandy
KevinVandy merged commit 3b22c10 into main Nov 26, 2026
16 checks passed
@KevinVandy
KevinVandy deleted the test/invariant-timeouts branch November 26, 2026 16:56
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