Skip to content

Commit d25d969

Browse files
built-by-asclaude
andcommitted
Add worktree path display to session sidebar
Shows the worktree directory path below each session name in the sidebar with subtle gray text to help users identify where each session's files are located. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 5d02ec3 commit d25d969

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

renderer.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,14 +329,20 @@ function addToSidebar(sessionId: string, name: string, hasActivePty: boolean) {
329329
const list = document.getElementById("session-list");
330330
if (!list) return;
331331

332+
const session = sessions.get(sessionId);
333+
const worktreePath = session?.worktreePath || '';
334+
332335
const item = document.createElement("div");
333336
item.id = `sidebar-${sessionId}`;
334337
item.className = "session-list-item";
335338
item.innerHTML = `
336339
<div class="flex items-center space-x-2 flex-1 session-name-container">
337340
<span class="session-indicator ${hasActivePty ? 'active' : ''}"></span>
338-
<span class="truncate session-name-text" data-id="${sessionId}">${name}</span>
339-
<input type="text" class="session-name-input hidden" data-id="${sessionId}" value="${name}" />
341+
<div class="flex-1 min-w-0">
342+
<span class="truncate session-name-text block" data-id="${sessionId}">${name}</span>
343+
<input type="text" class="session-name-input hidden" data-id="${sessionId}" value="${name}" />
344+
<span class="session-worktree-path text-xs text-gray-500 truncate block">${worktreePath}</span>
345+
</div>
340346
</div>
341347
<button class="session-delete-btn" data-id="${sessionId}" title="Delete session">×</button>
342348
`;

styles.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@
100100
min-width: 80px;
101101
}
102102

103+
.session-worktree-path {
104+
@apply text-xs text-gray-500 truncate block mt-0.5;
105+
}
106+
103107
/* Tabs */
104108
.tabs-container {
105109
@apply flex bg-gray-900 border-b border-gray-700 overflow-x-auto;

0 commit comments

Comments
 (0)