fix(frontend): restore click-to-open for side elements#2982
Open
axelray-dev wants to merge 1 commit into
Open
Conversation
Fixes Chainlit#2979 Co-Authored-By: Codex <codex@openai.com>
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
Since 2.11.0, the element side panel opened automatically whenever a message with
display="side"elements arrived. In 2.10.x the panel only opened when the user clicked the element link. Closing the panel did not stick, because the next side-element update forced it open again.Changes
MessagesContainer, stop auto-callingsetSideViewwhen side elements change.sideViewwhen no side elements remain so a closed/stale panel does not linger.onElementRefClickunchanged.Verification
frontend/tests/MessagesContainer.spec.tsx(2 tests)Fixes #2979
Summary by cubic
Restores click-to-open for side elements and stops auto-opening the side panel. Fixes #2979.
setSideViewinMessagesContainerwhen side elements update.sideViewwhen no side elements remain to avoid stale panels.onElementRefClickfor manual open; add Vitest tests to cover non-auto-open and clearing.Written for commit a76630e. Summary will update on new commits.