Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 33 additions & 9 deletions server/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -197,6 +208,7 @@ async function getProjects() {
displayName: customName || autoDisplayName,
fullPath: fullPath,
isCustomName: !!customName,
hasClaudeFile: hasClaudeFile,
sessions: []
};

Expand Down Expand Up @@ -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);
}
Expand Down
47 changes: 47 additions & 0 deletions src/components/MainContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,53 @@ function MainContent({
💡 <strong>Tip:</strong> {isMobile ? 'Tap the menu button above to access projects' : 'Create a new project by clicking the folder icon in the sidebar'}
</p>
</div>

{/* Icon Guide */}
<div className="mt-6 bg-yellow-50 dark:bg-yellow-900/20 rounded-lg p-4 border border-yellow-200 dark:border-yellow-800">
<h3 className="text-sm font-semibold text-yellow-800 dark:text-yellow-200 mb-3">Icon Guide</h3>
<div className="space-y-2 text-sm text-yellow-700 dark:text-yellow-300">
<div className="flex items-center gap-3">
<div className="w-6 h-6 bg-yellow-100 dark:bg-yellow-900/30 rounded flex items-center justify-center">
<svg className="w-3 h-3 text-yellow-600 dark:text-yellow-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 4v16m8-8H4" />
</svg>
</div>
<span><strong>Folder+</strong> - Create a new project</span>
</div>
<div className="flex items-center gap-3">
<div className="w-6 h-6 bg-yellow-100 dark:bg-yellow-900/30 rounded flex items-center justify-center">
<svg className="w-3 h-3 text-yellow-600 dark:text-yellow-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={3} d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
</svg>
</div>
<span><strong>Refresh</strong> - Reload projects and sessions</span>
</div>
<div className="flex items-center gap-3">
<div className="w-6 h-6 bg-yellow-100 dark:bg-yellow-900/30 rounded flex items-center justify-center">
<svg className="w-3 h-3 text-yellow-600 dark:text-yellow-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" />
</svg>
</div>
<span><strong>Star</strong> - Mark project as favorite</span>
</div>
<div className="flex items-center gap-3">
<div className="w-6 h-6 bg-yellow-100 dark:bg-yellow-900/30 rounded flex items-center justify-center">
<svg className="w-3 h-3 text-yellow-600 dark:text-yellow-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z" />
</svg>
</div>
<span><strong>Edit</strong> - Rename project</span>
</div>
<div className="flex items-center gap-3">
<div className="w-6 h-6 bg-blue-100 dark:bg-blue-900/30 rounded flex items-center justify-center">
<svg className="w-3 h-3 text-blue-600 dark:text-blue-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
</div>
<span><strong>Info</strong> - Project missing CLAUDE.md file (run /init to create)</span>
</div>
</div>
</div>
</div>
</div>
</div>
Expand Down
13 changes: 12 additions & 1 deletion src/components/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -680,6 +680,11 @@ function Sidebar({
>
<div className="flex items-center justify-between">
<div className="flex items-center gap-3 min-w-0 flex-1">
{!project.hasClaudeFile && (
<div className="w-8 h-8 rounded-lg bg-blue-500/10 dark:bg-blue-900/30 flex items-center justify-center border border-blue-200 dark:border-blue-800" title="CLAUDE.md not found. Run /init to create it">
<Info className="w-4 h-4 text-blue-600 dark:text-blue-400" />
</div>
)}
<div className={cn(
"w-8 h-8 rounded-lg flex items-center justify-center transition-colors",
isExpanded ? "bg-primary/10" : "bg-muted"
Expand Down Expand Up @@ -833,6 +838,12 @@ function Sidebar({
})}
>
<div className="flex items-center gap-3 min-w-0 flex-1">
{!project.hasClaudeFile && (
<Info
className="w-4 h-4 text-blue-600 dark:text-blue-400 flex-shrink-0"
title="CLAUDE.md not found. Run /init to create it"
/>
)}
{isExpanded ? (
<FolderOpen className="w-4 h-4 text-primary flex-shrink-0" />
) : (
Expand Down