Skip to content

Remove test console warnings and add CI enforcement#7820

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/remove-act-warnings-in-tests
Draft

Remove test console warnings and add CI enforcement#7820
Copilot wants to merge 4 commits intomainfrom
copilot/remove-act-warnings-in-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 7, 2026

Test output contained React act() and console warnings that could regress silently. This PR cleans up the current warning sources and adds CI-only enforcement for unexpected console.* calls.

Changelog

New

  • Added CI-only Vitest console enforcement via vitest-fail-on-console.

Changed

  • Updated warning-producing tests to wait for async React updates more explicitly.
  • Adjusted components/tests that leaked invalid DOM props or React warnings.
  • Preserved expected warning/error cases with explicit allowlisted handling.

Removed

  • Removed unintended DOM attributes from rendered output where they caused React warnings.

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 and test-infrastructure hardening; no public API rollout needed.

Testing & Reviewing

Review focus:

  • script/vitest/setup.ts console enforcement behavior
  • Tests that now explicitly handle async state updates
  • Components touched to avoid React console output

Merge checklist

Copilot AI and others added 4 commits May 7, 2026 19:34
Agent-Logs-Url: https://github.com/primer/react/sessions/6f872a32-6ca6-4638-b31e-81b5134c5538

Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Agent-Logs-Url: https://github.com/primer/react/sessions/6f872a32-6ca6-4638-b31e-81b5134c5538

Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Agent-Logs-Url: https://github.com/primer/react/sessions/6f872a32-6ca6-4638-b31e-81b5134c5538

Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Agent-Logs-Url: https://github.com/primer/react/sessions/6f872a32-6ca6-4638-b31e-81b5134c5538

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

changeset-bot Bot commented May 7, 2026

⚠️ No Changeset found

Latest commit: 6231ef5

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 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 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants