fix: Citation and Chat History panel independence (AB#43310)#917
Merged
Conversation
- Use flex-based citation-panel-wrapper for consistent height alignment - Add box-sizing: border-box to include padding/border in height calc - Prevent horizontal overflow on main-container Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Citation should close when Chat panel is hidden since citations originate from chat responses. ChatHistory toggle remains independent. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes AB#43310 where toggling the Chat History panel inadvertently closed the Citation panel (and vice versa). The previous logic dispatched hideCitation() for every panel toggle; now Citation hides only when the Chat panel itself is hidden. The Citation panel is also moved from a fixed overlay into the flex .main-container as a sibling between Chat and ChatHistory.
Changes:
- Guard the
hideCitation()dispatch so it only runs when Chat is being hidden. - Render
<CitationPanel>inline in.main-containervia a new.citation-panel-wrapperflex child. - Replace the fixed
.citation-overlayCSS with the new wrapper styles and addoverflow: hiddenon.main-container.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/App/src/App.tsx | Conditions Citation hiding on Chat panel toggle; relocates CitationPanel into the main flex row. |
| src/App/src/App.css | Removes overlay styles and adds .citation-panel-wrapper flex layout plus overflow: hidden on .main-container. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Avijit-Microsoft
approved these changes
May 15, 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.
Summary
Fixes the bug where toggling Chat History panel would close the Citation panel and vice versa.
Root Cause
dispatch(hideCitation())was called unconditionally inonHandlePanelStates, so toggling ANY panel (Dashboard, Chat, ChatHistory) would close Citation.Changes
dispatch(hideCitation())from panel toggle handler. Citation now only hides when Chat panel is hidden (intentional behavior). Moved CitationPanel inside.main-containeras a flex child between Chat and ChatHistory..citation-panel-wrapperwithflex: 0 1 20%for proper layout. Added--header-heightCSS variable. Addedoverflow: hiddenon.main-containerto prevent horizontal scrollbar.Behavior After Fix
Fixes AB#43310