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 <noreply@anthropic.com>
This commit is contained in:
Amrit Subramanian 2025-10-07 15:02:14 -04:00
parent 5d02ec3359
commit d25d969dde
2 changed files with 12 additions and 2 deletions

View file

@ -329,14 +329,20 @@ function addToSidebar(sessionId: string, name: string, hasActivePty: boolean) {
const list = document.getElementById("session-list");
if (!list) return;
const session = sessions.get(sessionId);
const worktreePath = session?.worktreePath || '';
const item = document.createElement("div");
item.id = `sidebar-${sessionId}`;
item.className = "session-list-item";
item.innerHTML = `
<div class="flex items-center space-x-2 flex-1 session-name-container">
<span class="session-indicator ${hasActivePty ? 'active' : ''}"></span>
<span class="truncate session-name-text" data-id="${sessionId}">${name}</span>
<input type="text" class="session-name-input hidden" data-id="${sessionId}" value="${name}" />
<div class="flex-1 min-w-0">
<span class="truncate session-name-text block" data-id="${sessionId}">${name}</span>
<input type="text" class="session-name-input hidden" data-id="${sessionId}" value="${name}" />
<span class="session-worktree-path text-xs text-gray-500 truncate block">${worktreePath}</span>
</div>
</div>
<button class="session-delete-btn" data-id="${sessionId}" title="Delete session">×</button>
`;

View file

@ -100,6 +100,10 @@
min-width: 80px;
}
.session-worktree-path {
@apply text-xs text-gray-500 truncate block mt-0.5;
}
/* Tabs */
.tabs-container {
@apply flex bg-gray-900 border-b border-gray-700 overflow-x-auto;