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:
parent
5d02ec3359
commit
d25d969dde
|
|
@ -329,14 +329,20 @@ function addToSidebar(sessionId: string, name: string, hasActivePty: boolean) {
|
||||||
const list = document.getElementById("session-list");
|
const list = document.getElementById("session-list");
|
||||||
if (!list) return;
|
if (!list) return;
|
||||||
|
|
||||||
|
const session = sessions.get(sessionId);
|
||||||
|
const worktreePath = session?.worktreePath || '';
|
||||||
|
|
||||||
const item = document.createElement("div");
|
const item = document.createElement("div");
|
||||||
item.id = `sidebar-${sessionId}`;
|
item.id = `sidebar-${sessionId}`;
|
||||||
item.className = "session-list-item";
|
item.className = "session-list-item";
|
||||||
item.innerHTML = `
|
item.innerHTML = `
|
||||||
<div class="flex items-center space-x-2 flex-1 session-name-container">
|
<div class="flex items-center space-x-2 flex-1 session-name-container">
|
||||||
<span class="session-indicator ${hasActivePty ? 'active' : ''}"></span>
|
<span class="session-indicator ${hasActivePty ? 'active' : ''}"></span>
|
||||||
<span class="truncate session-name-text" data-id="${sessionId}">${name}</span>
|
<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}" />
|
<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>
|
</div>
|
||||||
<button class="session-delete-btn" data-id="${sessionId}" title="Delete session">×</button>
|
<button class="session-delete-btn" data-id="${sessionId}" title="Delete session">×</button>
|
||||||
`;
|
`;
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,10 @@
|
||||||
min-width: 80px;
|
min-width: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.session-worktree-path {
|
||||||
|
@apply text-xs text-gray-500 truncate block mt-0.5;
|
||||||
|
}
|
||||||
|
|
||||||
/* Tabs */
|
/* Tabs */
|
||||||
.tabs-container {
|
.tabs-container {
|
||||||
@apply flex bg-gray-900 border-b border-gray-700 overflow-x-auto;
|
@apply flex bg-gray-900 border-b border-gray-700 overflow-x-auto;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue