Skip to content

Commit d1df3ba

Browse files
authored
Merge pull request #5 from built-by-as/add-worktree-path-to-session-sidebar
Add worktree path display to session sidebar
2 parents 5d02ec3 + d25d969 commit d1df3ba

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)