Fix Segment children prop-types warning for the Toolbar portal (#97) - #99
Open
reekitconcept wants to merge 1 commit into
Open
Fix Segment children prop-types warning for the Toolbar portal (#97)#99reekitconcept wants to merge 1 commit into
reekitconcept wants to merge 1 commit into
Conversation
Client-side navigation to the search page warned 'Invalid prop children supplied to Segment, expected a ReactNode': createPortal returns a ReactPortal, which renders fine but is not recognized by the prop-types node checker. Render the portal as a sibling of the Segment (a portal renders into its DOM target regardless of tree position; Segment provides no context or handlers the subtree would lose). Port of the feature-ai-rag fix to main. Indentation-only changes are prettier reindent after wrapping in a fragment - review with 'git diff -w' (7 insertions, 1 deletion).
This was referenced Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the React warning
Invalid prop children supplied to Segment, expected a ReactNodeon client-side navigation to the search page. Fixes #97.createPortalreturns aReactPortal— renderable, but not recognized by the prop-typesnodechecker, so Segment's propTypes flagged it. The portal now renders as a sibling of the Segment inside a fragment; behavior is unchanged (a portal renders into its DOM target regardless of tree position, and Segment provides no context or handlers the subtree would lose).Port of #98 (feature-ai-rag) to
main. The bulk of the diff is prettier reindentation from the fragment wrapper — review withgit diff -w(7 insertions, 1 deletion).