Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

feat: improve sidebar UI with distinct sections and better empty states (#6745)

Roushan Kumar Singh874fd924e651
diff --git a/web-app/src/containers/LeftPanel.tsx b/web-app/src/containers/LeftPanel.tsx
index c281dd4c6..79f99941b 100644
--- a/web-app/src/containers/LeftPanel.tsx
+++ b/web-app/src/containers/LeftPanel.tsx
@@ -258,11 +258,11 @@ const LeftPanel = () => {
isResizableContext && 'h-full w-full',
// Small screen context: fixed positioning and styling
isSmallScreen &&
- 'fixed h-full pb-[calc(env(safe-area-inset-bottom)+env(safe-area-inset-top))] bg-main-view z-50 md:border border-left-panel-fg/10 px-1 w-full md:w-48',
+ 'fixed h-full pb-[calc(env(safe-area-inset-bottom)+env(safe-area-inset-top))] bg-main-view z-50 md:border border-left-panel-fg/10 px-1 w-full md:w-48',
// Default context: original styling
!isResizableContext &&
- !isSmallScreen &&
- 'w-48 shrink-0 rounded-lg m-1.5 mr-0',
+ !isSmallScreen &&
+ 'w-48 shrink-0 rounded-lg m-1.5 mr-0',
// Visibility controls
open
? 'opacity-100 visibility-visible'
@@ -604,7 +604,8 @@ const LeftPanel = () => {
</div>
)}
- {Object.keys(threads).length === 0 && !searchTerm && (
+ {/* Show "No threads yet" when there are no threads at all OR when all threads are in projects */}
+ {(Object.keys(threads).length === 0 || (Object.keys(threads).length > 0 && unFavoritedThreads.length === 0 && favoritedThreads.length === 0)) && !searchTerm && (
<>
<div className="px-1 mt-2">
<div className="flex items-center gap-1 text-left-panel-fg/80">