Skip to content

fix: runtime crash in dropdowns from headlessui v2 Fragment check (React 19 upgrade regression) - #9694

Merged
prateekshourya29 merged 1 commit into
previewfrom
fix/combobox-fragment-runtime-crash
Aug 27, 2026
Merged

fix: runtime crash in dropdowns from headlessui v2 Fragment check (React 19 upgrade regression)#9694
prateekshourya29 merged 1 commit into
previewfrom
fix/combobox-fragment-runtime-crash

Conversation

@codingwolf-at

@codingwolf-at codingwolf-at commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Description

The React 19 upgrade (#9530) bumped @headlessui/react v1.7.19 → v2.2.10 (required — v1 reads APIs removed in React 19). Headless UI v2 added a stricter check on Combobox.Button as={Fragment} sites: the child must resolve to a single real element, not a Fragment.

Eight dropdown components (priority, estimate, intake-state, member, module, cycle, state, project) had a pre-existing, previously-harmless pattern of wrapping their button ternary in <>{cond ? <button/> : <button/>}</> before passing it to Combobox.Button. Under v1 this was silently tolerated; under v2 the child's type === Fragment now throws "Passing props on Fragment!" at runtime — crashing these dropdowns on preview post-#9530.

Fix: drop the redundant outer <>...</> in each of the 8 files — the ternary already evaluates to a single element, so the Fragment wrapper was never needed.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
Error Msg
Screenshot 2026-08-27 at 2 40 30 PM

Test Scenarios

  • pnpm --filter web run check:types — zero errors
  • pnpm run build — 16/16 tasks pass
  • Manually exercised priority, state, module, member, cycle, project, estimate, and intake-state dropdowns — button renders and opens without the runtime error

References

Runtime regression introduced by the @headlessui/react v1→v2 bump in #9530 (React 19 upgrade), which surfaced this latent Fragment-wrap bug.

Summary by CodeRabbit

  • Refactor
    • Simplified button rendering across dropdown menus.
    • Preserved existing button appearance, behavior, and support for custom buttons.

Combobox.Button as={Fragment} requires its child to be a single real
element. Wrapping the button ternary in <>...</> made the child a
Fragment instance itself, which @headlessui/react v2 rejects with
"Passing props on Fragment!" at runtime. Dropping the wrapper fixes
priority, estimate, intake-state, member, module, cycle, state, and
project dropdowns.
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: dd21adb6-4179-458a-8661-42afffce7076

📥 Commits

Reviewing files that changed from the base of the PR and between 1a76f29 and ae0ebdc.

📒 Files selected for processing (8)
  • apps/web/core/components/dropdowns/cycle/index.tsx
  • apps/web/core/components/dropdowns/estimate.tsx
  • apps/web/core/components/dropdowns/intake-state/base.tsx
  • apps/web/core/components/dropdowns/member/base.tsx
  • apps/web/core/components/dropdowns/module/base.tsx
  • apps/web/core/components/dropdowns/priority.tsx
  • apps/web/core/components/dropdowns/project/base.tsx
  • apps/web/core/components/dropdowns/state/base.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The PR removes unnecessary React fragment wrappers from conditional comboButton assignments in eight dropdown components. Rendered button branches and behavior remain unchanged.

Changes

Dropdown combo button JSX

Layer / File(s) Summary
Direct combo button conditional rendering
apps/web/core/components/dropdowns/cycle/index.tsx, apps/web/core/components/dropdowns/estimate.tsx, apps/web/core/components/dropdowns/intake-state/base.tsx, apps/web/core/components/dropdowns/member/base.tsx, apps/web/core/components/dropdowns/module/base.tsx, apps/web/core/components/dropdowns/priority.tsx, apps/web/core/components/dropdowns/project/base.tsx, apps/web/core/components/dropdowns/state/base.tsx
comboButton assignments now use direct ternary expressions instead of fragment-wrapped conditionals. Custom and default button rendering remains unchanged.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to ae0eb

The change removes redundant Fragment wrappers so the eight dropdown buttons render correctly with the upgraded UI library while preserving their existing behavior and interfaces. No actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: sriramveeraghanta

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 8 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the runtime crash, the affected dropdowns, and the Headless UI v2 and React 19 regression. It accurately summarizes the primary change.
Description check ✅ Passed The description includes the change details, bug-fix classification, error evidence, test scenarios, and reference to the regression source. It provides sufficient context for review.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/combobox-fragment-runtime-crash

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit ae0ebdc.

@codingwolf-at codingwolf-at changed the title fix: remove redundant Fragment wrapper around comboButton in dropdowns fix: runtime crash in dropdowns from headlessui v2 Fragment check (React 19 upgrade regression) Aug 27, 2026
@codingwolf-at
codingwolf-at marked this pull request as ready for review August 27, 2026 09:09
@codingwolf-at codingwolf-at self-assigned this Aug 27, 2026
@prateekshourya29
prateekshourya29 merged commit 302f09b into preview Aug 27, 2026
18 checks passed
@prateekshourya29
prateekshourya29 deleted the fix/combobox-fragment-runtime-crash branch August 27, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants