feat: implement RightPanel component for tabbed navigation between Sources and Report; update report panel handling in dashboard chat page for improved user experience

This commit is contained in:
Anish Sarkar 2026-03-11 01:22:24 +05:30
parent 8b468e06da
commit 414dceff2f
9 changed files with 259 additions and 87 deletions

View file

@ -95,9 +95,9 @@ function ReportPanelSkeleton() {
}
/**
* Inner content component used by both desktop panel and mobile drawer
* Inner content component used by desktop panel, mobile drawer, and the layout right panel
*/
function ReportPanelContent({
export function ReportPanelContent({
reportId,
title,
onClose,
@ -579,3 +579,18 @@ export function ReportPanel() {
return <MobileReportDrawer />;
}
/**
* MobileReportPanel mobile-only report drawer
*
* Used in the dashboard chat page where the desktop report is handled
* by the layout-level RightPanel instead.
*/
export function MobileReportPanel() {
const panelState = useAtomValue(reportPanelAtom);
const isDesktop = useMediaQuery("(min-width: 1024px)");
if (isDesktop || !panelState.isOpen || !panelState.reportId) return null;
return <MobileReportDrawer />;
}