fix(frontend): restore click-to-open for side elements - #2982
axelray-dev wants to merge 5 commits into
Conversation
Fixes Chainlit#2979 Co-Authored-By: Codex <codex@openai.com>
|
@codex review |
|
@codex review |
|
Code looks good to me, but I'm no react buff. Are other maintainers still alive? @hayescode @asvishnyakov @sandangel Anyone of you in a better position to verify quality? Feedback/approval from other users would also help! |
|
Just a user report in support of this PR: the auto-opening side panel since 2.11.0 is a real annoyance in our app. It affects the UX on every single message with a side element, which makes it hard to live with long-term. #2979 covered the same regression and was closed as stale while this PR was already open, so it would be a shame to lose it the same way. |
|
I revalidated this PR and merged the current upstream main branch as commit 645bd8e. The targeted Vitest suite passes 2/2, the frontend type-check passes after building the workspace client, and ESLint plus Prettier pass on the changed files. The earlier e2e failure was from the older base; please re-run CI on the updated head. I left the review thread open for verification. |
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 removes auto-opening of the side panel. Previously the panel opened whenever side elements arrived; now it opens only on click and stays closed otherwise. Fixes #2979.
setSideView; clearsideViewwhen no side elements remain to prevent stale panels.MessagesContainer.onElementRefClick.vitesttests verifying non-auto-open and proper clearing.Written for commit 645bd8e. Summary will update on new commits.