diff --git a/server/projects.js b/server/projects.js index 793d07ed..8d0e0473 100755 --- a/server/projects.js +++ b/server/projects.js @@ -186,6 +186,17 @@ async function getProjects() { // Extract actual project directory from JSONL sessions const actualProjectDir = await extractProjectDirectory(entry.name); + // Check if CLAUDE.md exists in the project directory + let hasClaudeFile = false; + try { + const claudeMdPath = path.join(actualProjectDir, 'CLAUDE.md'); + await fs.access(claudeMdPath); + hasClaudeFile = true; + } catch (error) { + // File doesn't exist or can't be accessed + hasClaudeFile = false; + } + // Get display name from config or generate one const customName = config[entry.name]?.displayName; const autoDisplayName = await generateDisplayName(entry.name, actualProjectDir); @@ -197,6 +208,7 @@ async function getProjects() { displayName: customName || autoDisplayName, fullPath: fullPath, isCustomName: !!customName, + hasClaudeFile: hasClaudeFile, sessions: [] }; @@ -234,15 +246,27 @@ async function getProjects() { } } - const project = { - name: projectName, - path: actualProjectDir, - displayName: projectConfig.displayName || await generateDisplayName(projectName, actualProjectDir), - fullPath: actualProjectDir, - isCustomName: !!projectConfig.displayName, - isManuallyAdded: true, - sessions: [] - }; + // Check if CLAUDE.md exists in the project directory + let hasClaudeFile = false; + try { + const claudeMdPath = path.join(actualProjectDir, 'CLAUDE.md'); + await fs.access(claudeMdPath); + hasClaudeFile = true; + } catch (error) { + // File doesn't exist or can't be accessed + hasClaudeFile = false; + } + + const project = { + name: projectName, + path: actualProjectDir, + displayName: projectConfig.displayName || await generateDisplayName(projectName, actualProjectDir), + fullPath: actualProjectDir, + isCustomName: !!projectConfig.displayName, + hasClaudeFile: hasClaudeFile, + isManuallyAdded: true, + sessions: [] + }; projects.push(project); } diff --git a/src/components/MainContent.jsx b/src/components/MainContent.jsx index 52dc2366..c3afd6df 100755 --- a/src/components/MainContent.jsx +++ b/src/components/MainContent.jsx @@ -127,6 +127,53 @@ function MainContent({ 💡 Tip: {isMobile ? 'Tap the menu button above to access projects' : 'Create a new project by clicking the folder icon in the sidebar'}

+ + {/* Icon Guide */} +
+

Icon Guide

+
+
+
+ + + +
+ Folder+ - Create a new project +
+
+
+ + + +
+ Refresh - Reload projects and sessions +
+
+
+ + + +
+ Star - Mark project as favorite +
+
+
+ + + +
+ Edit - Rename project +
+
+
+ + + +
+ Info - Project missing CLAUDE.md file (run /init to create) +
+
+
diff --git a/src/components/Sidebar.jsx b/src/components/Sidebar.jsx index 9a1e1116..3e528880 100755 --- a/src/components/Sidebar.jsx +++ b/src/components/Sidebar.jsx @@ -4,7 +4,7 @@ import { Button } from './ui/button'; import { Badge } from './ui/badge'; import { Input } from './ui/input'; -import { FolderOpen, Folder, Plus, MessageSquare, Clock, ChevronDown, ChevronRight, Edit3, Check, X, Trash2, Settings, FolderPlus, RefreshCw, Sparkles, Edit2, Star, Search } from 'lucide-react'; +import { FolderOpen, Folder, Plus, MessageSquare, Clock, ChevronDown, ChevronRight, Edit3, Check, X, Trash2, Settings, FolderPlus, RefreshCw, Sparkles, Edit2, Star, Search, Info } from 'lucide-react'; import { cn } from '../lib/utils'; import ClaudeLogo from './ClaudeLogo'; import { api } from '../utils/api'; @@ -680,6 +680,11 @@ function Sidebar({ >
+ {!project.hasClaudeFile && ( +
+ +
+ )}
+ {!project.hasClaudeFile && ( + + )} {isExpanded ? ( ) : (