diff --git a/src/components/AppSidebar.tsx b/src/components/AppSidebar.tsx
index 2aae5d07..cf48d0db 100644
--- a/src/components/AppSidebar.tsx
+++ b/src/components/AppSidebar.tsx
@@ -97,8 +97,19 @@ export function AppSidebar({
const homeDir = useHomeDir();
const activeSession = sessions.find((s) => s.id === activeSessionId);
- const activeSessionDirectory =
+ const executionDirectory =
getSessionExecutionDirectory(activeSession) || activeTargetDirectory || null;
+ const activeSessionSidebarMeta = activeSession ? sessionMeta[activeSession.id] : undefined;
+ const activeSessionIsChat = activeSession
+ ? activeSessionSidebarMeta?.sidebarSection === "chats" ||
+ (!activeSessionSidebarMeta?.sidebarSection &&
+ normalizeProjectPath(getSessionExecutionDirectory(activeSession) ?? "") ===
+ normalizeProjectPath(defaultChatDirectory ?? ""))
+ : normalizeProjectPath(activeTargetDirectory ?? "") ===
+ normalizeProjectPath(defaultChatDirectory ?? "");
+ const activeSessionDirectory = activeSessionIsChat
+ ? null
+ : activeSessionSidebarMeta?.displayProjectDir || executionDirectory;
const {
matchingSessionIds: messageMatchingSessionIds,
diff --git a/src/components/sidebar/ProjectEntry.tsx b/src/components/sidebar/ProjectEntry.tsx
index dafbdff6..692453c3 100644
--- a/src/components/sidebar/ProjectEntry.tsx
+++ b/src/components/sidebar/ProjectEntry.tsx
@@ -2,8 +2,10 @@ import {
ChevronDown,
ChevronRight,
ChevronUp,
+ Folder,
FolderOpen,
GripVertical,
+ Plus,
SquarePen,
} from "lucide-react";
import * as ContextMenu from "@/components/ui/context-menu";
@@ -122,14 +124,14 @@ export function ProjectEntry({
};
return (
-
+
{
if (sidebarState === "collapsed") {
const top = event.currentTarget.getBoundingClientRect().top;
@@ -141,17 +143,32 @@ export function ProjectEntry({
toggleCollapsed(directory);
}}
leadingAction={
- canDrag ? (
-
+ sidebarState !== "collapsed" ? (
+
+
+ {canDrag && (
+
+ )}
+
) : undefined
}
actions={
@@ -181,10 +198,10 @@ export function ProjectEntry({
) : sidebarState === "collapsed" ? (
+ ) : isCollapsed ? (
+
) : (
-
+
)}
{getProjectName(directory)}
@@ -204,11 +221,20 @@ export function ProjectEntry({
{!isCollapsed && sidebarState !== "collapsed" && (
-
+
{dirSessions.length === 0 ? (
-
- {t("sidebar.noSessionsYet")}
-
+
) : (
<>
{visibleSessions.map((session) =>
diff --git a/src/components/sidebar/SessionRow.tsx b/src/components/sidebar/SessionRow.tsx
index 8cb509a0..2c4b9d4d 100644
--- a/src/components/sidebar/SessionRow.tsx
+++ b/src/components/sidebar/SessionRow.tsx
@@ -124,9 +124,7 @@ export function SessionRow({
const hasPermission = !!pendingPermissions[session.id];
const meta = sessionMeta[session.id];
const hasColor = !!meta?.color;
- const colorBorderClass = hasColor
- ? `border-l-[3px] -ml-[3px] ${getColorBorderClass(meta.color)}`
- : "";
+ const colorDotClass = hasColor ? getColorBorderClass(meta.color).replace("border-", "bg-") : "";
const tags = meta?.tags ?? [];
const isPinned = !!meta?.pinnedAt;
const isNaming = namingSessionIds.has(session.id);
@@ -178,7 +176,7 @@ export function SessionRow({
label={displayTitle}
active={isActive}
editing={editingSessionId === session.id}
- className={`group/session ${colorBorderClass}`}
+ className={`group/session text-muted-foreground ${isActive ? "text-sidebar-accent-foreground" : ""}`}
onActivate={() => {
void selectSession(session.id);
closeMobileSidebar();
@@ -217,6 +215,11 @@ export function SessionRow({
{hasUnsent && (
)}
+ {hasColor && (
+
+ )}
{editingSessionId === session.id ? (