From 2e1367b00e0c354840a61796eeef55b8adb0aadb Mon Sep 17 00:00:00 2001
From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com>
Date: Sun, 3 May 2026 19:18:30 +0530
Subject: [PATCH] fix(sidebar): adjust padding and gradient heights for
improved layout consistency; enhance SidebarUsageFooter to conditionally
render border based on navigation items
---
.../components/layout/ui/sidebar/Sidebar.tsx | 27 +++++++++++++------
.../layout/ui/sidebar/SidebarSection.tsx | 2 +-
2 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx b/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx
index 946079333..3f02f1d6f 100644
--- a/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx
+++ b/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx
@@ -179,7 +179,7 @@ export function Sidebar({
{isCollapsed ? (
) : (
-
+
{/* Shared Chats Section - takes only space needed, max 50% */}
0 ? (
4 ? "pb-8" : ""}`}
+ className={`flex flex-col gap-0.5 max-h-full overflow-y-auto scrollbar-thin scrollbar-thumb-muted-foreground/20 scrollbar-track-transparent ${sharedChats.length > 4 ? "pb-2" : ""}`}
>
{sharedChats.slice(0, 20).map((chat) => (
{/* Gradient fade indicator when more than 4 items */}
{sharedChats.length > 4 && (
-
+
)}
) : (
@@ -266,7 +266,7 @@ export function Sidebar({
) : chats.length > 0 ? (
4 ? "pb-8" : ""}`}
+ className={`flex flex-col gap-0.5 h-full overflow-y-auto scrollbar-thin scrollbar-thumb-muted-foreground/20 scrollbar-track-transparent ${chats.length > 4 ? "pb-2" : ""}`}
>
{chats.slice(0, 20).map((chat) => (
{/* Gradient fade indicator when more than 4 items */}
{chats.length > 4 && (
-
+
)}
) : (
@@ -306,7 +306,11 @@ export function Sidebar({
/>
)}
-
+
0}
+ />
{renderUserProfile && (
+
{pageUsage && (
@@ -373,7 +384,7 @@ function SidebarUsageFooter({
}
return (
-
+
diff --git a/surfsense_web/components/layout/ui/sidebar/SidebarSection.tsx b/surfsense_web/components/layout/ui/sidebar/SidebarSection.tsx
index aeb0ebef1..10d5942ca 100644
--- a/surfsense_web/components/layout/ui/sidebar/SidebarSection.tsx
+++ b/surfsense_web/components/layout/ui/sidebar/SidebarSection.tsx
@@ -69,7 +69,7 @@ export function SidebarSection({
-