fix(ChatbotFootnote): skip popover validation when no popover is provided - #912
Merged
thatblindgeye merged 2 commits intoSep 23, 2026
Conversation
…ided The console.error guard fires when popover is undefined because `!popover?.cta && !popover?.showClose` is truthy for any falsy popover. This is a false positive — the label-only path (no popover) is valid. Gate the check on `popover` being defined so it only validates when a popover config is actually provided. Co-authored-by: Cursor <cursoragent@cursor.com>
11 tasks
thatblindgeye
left a comment
Collaborator
There was a problem hiding this comment.
@StanislavJochman would you feel comfortable adding some tests for this behavior? Just to check that the console error is being logged when expected, and isn't being logged when it shouldnt?
rebeccaalpert
approved these changes
Sep 22, 2026
rebeccaalpert
left a comment
Member
There was a problem hiding this comment.
Thank you so much! It looks great to me. I verified locally.
Contributor
Author
Theoretically I can. Can I open it as second PR? Or should I put it here? I would need this released if possible. |
Contributor
Author
|
Tests added. |
thatblindgeye
approved these changes
Sep 23, 2026
|
🎉 This PR is included in version 6.9.0-prerelease.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Problem
ChatbotFootnotelogs aconsole.errorwhen rendered without apopoverprop:This is a false positive. The label-only path (
popoveromitted) is a valid use case — the component already renders plain<Content>text when no popover is provided (line 134).The guard on line 66 uses optional chaining:
When
popoverisundefined, bothpopover?.ctaandpopover?.showCloseareundefined(falsy), so the condition is alwaystrue— triggering the error even though no popover was requested.Fix
Gate the check on
popoverbeing defined:Now the validation only fires when a popover config is provided but is missing a close mechanism.
How to reproduce
Before:
console.erroron every render.After: no error; same visual output.