refactor: update icons and improve sidebar styling for enhanced user experience

This commit is contained in:
Anish Sarkar 2026-05-15 00:25:58 +05:30
parent c180417329
commit 3846056bc7
6 changed files with 32 additions and 14 deletions

View file

@ -134,11 +134,16 @@ export function Sidebar({
const t = useTranslations("sidebar");
const [openDropdownChatId, setOpenDropdownChatId] = useState<number | null>(null);
// Inbox is rendered explicitly right below New Chat. Pull it out of the
// nav items list so it doesn't also appear in the bottom NavSection.
// Inbox and Documents are rendered explicitly right below New Chat. Pull
// them out of the nav items list so they don't also appear in the bottom
// NavSection. Documents is only present in navItems on mobile.
const inboxItem = useMemo(() => navItems.find((item) => item.url === "#inbox"), [navItems]);
const documentsItem = useMemo(
() => navItems.find((item) => item.url === "#documents"),
[navItems]
);
const footerNavItems = useMemo(
() => navItems.filter((item) => item.url !== "#inbox"),
() => navItems.filter((item) => item.url !== "#inbox" && item.url !== "#documents"),
[navItems]
);
@ -202,6 +207,16 @@ export function Sidebar({
}
/>
)}
{documentsItem && (
<SidebarButton
icon={documentsItem.icon}
label={documentsItem.title}
onClick={() => onNavItemClick?.(documentsItem)}
isCollapsed={isCollapsed}
isActive={documentsItem.isActive}
tooltipContent={isCollapsed ? documentsItem.title : undefined}
/>
)}
</div>
{/* Chat sections - fills available space */}