Skip to content

perf(react-compiler): enable useSafeTimeout, token remove buttons, and UnderlinePanels - #8555

Merged
joshblack merged 5 commits into
mainfrom
joshblack/react-compiler-underline-panels
Oct 20, 2026
Merged

joshblack merged 5 commits into
mainfrom
joshblack/react-compiler-underline-panels

Conversation

@joshblack

@joshblack joshblack commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Enable React Compiler for useSafeTimeout, the private token remove button, and UnderlinePanels. This combines the small migrations from #8553, #8554, and this PR into one review without changing their implementation.

Our migration report identifies the cleanup ref access, ref handling through remaining props, and captured positional counters as the respective blockers.

Changelog

New

Changed

  • Capture the timer Set when the useSafeTimeout effect runs. Cleanup retains the same mutable Set, including timers registered after the effect.
  • Remove unused explicit ref handling from the private token remove button.
  • Keep UnderlinePanels' positional counters in a local object, preserving explicit values, independent tab and panel indexing, child order, and slot matching.
  • Remove the three compiler exclusions and add minor changesets, matching our recent compiler rollout.

Removed

Rollout strategy

  • No changes needed in github/github-ui
  • Needs changes in github/github-ui
  • Ships with feature flag(s)
  • Not sure
  • None

@changeset-bot

changeset-bot Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4fa9b73

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

Not sure what this means? Click here to learn what changesets are.

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

@joshblack
joshblack added this pull request to stack #8556 October 15, 2026 20:50
@github-actions github-actions Bot added staff Author is a staff member integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Oct 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ 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.

@joshblack
joshblack removed this pull request from stack #8556 October 15, 2026 20:55
@joshblack joshblack changed the title perf(react-compiler): enable UnderlinePanels perf(react-compiler): enable useSafeTimeout, token remove buttons, and UnderlinePanels Oct 15, 2026
@joshblack
joshblack changed the base branch from joshblack/react-compiler-token-remove-button to main October 15, 2026 20:55
@github-actions
github-actions Bot temporarily deployed to storybook-preview-8555 October 15, 2026 21:03 Inactive
@github-actions
github-actions Bot temporarily deployed to storybook-preview-8555 October 15, 2026 21:15 Inactive
@github-actions
github-actions Bot temporarily deployed to storybook-preview-8555 October 15, 2026 21:31 Inactive
@joshblack
joshblack added this pull request to stack #8559 October 15, 2026 21:33
@primer-integration

primer-integration Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Integration test results from github/github-ui PR:

Waiting  Changes   Waiting
Passed  CI   Passed
Running  VRT   Running
Passed  Projects   Passed

@joshblack
joshblack marked this pull request as ready for review October 16, 2026 16:05
@joshblack
joshblack requested a review from a team as a code owner October 16, 2026 16:05
@joshblack
joshblack requested review from siddharthkp and a balanced review from Copilot and removed request for Copilot October 16, 2026 16:05
Copilot AI balanced review requested due to automatic review settings October 19, 2026 21:15
@joshblack
joshblack force-pushed the joshblack/react-compiler-underline-panels branch from 09e8fdb to 4fa9b73 Compare October 19, 2026 21:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

Static review found no blocking issues in these focused compatibility refactors; tests and compilation were not run.

No open issues 🎉

What changed in this PR

Enables React Compiler for useSafeTimeout, private token remove buttons, and experimental UnderlinePanels.

Changes:

  • Refactors timer cleanup, unused ref handling, and positional counters for compiler compatibility.
  • Removes compiler exclusions for all three implementations.
  • Adds minor changesets documenting the rollout.
File Description
packages/​react/​src/​Token/​_RemoveTokenButton.tsx Removes unused explicit ref handling.
packages/​react/​src/​hooks/​useSafeTimeout.ts Captures the shared timer Set for cleanup.
packages/​react/​src/​experimental/​UnderlinePanels/​UnderlinePanels.tsx Groups positional counters in a local object.
packages/​react/​script/​react-compiler.mjs Removes three compiler exclusions.
.changeset/​react-compiler-underline-panels.md Documents UnderlinePanels compiler support.
.changeset/​react-compiler-token-remove-button.md Documents token rendering improvements.
.changeset/​react-compiler-safe-timeout.md Documents timeout hook compiler support.

Review effort: Balanced

@github-actions
github-actions Bot temporarily deployed to storybook-preview-8555 October 19, 2026 21:29 Inactive
@joshblack joshblack added the integration-tests: skipped manually Changes in this PR do not require an integration test label Oct 20, 2026
joshblack and others added 5 commits October 20, 2026 11:12
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e632d4e3-54d2-4423-9888-8e37b00494a3
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>\nCopilot-Session: e632d4e3-54d2-4423-9888-8e37b00494a3
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e632d4e3-54d2-4423-9888-8e37b00494a3
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e632d4e3-54d2-4423-9888-8e37b00494a3
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e632d4e3-54d2-4423-9888-8e37b00494a3
@joshblack
joshblack force-pushed the joshblack/react-compiler-underline-panels branch from 4fa9b73 to 64fce7b Compare October 20, 2026 16:12
@github-actions
github-actions Bot temporarily deployed to storybook-preview-8555 October 20, 2026 16:23 Inactive
@joshblack
joshblack added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit 746d76a Oct 20, 2026
50 checks passed
@joshblack
joshblack deleted the joshblack/react-compiler-underline-panels branch October 20, 2026 16:45
@primer primer Bot mentioned this pull request Oct 20, 2026

This branch was successfully deployed

1 active and 1 inactive deployments
storybook-preview-8555 — 64fce7b1 Deployed Oct 20, 2026 by github-actions[bot]
github-pages — 64fce7b1 Deployed Oct 20, 2026 by joshblack via deploy-preview #33785
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 integration-tests: skipped manually Changes in this PR do not require an integration test staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants