Skip to content

fix: Citation and Chat History panel independence (AB#43310)#917

Merged
Avijit-Microsoft merged 2 commits into
devfrom
psl-panel-fix
May 15, 2026
Merged

fix: Citation and Chat History panel independence (AB#43310)#917
Avijit-Microsoft merged 2 commits into
devfrom
psl-panel-fix

Conversation

@Yamini-Microsoft

Copy link
Copy Markdown
Contributor

Summary

Fixes the bug where toggling Chat History panel would close the Citation panel and vice versa.

Root Cause

dispatch(hideCitation()) was called unconditionally in onHandlePanelStates, so toggling ANY panel (Dashboard, Chat, ChatHistory) would close Citation.

Changes

  • src/App/src/App.tsx: Removed unconditional dispatch(hideCitation()) from panel toggle handler. Citation now only hides when Chat panel is hidden (intentional behavior). Moved CitationPanel inside .main-container as a flex child between Chat and ChatHistory.
  • src/App/src/App.css: Added .citation-panel-wrapper with flex: 0 1 20% for proper layout. Added --header-height CSS variable. Added overflow: hidden on .main-container to prevent horizontal scrollbar.

Behavior After Fix

  • Citation stays open when ChatHistory toggles ✅
  • Citation hides when Chat is hidden ✅
  • No horizontal scrollbar ✅
  • Panel widths remain correct ✅

Fixes AB#43310

Yamini-Microsoft and others added 2 commits May 15, 2026 02:42
- 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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-container via a new .citation-panel-wrapper flex child.
  • Replace the fixed .citation-overlay CSS with the new wrapper styles and add overflow: hidden on .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.

Comment thread src/App/src/App.tsx
@Avijit-Microsoft Avijit-Microsoft merged commit 715ba55 into dev May 15, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants