Skip to content

refactor: drop React 18 workarounds - #165

Open
pratikbuilds wants to merge 1 commit into
corbitsdev:mainfrom
pratikbuilds:claude/i142-react18-cleanup
Open

pratikbuilds wants to merge 1 commit into
corbitsdev:mainfrom
pratikbuilds:claude/i142-react18-cleanup

Conversation

@pratikbuilds

@pratikbuilds pratikbuilds commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

PanelPane sets inert={!shown} directly. A hidden pane stays inert; a shown pane does not. The React 18 string inert workaround is gone.

ConversationItem returns the item-registry cleanup from its ref callback, so React 19 unregisters on detach. The React 18 null-ref release path and its test are gone. Unregister is still covered when an item rerenders out.

Does not change the React peer range (that is #149).

Closes #142

PanelPane passes `inert={!shown}` directly instead of a string `inert`
that React 18 kept. ConversationItem relies on React 19 running the
cleanup its ref callback returns, without the extra release ref for
React 18's null-ref detach.

Remove the test of that null-ref path and the test comments that
justify forwardRef checks by React 18.

Depends on corbitsdev#149, which narrows the peer range to React 19.
@corbits-triage

corbits-triage Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

@TheGreatAxios TheGreatAxios 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.

Approving. Hidden panes use boolean inert, shown panes do not, and ConversationItem still unregisters through the ref-callback cleanup.

Merge this after #149. On a tree that still allows React 18, inert={false} leaves the attribute set and the ref cleanup is ignored.

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.

Follow-ups from the conversation PR review

2 participants