Repository navigation
Conversation
compare() only looked at the chat in the widget's own index, so a compareBar in a nested index with the chat at the root (or the reverse) silently did nothing. Look in the widget's own index first, then the main index, then any other index, and warn in development when no chat is mounted. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 15 |
TIP This summary will be updated as you push new changes.
Contributor
Author
|
Follow-up: — via Claude |
This branch has not been deployed
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.
Summary
compare()resolved the chat only from the render state of the widget's own index, while the selection store is shared across the whole InstantSearch instance. AcompareBarin a nestedindexwith thechatat the root (or the reverse) therefore returnedfalsewith no feedback.The lookup now lives in a shared helper,
getChatRenderState(instantSearchInstance, indexId)insrc/lib/chat/, with a deterministic order: the chat in the widget's own index, then the main index, then the first other index that rendered a chat.compare()emits a dev-mode warning when no chat is mounted.Result
compare()opens the chat and sends the comparison regardless of which index the chat or the compare widget is mounted in.compare()warns in development when no chat is found.connectChatTriggeris unchanged.🤖 Generated with Claude Code