You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two frontend tests on main fail CircleCI intermittently. Both hit the provider PRs this week (#839, #840, #841) even though those PRs don't touch these files.
GeneralTab sound preview timer. "Test sound" starts a 1.5 s timer that resets the playing state. Nothing cancelled it on unmount, so when the test environment tore down first, the timer called setState with no window and Vitest reported an unhandled ReferenceError: window is not defined (fails the run even though every test passed). The timer now lives in a ref; it is cleared on unmount and when a new preview replaces it. This also stops a real state update on an unmounted Settings window.
HooksTab 32 × 32 limit test. It renders 32 rules with 32 arguments each, then ran role queries across ~1,000 inputs. Under a loaded runner that passed the 5 s default timeout. It now uses text queries for the same buttons (about 940 ms → 380 ms locally) and has a 20 s timeout for the heavy render.
Tests
New cancels the sound preview timer on unmount test: fails without the GeneralTab.tsx change (timer still pending after unmount), passes with it.
pnpm exec vitest run src/surfaces/settings/tabs/GeneralTab.test.tsx src/surfaces/settings/tabs/HooksTab.test.tsx: 58 passed.
pnpm test: 122 files, 1107 tests passed, no unhandled errors.
pnpm exec tsc --noEmit -p .: clean.
No UI change in normal use (the preview button still re-enables after 1.5 s), so no CUA proof is attached.
Summary by CodeRabbit
Bug Fixes
Notification sound previews now clean up their playback timers when another preview starts, playback fails, or the settings screen closes. This prevents lingering timers and ensures an earlier preview cannot interfere with a newer one.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
📝 Walkthrough
GeneralTab now manages the notification sound preview timer through replacement, playback failure, and component unmount. Its test checks timer cleanup on unmount. The HooksTab limit test updates its button queries, expected control count, and timeout.
GeneralTab stores the active preview timeout, cancels the previous timeout when starting a preview, and clears the timeout on unmount. Playback failure clears the timeout only if it is still current. A test checks timer cleanup on unmount.
HooksTab limit test
Layer / File(s)
Summary
Limit-test queries and timeout apps/desktop-tauri/src/surfaces/settings/tabs/HooksTab.test.tsx
The test locates disabled add controls through their text and button elements, checks for 32 argument-add controls, and sets a 20-second timeout.
The preview timer is managed across its lifecycle, and the HooksTab changes adjust test queries and timeout. No concrete merge-blocking risk is identified.
Pre-merge checks: 7 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Ui Changes Include Windows Proof
GeneralTab.tsx changed under the settings UI. The new timer handling changes notification preview behavior by preventing an earlier preview timer from stopping a newer preview. The PR description st…
Add screenshots or a proof note from a fresh Windows build to the PR description. The proof must cover the affected GeneralTab notification-sound preview behavior.
Passed checks: 7 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title is a short imperative summary that directly identifies the flaky GeneralTab and HooksTab tests addressed by the pull request.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Provider Data Stays Siloed
PASS. The PR changes only GeneralTab sound-preview timer cleanup and two test implementations. Added code uses a local timeout ref, clears timers on replacement/unmount, and updates playback state. Th…
Secrets Handled Safely
The pull request changes only timer cleanup and test query behavior. The diff adds no token, cookie, API key, OAuth credential, authorization header, credential-file deletion, or keyring mutation. Exi…
No Unapproved Dependencies
The pull request changes only three TypeScript source/test files. It adds no Cargo.toml, package.json, npm/yarn lockfile, or pnpm packageManager change. The repository packageManager declaration remai…
Full details: Ui Changes Include Windows Proof
Explanation
GeneralTab.tsx changed under the settings UI. The new timer handling changes notification preview behavior by preventing an earlier preview timer from stopping a newer preview. The PR description states that no CUA proof is attached and provides no screenshot or proof note from a fresh Windows build.
Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
Commit to this branch
Create a new PR
🧪 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two frontend tests on
mainfail CircleCI intermittently. Both hit the provider PRs this week (#839, #840, #841) even though those PRs don't touch these files.setStatewith nowindowand Vitest reported an unhandledReferenceError: window is not defined(fails the run even though every test passed). The timer now lives in a ref; it is cleared on unmount and when a new preview replaces it. This also stops a real state update on an unmounted Settings window.Tests
cancels the sound preview timer on unmounttest: fails without theGeneralTab.tsxchange (timer still pending after unmount), passes with it.pnpm exec vitest run src/surfaces/settings/tabs/GeneralTab.test.tsx src/surfaces/settings/tabs/HooksTab.test.tsx: 58 passed.pnpm test: 122 files, 1107 tests passed, no unhandled errors.pnpm exec tsc --noEmit -p .: clean.No UI change in normal use (the preview button still re-enables after 1.5 s), so no CUA proof is attached.
Summary by CodeRabbit