From 947f2707b404492c0a9d1e1a2d7203a0697d1d4d Mon Sep 17 00:00:00 2001 From: Josh Black Date: Wed, 1 Jul 2026 11:11:21 -0500 Subject: [PATCH 1/6] chore: migrate no-error React Compiler files Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- packages/react/script/react-compiler.mjs | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/packages/react/script/react-compiler.mjs b/packages/react/script/react-compiler.mjs index 1c2b353108d..8f37928de46 100644 --- a/packages/react/script/react-compiler.mjs +++ b/packages/react/script/react-compiler.mjs @@ -12,17 +12,14 @@ const files = glob return path.join(PACKAGE_DIR, match) }) const unsupportedPatterns = [ - 'src/ActionMenu/**/*.tsx', - 'src/Autocomplete/**/*.tsx', - 'src/Banner/**/*.tsx', - 'src/Button/**/*.tsx', - 'src/ConfirmationDialog/**/*.tsx', - 'src/Dialog/**/*.tsx', - 'src/PageLayout/**/*.tsx', - 'src/Pagination/**/*.tsx', - 'src/SelectPanel/**/*.tsx', - 'src/UnderlineNav/**/*.tsx', - 'src/experimental/SelectPanel2/**/*.tsx', + 'src/ActionMenu/ActionMenu.tsx', + 'src/Autocomplete/Autocomplete.test.tsx', + 'src/Autocomplete/AutocompleteInput.tsx', + 'src/Button/ButtonBase.tsx', + 'src/Dialog/Dialog.tsx', + 'src/SelectPanel/SelectPanel.examples.stories.tsx', + 'src/SelectPanel/SelectPanel.tsx', + 'src/experimental/SelectPanel2/SelectPanel.tsx', 'src/hooks/useAnchoredPosition.ts', 'src/hooks/useFocusTrap.ts', 'src/hooks/useFocusZone.ts', @@ -30,9 +27,7 @@ const unsupportedPatterns = [ 'src/hooks/useOnEscapePress.ts', 'src/hooks/useResizeObserver.ts', 'src/hooks/useSafeTimeout.ts', - 'src/hooks/useScrollFlash.ts', - 'src/hooks/useMergedRefs.ts', - 'src/TooltipV2/**/*.tsx', + 'src/TooltipV2/Tooltip.tsx', ] const unsupported = new Set( From 1c04149c44e30b98fdde49031982b84776bb6ba3 Mon Sep 17 00:00:00 2001 From: Josh Black Date: Wed, 1 Jul 2026 11:12:57 -0500 Subject: [PATCH 2/6] feat: enable React Compiler for no-error files Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .changeset/react-compiler-no-error-files.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/react-compiler-no-error-files.md diff --git a/.changeset/react-compiler-no-error-files.md b/.changeset/react-compiler-no-error-files.md new file mode 100644 index 00000000000..49b9d1c6b8f --- /dev/null +++ b/.changeset/react-compiler-no-error-files.md @@ -0,0 +1,5 @@ +--- +'@primer/react': minor +--- + +React Compiler: Enable compiler output for additional components From 048854d1d6da9eb49f2972bdae4bb1b6b2b1586b Mon Sep 17 00:00:00 2001 From: Josh Black Date: Wed, 1 Jul 2026 11:13:50 -0500 Subject: [PATCH 3/6] docs: clarify React Compiler changeset Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .changeset/react-compiler-no-error-files.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/react-compiler-no-error-files.md b/.changeset/react-compiler-no-error-files.md index 49b9d1c6b8f..7dabef8aaf7 100644 --- a/.changeset/react-compiler-no-error-files.md +++ b/.changeset/react-compiler-no-error-files.md @@ -2,4 +2,4 @@ '@primer/react': minor --- -React Compiler: Enable compiler output for additional components +React Compiler: Enable compiler output for Banner, ConfirmationDialog, PageLayout, Pagination, UnderlineNav, `useMergedRefs`, and `useScrollFlash` From 759f6101259a98b47b49835d08a443cd9e6573ed Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 1 Jul 2026 16:26:58 +0000 Subject: [PATCH 4/6] fix: convert ExampleWithActionMenu to proper React component in TooltipV2 tests Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com> --- .../src/TooltipV2/__tests__/Tooltip.test.tsx | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/packages/react/src/TooltipV2/__tests__/Tooltip.test.tsx b/packages/react/src/TooltipV2/__tests__/Tooltip.test.tsx index c87f32e59a5..92d9a0ed53d 100644 --- a/packages/react/src/TooltipV2/__tests__/Tooltip.test.tsx +++ b/packages/react/src/TooltipV2/__tests__/Tooltip.test.tsx @@ -30,7 +30,7 @@ const TooltipComponentWithExistingDescription = (props: Omit): JSX.Element { +function ExampleWithActionMenu({actionMenuTrigger}: {actionMenuTrigger: React.ReactElement}): JSX.Element { return ( @@ -82,11 +82,13 @@ describe('Tooltip', () => { it('should spread the accessibility attributes correctly on the trigger (ActionMenu.Button) when tooltip is used in an action menu', () => { const {getByRole, getByText} = HTMLRender( - ExampleWithActionMenu( - - Toggle Menu - , - ), + + Toggle Menu + + } + />, ) const menuButton = getByRole('button') const tooltip = getByText('Additional context about the menu button') @@ -96,13 +98,15 @@ describe('Tooltip', () => { it('should spread the accessibility attributes correctly on the trigger (Button) when tooltip is used in an action menu', () => { const {getByRole, getByText} = HTMLRender( - ExampleWithActionMenu( - - - - - , - ), + + + + + + } + />, ) const menuButton = getByRole('button') const tooltip = getByText('Additional context about the menu button') From 0951d559055d4321c7aa0e122542a8b2a5adddb9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 1 Jul 2026 17:05:31 +0000 Subject: [PATCH 5/6] fix: add SelectPanel.test.tsx to React Compiler unsupported list Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com> --- packages/react/script/react-compiler.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react/script/react-compiler.mjs b/packages/react/script/react-compiler.mjs index 8f37928de46..daab4ed8664 100644 --- a/packages/react/script/react-compiler.mjs +++ b/packages/react/script/react-compiler.mjs @@ -18,6 +18,7 @@ const unsupportedPatterns = [ 'src/Button/ButtonBase.tsx', 'src/Dialog/Dialog.tsx', 'src/SelectPanel/SelectPanel.examples.stories.tsx', + 'src/SelectPanel/SelectPanel.test.tsx', 'src/SelectPanel/SelectPanel.tsx', 'src/experimental/SelectPanel2/SelectPanel.tsx', 'src/hooks/useAnchoredPosition.ts', From 62674f37e7836142bc11445e715b0038c83aeca1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 1 Jul 2026 17:40:58 +0000 Subject: [PATCH 6/6] fix: add ActionMenu.test.tsx to React Compiler unsupported list Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com> --- packages/react/script/react-compiler.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react/script/react-compiler.mjs b/packages/react/script/react-compiler.mjs index daab4ed8664..01de9a0fbbd 100644 --- a/packages/react/script/react-compiler.mjs +++ b/packages/react/script/react-compiler.mjs @@ -12,6 +12,7 @@ const files = glob return path.join(PACKAGE_DIR, match) }) const unsupportedPatterns = [ + 'src/ActionMenu/ActionMenu.test.tsx', 'src/ActionMenu/ActionMenu.tsx', 'src/Autocomplete/Autocomplete.test.tsx', 'src/Autocomplete/AutocompleteInput.tsx',