Skip to content

Fix TreeView React 19 test timer leakage#7810

Draft
Copilot wants to merge 6 commits intomainfrom
copilot/fix-failing-github-actions-job
Draft

Fix TreeView React 19 test timer leakage#7810
Copilot wants to merge 6 commits intomainfrom
copilot/fix-failing-github-actions-job

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 6, 2026

Changelog

New

Changed

  • Updated packages/react/src/TreeView/TreeView.test.tsx to reset Vitest timers to real timers before each test, preventing React 19 browser tests from inheriting fake timers from earlier suites.
  • Fixes the failing test (react-19) GitHub Actions job by preventing the first TreeView browser test from hanging and causing cascading empty-DOM failures.

Removed

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Test-only fix for CI stability; no production behavior or API changes.

Testing & Reviewing

  • Reviewed Actions logs for run 25460332110, job 74702059950, and confirmed the failure started in packages/react/src/TreeView/TreeView.test.tsx after fake timers leaked into the React 19 browser run.
  • Verified the fix with targeted TreeView browser tests.
  • Verified a React 19 targeted subset after node script/setup-react-19.mts.
  • Ran:
    • npm test
    • npm run build
    • npm run type-check
    • npm run lint
    • npm run lint:css
    • npm run format:diff

Merge checklist

Copilot AI and others added 4 commits May 6, 2026 20:38
Agent-Logs-Url: https://github.com/primer/react/sessions/7ae876b8-1efe-4190-9ad8-2289a3a75d66

Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Agent-Logs-Url: https://github.com/primer/react/sessions/7ae876b8-1efe-4190-9ad8-2289a3a75d66

Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Agent-Logs-Url: https://github.com/primer/react/sessions/7ae876b8-1efe-4190-9ad8-2289a3a75d66

Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Agent-Logs-Url: https://github.com/primer/react/sessions/7ae876b8-1efe-4190-9ad8-2289a3a75d66

Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 6, 2026

⚠️ No Changeset found

Latest commit: e45519c

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

Copilot AI requested a review from joshblack May 6, 2026 20:50
@joshblack joshblack added the skip changeset This change does not need a changelog label May 6, 2026
@github-actions github-actions Bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label May 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

⚠️ Action required

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

To publish a canary release for integration testing, apply the Canary Release label to this PR.

Agent-Logs-Url: https://github.com/primer/react/sessions/bd1a9909-d881-4485-a90e-0f66e3adb56e

Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 6, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • example.com
    • Triggering command: /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1194/chrome-linux/headless_shell /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1194/chrome-linux/headless_shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AvoidUnnecessaryBeforeUnloadCheckSync,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate,AutoDeElevate,RenderD (dns block)
    • Triggering command: /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1194/chrome-linux/headless_shell /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1194/chrome-linux/headless_shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AvoidUnnecessaryBeforeUnloadCheckSync,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate,AutoDeElevate,RenderD odules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/node (dns block)
    • Triggering command: /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1194/chrome-linux/headless_shell /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1194/chrome-linux/headless_shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AvoidUnnecessaryBeforeUnloadCheckSync,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate,AutoDeElevate,RenderD t (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Fix TreeView React 19 test fake timers Fix TreeView React 19 test timer leakage May 6, 2026
…ush in afterEach

Agent-Logs-Url: https://github.com/primer/react/sessions/f9316a81-e9a1-47db-8214-46afb102cf84

Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm skip changeset This change does not need a changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants