@cerbur/clutch-dsh-worktree 0.1.22 → 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -9
- package/README.zh.md +21 -8
- package/assets/screenshots/screenshots-dashboard.png +0 -0
- package/assets/screenshots/screenshots-en.png +0 -0
- package/assets/screenshots/screenshots-git-reviewer.png +0 -0
- package/assets/screenshots/screenshots-zh.png +0 -0
- package/lib/client/WorktreeSurface.d.ts +1 -1
- package/lib/client/WorktreeSurface.d.ts.map +1 -1
- package/lib/client/WorktreeSurface.js +7 -13
- package/lib/client/WorktreeSurface.js.map +1 -1
- package/lib/client/dashboard/dashboard-sessions.d.ts +1 -1
- package/lib/client/dashboard/dashboard-sessions.d.ts.map +1 -1
- package/lib/client/dashboard/dashboard-sessions.js +3 -2
- package/lib/client/dashboard/dashboard-sessions.js.map +1 -1
- package/lib/client/dsh-slot-contract.d.ts +6 -1
- package/lib/client/dsh-slot-contract.d.ts.map +1 -1
- package/lib/client/entry.d.ts.map +1 -1
- package/lib/client/entry.js +14 -1
- package/lib/client/entry.js.map +1 -1
- package/lib/client/locales.d.ts +2 -0
- package/lib/client/locales.d.ts.map +1 -1
- package/lib/client/locales.js +2 -0
- package/lib/client/locales.js.map +1 -1
- package/lib/client/overlay/WorktreeOverlay.d.ts +5 -2
- package/lib/client/overlay/WorktreeOverlay.d.ts.map +1 -1
- package/lib/client/overlay/WorktreeOverlay.js +11 -2
- package/lib/client/overlay/WorktreeOverlay.js.map +1 -1
- package/lib/client/session/virtual-workspace-membership.d.ts +1 -0
- package/lib/client/session/virtual-workspace-membership.d.ts.map +1 -1
- package/lib/client/session/virtual-workspace-membership.js +4 -0
- package/lib/client/session/virtual-workspace-membership.js.map +1 -1
- package/lib/client/surface/components/SurfaceContent.js +2 -2
- package/lib/client/surface/components/SurfaceContent.js.map +1 -1
- package/lib/client/surface/components/SurfaceHeader.js +1 -1
- package/lib/client/surface/components/SurfaceHeader.js.map +1 -1
- package/lib/client/surface/components/WorkspaceTree.d.ts +1 -1
- package/lib/client/surface/components/WorkspaceTree.d.ts.map +1 -1
- package/lib/client/surface/components/WorkspaceTree.js +3 -2
- package/lib/client/surface/components/WorkspaceTree.js.map +1 -1
- package/lib/client/surface/selectors.d.ts +3 -1
- package/lib/client/surface/selectors.d.ts.map +1 -1
- package/lib/client/surface/selectors.js +15 -0
- package/lib/client/surface/selectors.js.map +1 -1
- package/lib/client/surface/state/useSessionOrdering.d.ts.map +1 -1
- package/lib/client/surface/state/useSessionOrdering.js +1 -1
- package/lib/client/surface/state/useSessionOrdering.js.map +1 -1
- package/lib/client/surface/state/useSurfaceRefresh.d.ts +2 -2
- package/lib/client/surface/state/useSurfaceRefresh.d.ts.map +1 -1
- package/lib/client/surface/state/useSurfaceRefresh.js +118 -95
- package/lib/client/surface/state/useSurfaceRefresh.js.map +1 -1
- package/lib/client/surface/state/useSurfaceSources.d.ts +6 -5
- package/lib/client/surface/state/useSurfaceSources.d.ts.map +1 -1
- package/lib/client/surface/state/useSurfaceSources.js +10 -6
- package/lib/client/surface/state/useSurfaceSources.js.map +1 -1
- package/lib/client/surface/types.d.ts +9 -5
- package/lib/client/surface/types.d.ts.map +1 -1
- package/lib/client/view/sidebar-workspace-slot.d.ts +14 -0
- package/lib/client/view/sidebar-workspace-slot.d.ts.map +1 -0
- package/lib/client/view/sidebar-workspace-slot.js +23 -0
- package/lib/client/view/sidebar-workspace-slot.js.map +1 -0
- package/lib/client/view/workspace-region-geometry.d.ts +11 -0
- package/lib/client/view/workspace-region-geometry.d.ts.map +1 -0
- package/lib/client/view/workspace-region-geometry.js +28 -0
- package/lib/client/view/workspace-region-geometry.js.map +1 -0
- package/lib/client/view/worktree-view-read.d.ts +9 -2
- package/lib/client/view/worktree-view-read.d.ts.map +1 -1
- package/lib/client/view/worktree-view-read.js +95 -5
- package/lib/client/view/worktree-view-read.js.map +1 -1
- package/lib/client/worktree-connection.d.ts +1 -0
- package/lib/client/worktree-connection.d.ts.map +1 -1
- package/lib/client/worktree-connection.js +18 -0
- package/lib/client/worktree-connection.js.map +1 -1
- package/lib/client.js +752 -739
- package/lib/client.js.map +1 -1
- package/lib/contract/index.contract.js +2 -0
- package/lib/contract/index.contract.js.map +1 -1
- package/lib/contract/index.d.ts +15 -1
- package/lib/contract/index.d.ts.map +1 -1
- package/lib/contract/index.js +1 -0
- package/lib/contract/index.js.map +1 -1
- package/lib/host/remote.d.ts.map +1 -1
- package/lib/host/remote.js +5 -0
- package/lib/host/remote.js.map +1 -1
- package/lib/host/service.d.ts +4 -1
- package/lib/host/service.d.ts.map +1 -1
- package/lib/host/service.js +6 -0
- package/lib/host/service.js.map +1 -1
- package/lib/manage/manager-navigation.d.ts +11 -0
- package/lib/manage/manager-navigation.d.ts.map +1 -0
- package/lib/manage/manager-navigation.js +88 -0
- package/lib/manage/manager-navigation.js.map +1 -0
- package/lib/manage/manager.d.ts +3 -0
- package/lib/manage/manager.d.ts.map +1 -1
- package/lib/manage/manager.js +6 -34
- package/lib/manage/manager.js.map +1 -1
- package/lib/typert.host.js +154 -50
- package/lib/typert.remote-client.d.ts +3 -1
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +154 -50
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -1061,9 +1061,28 @@ window.__ModuleLoader__.load({
|
|
|
1061
1061
|
};
|
|
1062
1062
|
}
|
|
1063
1063
|
/** Share complete Workspace reads without allowing stale generations to repopulate the cache. */
|
|
1064
|
-
function createWorktreeViewReader(manager) {
|
|
1064
|
+
function createWorktreeViewReader(manager, sessionIdsForWorkspace) {
|
|
1065
1065
|
const entries = /* @__PURE__ */ new Map();
|
|
1066
1066
|
let disposed = false;
|
|
1067
|
+
let active = 0;
|
|
1068
|
+
const queue = [];
|
|
1069
|
+
const schedule = (operation) => new Promise((resolve, reject) => {
|
|
1070
|
+
const start = () => {
|
|
1071
|
+
active += 1;
|
|
1072
|
+
let result;
|
|
1073
|
+
try {
|
|
1074
|
+
result = operation();
|
|
1075
|
+
} catch (error) {
|
|
1076
|
+
result = Promise.reject(error);
|
|
1077
|
+
}
|
|
1078
|
+
result.then(resolve, reject).finally(() => {
|
|
1079
|
+
active -= 1;
|
|
1080
|
+
queue.shift()?.();
|
|
1081
|
+
});
|
|
1082
|
+
};
|
|
1083
|
+
if (active < 3) start();
|
|
1084
|
+
else queue.push(start);
|
|
1085
|
+
});
|
|
1067
1086
|
const entryFor = (workspaceId) => {
|
|
1068
1087
|
const current = entries.get(workspaceId);
|
|
1069
1088
|
if (current !== void 0) return current;
|
|
@@ -1081,13 +1100,22 @@ window.__ModuleLoader__.load({
|
|
|
1081
1100
|
if (!entry.stale && entry.view !== void 0) return Promise.resolve(entry.view);
|
|
1082
1101
|
if (entry.inFlight?.generation === entry.generation) return entry.inFlight.promise;
|
|
1083
1102
|
const generation = entry.generation;
|
|
1084
|
-
|
|
1103
|
+
let knownSessionIds;
|
|
1104
|
+
const promise = schedule(() => {
|
|
1105
|
+
if (disposed) return Promise.reject(/* @__PURE__ */ new Error("Worktree view reader disposed"));
|
|
1106
|
+
const membership = sessionIdsForWorkspace?.(workspaceId);
|
|
1107
|
+
if (membership !== void 0) if ("sessionIds" in membership) knownSessionIds = membership.pending ? [.../* @__PURE__ */ new Set([...entry.knownSessionIds ?? [], ...membership.sessionIds])] : membership.sessionIds.slice();
|
|
1108
|
+
else knownSessionIds = membership.slice();
|
|
1109
|
+
return loadWorktreeView(manager, workspaceId);
|
|
1110
|
+
}).then((data) => {
|
|
1085
1111
|
const view = {
|
|
1086
1112
|
workspaceId,
|
|
1087
|
-
...data
|
|
1113
|
+
...data,
|
|
1114
|
+
...knownSessionIds === void 0 ? {} : { knownSessionIds }
|
|
1088
1115
|
};
|
|
1089
1116
|
if (!disposed && entries.get(workspaceId) === entry && entry.generation === generation) {
|
|
1090
1117
|
entry.view = view;
|
|
1118
|
+
entry.knownSessionIds = knownSessionIds;
|
|
1091
1119
|
entry.stale = false;
|
|
1092
1120
|
}
|
|
1093
1121
|
return view;
|
|
@@ -1158,7 +1186,26 @@ window.__ModuleLoader__.load({
|
|
|
1158
1186
|
entry.stale = true;
|
|
1159
1187
|
entry.view = void 0;
|
|
1160
1188
|
},
|
|
1161
|
-
read,
|
|
1189
|
+
read(workspaceId, options) {
|
|
1190
|
+
if (!options?.current) return read(workspaceId);
|
|
1191
|
+
const followCurrent = async () => {
|
|
1192
|
+
for (;;) {
|
|
1193
|
+
if (disposed) throw new Error("Worktree view reader disposed");
|
|
1194
|
+
const entry = entryFor(workspaceId);
|
|
1195
|
+
const generation = entry.generation;
|
|
1196
|
+
let view;
|
|
1197
|
+
try {
|
|
1198
|
+
view = await read(workspaceId);
|
|
1199
|
+
} catch (error) {
|
|
1200
|
+
if (disposed || generation === entry.generation) throw error;
|
|
1201
|
+
continue;
|
|
1202
|
+
}
|
|
1203
|
+
if (disposed) throw new Error("Worktree view reader disposed");
|
|
1204
|
+
if (!entry.stale && entry.view === view) return view;
|
|
1205
|
+
}
|
|
1206
|
+
};
|
|
1207
|
+
return followCurrent();
|
|
1208
|
+
},
|
|
1162
1209
|
readMany(workspaceIds) {
|
|
1163
1210
|
const uniqueIds = [...new Set(workspaceIds)];
|
|
1164
1211
|
return Promise.all(uniqueIds.map((workspaceId) => read(workspaceId)));
|
|
@@ -1172,6 +1219,34 @@ window.__ModuleLoader__.load({
|
|
|
1172
1219
|
}
|
|
1173
1220
|
/** Read Worktree, Git readiness/HEAD, binding, and Workspace-root Main projections. */
|
|
1174
1221
|
async function loadWorktreeView(manager, workspaceId) {
|
|
1222
|
+
if (manager.readWorkspaceNavigation) {
|
|
1223
|
+
let navigation;
|
|
1224
|
+
let unsupported = false;
|
|
1225
|
+
try {
|
|
1226
|
+
navigation = await manager.readWorkspaceNavigation({ workspaceId });
|
|
1227
|
+
} catch (error) {
|
|
1228
|
+
if (toWorktreeViewError(error).code !== "WORKTREE_NAVIGATION_UNSUPPORTED") throw error;
|
|
1229
|
+
unsupported = true;
|
|
1230
|
+
}
|
|
1231
|
+
if (!unsupported) {
|
|
1232
|
+
const { gitState, ...snapshot } = navigation;
|
|
1233
|
+
if (!gitState.ok) {
|
|
1234
|
+
const readiness = readinessFromBranchError(gitState.error);
|
|
1235
|
+
if (!readiness) throw gitState.error;
|
|
1236
|
+
return {
|
|
1237
|
+
...snapshot,
|
|
1238
|
+
branches: [],
|
|
1239
|
+
readiness
|
|
1240
|
+
};
|
|
1241
|
+
}
|
|
1242
|
+
return {
|
|
1243
|
+
...snapshot,
|
|
1244
|
+
branches: [],
|
|
1245
|
+
currentBranch: gitState.value.currentBranch,
|
|
1246
|
+
readiness: snapshot.checkout?.currentHead === void 0 ? { status: "noLocalBranch" } : { status: "ready" }
|
|
1247
|
+
};
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1175
1250
|
const [worktreesResult, branchesResult, bindingsResult, mainInstructionsResult, checkoutResult] = await Promise.allSettled([
|
|
1176
1251
|
manager.listWorktrees({ workspaceId }),
|
|
1177
1252
|
typeof manager.getWorkspaceGitState === "function" ? manager.getWorkspaceGitState({ workspaceId }) : manager.listBranches({ workspaceId }),
|
|
@@ -1216,7 +1291,7 @@ window.__ModuleLoader__.load({
|
|
|
1216
1291
|
return {
|
|
1217
1292
|
invalidate: guard.invalidate,
|
|
1218
1293
|
load(workspaceId, onSuccess, onError) {
|
|
1219
|
-
return guard.run(() => reader.read(workspaceId), onSuccess, (error) => onError(toWorktreeViewError(error)));
|
|
1294
|
+
return guard.run(() => reader.read(workspaceId, { current: true }), onSuccess, (error) => onError(toWorktreeViewError(error)));
|
|
1220
1295
|
}
|
|
1221
1296
|
};
|
|
1222
1297
|
}
|
|
@@ -1888,6 +1963,7 @@ window.__ModuleLoader__.load({
|
|
|
1888
1963
|
"action.retryBinding": "重试绑定",
|
|
1889
1964
|
"action.openCreatedSession": "打开已创建的 Session",
|
|
1890
1965
|
"status.loading": "正在加载工作区…",
|
|
1966
|
+
"status.workspaceFailed": "工作区加载失败,请在报错与修复中重试。",
|
|
1891
1967
|
"error.worktreeDataUnavailable": "暂时无法读取 Worktree 数据。请确认 DSH 服务已连接,再重试;已有列表会保留。",
|
|
1892
1968
|
"error.gitNotInstalled": "找不到 Git。请安装 Git 或将其加入 PATH,重启 DSH 后重试。",
|
|
1893
1969
|
"error.connectionDisposed": "Worktree 连接已关闭。请刷新页面或重启 DSH 后重试。",
|
|
@@ -2334,6 +2410,7 @@ window.__ModuleLoader__.load({
|
|
|
2334
2410
|
"action.retryBinding": "Retry Binding",
|
|
2335
2411
|
"action.openCreatedSession": "Open Created Session",
|
|
2336
2412
|
"status.loading": "Loading Workspaces…",
|
|
2413
|
+
"status.workspaceFailed": "Workspace loading failed. Retry in Errors & Repair.",
|
|
2337
2414
|
"error.worktreeDataUnavailable": "Worktree data could not be loaded. Check your connection to DSH, then retry. The existing list is preserved.",
|
|
2338
2415
|
"error.gitNotInstalled": "Git could not be found. Install Git or add it to PATH, restart DSH, then retry.",
|
|
2339
2416
|
"error.connectionDisposed": "The Worktree connection has closed. Refresh the page or restart DSH, then retry.",
|
|
@@ -2408,6 +2485,7 @@ window.__ModuleLoader__.load({
|
|
|
2408
2485
|
readWorktreeSessionState: "worktreeManager/readWorktreeSessionState",
|
|
2409
2486
|
syncWorktreeBaseline: "worktreeManager/syncWorktreeBaseline",
|
|
2410
2487
|
getWorkspaceGitState: "worktreeManager/getWorkspaceGitState",
|
|
2488
|
+
readWorkspaceNavigation: "worktreeManager/readWorkspaceNavigation",
|
|
2411
2489
|
getToolSettings: "worktreeManager/getToolSettings",
|
|
2412
2490
|
updateToolSettings: "worktreeManager/updateToolSettings",
|
|
2413
2491
|
watchToolChanges: "worktreeManager/watchToolChanges",
|
|
@@ -2546,6 +2624,20 @@ window.__ModuleLoader__.load({
|
|
|
2546
2624
|
probeHost: (signal) => call("listBindings", { workspaceId: "" }, signal),
|
|
2547
2625
|
listWorktrees: (input) => invoke("listWorktrees", input),
|
|
2548
2626
|
getWorkspaceGitState: (input) => invoke("getWorkspaceGitState", input),
|
|
2627
|
+
async readWorkspaceNavigation(input) {
|
|
2628
|
+
try {
|
|
2629
|
+
return await invoke("readWorkspaceNavigation", input);
|
|
2630
|
+
} catch (error) {
|
|
2631
|
+
const endpoint = WORKTREE_CONNECTION_ENDPOINTS.readWorkspaceNavigation;
|
|
2632
|
+
if (error instanceof WorktreeConnectionError && error.code === "CONNECTION_CALL_FAILED" && error.cause instanceof Error && error.cause.message === `transport failure for /api/${endpoint}: HTTP 404`) throw new WorktreeConnectionError({
|
|
2633
|
+
code: "WORKTREE_NAVIGATION_UNSUPPORTED",
|
|
2634
|
+
message: "",
|
|
2635
|
+
details: { endpoint },
|
|
2636
|
+
retryable: false
|
|
2637
|
+
});
|
|
2638
|
+
throw error;
|
|
2639
|
+
}
|
|
2640
|
+
},
|
|
2549
2641
|
listWorktreeCommits: (input) => invoke("listWorktreeCommits", input),
|
|
2550
2642
|
listWorktreeCommitFiles: (input) => invoke("listWorktreeCommitFiles", input),
|
|
2551
2643
|
getWorktreeCommitFileDiff: (input) => invoke("getWorktreeCommitFileDiff", input),
|
|
@@ -2771,7 +2863,7 @@ window.__ModuleLoader__.load({
|
|
|
2771
2863
|
const IconSearchOutline16 = createDshIconAlias(exports$1, "IconSearchOutline16", "IconSearchOutlineRegular");
|
|
2772
2864
|
const IconTrashOutline16 = createDshIconAlias(exports$1, "IconTrashOutline16", "IconTrashOutlineRegular");
|
|
2773
2865
|
//#endregion
|
|
2774
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/Documents/Code/clutch-dsh/packages/clutch-dsh-worktree/.agents/clutch-worktrees/
|
|
2866
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/Documents/Code/clutch-dsh/packages/clutch-dsh-worktree/.agents/clutch-worktrees/wt_3fc76dafedb7/packages/clutch-dsh-worktree/src/client/context/worktree-context.css.mjs
|
|
2775
2867
|
const css$9 = ".-cerbur-clutch-dsh-worktree-headerContext {\n display: inline-flex;\n min-width: 0;\n height: 22px;\n align-items: center;\n gap: 4px;\n max-width: 180px;\n overflow: hidden;\n border-radius: 6px;\n padding: 0 2px 0 0;\n background: var(--dsw-alias-fill-tsp-secondary);\n color: var(--dsw-alias-label-secondary);\n font-size: 12px;\n line-height: 22px;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-contextIcon {\n flex: none;\n opacity: 0.7;\n}\n\n.-cerbur-clutch-dsh-worktree-contextLabel {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-contextHoverTitle {\n max-width: 360px;\n color: var(--dsw-static-neutral-bluish-00);\n font-size: 14px;\n line-height: 20px;\n overflow-wrap: anywhere;\n white-space: normal;\n}\n\n.-cerbur-clutch-dsh-worktree-heroContextHost {\n position: absolute;\n z-index: 0;\n display: block;\n width: max-content;\n max-width: 260px;\n min-height: 22px;\n}\n\n.-cerbur-clutch-dsh-worktree-heroContext {\n display: inline-flex;\n box-sizing: border-box;\n max-width: 260px;\n min-height: 22px;\n align-items: center;\n overflow: hidden;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 999px;\n padding: 0 8px;\n background: var(--dsw-alias-bg-layer-1);\n color: var(--dsw-alias-label-secondary);\n font-size: 12px;\n line-height: 20px;\n pointer-events: auto;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n";
|
|
2776
2868
|
const styleId$9 = "@cerbur/clutch-dsh-worktree/worktree-context.css";
|
|
2777
2869
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/worktree-context.css\"]") === null) {
|
|
@@ -2835,8 +2927,8 @@ window.__ModuleLoader__.load({
|
|
|
2835
2927
|
globalSetViewMode?.(mode);
|
|
2836
2928
|
}
|
|
2837
2929
|
//#endregion
|
|
2838
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/Documents/Code/clutch-dsh/packages/clutch-dsh-worktree/.agents/clutch-worktrees/
|
|
2839
|
-
const css$8 = ".-cerbur-clutch-dsh-worktree-action {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 8px;\n width: calc(100% + 4px);\n height: 42px;\n margin: 4px -2px;\n box-sizing: border-box;\n border: 0;\n border-radius: 12px;\n padding: 0 10px 0 8px;\n background: transparent;\n color: var(--dsw-alias-label-primary);\n cursor: pointer;\n font: inherit;\n font-size: 14px;\n line-height: 22px;\n text-align: left;\n overflow: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-action:hover,\n.-cerbur-clutch-dsh-worktree-action[data-active='true'] {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-action[data-collapsed='true'] {\n width: 36px;\n height: 36px;\n margin: 8px 0 10px;\n justify-content: center;\n gap: 0;\n padding: 0;\n border-radius: 50%;\n}\n\n.-cerbur-clutch-dsh-worktree-actionLabel {\n display: inline-flex;\n min-width: 0;\n align-items: center;\n height: 22px;\n overflow: hidden;\n font-weight: 400;\n line-height: 22px;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-surface {\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n min-width: 0;\n overflow: hidden;\n border-right: 1px solid var(--dsw-alias-border-l1);\n background: var(--dsw-specific-sidebar-fill);\n color: var(--dsw-alias-label-primary);\n pointer-events: auto;\n transition: width var(--ds-transition-duration-slow) var(--ds-ease-in-out);\n}\n\n/* Native macOS AppFrame already paints the tint over OS window vibrancy.\n Once the covered native rows are concealed, use that one material without\n adding another fill or backdrop root (menus keep their own native blur). */\n[data-platform='darwin'] .-cerbur-clutch-dsh-worktree-surface[data-native-sidebar-covered='true'] {\n background: transparent;\n border-right: none;\n}\n\n/* The shell overlay is outside the native column's clipping boundary.\n Follow the semantic collapse immediately, even during the track transition. */\n[data-sidebar-collapsed] [data-shell-overlay] .-cerbur-clutch-dsh-worktree-surface,\n.-cerbur-clutch-dsh-worktree-surface[data-collapsed='true'] {\n visibility: hidden;\n opacity: 0;\n pointer-events: none;\n}\n\n@media (prefers-reduced-transparency: reduce) {\n [data-platform='darwin'] .-cerbur-clutch-dsh-worktree-surface[data-native-sidebar-covered='true'] {\n background: color-mix(in srgb, var(--dsw-specific-sidebar-fill) 90%, transparent);\n }\n}\n\n.-cerbur-clutch-dsh-worktree-motionExits {\n position: absolute;\n inset: 0;\n contain: strict;\n overflow: clip;\n pointer-events: none;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .-cerbur-clutch-dsh-worktree-surface {\n transition: none;\n }\n}\n\n.-cerbur-clutch-dsh-worktree-wideContent {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex: 1;\n flex-direction: column;\n}\n\n.-cerbur-clutch-dsh-worktree-surface[data-collapsed='true'] .-cerbur-clutch-dsh-worktree-wideContent {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRegistrationDialog {\n width: min(440px, 100%);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRegistrationBody {\n display: grid;\n min-width: 0;\n gap: 20px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRegistrationBody .-cerbur-clutch-dsh-worktree-modalField {\n min-width: 0;\n gap: 8px;\n line-height: 18px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRegistrationBody .-cerbur-clutch-dsh-worktree-renameInput,\n.-cerbur-clutch-dsh-worktree-worktreeRegistrationBody [data-single-select] > button {\n box-sizing: border-box;\n width: 100%;\n min-width: 0;\n height: 40px;\n padding: 0 12px;\n border: 1px solid var(--dsw-alias-border-l3);\n font-size: 14px;\n line-height: 22px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRegistrationBody .-cerbur-clutch-dsh-worktree-renameInput:focus-within {\n border-color: var(--dsw-alias-state-business-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeModalTabs {\n display: flex;\n gap: 20px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeModalTab {\n border: 0;\n border-bottom: 2px solid transparent;\n padding: 4px 0 8px;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n font: inherit;\n font-size: 14px;\n line-height: 22px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeModalTab[aria-selected='true'] {\n border-bottom-color: var(--dsw-alias-label-primary);\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeImportCandidates {\n display: grid;\n gap: 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeImportError {\n display: grid;\n gap: 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-closeButton {\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n font: inherit;\n}\n\n.-cerbur-clutch-dsh-worktree-closeButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-header {\n display: flex;\n align-items: center;\n gap: 6px;\n flex: none;\n min-height: 44px;\n padding: 6px 10px;\n box-sizing: border-box;\n border-bottom: 1px solid var(--dsw-alias-border-l1);\n}\n\n.-cerbur-clutch-dsh-worktree-title {\n min-width: 0;\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 14px;\n font-weight: 600;\n opacity: 1;\n visibility: visible;\n transition:\n opacity 120ms var(--ds-ease-in-out),\n transform 180ms var(--ds-ease-in-out),\n visibility 0s linear;\n}\n\n.-cerbur-clutch-dsh-worktree-titleHidden {\n flex: 0 0 0px;\n max-width: 0;\n opacity: 0;\n transform: translateX(-4px);\n visibility: hidden;\n pointer-events: none;\n transition-delay: 0s, 0s, 180ms;\n}\n\n.-cerbur-clutch-dsh-worktree-closeButton {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n width: 28px;\n height: 28px;\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n font: inherit;\n font-size: 16px;\n line-height: 1;\n}\n\n.-cerbur-clutch-dsh-worktree-closeButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-modeButton[data-active='true'] {\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-workspacePicker {\n display: block;\n width: calc(100% - 20px);\n margin: 6px 10px 8px;\n padding: 6px 8px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 7px;\n background: var(--dsw-alias-button-elevated-fill);\n color: var(--dsw-alias-label-primary);\n font: inherit;\n font-size: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceLabel {\n display: block;\n color: var(--dsw-alias-label-tertiary);\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-scrollFrame {\n position: relative;\n min-height: 0;\n flex: 1;\n}\n\n.-cerbur-clutch-dsh-worktree-content {\n height: 100%;\n box-sizing: border-box;\n overflow: auto;\n padding: 0 10px 12px;\n scrollbar-width: none;\n}\n\n.-cerbur-clutch-dsh-worktree-content::-webkit-scrollbar {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-scrollContent {\n min-width: 0;\n display: flow-root;\n}\n\n/* The themed thumb floats in the existing right inset. Native scrolling\n stays on .-cerbur-clutch-dsh-worktree-content; OS scrollbar preferences cannot shift the rows. */\n.-cerbur-clutch-dsh-worktree-overlayScrollbar {\n position: absolute;\n top: 0;\n right: 2px;\n bottom: 0;\n width: 5px;\n touch-action: none;\n user-select: none;\n}\n\n.-cerbur-clutch-dsh-worktree-scrollbarThumb {\n width: 100%;\n border-radius: 999px;\n background: var(--dsw-alias-scrollbar-bg-l2);\n opacity: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-scrollFrame:hover .-cerbur-clutch-dsh-worktree-scrollbarThumb,\n.-cerbur-clutch-dsh-worktree-scrollFrame:focus-within .-cerbur-clutch-dsh-worktree-scrollbarThumb,\n.-cerbur-clutch-dsh-worktree-overlayScrollbar[data-dragging='true'] .-cerbur-clutch-dsh-worktree-scrollbarThumb {\n opacity: 1;\n}\n\n.-cerbur-clutch-dsh-worktree-scrollbarThumb:hover,\n.-cerbur-clutch-dsh-worktree-overlayScrollbar[data-dragging='true'] .-cerbur-clutch-dsh-worktree-scrollbarThumb {\n background: var(--dsw-alias-scrollbar-hover-l2);\n}\n\n.-cerbur-clutch-dsh-worktree-content:focus-visible {\n outline: 2px solid var(--dsw-alias-border-l3);\n outline-offset: -2px;\n}\n\n.-cerbur-clutch-dsh-worktree-error {\n margin: 12px 0 0;\n padding: 8px;\n border: 1px solid var(--dsw-alias-state-error-primary);\n border-radius: 7px;\n}\n\n.-cerbur-clutch-dsh-worktree-notice {\n margin: 12px 0 0;\n padding: 8px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 7px;\n background: var(--dsw-alias-button-elevated-fill);\n}\n\n.-cerbur-clutch-dsh-worktree-retryButton,\n.-cerbur-clutch-dsh-worktree-actionButton {\n border: 0;\n border-radius: 6px;\n background: var(--dsw-alias-button-elevated-fill);\n color: var(--dsw-alias-label-primary);\n cursor: pointer;\n font: inherit;\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-retryButton,\n.-cerbur-clutch-dsh-worktree-actionButton {\n width: 100%;\n padding: 6px 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-recoveryActions {\n display: grid;\n gap: 6px;\n margin-top: 6px;\n}\n\n.-cerbur-clutch-dsh-worktree-retryButton:disabled,\n.-cerbur-clutch-dsh-worktree-actionButton:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.-cerbur-clutch-dsh-worktree-actions {\n display: grid;\n gap: 6px;\n margin-top: 10px;\n padding: 8px;\n border: 1px solid var(--dsw-alias-border-l1);\n border-radius: 7px;\n}\n\n.-cerbur-clutch-dsh-worktree-actionSelect {\n min-width: 0;\n padding: 5px 6px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 6px;\n background: var(--dsw-alias-button-elevated-fill);\n color: var(--dsw-alias-label-primary);\n font: inherit;\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-section {\n margin: 12px 0 0;\n}\n\n.-cerbur-clutch-dsh-worktree-sectionTitle {\n margin: 0 2px 4px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.02em;\n text-transform: uppercase;\n}\n\n.-cerbur-clutch-dsh-worktree-empty,\n.-cerbur-clutch-dsh-worktree-message {\n margin: 0;\n padding: 8px 4px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 12px;\n line-height: 18px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitReadiness {\n display: grid;\n gap: 4px;\n}\n\n.-cerbur-clutch-dsh-worktree-commandBlock {\n margin: 6px 0 0;\n padding: 8px;\n overflow-x: auto;\n border-radius: 6px;\n background: var(--dsw-alias-button-elevated-fill);\n color: var(--dsw-alias-label-secondary);\n font:\n 11px/16px ui-monospace,\n SFMono-Regular,\n Menlo,\n monospace;\n white-space: pre-wrap;\n}\n\n.-cerbur-clutch-dsh-worktree-message[data-error='true'] {\n color: var(--dsw-alias-state-error-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-worktree,\n.-cerbur-clutch-dsh-worktree-session {\n display: flex;\n align-items: center;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n border: 0;\n border-radius: 7px;\n padding: 6px 8px;\n background: transparent;\n color: var(--dsw-alias-label-primary);\n font: inherit;\n font-size: 12px;\n text-align: left;\n}\n\n.-cerbur-clutch-dsh-worktree-worktree {\n cursor: default;\n}\n\n.-cerbur-clutch-dsh-worktree-session {\n cursor: pointer;\n}\n\n.-cerbur-clutch-dsh-worktree-worktree:hover,\n.-cerbur-clutch-dsh-worktree-session:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeLabel,\n.-cerbur-clutch-dsh-worktree-sessionLabel {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-status {\n flex: none;\n margin-left: auto;\n padding-left: 8px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-searchSlot {\n flex: none;\n max-width: 28px;\n min-width: 0;\n display: flex;\n align-items: center;\n margin-left: auto;\n box-sizing: border-box;\n transition:\n flex 180ms var(--ds-ease-in-out),\n max-width 180ms var(--ds-ease-in-out);\n}\n\n.-cerbur-clutch-dsh-worktree-searchSlotExpanded {\n flex: 1;\n max-width: 100%;\n}\n\n.-cerbur-clutch-dsh-worktree-headerActions {\n flex: none;\n display: flex;\n align-items: center;\n gap: 4px;\n margin-left: 0;\n opacity: 1;\n visibility: visible;\n transition:\n opacity 120ms var(--ds-ease-in-out),\n transform 180ms var(--ds-ease-in-out),\n visibility 0s linear;\n}\n\n.-cerbur-clutch-dsh-worktree-headerActionsHidden {\n flex: 0 0 0px;\n max-width: 0;\n margin-left: 0;\n opacity: 0;\n transform: translateX(4px);\n visibility: hidden;\n pointer-events: none;\n transition-delay: 0s, 0s, 180ms;\n}\n\n.-cerbur-clutch-dsh-worktree-search {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n height: 28px;\n box-sizing: border-box;\n border-radius: 6px;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n transition:\n background 180ms var(--ds-ease-in-out),\n box-shadow 180ms var(--ds-ease-in-out),\n color 180ms var(--ds-ease-in-out);\n}\n\n.-cerbur-clutch-dsh-worktree-searchExpanded {\n background: var(--dsw-alias-interactive-bg-subtle);\n box-shadow: inset 0 0 0 1px var(--dsw-alias-border-l2);\n}\n\n.-cerbur-clutch-dsh-worktree-searchExpanded:focus-within {\n box-shadow: inset 0 0 0 1px #3b82f6;\n}\n\n.-cerbur-clutch-dsh-worktree-searchButton {\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n border-radius: 50%;\n padding: 0;\n background: transparent;\n cursor: pointer;\n color: inherit;\n}\n\n.-cerbur-clutch-dsh-worktree-searchButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-searchExpanded .-cerbur-clutch-dsh-worktree-searchButton:hover {\n background: transparent;\n}\n\n.-cerbur-clutch-dsh-worktree-searchInput {\n flex: 1;\n width: 0;\n min-width: 0;\n box-sizing: border-box;\n border: none;\n outline: none;\n background: transparent;\n opacity: 0;\n pointer-events: none;\n font: inherit;\n font-size: 13px;\n line-height: 18px;\n color: var(--dsw-alias-label-primary);\n transition: opacity 120ms var(--ds-ease-in-out);\n}\n\n.-cerbur-clutch-dsh-worktree-searchExpanded .-cerbur-clutch-dsh-worktree-searchInput {\n margin-left: -2px;\n opacity: 1;\n pointer-events: auto;\n}\n\n.-cerbur-clutch-dsh-worktree-searchInput::placeholder {\n color: var(--dsw-alias-label-tertiary);\n}\n\n.-cerbur-clutch-dsh-worktree-clearButton {\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n border-radius: 50%;\n padding: 0;\n background: transparent;\n cursor: pointer;\n color: var(--dsw-alias-label-secondary);\n}\n\n.-cerbur-clutch-dsh-worktree-clearButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-actionSelect:focus {\n border-color: #3b82f6;\n}\n\n.-cerbur-clutch-dsh-worktree-iconButton {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n font: inherit;\n font-size: 20px;\n line-height: 1;\n}\n\n.-cerbur-clutch-dsh-worktree-iconButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-activityBell {\n display: inline-flex;\n position: relative;\n}\n\n.-cerbur-clutch-dsh-worktree-activityBadge {\n position: absolute;\n top: 4px;\n right: 4px;\n width: 5px;\n height: 5px;\n border-radius: 50%;\n background: var(--dsw-alias-brand-primary, #3b82f6);\n outline: 2px solid var(--dsw-specific-sidebar-fill);\n pointer-events: none;\n}\n\n.-cerbur-clutch-dsh-worktree-activityPanel {\n position: fixed;\n z-index: 1000;\n box-sizing: border-box;\n width: min(360px, calc(100vw - 16px));\n max-height: min(440px, calc(100dvh - 72px));\n display: flex;\n flex-direction: column;\n padding: 6px;\n color: var(--dsw-alias-label-primary);\n --dsw-elevation-stroke-color: var(--dsw-alias-border-l1);\n box-shadow: var(--dsw-elevation-prominent);\n outline: none;\n}\n\n.-cerbur-clutch-dsh-worktree-activityHeading {\n flex: none;\n padding: 8px 10px;\n font-size: 12px;\n font-weight: 600;\n color: var(--dsw-alias-label-secondary);\n}\n\n.-cerbur-clutch-dsh-worktree-activityEmpty {\n margin: 0;\n padding: 26px 10px 32px;\n text-align: center;\n font-size: 13px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.-cerbur-clutch-dsh-worktree-activityList {\n overflow: auto;\n min-height: 0;\n padding: 0;\n margin: 0;\n list-style: none;\n}\n\n.-cerbur-clutch-dsh-worktree-activityEntry {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n box-sizing: border-box;\n width: 100%;\n height: auto;\n border: 0;\n border-radius: 7px;\n padding: 10px;\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.-cerbur-clutch-dsh-worktree-activityEntry:hover,\n.-cerbur-clutch-dsh-worktree-activityEntry:focus-visible {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-activityEntry:focus-visible {\n outline: 1px solid var(--dsw-alias-label-secondary);\n outline-offset: -1px;\n}\n\n.-cerbur-clutch-dsh-worktree-activityIdentity {\n display: flex;\n flex-direction: column;\n min-width: 0;\n gap: 3px;\n flex: 1;\n}\n\n.-cerbur-clutch-dsh-worktree-activityName,\n.-cerbur-clutch-dsh-worktree-activityContext {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-activityName {\n font-size: 13px;\n line-height: 18px;\n}\n\n.-cerbur-clutch-dsh-worktree-activityContext,\n.-cerbur-clutch-dsh-worktree-activityTime {\n color: var(--dsw-alias-label-secondary);\n font-size: 11px;\n line-height: 16px;\n}\n\n.-cerbur-clutch-dsh-worktree-activityMetadata {\n display: flex;\n flex: none;\n flex-direction: column;\n align-items: flex-end;\n gap: 5px;\n padding-top: 2px;\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceList {\n position: relative;\n min-width: 0;\n min-height: 0;\n display: grid;\n gap: 4px;\n overflow-x: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceGroup {\n min-width: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow,\n.-cerbur-clutch-dsh-worktree-worktreeRow {\n position: relative;\n display: flex;\n align-items: center;\n min-width: 0;\n min-height: 36px;\n box-sizing: border-box;\n border-radius: 8px;\n padding: 3px 4px;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow:hover,\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow .-cerbur-clutch-dsh-worktree-workspaceDisclosure {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow:hover .-cerbur-clutch-dsh-worktree-workspaceDisclosure,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-workspaceDisclosure {\n display: inline-flex;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow:hover .-cerbur-clutch-dsh-worktree-workspaceIcon,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-workspaceIcon {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-worktreeDisclosure {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-worktreeDisclosure,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-worktreeDisclosure {\n display: inline-flex;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-worktreeIcon,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-worktreeIcon {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-disclosureButton {\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 28px;\n border: 0;\n border-radius: 6px;\n padding: 0;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n font: inherit;\n font-size: 17px;\n line-height: 1;\n}\n\n.-cerbur-clutch-dsh-worktree-disclosureButton > svg {\n display: block;\n}\n\n.-cerbur-clutch-dsh-worktree-disclosureArrow {\n transition: transform 150ms var(--ds-ease-in-out);\n}\n\n.-cerbur-clutch-dsh-worktree-disclosureButton[aria-expanded='true'] .-cerbur-clutch-dsh-worktree-disclosureArrow {\n transform: rotate(90deg);\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceDisclosure,\n.-cerbur-clutch-dsh-worktree-worktreeDisclosure {\n color: var(--dsw-alias-label-caption);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .-cerbur-clutch-dsh-worktree-disclosureArrow {\n transition: none;\n }\n}\n\n.-cerbur-clutch-dsh-worktree-disclosureButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceIcon,\n.-cerbur-clutch-dsh-worktree-worktreeIcon {\n flex: none;\n width: 24px;\n color: var(--dsw-alias-label-secondary);\n font-size: 20px;\n line-height: 1;\n text-align: center;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeIcon[data-worktree-state='done'] {\n color: var(--dsw-alias-state-success-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeIcon[data-worktree-state='warning'] {\n color: var(--dsw-alias-state-warn-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeIcon[data-worktree-state='error'] {\n color: var(--dsw-alias-state-error-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeStateLabel {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n overflow: hidden;\n border: 0;\n padding: 0;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceIcon {\n color: var(--dsw-alias-label-tertiary);\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceIcon[data-workspace-active='true'] {\n color: var(--dsw-alias-state-business-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceTitle,\n.-cerbur-clutch-dsh-worktree-worktreeLabel {\n min-width: 0;\n overflow: hidden;\n flex: 1;\n padding: 0 6px;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-main-group='true'] .-cerbur-clutch-dsh-worktree-worktreeLabel {\n font-weight: 600;\n}\n\n/* Native title reveal: the span clips its own text and scrolls only while\n hovered. Activity alone keeps the resting ellipsis. */\n@media (hover: hover) {\n .-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-worktreeLabel,\n .-cerbur-clutch-dsh-worktree-treeSessionRow:hover .-cerbur-clutch-dsh-worktree-sessionLabel {\n text-overflow: clip;\n }\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeLabel[data-scrolled],\n.-cerbur-clutch-dsh-worktree-sessionLabel[data-scrolled] {\n mask-image: linear-gradient(to right, transparent, #000 12px);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeLabel[data-clipped],\n.-cerbur-clutch-dsh-worktree-sessionLabel[data-clipped] {\n mask-image: linear-gradient(to left, transparent, #000 12px);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeLabel[data-scrolled][data-clipped],\n.-cerbur-clutch-dsh-worktree-sessionLabel[data-scrolled][data-clipped] {\n mask-image: linear-gradient(\n to right,\n transparent,\n #000 12px,\n #000 calc(100% - 12px),\n transparent\n );\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeHoverTitle {\n color: var(--dsw-static-neutral-bluish-00);\n font-size: 14px;\n line-height: 20px;\n overflow-wrap: anywhere;\n}\n\n/* Native Session hover card: full title, relative time, and current status. */\n.-cerbur-clutch-dsh-worktree-sessionHoverContent {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionHoverTitle {\n color: #FFFFFF;\n font-size: 14px;\n line-height: 20px;\n overflow-wrap: break-word;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionHoverTime {\n color: #CFD3D6;\n font-size: 12px;\n line-height: 16px;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionHoverStatus {\n display: flex;\n align-items: center;\n gap: 8px;\n color: #ADB2B8;\n font-size: 12px;\n line-height: 20px;\n}\n\n.-cerbur-clutch-dsh-worktree-treeActionSlot,\n.-cerbur-clutch-dsh-worktree-workspaceActions {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: flex-end;\n height: 28px;\n margin-left: auto;\n}\n\n/* Workspace rows retain the native fixed action column. */\n.-cerbur-clutch-dsh-worktree-workspaceActions {\n flex: 0 0 64px;\n width: 64px;\n}\n\n/* Group actions do not reserve space until their row needs to show them. */\n.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-treeActionSlot {\n min-width: 0;\n flex: 0 0 0;\n width: 0;\n gap: 4px;\n}\n\n/* Keep the 28px activity indicator plus a 4px label gap while collapsed. */\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot {\n flex: 0 0 32px;\n width: 32px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-treeActionSlot,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot,\n.-cerbur-clutch-dsh-worktree-worktreeRow:focus-within .-cerbur-clutch-dsh-worktree-treeActionSlot {\n flex: 0 0 auto;\n width: auto;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceActions > .-cerbur-clutch-dsh-worktree-menuAction {\n position: absolute;\n top: 0;\n right: 32px;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceActions > .-cerbur-clutch-dsh-worktree-iconButton:last-child {\n position: absolute;\n top: 0;\n right: 0;\n visibility: hidden;\n}\n\n/* Worktree actions flow naturally so the rail matches the controls that exist. */\n.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-dashboardAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child {\n position: static;\n opacity: 0;\n pointer-events: none;\n visibility: visible;\n}\n\n.-cerbur-clutch-dsh-worktree-groupActivity {\n position: absolute;\n top: 0;\n right: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n visibility: hidden;\n pointer-events: none;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true'] .-cerbur-clutch-dsh-worktree-groupActivity,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true'] .-cerbur-clutch-dsh-worktree-groupActivity {\n visibility: visible;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true']:hover .-cerbur-clutch-dsh-worktree-groupActivity,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true']:hover .-cerbur-clutch-dsh-worktree-groupActivity,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true'][data-menu-open='true'] .-cerbur-clutch-dsh-worktree-groupActivity,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true'][data-menu-open='true'] .-cerbur-clutch-dsh-worktree-groupActivity,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true']:focus-within .-cerbur-clutch-dsh-worktree-groupActivity,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true']:focus-within .-cerbur-clutch-dsh-worktree-groupActivity {\n visibility: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child {\n visibility: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true']:hover .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true']:hover .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true'][data-menu-open='true']\n .-cerbur-clutch-dsh-worktree-treeActionSlot\n > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true'][data-menu-open='true']\n .-cerbur-clutch-dsh-worktree-treeActionSlot\n > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true']:focus-within .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true']:focus-within .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child {\n visibility: visible;\n}\n\n.-cerbur-clutch-dsh-worktree-dashboardAction {\n display: inline-flex;\n flex: 0 0 28px;\n width: 28px;\n height: 28px;\n visibility: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-menuAction {\n display: inline-flex;\n flex: 0 0 28px;\n width: 28px;\n height: 28px;\n visibility: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow:hover .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-workspaceRow:focus-within .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-workspaceRow:hover [data-add-worktree],\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-menu-open='true'] [data-add-worktree],\n.-cerbur-clutch-dsh-worktree-workspaceRow:focus-within [data-add-worktree] {\n visibility: visible;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-dashboardAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-dashboardAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow:focus-within .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-dashboardAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow:focus-within .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-worktreeRow:focus-within .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child {\n opacity: 1;\n pointer-events: auto;\n visibility: visible;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow.-cerbur-clutch-dsh-worktree-dropBefore::before,\n.-cerbur-clutch-dsh-worktree-workspaceRow.-cerbur-clutch-dsh-worktree-dropAfter::after {\n position: absolute;\n right: 4px;\n left: 4px;\n height: 2px;\n border-radius: 2px;\n background: var(--dsw-alias-brand-primary);\n content: '';\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow.-cerbur-clutch-dsh-worktree-dropBefore::before {\n top: -1px;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow.-cerbur-clutch-dsh-worktree-dropAfter::after {\n bottom: -1px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow.-cerbur-clutch-dsh-worktree-dropBefore::before,\n.-cerbur-clutch-dsh-worktree-worktreeRow.-cerbur-clutch-dsh-worktree-dropAfter::after {\n position: absolute;\n right: 4px;\n left: 4px;\n height: 2px;\n border-radius: 2px;\n background: var(--dsw-alias-brand-primary);\n content: '';\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow.-cerbur-clutch-dsh-worktree-dropBefore::before {\n top: -1px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow.-cerbur-clutch-dsh-worktree-dropAfter::after {\n bottom: -1px;\n}\n\n.-cerbur-clutch-dsh-worktree-treeChildren {\n margin-left: 16px;\n padding: 2px 0 5px 12px;\n border-left: 1px solid var(--dsw-alias-border-l1);\n}\n\n.-cerbur-clutch-dsh-worktree-groupLabel {\n padding: 6px 8px 3px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 0.05em;\n text-transform: uppercase;\n}\n\n.-cerbur-clutch-dsh-worktree-groupHeader {\n display: flex;\n align-items: center;\n min-height: 34px;\n padding-right: 4px;\n}\n\n.-cerbur-clutch-dsh-worktree-groupHeader .-cerbur-clutch-dsh-worktree-groupLabel {\n flex: 1;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeGroup {\n margin-top: 2px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow {\n min-height: 34px;\n}\n\n/* Compact the Worktree leading slots to make room for its third action. */\n.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-worktreeIcon,\n.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-disclosureButton {\n width: 20px;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow {\n position: relative;\n display: flex;\n align-items: center;\n width: calc(100% - 20px);\n margin-left: 20px;\n min-width: 0;\n min-height: 31px;\n box-sizing: border-box;\n border-radius: 7px;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow:hover,\n.-cerbur-clutch-dsh-worktree-treeSessionRow[data-menu-open='true'] {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow[data-session-current='true'] {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow[data-session-current='true'] .-cerbur-clutch-dsh-worktree-treeSessionContent {\n font-weight: 600;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow.-cerbur-clutch-dsh-worktree-dropBefore::before,\n.-cerbur-clutch-dsh-worktree-treeSessionRow.-cerbur-clutch-dsh-worktree-dropAfter::after {\n position: absolute;\n right: 4px;\n left: 4px;\n height: 2px;\n border-radius: 2px;\n background: var(--dsw-alias-brand-primary);\n content: '';\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow.-cerbur-clutch-dsh-worktree-dropBefore::before {\n top: -1px;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow.-cerbur-clutch-dsh-worktree-dropAfter::after {\n bottom: -1px;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionContent {\n display: flex;\n align-items: center;\n flex: 1;\n width: 0;\n min-width: 0;\n min-height: 31px;\n box-sizing: border-box;\n border: 0;\n border-radius: 7px;\n padding: 4px 4px;\n background: transparent;\n color: var(--dsw-alias-label-primary);\n cursor: pointer;\n font: inherit;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n text-align: left;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionContent:hover {\n background: transparent;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionTrailing {\n position: relative;\n display: inline-flex;\n flex: 0 0 52px;\n align-items: center;\n justify-content: flex-end;\n width: 52px;\n height: 28px;\n margin-left: auto;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionMeta,\n.-cerbur-clutch-dsh-worktree-rowActions {\n position: absolute;\n inset: 0;\n display: inline-flex;\n align-items: center;\n justify-content: flex-end;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionMeta {\n color: var(--dsw-alias-label-tertiary);\n pointer-events: none;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionStatus {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionTime {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n margin-right: 4px;\n font-size: 12px;\n line-height: 20px;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionOverflowButton {\n display: block;\n width: calc(100% - 24px);\n margin: 2px 0 4px 24px;\n padding: 4px 8px;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n font: inherit;\n font-size: 12px;\n font-weight: 400;\n line-height: 20px;\n text-align: left;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionOverflowButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-rowActions {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow:hover .-cerbur-clutch-dsh-worktree-sessionMeta,\n.-cerbur-clutch-dsh-worktree-treeSessionRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-sessionMeta,\n.-cerbur-clutch-dsh-worktree-sessionTrailing:focus-within .-cerbur-clutch-dsh-worktree-sessionMeta {\n visibility: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow:hover .-cerbur-clutch-dsh-worktree-rowActions,\n.-cerbur-clutch-dsh-worktree-treeSessionRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-rowActions,\n.-cerbur-clutch-dsh-worktree-sessionTrailing:focus-within .-cerbur-clutch-dsh-worktree-rowActions {\n display: inline-flex;\n}\n\n.-cerbur-clutch-dsh-worktree-renameInput {\n width: 100%;\n}\n\n.-cerbur-clutch-dsh-worktree-renameError {\n margin: 8px 0 0;\n color: var(--dsw-alias-state-error-primary);\n font-size: 13px;\n line-height: 20px;\n}\n\n.-cerbur-clutch-dsh-worktree-emptyNested {\n margin: 0;\n padding: 4px 8px 5px 28px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-archivedGroup {\n margin-top: 4px;\n}\n\n.-cerbur-clutch-dsh-worktree-modalField {\n display: grid;\n gap: 5px;\n color: var(--dsw-alias-label-secondary);\n font-size: 12px;\n}\n.-cerbur-clutch-dsh-worktree-worktreeHoverDetails {\n max-width: 360px;\n white-space: normal;\n overflow-wrap: anywhere;\n line-height: 1.5;\n}\n";
|
|
2930
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/Documents/Code/clutch-dsh/packages/clutch-dsh-worktree/.agents/clutch-worktrees/wt_3fc76dafedb7/packages/clutch-dsh-worktree/src/client/worktree.css.mjs
|
|
2931
|
+
const css$8 = ".-cerbur-clutch-dsh-worktree-action {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 8px;\n width: calc(100% + 4px);\n height: 42px;\n margin: 4px -2px;\n box-sizing: border-box;\n border: 0;\n border-radius: 12px;\n padding: 0 10px 0 8px;\n background: transparent;\n color: var(--dsw-alias-label-primary);\n cursor: pointer;\n font: inherit;\n font-size: 14px;\n line-height: 22px;\n text-align: left;\n overflow: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-action:hover,\n.-cerbur-clutch-dsh-worktree-action[data-active='true'] {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-action[data-collapsed='true'] {\n width: 36px;\n height: 36px;\n margin: 8px 0 10px;\n justify-content: center;\n gap: 0;\n padding: 0;\n border-radius: 50%;\n}\n\n.-cerbur-clutch-dsh-worktree-actionLabel {\n display: inline-flex;\n min-width: 0;\n align-items: center;\n height: 22px;\n overflow: hidden;\n font-weight: 400;\n line-height: 22px;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceSeat {\n display: flex;\n flex: 1;\n min-height: 0;\n min-width: 0;\n overflow: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-surface {\n position: relative;\n flex: 1;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n min-width: 0;\n overflow: hidden;\n min-height: 0;\n background: transparent;\n color: var(--dsw-alias-label-primary);\n pointer-events: auto;\n transition: width var(--ds-transition-duration-slow) var(--ds-ease-in-out);\n}\n\n/* Fold state comes directly from the sidebar.-cerbur-clutch-dsh-worktree-workspaces owner. */\n.-cerbur-clutch-dsh-worktree-surface[data-collapsed='true'] {\n visibility: hidden;\n opacity: 0;\n pointer-events: none;\n}\n\n.-cerbur-clutch-dsh-worktree-motionExits {\n position: absolute;\n inset: 0;\n contain: strict;\n overflow: clip;\n pointer-events: none;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .-cerbur-clutch-dsh-worktree-surface {\n transition: none;\n }\n}\n\n.-cerbur-clutch-dsh-worktree-wideContent {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex: 1;\n flex-direction: column;\n}\n\n.-cerbur-clutch-dsh-worktree-surface[data-collapsed='true'] .-cerbur-clutch-dsh-worktree-wideContent {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRegistrationDialog {\n width: min(440px, 100%);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRegistrationBody {\n display: grid;\n min-width: 0;\n gap: 20px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRegistrationBody .-cerbur-clutch-dsh-worktree-modalField {\n min-width: 0;\n gap: 8px;\n line-height: 18px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRegistrationBody .-cerbur-clutch-dsh-worktree-renameInput,\n.-cerbur-clutch-dsh-worktree-worktreeRegistrationBody [data-single-select] > button {\n box-sizing: border-box;\n width: 100%;\n min-width: 0;\n height: 40px;\n padding: 0 12px;\n border: 1px solid var(--dsw-alias-border-l3);\n font-size: 14px;\n line-height: 22px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRegistrationBody .-cerbur-clutch-dsh-worktree-renameInput:focus-within {\n border-color: var(--dsw-alias-state-business-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeModalTabs {\n display: flex;\n gap: 20px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeModalTab {\n border: 0;\n border-bottom: 2px solid transparent;\n padding: 4px 0 8px;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n font: inherit;\n font-size: 14px;\n line-height: 22px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeModalTab[aria-selected='true'] {\n border-bottom-color: var(--dsw-alias-label-primary);\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeImportCandidates {\n display: grid;\n gap: 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeImportError {\n display: grid;\n gap: 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-closeButton {\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n font: inherit;\n}\n\n.-cerbur-clutch-dsh-worktree-closeButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-header {\n display: flex;\n align-items: center;\n gap: 6px;\n flex: none;\n height: 36px;\n margin: 2px 0 4px;\n padding: 0 10px 0 4px;\n box-sizing: border-box;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.-cerbur-clutch-dsh-worktree-sidebarTitle {\n min-width: 0;\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n opacity: 1;\n visibility: visible;\n transition:\n opacity 120ms var(--ds-ease-in-out),\n transform 180ms var(--ds-ease-in-out),\n visibility 0s linear;\n}\n\n.-cerbur-clutch-dsh-worktree-titleHidden {\n flex: 0 0 0px;\n max-width: 0;\n opacity: 0;\n transform: translateX(-4px);\n visibility: hidden;\n pointer-events: none;\n transition-delay: 0s, 0s, 180ms;\n}\n\n.-cerbur-clutch-dsh-worktree-closeButton {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n width: 28px;\n height: 28px;\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n font: inherit;\n font-size: 16px;\n line-height: 1;\n}\n\n.-cerbur-clutch-dsh-worktree-closeButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-modeButton[data-active='true'] {\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-workspacePicker {\n display: block;\n width: calc(100% - 20px);\n margin: 6px 10px 8px;\n padding: 6px 8px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 7px;\n background: var(--dsw-alias-button-elevated-fill);\n color: var(--dsw-alias-label-primary);\n font: inherit;\n font-size: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceLabel {\n display: block;\n color: var(--dsw-alias-label-tertiary);\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-scrollFrame {\n position: relative;\n min-height: 0;\n flex: 1;\n}\n\n.-cerbur-clutch-dsh-worktree-content {\n height: 100%;\n box-sizing: border-box;\n overflow: auto;\n padding: 0 10px 12px 0;\n scrollbar-width: none;\n}\n\n.-cerbur-clutch-dsh-worktree-content::-webkit-scrollbar {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-scrollContent {\n min-width: 0;\n display: flow-root;\n}\n\n/* The themed thumb floats in the existing right inset. Native scrolling\n stays on .-cerbur-clutch-dsh-worktree-content; OS scrollbar preferences cannot shift the rows. */\n.-cerbur-clutch-dsh-worktree-overlayScrollbar {\n position: absolute;\n top: 0;\n right: 2px;\n bottom: 0;\n width: 5px;\n touch-action: none;\n user-select: none;\n}\n\n.-cerbur-clutch-dsh-worktree-scrollbarThumb {\n width: 100%;\n border-radius: 999px;\n background: var(--dsw-alias-scrollbar-bg-l2);\n opacity: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-scrollFrame:hover .-cerbur-clutch-dsh-worktree-scrollbarThumb,\n.-cerbur-clutch-dsh-worktree-scrollFrame:focus-within .-cerbur-clutch-dsh-worktree-scrollbarThumb,\n.-cerbur-clutch-dsh-worktree-overlayScrollbar[data-dragging='true'] .-cerbur-clutch-dsh-worktree-scrollbarThumb {\n opacity: 1;\n}\n\n.-cerbur-clutch-dsh-worktree-scrollbarThumb:hover,\n.-cerbur-clutch-dsh-worktree-overlayScrollbar[data-dragging='true'] .-cerbur-clutch-dsh-worktree-scrollbarThumb {\n background: var(--dsw-alias-scrollbar-hover-l2);\n}\n\n.-cerbur-clutch-dsh-worktree-content:focus-visible {\n outline: 2px solid var(--dsw-alias-border-l3);\n outline-offset: -2px;\n}\n\n.-cerbur-clutch-dsh-worktree-error {\n margin: 12px 0 0;\n padding: 8px;\n border: 1px solid var(--dsw-alias-state-error-primary);\n border-radius: 7px;\n}\n\n.-cerbur-clutch-dsh-worktree-notice {\n margin: 12px 0 0;\n padding: 8px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 7px;\n background: var(--dsw-alias-button-elevated-fill);\n}\n\n.-cerbur-clutch-dsh-worktree-retryButton,\n.-cerbur-clutch-dsh-worktree-actionButton {\n border: 0;\n border-radius: 6px;\n background: var(--dsw-alias-button-elevated-fill);\n color: var(--dsw-alias-label-primary);\n cursor: pointer;\n font: inherit;\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-retryButton,\n.-cerbur-clutch-dsh-worktree-actionButton {\n width: 100%;\n padding: 6px 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-recoveryActions {\n display: grid;\n gap: 6px;\n margin-top: 6px;\n}\n\n.-cerbur-clutch-dsh-worktree-retryButton:disabled,\n.-cerbur-clutch-dsh-worktree-actionButton:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.-cerbur-clutch-dsh-worktree-actions {\n display: grid;\n gap: 6px;\n margin-top: 10px;\n padding: 8px;\n border: 1px solid var(--dsw-alias-border-l1);\n border-radius: 7px;\n}\n\n.-cerbur-clutch-dsh-worktree-actionSelect {\n min-width: 0;\n padding: 5px 6px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 6px;\n background: var(--dsw-alias-button-elevated-fill);\n color: var(--dsw-alias-label-primary);\n font: inherit;\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-section {\n margin: 12px 0 0;\n}\n\n.-cerbur-clutch-dsh-worktree-sectionTitle {\n margin: 0 2px 4px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.02em;\n text-transform: uppercase;\n}\n\n.-cerbur-clutch-dsh-worktree-empty,\n.-cerbur-clutch-dsh-worktree-message {\n margin: 0;\n padding: 8px 4px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 12px;\n line-height: 18px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitReadiness {\n display: grid;\n gap: 4px;\n}\n\n.-cerbur-clutch-dsh-worktree-commandBlock {\n margin: 6px 0 0;\n padding: 8px;\n overflow-x: auto;\n border-radius: 6px;\n background: var(--dsw-alias-button-elevated-fill);\n color: var(--dsw-alias-label-secondary);\n font:\n 11px/16px ui-monospace,\n SFMono-Regular,\n Menlo,\n monospace;\n white-space: pre-wrap;\n}\n\n.-cerbur-clutch-dsh-worktree-message[data-error='true'] {\n color: var(--dsw-alias-state-error-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-worktree,\n.-cerbur-clutch-dsh-worktree-session {\n display: flex;\n align-items: center;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n border: 0;\n border-radius: 7px;\n padding: 6px 8px;\n background: transparent;\n color: var(--dsw-alias-label-primary);\n font: inherit;\n font-size: 12px;\n text-align: left;\n}\n\n.-cerbur-clutch-dsh-worktree-worktree {\n cursor: default;\n}\n\n.-cerbur-clutch-dsh-worktree-session {\n cursor: pointer;\n}\n\n.-cerbur-clutch-dsh-worktree-worktree:hover,\n.-cerbur-clutch-dsh-worktree-session:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeLabel,\n.-cerbur-clutch-dsh-worktree-sessionLabel {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-status {\n flex: none;\n margin-left: auto;\n padding-left: 8px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-searchSlot {\n flex: none;\n max-width: 28px;\n min-width: 0;\n display: flex;\n align-items: center;\n margin-left: auto;\n box-sizing: border-box;\n transition:\n flex 180ms var(--ds-ease-in-out),\n max-width 180ms var(--ds-ease-in-out);\n}\n\n.-cerbur-clutch-dsh-worktree-searchSlotExpanded {\n flex: 1;\n max-width: 100%;\n}\n\n.-cerbur-clutch-dsh-worktree-headerActions {\n flex: none;\n display: flex;\n align-items: center;\n gap: 4px;\n margin-left: 0;\n opacity: 1;\n visibility: visible;\n transition:\n opacity 120ms var(--ds-ease-in-out),\n transform 180ms var(--ds-ease-in-out),\n visibility 0s linear;\n}\n\n.-cerbur-clutch-dsh-worktree-headerActionsHidden {\n flex: 0 0 0px;\n max-width: 0;\n margin-left: 0;\n opacity: 0;\n transform: translateX(4px);\n visibility: hidden;\n pointer-events: none;\n transition-delay: 0s, 0s, 180ms;\n}\n\n.-cerbur-clutch-dsh-worktree-search {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n height: 28px;\n box-sizing: border-box;\n border-radius: 6px;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n transition:\n background 180ms var(--ds-ease-in-out),\n box-shadow 180ms var(--ds-ease-in-out),\n color 180ms var(--ds-ease-in-out);\n}\n\n.-cerbur-clutch-dsh-worktree-searchExpanded {\n background: var(--dsw-alias-interactive-bg-subtle);\n box-shadow: inset 0 0 0 1px var(--dsw-alias-border-l2);\n}\n\n.-cerbur-clutch-dsh-worktree-searchExpanded:focus-within {\n box-shadow: inset 0 0 0 1px #3b82f6;\n}\n\n.-cerbur-clutch-dsh-worktree-searchButton {\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n border-radius: 50%;\n padding: 0;\n background: transparent;\n cursor: pointer;\n color: inherit;\n}\n\n.-cerbur-clutch-dsh-worktree-searchButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-searchExpanded .-cerbur-clutch-dsh-worktree-searchButton:hover {\n background: transparent;\n}\n\n.-cerbur-clutch-dsh-worktree-searchInput {\n flex: 1;\n width: 0;\n min-width: 0;\n box-sizing: border-box;\n border: none;\n outline: none;\n background: transparent;\n opacity: 0;\n pointer-events: none;\n font: inherit;\n font-size: 13px;\n line-height: 18px;\n color: var(--dsw-alias-label-primary);\n transition: opacity 120ms var(--ds-ease-in-out);\n}\n\n.-cerbur-clutch-dsh-worktree-searchExpanded .-cerbur-clutch-dsh-worktree-searchInput {\n margin-left: -2px;\n opacity: 1;\n pointer-events: auto;\n}\n\n.-cerbur-clutch-dsh-worktree-searchInput::placeholder {\n color: var(--dsw-alias-label-tertiary);\n}\n\n.-cerbur-clutch-dsh-worktree-clearButton {\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n border-radius: 50%;\n padding: 0;\n background: transparent;\n cursor: pointer;\n color: var(--dsw-alias-label-secondary);\n}\n\n.-cerbur-clutch-dsh-worktree-clearButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-actionSelect:focus {\n border-color: #3b82f6;\n}\n\n.-cerbur-clutch-dsh-worktree-iconButton {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n font: inherit;\n font-size: 20px;\n line-height: 1;\n}\n\n.-cerbur-clutch-dsh-worktree-iconButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-activityBell {\n display: inline-flex;\n position: relative;\n}\n\n.-cerbur-clutch-dsh-worktree-activityBadge {\n position: absolute;\n top: 4px;\n right: 4px;\n width: 5px;\n height: 5px;\n border-radius: 50%;\n background: var(--dsw-alias-brand-primary, #3b82f6);\n outline: 2px solid var(--dsw-specific-sidebar-fill);\n pointer-events: none;\n}\n\n.-cerbur-clutch-dsh-worktree-activityPanel {\n position: fixed;\n z-index: 1000;\n box-sizing: border-box;\n width: min(360px, calc(100vw - 16px));\n max-height: min(440px, calc(100dvh - 72px));\n display: flex;\n flex-direction: column;\n padding: 6px;\n color: var(--dsw-alias-label-primary);\n --dsw-elevation-stroke-color: var(--dsw-alias-border-l1);\n box-shadow: var(--dsw-elevation-prominent);\n outline: none;\n}\n\n.-cerbur-clutch-dsh-worktree-activityHeading {\n flex: none;\n padding: 8px 10px;\n font-size: 12px;\n font-weight: 600;\n color: var(--dsw-alias-label-secondary);\n}\n\n.-cerbur-clutch-dsh-worktree-activityEmpty {\n margin: 0;\n padding: 26px 10px 32px;\n text-align: center;\n font-size: 13px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.-cerbur-clutch-dsh-worktree-activityList {\n overflow: auto;\n min-height: 0;\n padding: 0;\n margin: 0;\n list-style: none;\n}\n\n.-cerbur-clutch-dsh-worktree-activityEntry {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n box-sizing: border-box;\n width: 100%;\n height: auto;\n border: 0;\n border-radius: 7px;\n padding: 10px;\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.-cerbur-clutch-dsh-worktree-activityEntry:hover,\n.-cerbur-clutch-dsh-worktree-activityEntry:focus-visible {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-activityEntry:focus-visible {\n outline: 1px solid var(--dsw-alias-label-secondary);\n outline-offset: -1px;\n}\n\n.-cerbur-clutch-dsh-worktree-activityIdentity {\n display: flex;\n flex-direction: column;\n min-width: 0;\n gap: 3px;\n flex: 1;\n}\n\n.-cerbur-clutch-dsh-worktree-activityName,\n.-cerbur-clutch-dsh-worktree-activityContext {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-activityName {\n font-size: 13px;\n line-height: 18px;\n}\n\n.-cerbur-clutch-dsh-worktree-activityContext,\n.-cerbur-clutch-dsh-worktree-activityTime {\n color: var(--dsw-alias-label-secondary);\n font-size: 11px;\n line-height: 16px;\n}\n\n.-cerbur-clutch-dsh-worktree-activityMetadata {\n display: flex;\n flex: none;\n flex-direction: column;\n align-items: flex-end;\n gap: 5px;\n padding-top: 2px;\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceList {\n position: relative;\n min-width: 0;\n min-height: 0;\n display: grid;\n gap: 4px;\n overflow-x: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceGroup {\n min-width: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow,\n.-cerbur-clutch-dsh-worktree-worktreeRow {\n position: relative;\n display: flex;\n align-items: center;\n min-width: 0;\n min-height: 36px;\n box-sizing: border-box;\n border-radius: 8px;\n padding: 3px 4px 3px 6px;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow:hover,\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow .-cerbur-clutch-dsh-worktree-workspaceDisclosure {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow:hover .-cerbur-clutch-dsh-worktree-workspaceDisclosure,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-workspaceDisclosure {\n display: inline-flex;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow:hover .-cerbur-clutch-dsh-worktree-workspaceIcon,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-workspaceIcon {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-worktreeDisclosure {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-worktreeDisclosure,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-worktreeDisclosure {\n display: inline-flex;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-worktreeIcon,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-worktreeIcon {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-disclosureButton {\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 28px;\n border: 0;\n border-radius: 6px;\n padding: 0;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n font: inherit;\n font-size: 17px;\n line-height: 1;\n}\n\n.-cerbur-clutch-dsh-worktree-disclosureButton > svg {\n display: block;\n}\n\n.-cerbur-clutch-dsh-worktree-disclosureArrow {\n transition: transform 150ms var(--ds-ease-in-out);\n}\n\n.-cerbur-clutch-dsh-worktree-disclosureButton[aria-expanded='true'] .-cerbur-clutch-dsh-worktree-disclosureArrow {\n transform: rotate(90deg);\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceDisclosure,\n.-cerbur-clutch-dsh-worktree-worktreeDisclosure {\n color: var(--dsw-alias-label-caption);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .-cerbur-clutch-dsh-worktree-disclosureArrow {\n transition: none;\n }\n}\n\n.-cerbur-clutch-dsh-worktree-disclosureButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceIcon,\n.-cerbur-clutch-dsh-worktree-worktreeIcon {\n flex: none;\n width: 20px;\n color: var(--dsw-alias-label-secondary);\n font-size: 20px;\n line-height: 1;\n text-align: center;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeIcon[data-worktree-state='done'] {\n color: var(--dsw-alias-state-success-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeIcon[data-worktree-state='warning'] {\n color: var(--dsw-alias-state-warn-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeIcon[data-worktree-state='error'] {\n color: var(--dsw-alias-state-error-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeStateLabel {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n overflow: hidden;\n border: 0;\n padding: 0;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceIcon {\n color: var(--dsw-alias-label-tertiary);\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceIcon[data-workspace-active='true'] {\n color: var(--dsw-alias-state-business-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceTitle,\n.-cerbur-clutch-dsh-worktree-worktreeLabel {\n min-width: 0;\n overflow: hidden;\n flex: 1;\n padding: 0 2px;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-main-group='true'] .-cerbur-clutch-dsh-worktree-worktreeLabel {\n font-weight: 600;\n}\n\n/* Native title reveal: the span clips its own text and scrolls only while\n hovered. Activity alone keeps the resting ellipsis. */\n@media (hover: hover) {\n .-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-worktreeLabel,\n .-cerbur-clutch-dsh-worktree-treeSessionRow:hover .-cerbur-clutch-dsh-worktree-sessionLabel {\n text-overflow: clip;\n }\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeLabel[data-scrolled],\n.-cerbur-clutch-dsh-worktree-sessionLabel[data-scrolled] {\n mask-image: linear-gradient(to right, transparent, #000 12px);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeLabel[data-clipped],\n.-cerbur-clutch-dsh-worktree-sessionLabel[data-clipped] {\n mask-image: linear-gradient(to left, transparent, #000 12px);\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeLabel[data-scrolled][data-clipped],\n.-cerbur-clutch-dsh-worktree-sessionLabel[data-scrolled][data-clipped] {\n mask-image: linear-gradient(\n to right,\n transparent,\n #000 12px,\n #000 calc(100% - 12px),\n transparent\n );\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeHoverTitle {\n color: var(--dsw-static-neutral-bluish-00);\n font-size: 14px;\n line-height: 20px;\n overflow-wrap: anywhere;\n}\n\n/* Native Session hover card: full title, relative time, and current status. */\n.-cerbur-clutch-dsh-worktree-sessionHoverContent {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionHoverTitle {\n color: #FFFFFF;\n font-size: 14px;\n line-height: 20px;\n overflow-wrap: break-word;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionHoverTime {\n color: #CFD3D6;\n font-size: 12px;\n line-height: 16px;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionHoverStatus {\n display: flex;\n align-items: center;\n gap: 8px;\n color: #ADB2B8;\n font-size: 12px;\n line-height: 20px;\n}\n\n.-cerbur-clutch-dsh-worktree-treeActionSlot,\n.-cerbur-clutch-dsh-worktree-workspaceActions {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: flex-end;\n height: 28px;\n margin-left: auto;\n}\n\n/* Workspace rows retain the native fixed action column. */\n.-cerbur-clutch-dsh-worktree-workspaceActions {\n flex: 0 0 64px;\n width: 64px;\n}\n\n/* Group actions do not reserve space until their row needs to show them. */\n.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-treeActionSlot {\n min-width: 0;\n flex: 0 0 0;\n width: 0;\n gap: 4px;\n}\n\n/* Keep the 28px activity indicator plus a 4px label gap while collapsed. */\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot {\n flex: 0 0 32px;\n width: 32px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-treeActionSlot,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot,\n.-cerbur-clutch-dsh-worktree-worktreeRow:focus-within .-cerbur-clutch-dsh-worktree-treeActionSlot {\n flex: 0 0 auto;\n width: auto;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceActions > .-cerbur-clutch-dsh-worktree-menuAction {\n position: absolute;\n top: 0;\n right: 32px;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceActions > .-cerbur-clutch-dsh-worktree-iconButton:last-child {\n position: absolute;\n top: 0;\n right: 0;\n visibility: hidden;\n}\n\n/* Worktree actions flow naturally so the rail matches the controls that exist. */\n.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-dashboardAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child {\n position: static;\n opacity: 0;\n pointer-events: none;\n visibility: visible;\n}\n\n.-cerbur-clutch-dsh-worktree-groupActivity {\n position: absolute;\n top: 0;\n right: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n visibility: hidden;\n pointer-events: none;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true'] .-cerbur-clutch-dsh-worktree-groupActivity,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true'] .-cerbur-clutch-dsh-worktree-groupActivity {\n visibility: visible;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true']:hover .-cerbur-clutch-dsh-worktree-groupActivity,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true']:hover .-cerbur-clutch-dsh-worktree-groupActivity,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true'][data-menu-open='true'] .-cerbur-clutch-dsh-worktree-groupActivity,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true'][data-menu-open='true'] .-cerbur-clutch-dsh-worktree-groupActivity,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true']:focus-within .-cerbur-clutch-dsh-worktree-groupActivity,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true']:focus-within .-cerbur-clutch-dsh-worktree-groupActivity {\n visibility: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child {\n visibility: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true']:hover .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true']:hover .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true'][data-menu-open='true']\n .-cerbur-clutch-dsh-worktree-treeActionSlot\n > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true'][data-menu-open='true']\n .-cerbur-clutch-dsh-worktree-treeActionSlot\n > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-group-activity='true']:focus-within .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-group-activity='true']:focus-within .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child {\n visibility: visible;\n}\n\n.-cerbur-clutch-dsh-worktree-dashboardAction {\n display: inline-flex;\n flex: 0 0 28px;\n width: 28px;\n height: 28px;\n visibility: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-menuAction {\n display: inline-flex;\n flex: 0 0 28px;\n width: 28px;\n height: 28px;\n visibility: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow:hover .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-workspaceRow:focus-within .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-workspaceRow:hover [data-add-worktree],\n.-cerbur-clutch-dsh-worktree-workspaceRow[data-menu-open='true'] [data-add-worktree],\n.-cerbur-clutch-dsh-worktree-workspaceRow:focus-within [data-add-worktree] {\n visibility: visible;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-dashboardAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-dashboardAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow:focus-within .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-dashboardAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow:focus-within .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-menuAction,\n.-cerbur-clutch-dsh-worktree-worktreeRow:hover .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-worktreeRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child,\n.-cerbur-clutch-dsh-worktree-worktreeRow:focus-within .-cerbur-clutch-dsh-worktree-treeActionSlot > .-cerbur-clutch-dsh-worktree-iconButton:last-child {\n opacity: 1;\n pointer-events: auto;\n visibility: visible;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow.-cerbur-clutch-dsh-worktree-dropBefore::before,\n.-cerbur-clutch-dsh-worktree-workspaceRow.-cerbur-clutch-dsh-worktree-dropAfter::after {\n position: absolute;\n right: 4px;\n left: 4px;\n height: 2px;\n border-radius: 2px;\n background: var(--dsw-alias-brand-primary);\n content: '';\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow.-cerbur-clutch-dsh-worktree-dropBefore::before {\n top: -1px;\n}\n\n.-cerbur-clutch-dsh-worktree-workspaceRow.-cerbur-clutch-dsh-worktree-dropAfter::after {\n bottom: -1px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow.-cerbur-clutch-dsh-worktree-dropBefore::before,\n.-cerbur-clutch-dsh-worktree-worktreeRow.-cerbur-clutch-dsh-worktree-dropAfter::after {\n position: absolute;\n right: 4px;\n left: 4px;\n height: 2px;\n border-radius: 2px;\n background: var(--dsw-alias-brand-primary);\n content: '';\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow.-cerbur-clutch-dsh-worktree-dropBefore::before {\n top: -1px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow.-cerbur-clutch-dsh-worktree-dropAfter::after {\n bottom: -1px;\n}\n\n.-cerbur-clutch-dsh-worktree-treeChildren {\n margin-left: 16px;\n padding: 2px 0 5px 6px;\n border-left: 1px solid var(--dsw-alias-border-l1);\n}\n\n.-cerbur-clutch-dsh-worktree-groupLabel {\n padding: 6px 8px 3px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 0.05em;\n text-transform: uppercase;\n}\n\n.-cerbur-clutch-dsh-worktree-groupHeader {\n display: flex;\n align-items: center;\n min-height: 34px;\n padding-right: 4px;\n}\n\n.-cerbur-clutch-dsh-worktree-groupHeader .-cerbur-clutch-dsh-worktree-groupLabel {\n flex: 1;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeGroup {\n margin-top: 2px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeRow {\n min-height: 34px;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow {\n position: relative;\n display: flex;\n align-items: center;\n width: calc(100% - 20px);\n margin-left: 20px;\n min-width: 0;\n min-height: 31px;\n box-sizing: border-box;\n border-radius: 7px;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow:hover,\n.-cerbur-clutch-dsh-worktree-treeSessionRow[data-menu-open='true'] {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow[data-session-current='true'] {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow.-cerbur-clutch-dsh-worktree-dropBefore::before,\n.-cerbur-clutch-dsh-worktree-treeSessionRow.-cerbur-clutch-dsh-worktree-dropAfter::after {\n position: absolute;\n right: 4px;\n left: 4px;\n height: 2px;\n border-radius: 2px;\n background: var(--dsw-alias-brand-primary);\n content: '';\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow.-cerbur-clutch-dsh-worktree-dropBefore::before {\n top: -1px;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow.-cerbur-clutch-dsh-worktree-dropAfter::after {\n bottom: -1px;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionContent {\n display: flex;\n align-items: center;\n flex: 1;\n width: 0;\n min-width: 0;\n min-height: 31px;\n box-sizing: border-box;\n border: 0;\n border-radius: 7px;\n padding: 4px 4px;\n background: transparent;\n color: var(--dsw-alias-label-primary);\n cursor: pointer;\n font: inherit;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n text-align: left;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionContent:hover {\n background: transparent;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionTrailing {\n position: relative;\n display: inline-flex;\n flex: 0 0 52px;\n align-items: center;\n justify-content: flex-end;\n width: 52px;\n height: 28px;\n margin-left: auto;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionMeta,\n.-cerbur-clutch-dsh-worktree-rowActions {\n position: absolute;\n inset: 0;\n display: inline-flex;\n align-items: center;\n justify-content: flex-end;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionMeta {\n color: var(--dsw-alias-label-tertiary);\n pointer-events: none;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionStatus {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionTime {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n margin-right: 4px;\n font-size: 12px;\n line-height: 20px;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionOverflowButton {\n display: block;\n width: calc(100% - 24px);\n margin: 2px 0 4px 24px;\n padding: 4px 8px;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n font: inherit;\n font-size: 12px;\n font-weight: 400;\n line-height: 20px;\n text-align: left;\n}\n\n.-cerbur-clutch-dsh-worktree-sessionOverflowButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n}\n\n.-cerbur-clutch-dsh-worktree-rowActions {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow:hover .-cerbur-clutch-dsh-worktree-sessionMeta,\n.-cerbur-clutch-dsh-worktree-treeSessionRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-sessionMeta,\n.-cerbur-clutch-dsh-worktree-sessionTrailing:focus-within .-cerbur-clutch-dsh-worktree-sessionMeta {\n visibility: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-treeSessionRow:hover .-cerbur-clutch-dsh-worktree-rowActions,\n.-cerbur-clutch-dsh-worktree-treeSessionRow[data-menu-open='true'] .-cerbur-clutch-dsh-worktree-rowActions,\n.-cerbur-clutch-dsh-worktree-sessionTrailing:focus-within .-cerbur-clutch-dsh-worktree-rowActions {\n display: inline-flex;\n}\n\n.-cerbur-clutch-dsh-worktree-renameInput {\n width: 100%;\n}\n\n.-cerbur-clutch-dsh-worktree-renameError {\n margin: 8px 0 0;\n color: var(--dsw-alias-state-error-primary);\n font-size: 13px;\n line-height: 20px;\n}\n\n.-cerbur-clutch-dsh-worktree-emptyNested {\n margin: 0;\n padding: 4px 8px 5px 28px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-archivedGroup {\n margin-top: 4px;\n}\n\n.-cerbur-clutch-dsh-worktree-modalField {\n display: grid;\n gap: 5px;\n color: var(--dsw-alias-label-secondary);\n font-size: 12px;\n}\n.-cerbur-clutch-dsh-worktree-worktreeHoverDetails {\n max-width: 360px;\n white-space: normal;\n overflow-wrap: anywhere;\n line-height: 1.5;\n}\n";
|
|
2840
2932
|
const styleId$8 = "@cerbur/clutch-dsh-worktree/worktree.css";
|
|
2841
2933
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/worktree.css\"]") === null) {
|
|
2842
2934
|
const tag = document.createElement("style");
|
|
@@ -2848,7 +2940,9 @@ window.__ModuleLoader__.load({
|
|
|
2848
2940
|
var worktree_css_default = {
|
|
2849
2941
|
"action": "-cerbur-clutch-dsh-worktree-action",
|
|
2850
2942
|
"actionLabel": "-cerbur-clutch-dsh-worktree-actionLabel",
|
|
2943
|
+
"workspaceSeat": "-cerbur-clutch-dsh-worktree-workspaceSeat",
|
|
2851
2944
|
"surface": "-cerbur-clutch-dsh-worktree-surface",
|
|
2945
|
+
"workspaces": "-cerbur-clutch-dsh-worktree-workspaces",
|
|
2852
2946
|
"motionExits": "-cerbur-clutch-dsh-worktree-motionExits",
|
|
2853
2947
|
"wideContent": "-cerbur-clutch-dsh-worktree-wideContent",
|
|
2854
2948
|
"worktreeRegistrationDialog": "-cerbur-clutch-dsh-worktree-worktreeRegistrationDialog",
|
|
@@ -2861,7 +2955,7 @@ window.__ModuleLoader__.load({
|
|
|
2861
2955
|
"worktreeImportError": "-cerbur-clutch-dsh-worktree-worktreeImportError",
|
|
2862
2956
|
"closeButton": "-cerbur-clutch-dsh-worktree-closeButton",
|
|
2863
2957
|
"header": "-cerbur-clutch-dsh-worktree-header",
|
|
2864
|
-
"
|
|
2958
|
+
"sidebarTitle": "-cerbur-clutch-dsh-worktree-sidebarTitle",
|
|
2865
2959
|
"titleHidden": "-cerbur-clutch-dsh-worktree-titleHidden",
|
|
2866
2960
|
"modeButton": "-cerbur-clutch-dsh-worktree-modeButton",
|
|
2867
2961
|
"workspacePicker": "-cerbur-clutch-dsh-worktree-workspacePicker",
|
|
@@ -3028,7 +3122,7 @@ window.__ModuleLoader__.load({
|
|
|
3028
3122
|
});
|
|
3029
3123
|
}
|
|
3030
3124
|
//#endregion
|
|
3031
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/Documents/Code/clutch-dsh/packages/clutch-dsh-worktree/.agents/clutch-worktrees/
|
|
3125
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/Documents/Code/clutch-dsh/packages/clutch-dsh-worktree/.agents/clutch-worktrees/wt_3fc76dafedb7/packages/clutch-dsh-worktree/src/client/dashboard/dashboard-header-action.css.mjs
|
|
3032
3126
|
const css$7 = "/* Match the native 28px circular Session-header utility controls. */\n.-cerbur-clutch-dsh-worktree-headerDashboardButton {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 6px;\n color: var(--dsw-alias-label-secondary);\n background: transparent;\n border: none;\n border-radius: 28px;\n cursor: pointer;\n}\n\n.-cerbur-clutch-dsh-worktree-headerDashboardButton svg {\n width: 16px;\n height: 16px;\n}\n\n.-cerbur-clutch-dsh-worktree-headerDashboardButton:hover,\n.-cerbur-clutch-dsh-worktree-headerDashboardButton:focus-visible {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n";
|
|
3033
3127
|
const styleId$7 = "@cerbur/clutch-dsh-worktree/dashboard-header-action.css";
|
|
3034
3128
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/dashboard-header-action.css\"]") === null) {
|
|
@@ -3247,6 +3341,7 @@ window.__ModuleLoader__.load({
|
|
|
3247
3341
|
return record.gitRootPath ?? record.absolutePath;
|
|
3248
3342
|
}
|
|
3249
3343
|
Object.freeze([
|
|
3344
|
+
"readWorkspaceNavigation",
|
|
3250
3345
|
"canReuseLocalSession",
|
|
3251
3346
|
"createWorktreeSession",
|
|
3252
3347
|
"readWorktreeSessionState",
|
|
@@ -3596,7 +3691,7 @@ window.__ModuleLoader__.load({
|
|
|
3596
3691
|
}, current.key);
|
|
3597
3692
|
}
|
|
3598
3693
|
//#endregion
|
|
3599
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/Documents/Code/clutch-dsh/packages/clutch-dsh-worktree/.agents/clutch-worktrees/
|
|
3694
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/Documents/Code/clutch-dsh/packages/clutch-dsh-worktree/.agents/clutch-worktrees/wt_3fc76dafedb7/packages/clutch-dsh-worktree/src/client/select/single-select.css.mjs
|
|
3600
3695
|
const css$6 = ".-cerbur-clutch-dsh-worktree-singleSelectRoot { min-width: 0; width: 100%; }\n.-cerbur-clutch-dsh-worktree-singleSelectTrigger {\n display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0;\n min-height: 36px; padding: 6px 10px; border-radius: var(--dsw-radius-md, 8px);\n border: 1px solid var(--dsw-alias-border-l3);\n background: var(--dsw-alias-bg-base); color: var(--dsw-alias-label-primary);\n font: inherit; text-align: start; cursor: pointer;\n}\n.-cerbur-clutch-dsh-worktree-singleSelectRoot[data-size='compact'] { width: min(280px, 45vw); }\n.-cerbur-clutch-dsh-worktree-singleSelectRoot[data-size='compact'] .-cerbur-clutch-dsh-worktree-singleSelectTrigger { min-height: 28px; padding: 3px 8px; font-size: 12px; }\n.-cerbur-clutch-dsh-worktree-singleSelectTrigger:disabled, .-cerbur-clutch-dsh-worktree-singleSelectOption:disabled { opacity: .4; cursor: default; }\n.-cerbur-clutch-dsh-worktree-singleSelectTrigger:focus-visible { outline: 2px solid var(--dsw-alias-state-business-primary); outline-offset: 2px; }\n.-cerbur-clutch-dsh-worktree-singleSelectPopup {\n position: fixed; z-index: 1100; padding: 8px; box-sizing: border-box;\n border: 0; border-radius: var(--dsw-radius-lg, 12px);\n --dsw-elevation-stroke-color: var(--dsw-alias-border-l1);\n box-shadow: var(--dsw-elevation-prominent);\n --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);\n --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);\n}\n.-cerbur-clutch-dsh-worktree-singleSelectPicker { display: flex; flex-direction: column; gap: 8px; min-width: 0; }\n.-cerbur-clutch-dsh-worktree-singleSelectSearch { box-sizing: border-box; width: 100%; min-width: 0; }\n.-cerbur-clutch-dsh-worktree-singleSelectLoading { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 80px; color: var(--dsw-alias-label-secondary); font-size: 12px; }\n.-cerbur-clutch-dsh-worktree-singleSelectLoading svg { width: 16px; height: 16px; animation: singleSelectSpin 1s linear infinite; }\n@keyframes singleSelectSpin { to { transform: rotate(360deg); } }\n@media (prefers-reduced-motion: reduce) { .-cerbur-clutch-dsh-worktree-singleSelectLoading svg { animation: none; } }\n.-cerbur-clutch-dsh-worktree-singleSelectFilters { display: flex; flex-wrap: wrap; gap: 4px; }\n.-cerbur-clutch-dsh-worktree-singleSelectFilters button {\n border: 0; border-radius: var(--dsw-radius-md, 8px); padding: 4px 8px; background: transparent;\n color: var(--dsw-alias-label-secondary); font: inherit; font-size: 11px; cursor: pointer;\n}\n.-cerbur-clutch-dsh-worktree-singleSelectFilters button[aria-pressed='true'], .-cerbur-clutch-dsh-worktree-singleSelectFilters button:hover:not(:disabled) { background: var(--dsw-alias-interactive-bg-hover); color: var(--dsw-alias-label-primary); }\n.-cerbur-clutch-dsh-worktree-singleSelectViewport {\n height: clamp(120px, calc(100dvh - 160px), 300px); overflow-y: auto; overscroll-behavior: contain;\n padding: 4px; box-sizing: border-box; min-height: 0;\n}\n.-cerbur-clutch-dsh-worktree-singleSelectPopup .-cerbur-clutch-dsh-worktree-singleSelectViewport { height: auto; max-height: var(--single-select-viewport-height, 220px); }\n.-cerbur-clutch-dsh-worktree-singleSelectPopup .-cerbur-clutch-dsh-worktree-singleSelectEmpty { min-height: 80px; }\n.-cerbur-clutch-dsh-worktree-singleSelectGroup { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 36px; box-sizing: border-box; padding: 6px 8px; color: var(--dsw-alias-label-tertiary); font-size: 11px; line-height: 15px; }\n.-cerbur-clutch-dsh-worktree-singleSelectOption {\n box-sizing: border-box;\n display: flex; align-items: center; gap: 6px; width: 100%; min-height: 34px;\n padding: 6px 8px; border: 0; border-radius: var(--dsw-radius-md, 8px); background: transparent;\n color: var(--dsw-alias-label-primary); font: inherit; font-size: 13px; line-height: 20px; text-align: start; cursor: pointer;\n}\n.-cerbur-clutch-dsh-worktree-singleSelectOption:hover:not(:disabled), .-cerbur-clutch-dsh-worktree-singleSelectOption[data-highlighted='true']:not(:disabled), .-cerbur-clutch-dsh-worktree-singleSelectOption:focus-visible:not(:disabled) { background: var(--dsw-alias-interactive-bg-hover); outline: none; }\n.-cerbur-clutch-dsh-worktree-singleSelectOption[data-description='true'] { min-height: 48px; }\n.-cerbur-clutch-dsh-worktree-singleSelectText { display: flex; flex-direction: column; flex: 1; min-width: 0; }\n.-cerbur-clutch-dsh-worktree-singleSelectName { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.-cerbur-clutch-dsh-worktree-singleSelectDescription { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dsw-alias-label-tertiary); font-size: 11px; line-height: 16px; }\n.-cerbur-clutch-dsh-worktree-singleSelectBadge { flex: none; color: var(--dsw-alias-label-tertiary); font-size: 11px; }\n.-cerbur-clutch-dsh-worktree-singleSelectTrigger > svg, .-cerbur-clutch-dsh-worktree-singleSelectOption > svg { width: 14px; height: 14px; flex: none; }\n.-cerbur-clutch-dsh-worktree-singleSelectEmpty { display: grid; place-items: center; height: 100%; color: var(--dsw-alias-label-tertiary); font-size: 13px; }\n";
|
|
3601
3696
|
const styleId$6 = "@cerbur/clutch-dsh-worktree/single-select.css";
|
|
3602
3697
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/single-select.css\"]") === null) {
|
|
@@ -3997,7 +4092,7 @@ window.__ModuleLoader__.load({
|
|
|
3997
4092
|
});
|
|
3998
4093
|
}
|
|
3999
4094
|
//#endregion
|
|
4000
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/Documents/Code/clutch-dsh/packages/clutch-dsh-worktree/.agents/clutch-worktrees/
|
|
4095
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/Documents/Code/clutch-dsh/packages/clutch-dsh-worktree/.agents/clutch-worktrees/wt_3fc76dafedb7/packages/clutch-dsh-worktree/src/client/branch/git-branch.css.mjs
|
|
4001
4096
|
const css$5 = ".-cerbur-clutch-dsh-worktree-branchFetch { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 4px; border: 0; border-radius: var(--dsw-radius-sm); background: transparent; color: var(--dsw-alias-label-secondary); cursor: pointer; }\n.-cerbur-clutch-dsh-worktree-branchFetch:hover:not(:disabled) { background: var(--dsw-alias-interactive-bg-hover); }\n.-cerbur-clutch-dsh-worktree-branchFetch:disabled { opacity: .4; cursor: default; }\n.-cerbur-clutch-dsh-worktree-branchFetch svg { width: 16px; height: 16px; }\n.-cerbur-clutch-dsh-worktree-branchFetch[aria-busy='true'] svg { animation: branchFetchSpin 1s linear infinite; }\n@keyframes branchFetchSpin { to { transform: rotate(360deg); } }\n@media (prefers-reduced-motion: reduce) { .-cerbur-clutch-dsh-worktree-branchFetch[aria-busy='true'] svg { animation: none; } }\n.-cerbur-clutch-dsh-worktree-branchFetch[data-fetch-status='success'], .-cerbur-clutch-dsh-worktree-branchFetch[data-fetch-status='error'] { width: auto; padding-inline: 6px; white-space: nowrap; font-size: 12px; line-height: 18px; }\n.-cerbur-clutch-dsh-worktree-branchFetch[data-fetch-status='success']:disabled { opacity: 1; }\n.-cerbur-clutch-dsh-worktree-branchFetch[data-fetch-status='error'] { color: var(--dsw-alias-state-error-primary); }\n";
|
|
4002
4097
|
const styleId$5 = "@cerbur/clutch-dsh-worktree/git-branch.css";
|
|
4003
4098
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/git-branch.css\"]") === null) {
|
|
@@ -4429,6 +4524,24 @@ window.__ModuleLoader__.load({
|
|
|
4429
4524
|
}
|
|
4430
4525
|
//#endregion
|
|
4431
4526
|
//#region lib/client/surface/selectors.js
|
|
4527
|
+
/** Pending native replay is incomplete evidence, not removal of ready rows. */
|
|
4528
|
+
function retainPendingWorkspaces(previous, next) {
|
|
4529
|
+
if (!previous || !isPendingListPhase(next.phase)) return next;
|
|
4530
|
+
const updates = new Map(next.items.map((item) => [item.workspaceId, item]));
|
|
4531
|
+
const items = previous.items.map((item) => {
|
|
4532
|
+
const update = updates.get(item.workspaceId);
|
|
4533
|
+
updates.delete(item.workspaceId);
|
|
4534
|
+
return update ? {
|
|
4535
|
+
...update,
|
|
4536
|
+
sessionIds: [.../* @__PURE__ */ new Set([...item.sessionIds, ...update.sessionIds])]
|
|
4537
|
+
} : item;
|
|
4538
|
+
});
|
|
4539
|
+
return {
|
|
4540
|
+
...next,
|
|
4541
|
+
items: [...items, ...updates.values()],
|
|
4542
|
+
archivedSessionIds: [.../* @__PURE__ */ new Set([...previous.archivedSessionIds ?? [], ...next.archivedSessionIds ?? []])]
|
|
4543
|
+
};
|
|
4544
|
+
}
|
|
4432
4545
|
/** Native activity changes invalidate only the archived Worktrees' owning reads. */
|
|
4433
4546
|
function worktreeActivityRefreshWorkspaceIds(views, previous, next) {
|
|
4434
4547
|
return views.filter((view) => view.bindings.some((binding) => previous[binding.sessionId]?.ongoing !== next[binding.sessionId]?.ongoing && view.worktrees.some((record) => record.worktreeId === binding.worktreeId && record.status === "removed"))).map((view) => view.workspaceId);
|
|
@@ -4481,12 +4594,15 @@ window.__ModuleLoader__.load({
|
|
|
4481
4594
|
const view = views.find((candidate) => candidate.workspaceId === workspace.workspaceId);
|
|
4482
4595
|
if (view === void 0) return void 0;
|
|
4483
4596
|
const binding = view.bindings.find((candidate) => candidate.sessionId === currentSessionId);
|
|
4484
|
-
if (binding === void 0)
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4597
|
+
if (binding === void 0) {
|
|
4598
|
+
if (view.knownSessionIds !== void 0 && !view.knownSessionIds.includes(currentSessionId)) return void 0;
|
|
4599
|
+
return {
|
|
4600
|
+
sessionId: currentSessionId,
|
|
4601
|
+
workspaceId: workspace.workspaceId,
|
|
4602
|
+
groupKey: "main:" + workspace.workspaceId,
|
|
4603
|
+
kind: "main"
|
|
4604
|
+
};
|
|
4605
|
+
}
|
|
4490
4606
|
const worktree = view.worktrees.find((candidate) => candidate.worktreeId === binding.worktreeId && candidate.workspaceId === workspace.workspaceId);
|
|
4491
4607
|
if (worktree === void 0) return void 0;
|
|
4492
4608
|
return {
|
|
@@ -6838,7 +6954,7 @@ window.__ModuleLoader__.load({
|
|
|
6838
6954
|
const allWorkspaceSessionIds = filterArchivedSessionIds(workspaceSessionIds(workspaces, workspace.workspaceId, sessions.ids), archivedSessionIds);
|
|
6839
6955
|
const workspaceGroupActivityStatus = aggregateSessionStatus(filterVisibleSessionIds(allWorkspaceSessionIds, sessions), sessionPresentations);
|
|
6840
6956
|
const bindings = view?.bindings ?? [];
|
|
6841
|
-
const mainSessionIds = filterVisibleSessionIds(unboundSessionIds(allWorkspaceSessionIds, [...new Set(bindings.map((binding) => binding.sessionId))]), sessions);
|
|
6957
|
+
const mainSessionIds = filterVisibleSessionIds(unboundSessionIds(allWorkspaceSessionIds, [...new Set(bindings.map((binding) => binding.sessionId))]).filter((id) => view?.knownSessionIds === void 0 || view.knownSessionIds.includes(id)), sessions);
|
|
6842
6958
|
const mainGroupKey = `main:${workspace.workspaceId}`;
|
|
6843
6959
|
const orderedMainSessionIds = orderedSessionIdsByAccount.get(mainGroupKey) ?? mainSessionIds;
|
|
6844
6960
|
const visibleMainSessionIds = mainSessionIds.filter((sessionId) => workspaceMatchesQuery || sessionMatchesQuery(sessionId, sessions, query));
|
|
@@ -6855,189 +6971,197 @@ window.__ModuleLoader__.load({
|
|
|
6855
6971
|
return (0, react_jsx_runtime.jsxs)("section", {
|
|
6856
6972
|
className: worktree_css_default.workspaceGroup,
|
|
6857
6973
|
"data-workspace-id": workspace.workspaceId,
|
|
6858
|
-
children: [
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
over: null
|
|
6874
|
-
});
|
|
6875
|
-
},
|
|
6876
|
-
hover: (half) => {
|
|
6877
|
-
setWorkspaceDrag((current) => current === void 0 ? current : {
|
|
6878
|
-
...current,
|
|
6879
|
-
over: {
|
|
6974
|
+
children: [
|
|
6975
|
+
(0, react_jsx_runtime.jsx)(WorktreeWorkspaceRow, {
|
|
6976
|
+
t,
|
|
6977
|
+
workspace,
|
|
6978
|
+
expanded,
|
|
6979
|
+
containsCurrentSession: currentSessionId !== void 0 && allWorkspaceSessionIds.includes(currentSessionId),
|
|
6980
|
+
groupActivityStatus: workspaceGroupActivityStatus,
|
|
6981
|
+
actionPending,
|
|
6982
|
+
menuOpen: openWorkspaceMenuId === workspace.workspaceId,
|
|
6983
|
+
drag: {
|
|
6984
|
+
active: workspaceDrag !== void 0,
|
|
6985
|
+
marker: workspaceDrag?.over?.workspaceId === workspace.workspaceId ? workspaceDrag.over.half : null,
|
|
6986
|
+
start: () => {
|
|
6987
|
+
workspaceDropCommitted.current = false;
|
|
6988
|
+
setWorkspaceDrag({
|
|
6880
6989
|
workspaceId: workspace.workspaceId,
|
|
6881
|
-
half
|
|
6882
|
-
}
|
|
6883
|
-
});
|
|
6884
|
-
},
|
|
6885
|
-
drop: (half) => {
|
|
6886
|
-
if (workspaceDrag === void 0) return;
|
|
6887
|
-
commitWorkspaceDrag(workspaceDrag, {
|
|
6888
|
-
workspaceId: workspace.workspaceId,
|
|
6889
|
-
half
|
|
6890
|
-
});
|
|
6891
|
-
},
|
|
6892
|
-
end: () => {
|
|
6893
|
-
if (workspaceDrag?.over !== null && workspaceDrag?.over !== void 0) commitWorkspaceDrag(workspaceDrag, workspaceDrag.over);
|
|
6894
|
-
else setWorkspaceDrag(void 0);
|
|
6895
|
-
workspaceDropCommitted.current = false;
|
|
6896
|
-
}
|
|
6897
|
-
},
|
|
6898
|
-
onToggle: () => {
|
|
6899
|
-
toggleWorkspace(workspace.workspaceId);
|
|
6900
|
-
},
|
|
6901
|
-
onCreateWorktree: () => {
|
|
6902
|
-
openWorktreeCreator(workspace);
|
|
6903
|
-
},
|
|
6904
|
-
onRename: () => {
|
|
6905
|
-
openWorkspaceRename(workspace);
|
|
6906
|
-
},
|
|
6907
|
-
onDelete: () => {
|
|
6908
|
-
openWorkspaceDelete(workspace);
|
|
6909
|
-
},
|
|
6910
|
-
onMenuOpenChange: (open) => {
|
|
6911
|
-
setOpenWorkspaceMenuId(open ? workspace.workspaceId : void 0);
|
|
6912
|
-
}
|
|
6913
|
-
}), expanded && (0, react_jsx_runtime.jsxs)("div", {
|
|
6914
|
-
className: worktree_css_default.treeChildren,
|
|
6915
|
-
children: [
|
|
6916
|
-
(0, react_jsx_runtime.jsx)(WorktreeGroupRow, {
|
|
6917
|
-
t,
|
|
6918
|
-
kind: "main",
|
|
6919
|
-
label: mainLabel,
|
|
6920
|
-
expanded: mainExpanded,
|
|
6921
|
-
groupActivityStatus: aggregateSessionStatus(mainSessionIds, sessionPresentations),
|
|
6922
|
-
icon: (0, react_jsx_runtime.jsx)(IconBranchOutline16, {}),
|
|
6923
|
-
workspaceTitle: workspace.title,
|
|
6924
|
-
onToggle: () => {
|
|
6925
|
-
toggleMain(workspace.workspaceId);
|
|
6926
|
-
},
|
|
6927
|
-
showDashboardAction: props.openDashboard !== void 0,
|
|
6928
|
-
menu: {
|
|
6929
|
-
onDashboard: props.openDashboard === void 0 ? void 0 : () => props.openDashboard?.(createMainWorktreeRecord(workspace, currentBranch, view?.mainInstructions, view?.checkout)),
|
|
6930
|
-
open: openMainMenuId === workspace.workspaceId,
|
|
6931
|
-
label: mainLabel,
|
|
6932
|
-
copyPath: workspace.path,
|
|
6933
|
-
showCreate: mainRef !== void 0,
|
|
6934
|
-
showRemove: false,
|
|
6935
|
-
disabled: actionPending,
|
|
6936
|
-
onOpenChange: (open) => {
|
|
6937
|
-
setOpenMainMenuId(open ? workspace.workspaceId : void 0);
|
|
6938
|
-
},
|
|
6939
|
-
onCreateWorktree: mainRef === void 0 ? void 0 : () => {
|
|
6940
|
-
openWorktreeCreator(workspace, {
|
|
6941
|
-
baseBranch: currentHead?.kind !== "branch" && currentHead !== void 0 ? "HEAD" : currentBranch,
|
|
6942
|
-
newBranch: createNumberedWorktreeName(mainRef, workspaceWorktreeNames)
|
|
6943
|
-
});
|
|
6944
|
-
}
|
|
6945
|
-
},
|
|
6946
|
-
onCreateSession: createMainSession === void 0 ? void 0 : () => {
|
|
6947
|
-
createMainSession(workspace.workspaceId);
|
|
6948
|
-
}
|
|
6949
|
-
}),
|
|
6950
|
-
mainExpanded && (0, react_jsx_runtime.jsx)(WorktreeSessionGroup, {
|
|
6951
|
-
t,
|
|
6952
|
-
groupKey: mainGroupKey,
|
|
6953
|
-
sessionIds,
|
|
6954
|
-
workspaceId: workspace.workspaceId,
|
|
6955
|
-
currentSessionId,
|
|
6956
|
-
expanded: mainSessionGroupExpanded,
|
|
6957
|
-
actionPending,
|
|
6958
|
-
sessions,
|
|
6959
|
-
sessionPresentations,
|
|
6960
|
-
dragState: sessionDrag,
|
|
6961
|
-
onToggleExpanded: () => {
|
|
6962
|
-
toggleSessionGroup(mainGroupKey, mainSessionGroupAutoExpanded);
|
|
6963
|
-
},
|
|
6964
|
-
onStartDrag: (groupKey, sessionId) => {
|
|
6965
|
-
sessionDropCommitted.current = false;
|
|
6966
|
-
setSessionDrag({
|
|
6967
|
-
groupKey,
|
|
6968
|
-
sessionId,
|
|
6969
6990
|
over: null
|
|
6970
6991
|
});
|
|
6971
6992
|
},
|
|
6972
|
-
|
|
6973
|
-
|
|
6993
|
+
hover: (half) => {
|
|
6994
|
+
setWorkspaceDrag((current) => current === void 0 ? current : {
|
|
6974
6995
|
...current,
|
|
6975
6996
|
over: {
|
|
6976
|
-
|
|
6997
|
+
workspaceId: workspace.workspaceId,
|
|
6977
6998
|
half
|
|
6978
6999
|
}
|
|
6979
7000
|
});
|
|
6980
7001
|
},
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
onCommitDrag: commitSessionDrag,
|
|
6988
|
-
onOpen: (sessionId) => {
|
|
6989
|
-
openWorktreeSession$1({ open: openSession }, sessionId);
|
|
7002
|
+
drop: (half) => {
|
|
7003
|
+
if (workspaceDrag === void 0) return;
|
|
7004
|
+
commitWorkspaceDrag(workspaceDrag, {
|
|
7005
|
+
workspaceId: workspace.workspaceId,
|
|
7006
|
+
half
|
|
7007
|
+
});
|
|
6990
7008
|
},
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7009
|
+
end: () => {
|
|
7010
|
+
if (workspaceDrag?.over !== null && workspaceDrag?.over !== void 0) commitWorkspaceDrag(workspaceDrag, workspaceDrag.over);
|
|
7011
|
+
else setWorkspaceDrag(void 0);
|
|
7012
|
+
workspaceDropCommitted.current = false;
|
|
7013
|
+
}
|
|
7014
|
+
},
|
|
7015
|
+
onToggle: () => {
|
|
7016
|
+
toggleWorkspace(workspace.workspaceId);
|
|
7017
|
+
},
|
|
7018
|
+
onCreateWorktree: () => {
|
|
7019
|
+
openWorktreeCreator(workspace);
|
|
7020
|
+
},
|
|
7021
|
+
onRename: () => {
|
|
7022
|
+
openWorkspaceRename(workspace);
|
|
7023
|
+
},
|
|
7024
|
+
onDelete: () => {
|
|
7025
|
+
openWorkspaceDelete(workspace);
|
|
7026
|
+
},
|
|
7027
|
+
onMenuOpenChange: (open) => {
|
|
7028
|
+
setOpenWorkspaceMenuId(open ? workspace.workspaceId : void 0);
|
|
7029
|
+
}
|
|
7030
|
+
}),
|
|
7031
|
+
expanded && view === void 0 && (0, react_jsx_runtime.jsx)("p", {
|
|
7032
|
+
className: worktree_css_default.message,
|
|
7033
|
+
"data-workspace-read": workspace.workspaceId,
|
|
7034
|
+
children: read.readState.targetErrors?.[workspace.workspaceId] ? t("status.workspaceFailed") : t("status.loading")
|
|
7035
|
+
}),
|
|
7036
|
+
expanded && view !== void 0 && (0, react_jsx_runtime.jsxs)("div", {
|
|
7037
|
+
className: worktree_css_default.treeChildren,
|
|
7038
|
+
children: [
|
|
7039
|
+
(0, react_jsx_runtime.jsx)(WorktreeGroupRow, {
|
|
7040
|
+
t,
|
|
7041
|
+
kind: "main",
|
|
7042
|
+
label: mainLabel,
|
|
7043
|
+
expanded: mainExpanded,
|
|
7044
|
+
groupActivityStatus: aggregateSessionStatus(mainSessionIds, sessionPresentations),
|
|
7045
|
+
icon: (0, react_jsx_runtime.jsx)(IconBranchOutline16, {}),
|
|
7046
|
+
workspaceTitle: workspace.title,
|
|
7047
|
+
onToggle: () => {
|
|
7048
|
+
toggleMain(workspace.workspaceId);
|
|
7049
|
+
},
|
|
7050
|
+
showDashboardAction: props.openDashboard !== void 0,
|
|
7051
|
+
menu: {
|
|
7052
|
+
onDashboard: props.openDashboard === void 0 ? void 0 : () => props.openDashboard?.(createMainWorktreeRecord(workspace, currentBranch, view?.mainInstructions, view?.checkout)),
|
|
7053
|
+
open: openMainMenuId === workspace.workspaceId,
|
|
7054
|
+
label: mainLabel,
|
|
7055
|
+
copyPath: workspace.path,
|
|
7056
|
+
showCreate: mainRef !== void 0,
|
|
7057
|
+
showRemove: false,
|
|
7058
|
+
disabled: actionPending,
|
|
7059
|
+
onOpenChange: (open) => {
|
|
7060
|
+
setOpenMainMenuId(open ? workspace.workspaceId : void 0);
|
|
7061
|
+
},
|
|
7062
|
+
onCreateWorktree: mainRef === void 0 ? void 0 : () => {
|
|
7063
|
+
openWorktreeCreator(workspace, {
|
|
7064
|
+
baseBranch: currentHead?.kind !== "branch" && currentHead !== void 0 ? "HEAD" : currentBranch,
|
|
7065
|
+
newBranch: createNumberedWorktreeName(mainRef, workspaceWorktreeNames)
|
|
7066
|
+
});
|
|
7067
|
+
}
|
|
7068
|
+
},
|
|
7069
|
+
onCreateSession: createMainSession === void 0 ? void 0 : () => {
|
|
7070
|
+
createMainSession(workspace.workspaceId);
|
|
7071
|
+
}
|
|
7072
|
+
}),
|
|
7073
|
+
mainExpanded && (0, react_jsx_runtime.jsx)(WorktreeSessionGroup, {
|
|
7074
|
+
t,
|
|
7075
|
+
groupKey: mainGroupKey,
|
|
7076
|
+
sessionIds,
|
|
7077
|
+
workspaceId: workspace.workspaceId,
|
|
7078
|
+
currentSessionId,
|
|
7079
|
+
expanded: mainSessionGroupExpanded,
|
|
7080
|
+
actionPending,
|
|
7081
|
+
sessions,
|
|
7082
|
+
sessionPresentations,
|
|
7083
|
+
dragState: sessionDrag,
|
|
7084
|
+
onToggleExpanded: () => {
|
|
7085
|
+
toggleSessionGroup(mainGroupKey, mainSessionGroupAutoExpanded);
|
|
7086
|
+
},
|
|
7087
|
+
onStartDrag: (groupKey, sessionId) => {
|
|
7088
|
+
sessionDropCommitted.current = false;
|
|
7089
|
+
setSessionDrag({
|
|
7090
|
+
groupKey,
|
|
7091
|
+
sessionId,
|
|
7092
|
+
over: null
|
|
7093
|
+
});
|
|
7094
|
+
},
|
|
7095
|
+
onHoverDrag: (sessionId, half) => {
|
|
7096
|
+
setSessionDrag((current) => current === void 0 ? current : {
|
|
7097
|
+
...current,
|
|
7098
|
+
over: {
|
|
7099
|
+
sessionId,
|
|
7100
|
+
half
|
|
7101
|
+
}
|
|
7102
|
+
});
|
|
7103
|
+
},
|
|
7104
|
+
onClearDrag: () => {
|
|
7105
|
+
setSessionDrag(void 0);
|
|
7106
|
+
},
|
|
7107
|
+
onFinishDrag: () => {
|
|
7108
|
+
sessionDropCommitted.current = false;
|
|
7109
|
+
},
|
|
7110
|
+
onCommitDrag: commitSessionDrag,
|
|
7111
|
+
onOpen: (sessionId) => {
|
|
7112
|
+
openWorktreeSession$1({ open: openSession }, sessionId);
|
|
7113
|
+
},
|
|
7114
|
+
onRename: renameSession === void 0 ? void 0 : openSessionRename,
|
|
7115
|
+
onFork: forkSession,
|
|
7116
|
+
onArchive: archiveSession === void 0 ? void 0 : archiveWorktreeSession
|
|
7117
|
+
}),
|
|
7118
|
+
activeWorktrees.length === 0 && archivedWorktrees.length === 0 && (0, react_jsx_runtime.jsx)("p", {
|
|
7119
|
+
className: worktree_css_default.emptyNested,
|
|
7120
|
+
children: t("worktree.noWorktrees")
|
|
7121
|
+
}),
|
|
7122
|
+
activeWorktrees.map((record) => (0, react_jsx_runtime.jsx)(ActiveWorktree, {
|
|
7123
|
+
record,
|
|
7124
|
+
source,
|
|
7125
|
+
expansion,
|
|
7126
|
+
ordering,
|
|
7127
|
+
props,
|
|
7128
|
+
lifecycle,
|
|
7129
|
+
session,
|
|
7130
|
+
menus,
|
|
7131
|
+
mutation,
|
|
7132
|
+
read,
|
|
7133
|
+
registration,
|
|
7134
|
+
lifecycleState,
|
|
7135
|
+
drag,
|
|
7136
|
+
native,
|
|
7137
|
+
bindings,
|
|
7138
|
+
workspaceMatchesQuery,
|
|
7139
|
+
workspace,
|
|
7140
|
+
workspaceWorktreeNames,
|
|
7141
|
+
sameWorkspaceWorktreeDrag,
|
|
7142
|
+
activeWorktrees
|
|
7143
|
+
}, record.worktreeId)),
|
|
7144
|
+
archivedWorktrees.length > 0 && (0, react_jsx_runtime.jsx)(ArchivedWorktrees, {
|
|
7145
|
+
expansion,
|
|
7146
|
+
props,
|
|
7147
|
+
source,
|
|
7148
|
+
ordering,
|
|
7149
|
+
lifecycle,
|
|
7150
|
+
mutation,
|
|
7151
|
+
menus,
|
|
7152
|
+
read,
|
|
7153
|
+
lifecycleState,
|
|
7154
|
+
drag,
|
|
7155
|
+
session,
|
|
7156
|
+
native,
|
|
7157
|
+
workspace,
|
|
7158
|
+
archivedWorktrees,
|
|
7159
|
+
bindings,
|
|
7160
|
+
workspaceMatchesQuery
|
|
7161
|
+
})
|
|
7162
|
+
]
|
|
7163
|
+
})
|
|
7164
|
+
]
|
|
7041
7165
|
}, workspace.workspaceId);
|
|
7042
7166
|
})
|
|
7043
7167
|
}) });
|
|
@@ -7255,8 +7379,8 @@ window.__ModuleLoader__.load({
|
|
|
7255
7379
|
}]
|
|
7256
7380
|
});
|
|
7257
7381
|
}
|
|
7258
|
-
|
|
7259
|
-
const
|
|
7382
|
+
for (const [workspaceId, error] of Object.entries(readState.targetErrors ?? {})) {
|
|
7383
|
+
const workspaceIds = [workspaceId];
|
|
7260
7384
|
notices.push({
|
|
7261
7385
|
key: "target:" + JSON.stringify([
|
|
7262
7386
|
workspaceIds,
|
|
@@ -7561,7 +7685,7 @@ window.__ModuleLoader__.load({
|
|
|
7561
7685
|
className: worktree_css_default.header,
|
|
7562
7686
|
children: [
|
|
7563
7687
|
(0, react_jsx_runtime.jsx)("span", {
|
|
7564
|
-
className: cx(worktree_css_default.
|
|
7688
|
+
className: cx(worktree_css_default.sidebarTitle, searchExpanded && worktree_css_default.titleHidden),
|
|
7565
7689
|
children: t("worktree.title")
|
|
7566
7690
|
}),
|
|
7567
7691
|
(0, react_jsx_runtime.jsx)("div", {
|
|
@@ -8887,7 +9011,7 @@ window.__ModuleLoader__.load({
|
|
|
8887
9011
|
if (view === void 0) continue;
|
|
8888
9012
|
const allWorkspaceSessionIds = filterArchivedSessionIds(workspaceSessionIds(workspaces, workspace.workspaceId, sessions.ids), archivedSessionIds);
|
|
8889
9013
|
const bindings = view.bindings;
|
|
8890
|
-
const mainSessionIds = filterVisibleSessionIds(unboundSessionIds(allWorkspaceSessionIds, [...new Set(bindings.map((binding) => binding.sessionId))]), sessions);
|
|
9014
|
+
const mainSessionIds = filterVisibleSessionIds(unboundSessionIds(allWorkspaceSessionIds, [...new Set(bindings.map((binding) => binding.sessionId))]).filter((id) => view.knownSessionIds === void 0 || view.knownSessionIds.includes(id)), sessions);
|
|
8891
9015
|
inputs.push({
|
|
8892
9016
|
accountKey: `main:${workspace.workspaceId}`,
|
|
8893
9017
|
sessionIds: mainSessionIds,
|
|
@@ -8984,12 +9108,23 @@ window.__ModuleLoader__.load({
|
|
|
8984
9108
|
//#endregion
|
|
8985
9109
|
//#region lib/client/surface/state/useSurfaceRefresh.js
|
|
8986
9110
|
function useSurfaceRefresh({ source, props, registrationState }) {
|
|
8987
|
-
const { forkRecoverySnapshot,
|
|
9111
|
+
const { forkRecoverySnapshot, mode, workspaceIds, sessionPresentations } = source;
|
|
9112
|
+
const workspaceIdsRef = (0, react.useRef)(workspaceIds);
|
|
9113
|
+
workspaceIdsRef.current = isPendingListPhase(source.workspaces.phase) ? [.../* @__PURE__ */ new Set([...workspaceIdsRef.current, ...workspaceIds])] : workspaceIds;
|
|
9114
|
+
const workspacesRef = (0, react.useRef)(source.workspaces);
|
|
9115
|
+
workspacesRef.current = source.workspaces;
|
|
8988
9116
|
const { manager, viewReader, invalidateWorktreeContext, syncSessionWorkspaces } = props;
|
|
9117
|
+
const syncedMembershipViews = (0, react.useRef)(/* @__PURE__ */ new Map());
|
|
8989
9118
|
const { modalReadViewRef, setModalReadError, setModalReadLoading, modalReadLoader, setWorktreeModalWorkspaceId } = registrationState;
|
|
8990
9119
|
const [readState, setReadState] = (0, react.useState)(EMPTY_READ_STATE);
|
|
8991
9120
|
const readStateRef = (0, react.useRef)(readState);
|
|
8992
9121
|
readStateRef.current = readState;
|
|
9122
|
+
const priorityIdsRef = (0, react.useRef)(workspaceIds);
|
|
9123
|
+
const currentWorkspaceId = source.workspaces.items.find((workspace) => workspace.sessionIds.includes(source.currentSessionId ?? ""))?.workspaceId;
|
|
9124
|
+
priorityIdsRef.current = [...workspaceIds].sort((a, b) => {
|
|
9125
|
+
const priority = (id) => id === currentWorkspaceId ? 0 : source.expandSnapshot.collapsedWorkspaceIds[id] ? 2 : 1;
|
|
9126
|
+
return priority(a) - priority(b);
|
|
9127
|
+
});
|
|
8993
9128
|
const refreshGuard = (0, react.useRef)(createWorktreeRefreshGuard());
|
|
8994
9129
|
const targetRefreshGuards = (0, react.useRef)(/* @__PURE__ */ new Map());
|
|
8995
9130
|
const targetReads = (0, react.useRef)(/* @__PURE__ */ new Map());
|
|
@@ -9011,38 +9146,12 @@ window.__ModuleLoader__.load({
|
|
|
9011
9146
|
return;
|
|
9012
9147
|
}
|
|
9013
9148
|
const scope = options.scope ?? { kind: "global" };
|
|
9014
|
-
const preserveCurrent = options.preserveCurrent === true;
|
|
9015
9149
|
const currentWorkspaceIds = workspaceIdsRef.current;
|
|
9016
|
-
if (scope.kind === "global") {
|
|
9017
|
-
|
|
9018
|
-
|
|
9019
|
-
|
|
9020
|
-
|
|
9021
|
-
const selectedWorkspaceIds = [...currentWorkspaceIds];
|
|
9022
|
-
for (const workspaceId of selectedWorkspaceIds) viewReader.invalidate(workspaceId);
|
|
9023
|
-
const contextRefresh = options.invalidateContext === false ? void 0 : invalidateWorktreeContext?.(void 0, { alreadyInvalidated: true });
|
|
9024
|
-
await refreshGuard.current.run(async () => {
|
|
9025
|
-
const [views] = await Promise.all([viewReader.readMany(selectedWorkspaceIds), contextRefresh ?? Promise.resolve()]);
|
|
9026
|
-
return views;
|
|
9027
|
-
}, (views) => {
|
|
9028
|
-
setReadState((current) => {
|
|
9029
|
-
const merged = mergeWorktreeViews(current.views, workspaceIdsRef.current, views);
|
|
9030
|
-
return {
|
|
9031
|
-
status: "ready",
|
|
9032
|
-
views: modalReadViewRef.current === void 0 ? merged : mergeWorktreeView(merged, modalReadViewRef.current)
|
|
9033
|
-
};
|
|
9034
|
-
});
|
|
9035
|
-
}, (error) => {
|
|
9036
|
-
if (preserveCurrent) throw error;
|
|
9037
|
-
setReadState({
|
|
9038
|
-
status: "error",
|
|
9039
|
-
views: modalReadViewRef.current === void 0 ? [] : [modalReadViewRef.current],
|
|
9040
|
-
error: toWorktreeViewError(error)
|
|
9041
|
-
});
|
|
9042
|
-
});
|
|
9043
|
-
return;
|
|
9044
|
-
}
|
|
9045
|
-
const requestedWorkspaceIds = scope.kind === "workspace" ? [scope.workspaceId] : scope.workspaceIds;
|
|
9150
|
+
if (scope.kind === "global") setReadState((current) => ({
|
|
9151
|
+
...current,
|
|
9152
|
+
status: "ready"
|
|
9153
|
+
}));
|
|
9154
|
+
const requestedWorkspaceIds = scope.kind === "global" ? priorityIdsRef.current : scope.kind === "workspace" ? [scope.workspaceId] : scope.workspaceIds;
|
|
9046
9155
|
const selectedWorkspaceIds = [...new Set(requestedWorkspaceIds)].filter((workspaceId) => currentWorkspaceIds.includes(workspaceId));
|
|
9047
9156
|
if (selectedWorkspaceIds.length === 0) {
|
|
9048
9157
|
if (options.openingSession) throw new WorktreeSessionActionError("WORKTREE_SESSION_REPAIR_REQUIRED", "workspace projection unavailable", true);
|
|
@@ -9050,14 +9159,16 @@ window.__ModuleLoader__.load({
|
|
|
9050
9159
|
}
|
|
9051
9160
|
const results = await Promise.allSettled(selectedWorkspaceIds.map(async (workspaceId) => {
|
|
9052
9161
|
const guard = guardFor(workspaceId);
|
|
9053
|
-
if (!options.alreadyInvalidated) viewReader.invalidate(workspaceId, {
|
|
9162
|
+
if (!options.alreadyInvalidated && !options.ensureLoaded) viewReader.invalidate(workspaceId, {
|
|
9054
9163
|
reuseInFlight: options.reuseInFlight,
|
|
9055
9164
|
changeId: options.changeId
|
|
9056
9165
|
});
|
|
9057
|
-
|
|
9166
|
+
options.invalidateContext === false || invalidateWorktreeContext?.(workspaceId, { alreadyInvalidated: true })?.catch(() => void 0);
|
|
9058
9167
|
let request = {
|
|
9059
9168
|
generation: guard.begin(),
|
|
9060
|
-
promise: viewReader.read(workspaceId)
|
|
9169
|
+
promise: viewReader.read(workspaceId, { current: true }),
|
|
9170
|
+
pending: true,
|
|
9171
|
+
sessionIds: workspacesRef.current.items.find((item) => item.workspaceId === workspaceId)?.sessionIds ?? []
|
|
9061
9172
|
};
|
|
9062
9173
|
targetReads.current.set(workspaceId, request);
|
|
9063
9174
|
try {
|
|
@@ -9075,28 +9186,24 @@ window.__ModuleLoader__.load({
|
|
|
9075
9186
|
request = latest;
|
|
9076
9187
|
}
|
|
9077
9188
|
if (!view) throw new WorktreeSessionActionError("WORKTREE_VIEW_FAILED", "workspace projection unavailable", true);
|
|
9189
|
+
view = view.knownSessionIds === void 0 ? {
|
|
9190
|
+
...view,
|
|
9191
|
+
knownSessionIds: request.sessionIds
|
|
9192
|
+
} : view;
|
|
9078
9193
|
if (opening && (!workspaceIdsRef.current.includes(workspaceId) || !view.worktrees.some((record) => record.worktreeId === opening.worktreeId) || !view.bindings.some((binding) => binding.sessionId === opening.sessionId && binding.worktreeId === opening.worktreeId && binding.status === "active"))) throw new WorktreeSessionActionError("WORKTREE_SESSION_REPAIR_REQUIRED", "binding projection not ready", true);
|
|
9079
9194
|
if (!guard.isCurrent(request.generation)) return;
|
|
9195
|
+
if (targetRefreshGuards.current.get(workspaceId) !== guard) return;
|
|
9080
9196
|
if (!workspaceIdsRef.current.includes(workspaceId)) return;
|
|
9197
|
+
request.pending = false;
|
|
9081
9198
|
const publish = () => setReadState((current) => {
|
|
9082
|
-
const
|
|
9083
|
-
|
|
9199
|
+
const targetErrors = { ...current.targetErrors };
|
|
9200
|
+
delete targetErrors[workspaceId];
|
|
9201
|
+
return {
|
|
9084
9202
|
...current,
|
|
9085
9203
|
status: "ready",
|
|
9086
9204
|
views: mergeWorktreeViews(current.views, workspaceIdsRef.current, [view]),
|
|
9087
|
-
error: void 0
|
|
9088
|
-
|
|
9089
|
-
if (remainingTargetError.length === 0) {
|
|
9090
|
-
const withoutTargetError = { ...next };
|
|
9091
|
-
delete withoutTargetError.targetError;
|
|
9092
|
-
return withoutTargetError;
|
|
9093
|
-
}
|
|
9094
|
-
return {
|
|
9095
|
-
...next,
|
|
9096
|
-
targetError: {
|
|
9097
|
-
workspaceIds: remainingTargetError,
|
|
9098
|
-
error: current.targetError.error
|
|
9099
|
-
}
|
|
9205
|
+
error: void 0,
|
|
9206
|
+
targetErrors
|
|
9100
9207
|
};
|
|
9101
9208
|
});
|
|
9102
9209
|
if (options.openingSession) (0, react_dom.flushSync)(publish);
|
|
@@ -9104,17 +9211,17 @@ window.__ModuleLoader__.load({
|
|
|
9104
9211
|
} catch (error) {
|
|
9105
9212
|
if (options.openingSession) throw error;
|
|
9106
9213
|
if (!guard.isCurrent(request.generation)) return;
|
|
9214
|
+
if (targetRefreshGuards.current.get(workspaceId) !== guard) return;
|
|
9107
9215
|
if (!workspaceIdsRef.current.includes(workspaceId)) return;
|
|
9108
9216
|
setReadState((current) => {
|
|
9109
|
-
const previousIds = current.targetError?.workspaceIds ?? [];
|
|
9110
9217
|
return {
|
|
9111
9218
|
...current,
|
|
9112
9219
|
status: "ready",
|
|
9113
9220
|
views: mergeWorktreeViews(current.views, workspaceIdsRef.current, []),
|
|
9114
9221
|
error: void 0,
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9222
|
+
targetErrors: {
|
|
9223
|
+
...current.targetErrors,
|
|
9224
|
+
[workspaceId]: {
|
|
9118
9225
|
...toWorktreeViewError(error),
|
|
9119
9226
|
retryable: true
|
|
9120
9227
|
}
|
|
@@ -9122,7 +9229,7 @@ window.__ModuleLoader__.load({
|
|
|
9122
9229
|
};
|
|
9123
9230
|
});
|
|
9124
9231
|
} finally {
|
|
9125
|
-
|
|
9232
|
+
request.pending = false;
|
|
9126
9233
|
}
|
|
9127
9234
|
}));
|
|
9128
9235
|
if (options.openingSession) {
|
|
@@ -9162,7 +9269,12 @@ window.__ModuleLoader__.load({
|
|
|
9162
9269
|
});
|
|
9163
9270
|
return;
|
|
9164
9271
|
}
|
|
9165
|
-
|
|
9272
|
+
const sessionIds = workspacesRef.current.items.find((item) => item.workspaceId === workspaceId)?.sessionIds ?? [];
|
|
9273
|
+
modalReadLoader.current.load(workspaceId, (data) => {
|
|
9274
|
+
const view = data.knownSessionIds === void 0 ? {
|
|
9275
|
+
...data,
|
|
9276
|
+
knownSessionIds: sessionIds
|
|
9277
|
+
} : data;
|
|
9166
9278
|
modalReadViewRef.current = view;
|
|
9167
9279
|
setModalReadLoading(false);
|
|
9168
9280
|
setReadState((current) => ({
|
|
@@ -9174,8 +9286,58 @@ window.__ModuleLoader__.load({
|
|
|
9174
9286
|
setModalReadError(toWorktreeViewError(error));
|
|
9175
9287
|
});
|
|
9176
9288
|
}, [manager, viewReader]);
|
|
9289
|
+
const previousNativeSessions = (0, react.useRef)(new Map(source.workspaces.items.map((item) => [item.workspaceId, item.sessionIds])));
|
|
9290
|
+
(0, react.useEffect)(() => {
|
|
9291
|
+
if (isPendingListPhase(source.workspaces.phase)) return;
|
|
9292
|
+
const previous = previousNativeSessions.current;
|
|
9293
|
+
previousNativeSessions.current = new Map(source.workspaces.items.map((item) => [item.workspaceId, item.sessionIds]));
|
|
9294
|
+
for (const workspace of source.workspaces.items) {
|
|
9295
|
+
const ids = previous.get(workspace.workspaceId);
|
|
9296
|
+
if (!ids) continue;
|
|
9297
|
+
const view = readStateRef.current.views.find((item) => item.workspaceId === workspace.workspaceId);
|
|
9298
|
+
if (!workspace.sessionIds.some((id) => !ids.includes(id) && !view?.bindings.some((binding) => binding.sessionId === id))) continue;
|
|
9299
|
+
viewReader.invalidate(workspace.workspaceId);
|
|
9300
|
+
guardFor(workspace.workspaceId).invalidate();
|
|
9301
|
+
if (mode === "worktree") refresh({
|
|
9302
|
+
scope: {
|
|
9303
|
+
kind: "workspace",
|
|
9304
|
+
workspaceId: workspace.workspaceId
|
|
9305
|
+
},
|
|
9306
|
+
alreadyInvalidated: true
|
|
9307
|
+
});
|
|
9308
|
+
}
|
|
9309
|
+
}, [
|
|
9310
|
+
source.workspaces.items,
|
|
9311
|
+
source.workspaces.phase,
|
|
9312
|
+
mode,
|
|
9313
|
+
refresh,
|
|
9314
|
+
viewReader
|
|
9315
|
+
]);
|
|
9316
|
+
(0, react.useEffect)(() => {
|
|
9317
|
+
if (mode !== "worktree" || isPendingListPhase(source.workspaces.phase)) return;
|
|
9318
|
+
for (const view of readState.views) {
|
|
9319
|
+
if (view.knownSessionIds === void 0 || readState.targetErrors?.[view.workspaceId]) continue;
|
|
9320
|
+
const unknown = (source.workspaces.items.find((item) => item.workspaceId === view.workspaceId)?.sessionIds ?? []).filter((id) => !view.knownSessionIds.includes(id) && !view.bindings.some((binding) => binding.sessionId === id));
|
|
9321
|
+
const pending = targetReads.current.get(view.workspaceId);
|
|
9322
|
+
if (!unknown.length || pending?.pending && unknown.every((id) => pending.sessionIds.includes(id))) continue;
|
|
9323
|
+
refresh({ scope: {
|
|
9324
|
+
kind: "workspace",
|
|
9325
|
+
workspaceId: view.workspaceId
|
|
9326
|
+
} });
|
|
9327
|
+
}
|
|
9328
|
+
}, [
|
|
9329
|
+
readState.views,
|
|
9330
|
+
readState.targetErrors,
|
|
9331
|
+
source.workspaces.items,
|
|
9332
|
+
source.workspaces.phase,
|
|
9333
|
+
mode,
|
|
9334
|
+
refresh
|
|
9335
|
+
]);
|
|
9177
9336
|
(0, react.useEffect)(() => {
|
|
9178
|
-
if (mode === "worktree") refresh({
|
|
9337
|
+
if (mode === "worktree") refresh({
|
|
9338
|
+
preserveCurrent: true,
|
|
9339
|
+
reuseInFlight: true
|
|
9340
|
+
});
|
|
9179
9341
|
else {
|
|
9180
9342
|
refreshGuard.current.invalidate();
|
|
9181
9343
|
for (const guard of targetRefreshGuards.current.values()) guard.invalidate();
|
|
@@ -9185,51 +9347,47 @@ window.__ModuleLoader__.load({
|
|
|
9185
9347
|
setWorktreeModalWorkspaceId(void 0);
|
|
9186
9348
|
setModalReadError(void 0);
|
|
9187
9349
|
setModalReadLoading(false);
|
|
9188
|
-
setReadState(EMPTY_READ_STATE);
|
|
9189
9350
|
}
|
|
9190
9351
|
}, [mode, refresh]);
|
|
9191
9352
|
const previousWorkspaceIdsRef = (0, react.useRef)(workspaceIds);
|
|
9192
9353
|
(0, react.useEffect)(() => {
|
|
9354
|
+
if (isPendingListPhase(source.workspaces.phase)) return;
|
|
9193
9355
|
const previousWorkspaceIds = previousWorkspaceIdsRef.current;
|
|
9194
9356
|
previousWorkspaceIdsRef.current = workspaceIds;
|
|
9195
|
-
if (mode !== "worktree") return;
|
|
9196
9357
|
const addedWorkspaceIds = workspaceIds.filter((workspaceId) => !previousWorkspaceIds.includes(workspaceId));
|
|
9197
9358
|
const removedWorkspaceIds = previousWorkspaceIds.filter((workspaceId) => !workspaceIds.includes(workspaceId));
|
|
9198
9359
|
for (const workspaceId of removedWorkspaceIds) {
|
|
9360
|
+
targetRefreshGuards.current.get(workspaceId)?.invalidate();
|
|
9199
9361
|
targetRefreshGuards.current.delete(workspaceId);
|
|
9200
9362
|
targetReads.current.delete(workspaceId);
|
|
9363
|
+
viewReader.invalidate(workspaceId);
|
|
9364
|
+
syncedMembershipViews.current.delete(workspaceId);
|
|
9365
|
+
props.syncWorkspaceSessions?.(workspaceId, []);
|
|
9201
9366
|
}
|
|
9202
9367
|
setReadState((current) => {
|
|
9203
9368
|
const views = mergeWorktreeViews(current.views, workspaceIds, []);
|
|
9204
|
-
const
|
|
9205
|
-
const next = {
|
|
9206
|
-
...current,
|
|
9207
|
-
views
|
|
9208
|
-
};
|
|
9209
|
-
if (remainingTargetError.length === 0) {
|
|
9210
|
-
const withoutTargetError = { ...next };
|
|
9211
|
-
delete withoutTargetError.targetError;
|
|
9212
|
-
return withoutTargetError;
|
|
9213
|
-
}
|
|
9369
|
+
const targetErrors = Object.fromEntries(Object.entries(current.targetErrors ?? {}).filter(([workspaceId]) => workspaceIds.includes(workspaceId)));
|
|
9214
9370
|
return {
|
|
9215
|
-
...
|
|
9216
|
-
|
|
9217
|
-
|
|
9218
|
-
error: current.targetError.error
|
|
9219
|
-
}
|
|
9371
|
+
...current,
|
|
9372
|
+
views,
|
|
9373
|
+
targetErrors
|
|
9220
9374
|
};
|
|
9221
9375
|
});
|
|
9376
|
+
if (mode !== "worktree") return;
|
|
9222
9377
|
for (const workspaceId of addedWorkspaceIds) refresh({
|
|
9223
9378
|
scope: {
|
|
9224
9379
|
kind: "workspace",
|
|
9225
9380
|
workspaceId
|
|
9226
9381
|
},
|
|
9227
|
-
preserveCurrent: true
|
|
9382
|
+
preserveCurrent: true,
|
|
9383
|
+
ensureLoaded: true
|
|
9228
9384
|
}).catch(() => {});
|
|
9229
9385
|
}, [
|
|
9230
9386
|
mode,
|
|
9231
9387
|
refresh,
|
|
9232
|
-
workspaceIds
|
|
9388
|
+
workspaceIds,
|
|
9389
|
+
source.workspaces.phase,
|
|
9390
|
+
viewReader
|
|
9233
9391
|
]);
|
|
9234
9392
|
(0, react.useEffect)(() => {
|
|
9235
9393
|
if (forkRecoveryRevisionRef.current === forkRecoverySnapshot.revision) return;
|
|
@@ -9251,7 +9409,16 @@ window.__ModuleLoader__.load({
|
|
|
9251
9409
|
refresh
|
|
9252
9410
|
]);
|
|
9253
9411
|
(0, react.useEffect)(() => {
|
|
9254
|
-
if (readState.status !== "ready" ||
|
|
9412
|
+
if (readState.status !== "ready" || isPendingListPhase(source.workspaces.phase)) return;
|
|
9413
|
+
if (props.syncWorkspaceSessions) {
|
|
9414
|
+
for (const view of readState.views) {
|
|
9415
|
+
if (syncedMembershipViews.current.get(view.workspaceId) === view || targetReads.current.get(view.workspaceId)?.pending) continue;
|
|
9416
|
+
syncedMembershipViews.current.set(view.workspaceId, view);
|
|
9417
|
+
props.syncWorkspaceSessions(view.workspaceId, view.bindings);
|
|
9418
|
+
}
|
|
9419
|
+
return;
|
|
9420
|
+
}
|
|
9421
|
+
if (syncSessionWorkspaces === void 0 || [...targetReads.current.values()].some((request) => request.pending) || !isCompleteWorktreeWorkspaceSnapshot(workspaceIds, readState.views)) return;
|
|
9255
9422
|
syncSessionWorkspaces(readState.views.flatMap((view) => view.bindings.map((binding) => ({
|
|
9256
9423
|
workspaceId: binding.workspaceId,
|
|
9257
9424
|
sessionId: binding.sessionId
|
|
@@ -9259,7 +9426,10 @@ window.__ModuleLoader__.load({
|
|
|
9259
9426
|
}, [
|
|
9260
9427
|
readState.status,
|
|
9261
9428
|
readState.views,
|
|
9262
|
-
syncSessionWorkspaces
|
|
9429
|
+
syncSessionWorkspaces,
|
|
9430
|
+
props.syncWorkspaceSessions,
|
|
9431
|
+
workspaceIds,
|
|
9432
|
+
source.workspaces.phase
|
|
9263
9433
|
]);
|
|
9264
9434
|
const viewByWorkspace = (0, react.useMemo)(() => new Map(readState.views.map((view) => [view.workspaceId, view])), [readState.views]);
|
|
9265
9435
|
const previousActivityRef = (0, react.useRef)(sessionPresentations);
|
|
@@ -9296,439 +9466,40 @@ window.__ModuleLoader__.load({
|
|
|
9296
9466
|
};
|
|
9297
9467
|
}
|
|
9298
9468
|
//#endregion
|
|
9299
|
-
//#region lib/client/
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
|
|
9306
|
-
|
|
9307
|
-
|
|
9308
|
-
|
|
9309
|
-
|
|
9310
|
-
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
|
|
9469
|
+
//#region lib/client/view/workspace-region-geometry.js
|
|
9470
|
+
/** Measure only the plugin-owned seat for popover readiness, never for placement. */
|
|
9471
|
+
function useWorkspaceRegionGeometry(seat) {
|
|
9472
|
+
const [measured, setMeasured] = (0, react.useState)();
|
|
9473
|
+
(0, react.useLayoutEffect)(() => {
|
|
9474
|
+
if (!seat) return;
|
|
9475
|
+
const element = seat.element;
|
|
9476
|
+
let disposed = false;
|
|
9477
|
+
const measure = () => {
|
|
9478
|
+
if (disposed) return;
|
|
9479
|
+
const rect = element.getBoundingClientRect();
|
|
9480
|
+
const height = element.isConnected && Number.isFinite(rect.height) && rect.width > 0 ? Math.max(0, rect.height) : 0;
|
|
9481
|
+
setMeasured((previous) => previous?.element === element && previous.height === height ? previous : {
|
|
9482
|
+
element,
|
|
9483
|
+
height
|
|
9484
|
+
});
|
|
9485
|
+
};
|
|
9486
|
+
measure();
|
|
9487
|
+
const observer = typeof ResizeObserver === "undefined" ? void 0 : new ResizeObserver(measure);
|
|
9488
|
+
observer?.observe(element);
|
|
9489
|
+
return () => {
|
|
9490
|
+
disposed = true;
|
|
9491
|
+
observer?.disconnect();
|
|
9492
|
+
};
|
|
9493
|
+
}, [seat]);
|
|
9494
|
+
const collapsed = seat?.wide !== true;
|
|
9495
|
+
const height = measured?.element === seat?.element ? measured?.height ?? 0 : 0;
|
|
9314
9496
|
return {
|
|
9315
|
-
|
|
9316
|
-
|
|
9317
|
-
|
|
9318
|
-
|
|
9319
|
-
|
|
9320
|
-
|
|
9321
|
-
//#region lib/client/layout/app-frame.js
|
|
9322
|
-
/** Public AppFrame anchors; never infer a column from sibling order or private classes. */
|
|
9323
|
-
function directChildWithin(parent, anchor) {
|
|
9324
|
-
let child = anchor;
|
|
9325
|
-
while (child && child.parentElement !== parent) child = child.parentElement;
|
|
9326
|
-
return child ?? void 0;
|
|
9327
|
-
}
|
|
9328
|
-
function resolveAppFrame(surface) {
|
|
9329
|
-
const overlay = surface.closest("[data-shell-overlay]");
|
|
9330
|
-
const frame = overlay?.parentElement;
|
|
9331
|
-
if (!(overlay instanceof HTMLElement) || !frame || !overlay.isConnected) return void 0;
|
|
9332
|
-
for (const selector of ["[data-worktree-mode-action]", "[data-pane=\"sidebar\"]"]) {
|
|
9333
|
-
const columns = new Set(Array.from(frame.querySelectorAll(selector)).map((anchor) => directChildWithin(frame, anchor)).filter((column) => column instanceof HTMLElement && column !== overlay && !column.hasAttribute("data-shell-overlay") && !column.hasAttribute("data-rightbar-col") && !column.hasAttribute("data-shell-leading")));
|
|
9334
|
-
if (columns.size > 1) return void 0;
|
|
9335
|
-
const sidebar = columns.values().next().value;
|
|
9336
|
-
if (sidebar) return {
|
|
9337
|
-
overlay,
|
|
9338
|
-
frame,
|
|
9339
|
-
sidebar
|
|
9340
|
-
};
|
|
9341
|
-
}
|
|
9342
|
-
}
|
|
9343
|
-
function finiteRect(rect) {
|
|
9344
|
-
return [
|
|
9345
|
-
rect.left,
|
|
9346
|
-
rect.right,
|
|
9347
|
-
rect.top,
|
|
9348
|
-
rect.bottom,
|
|
9349
|
-
rect.width,
|
|
9350
|
-
rect.height
|
|
9351
|
-
].every(Number.isFinite);
|
|
9352
|
-
}
|
|
9353
|
-
function resolveFrameContent(frame, overlay, sidebar) {
|
|
9354
|
-
const rightbars = Array.from(frame.querySelectorAll("[data-rightbar-col]")).filter((column) => directChildWithin(frame, column) !== overlay);
|
|
9355
|
-
if (rightbars.length > 1) return void 0;
|
|
9356
|
-
const column = rightbars[0];
|
|
9357
|
-
const rightbar = frame.hasAttribute("data-rightbar-collapsed") ? void 0 : column;
|
|
9358
|
-
const box = overlay.getBoundingClientRect();
|
|
9359
|
-
const boundary = sidebar.getBoundingClientRect();
|
|
9360
|
-
const columnRect = column?.getBoundingClientRect();
|
|
9361
|
-
if (!finiteRect(box) || !finiteRect(boundary) || rightbar && columnRect && !finiteRect(columnRect)) return;
|
|
9362
|
-
const centerEdges = [rightbar && columnRect ? columnRect.left : box.right];
|
|
9363
|
-
if (!rightbar && columnRect && finiteRect(columnRect)) centerEdges.push(columnRect.left);
|
|
9364
|
-
const excluded = column ? directChildWithin(frame, column) : void 0;
|
|
9365
|
-
const centers = Array.from(frame.children).filter((child) => {
|
|
9366
|
-
if (!(child instanceof HTMLElement) || child === sidebar || child === overlay || child === excluded || child.hasAttribute("data-shell-overlay") || child.hasAttribute("data-shell-leading") || child.hasAttribute("data-window-drag")) return false;
|
|
9367
|
-
const rect = child.getBoundingClientRect();
|
|
9368
|
-
return finiteRect(rect) && rect.width > 0 && rect.height > 0 && Math.abs(rect.left - boundary.right) <= 1 && centerEdges.some((edge) => Math.abs(rect.right - edge) <= 1) && rect.top >= box.top - 1 && rect.top < box.bottom && Math.abs(rect.bottom - box.bottom) <= 1;
|
|
9369
|
-
});
|
|
9370
|
-
if (centers.length !== 1) return void 0;
|
|
9371
|
-
return {
|
|
9372
|
-
center: centers[0],
|
|
9373
|
-
rightbar
|
|
9374
|
-
};
|
|
9375
|
-
}
|
|
9376
|
-
//#endregion
|
|
9377
|
-
//#region lib/client/dashboard/dashboard-overlay.js
|
|
9378
|
-
const SIDEBAR_RESIZE_HANDLE_HALF_WIDTH = 4;
|
|
9379
|
-
/** Reversible presentation only: leave the native React tree and Session alive. */
|
|
9380
|
-
function concealDashboardBackground(element) {
|
|
9381
|
-
const visibility = element.style.getPropertyValue("visibility");
|
|
9382
|
-
const priority = element.style.getPropertyPriority("visibility");
|
|
9383
|
-
const inert = element.getAttribute("inert");
|
|
9384
|
-
const hidden = element.getAttribute("aria-hidden");
|
|
9385
|
-
element.style.setProperty("visibility", "hidden");
|
|
9386
|
-
element.setAttribute("inert", "");
|
|
9387
|
-
element.setAttribute("aria-hidden", "true");
|
|
9388
|
-
return () => {
|
|
9389
|
-
if (element.style.getPropertyValue("visibility") === "hidden") if (visibility) element.style.setProperty("visibility", visibility, priority);
|
|
9390
|
-
else element.style.removeProperty("visibility");
|
|
9391
|
-
for (const [name, value] of [["inert", inert], ["aria-hidden", hidden]]) if (value === null) element.removeAttribute(name);
|
|
9392
|
-
else element.setAttribute(name, value);
|
|
9393
|
-
};
|
|
9394
|
-
}
|
|
9395
|
-
function isRightSidebarOpenFromDom(frame, rightbar) {
|
|
9396
|
-
return !frame.hasAttribute("data-rightbar-collapsed") && rightbar instanceof HTMLElement && frame.contains(rightbar) && (rightbar.hasAttribute("data-sidebar-right-open") || rightbar.querySelector("[data-sidebar-right-open]") !== null);
|
|
9397
|
-
}
|
|
9398
|
-
/** Layout seam shared with the existing Sidebar overlay; fail closed on frame/center loss. */
|
|
9399
|
-
function mountDashboardOverlay(surface, onPlacement, options) {
|
|
9400
|
-
const overlay = surface.closest("[data-shell-overlay]");
|
|
9401
|
-
const frame = overlay?.parentElement;
|
|
9402
|
-
if (!overlay || !frame) {
|
|
9403
|
-
onPlacement(void 0);
|
|
9404
|
-
options?.onRightSidebarChange?.(false);
|
|
9405
|
-
return () => {};
|
|
9406
|
-
}
|
|
9407
|
-
const hidden = /* @__PURE__ */ new Map();
|
|
9408
|
-
let observed = [];
|
|
9409
|
-
let scheduled;
|
|
9410
|
-
let disposed = false;
|
|
9411
|
-
let lastRightSidebarOpen;
|
|
9412
|
-
const restore = () => {
|
|
9413
|
-
for (const cleanup of hidden.values()) cleanup();
|
|
9414
|
-
hidden.clear();
|
|
9415
|
-
};
|
|
9416
|
-
const schedule = () => {
|
|
9417
|
-
if (disposed || scheduled !== void 0) return;
|
|
9418
|
-
scheduled = requestAnimationFrame(() => {
|
|
9419
|
-
scheduled = void 0;
|
|
9420
|
-
update();
|
|
9421
|
-
});
|
|
9422
|
-
};
|
|
9423
|
-
const resize = typeof ResizeObserver === "undefined" ? void 0 : new ResizeObserver(schedule);
|
|
9424
|
-
const update = () => {
|
|
9425
|
-
if (disposed) return;
|
|
9426
|
-
const anchors = resolveAppFrame(surface);
|
|
9427
|
-
const content = anchors?.frame === frame && anchors.overlay === overlay ? resolveFrameContent(frame, overlay, anchors.sidebar) : void 0;
|
|
9428
|
-
const nextObserved = [
|
|
9429
|
-
frame,
|
|
9430
|
-
overlay,
|
|
9431
|
-
...Array.from(frame.children),
|
|
9432
|
-
...Array.from(frame.querySelectorAll("[data-rightbar-col]"))
|
|
9433
|
-
];
|
|
9434
|
-
for (const old of observed) if (!nextObserved.includes(old)) resize?.unobserve(old);
|
|
9435
|
-
for (const next of nextObserved) if (!observed.includes(next)) resize?.observe(next);
|
|
9436
|
-
observed = nextObserved;
|
|
9437
|
-
if (!anchors || !content) {
|
|
9438
|
-
restore();
|
|
9439
|
-
onPlacement(void 0);
|
|
9440
|
-
if (lastRightSidebarOpen) {
|
|
9441
|
-
lastRightSidebarOpen = false;
|
|
9442
|
-
options?.onRightSidebarChange?.(false);
|
|
9443
|
-
}
|
|
9444
|
-
return;
|
|
9445
|
-
}
|
|
9446
|
-
const { sidebar } = anchors;
|
|
9447
|
-
const { center, rightbar } = content;
|
|
9448
|
-
const box = overlay.getBoundingClientRect();
|
|
9449
|
-
const boundary = sidebar.getBoundingClientRect();
|
|
9450
|
-
const rightBoundary = rightbar instanceof HTMLElement ? rightbar.getBoundingClientRect().left : box.right;
|
|
9451
|
-
const left = Math.max(0, boundary.right - box.left + SIDEBAR_RESIZE_HANDLE_HALF_WIDTH);
|
|
9452
|
-
const width = Math.min(box.right, rightBoundary) - box.left - left;
|
|
9453
|
-
if (width <= 0 || box.height <= 0) {
|
|
9454
|
-
restore();
|
|
9455
|
-
onPlacement(void 0);
|
|
9456
|
-
return;
|
|
9457
|
-
}
|
|
9458
|
-
const centerBox = center.getBoundingClientRect();
|
|
9459
|
-
const top = Math.max(0, centerBox.top - box.top);
|
|
9460
|
-
const height = Math.min(box.bottom, centerBox.bottom) - box.top - top;
|
|
9461
|
-
if (height <= 0) {
|
|
9462
|
-
restore();
|
|
9463
|
-
onPlacement(void 0);
|
|
9464
|
-
return;
|
|
9465
|
-
}
|
|
9466
|
-
for (const [element, cleanup] of hidden) if (element !== center) {
|
|
9467
|
-
cleanup();
|
|
9468
|
-
hidden.delete(element);
|
|
9469
|
-
}
|
|
9470
|
-
if (!hidden.has(center)) hidden.set(center, concealDashboardBackground(center));
|
|
9471
|
-
onPlacement({
|
|
9472
|
-
left,
|
|
9473
|
-
top,
|
|
9474
|
-
width,
|
|
9475
|
-
height
|
|
9476
|
-
});
|
|
9477
|
-
const isRightSidebarOpen = options?.isRightSidebarExpanded !== void 0 ? options.isRightSidebarExpanded() : isRightSidebarOpenFromDom(frame, rightbar);
|
|
9478
|
-
if (lastRightSidebarOpen !== isRightSidebarOpen) {
|
|
9479
|
-
lastRightSidebarOpen = isRightSidebarOpen;
|
|
9480
|
-
options?.onRightSidebarChange?.(isRightSidebarOpen);
|
|
9481
|
-
}
|
|
9482
|
-
};
|
|
9483
|
-
const mutation = typeof MutationObserver === "undefined" ? void 0 : new MutationObserver(schedule);
|
|
9484
|
-
try {
|
|
9485
|
-
mutation?.observe(frame, {
|
|
9486
|
-
childList: true,
|
|
9487
|
-
attributes: true,
|
|
9488
|
-
subtree: true,
|
|
9489
|
-
attributeFilter: [
|
|
9490
|
-
"data-rightbar-collapsed",
|
|
9491
|
-
"data-sidebar-right-open",
|
|
9492
|
-
"data-sidebar-right-panel",
|
|
9493
|
-
"data-rightbar-col",
|
|
9494
|
-
"data-worktree-mode-action",
|
|
9495
|
-
"data-pane",
|
|
9496
|
-
"data-window-drag",
|
|
9497
|
-
"data-shell-leading",
|
|
9498
|
-
"data-shell-overlay"
|
|
9499
|
-
]
|
|
9500
|
-
});
|
|
9501
|
-
} catch {
|
|
9502
|
-
mutation?.observe(frame, { childList: true });
|
|
9503
|
-
}
|
|
9504
|
-
if (frame.parentElement) try {
|
|
9505
|
-
mutation?.observe(frame.parentElement, { childList: true });
|
|
9506
|
-
} catch {}
|
|
9507
|
-
update();
|
|
9508
|
-
return () => {
|
|
9509
|
-
disposed = true;
|
|
9510
|
-
resize?.disconnect();
|
|
9511
|
-
mutation?.disconnect();
|
|
9512
|
-
if (scheduled !== void 0) cancelAnimationFrame(scheduled);
|
|
9513
|
-
restore();
|
|
9514
|
-
if (lastRightSidebarOpen) {
|
|
9515
|
-
lastRightSidebarOpen = false;
|
|
9516
|
-
options?.onRightSidebarChange?.(false);
|
|
9517
|
-
}
|
|
9518
|
-
};
|
|
9519
|
-
}
|
|
9520
|
-
//#endregion
|
|
9521
|
-
//#region lib/client/overlay/sidebar-overlay-geometry.js
|
|
9522
|
-
const EMPTY_BOUNDS = {
|
|
9523
|
-
ready: false,
|
|
9524
|
-
top: 0,
|
|
9525
|
-
height: 0
|
|
9526
|
-
};
|
|
9527
|
-
function asRect(element) {
|
|
9528
|
-
const rect = element.getBoundingClientRect();
|
|
9529
|
-
return {
|
|
9530
|
-
top: rect.top,
|
|
9531
|
-
bottom: rect.bottom
|
|
9532
|
-
};
|
|
9533
|
-
}
|
|
9534
|
-
function syncObservedElement(observer, previous, next) {
|
|
9535
|
-
const nextElement = next ?? void 0;
|
|
9536
|
-
if (previous === nextElement) return previous;
|
|
9537
|
-
if (previous !== void 0) observer?.unobserve(previous);
|
|
9538
|
-
if (nextElement !== void 0) observer?.observe(nextElement);
|
|
9539
|
-
return nextElement;
|
|
9540
|
-
}
|
|
9541
|
-
function resolveNativeSidebarRoot(sidebar) {
|
|
9542
|
-
const newSession = findNewSessionAnchor(sidebar);
|
|
9543
|
-
const action = sidebar.querySelector("[data-worktree-mode-action]");
|
|
9544
|
-
if (!newSession || !action) return void 0;
|
|
9545
|
-
let candidate;
|
|
9546
|
-
for (let root = newSession.parentElement; root; root = root.parentElement) {
|
|
9547
|
-
const content = directChildWithin(root, newSession);
|
|
9548
|
-
const footer = directChildWithin(root, action);
|
|
9549
|
-
const rect = root.getBoundingClientRect();
|
|
9550
|
-
if (content && footer && content !== footer) {
|
|
9551
|
-
candidate ??= root;
|
|
9552
|
-
if (rect.width > 0 && rect.height > 0) return root;
|
|
9553
|
-
}
|
|
9554
|
-
if (root === sidebar) break;
|
|
9555
|
-
}
|
|
9556
|
-
return candidate;
|
|
9557
|
-
}
|
|
9558
|
-
function findNewSessionAnchor(root) {
|
|
9559
|
-
const labels = [
|
|
9560
|
-
"新建会话",
|
|
9561
|
-
"New session",
|
|
9562
|
-
"新会话",
|
|
9563
|
-
"New Session"
|
|
9564
|
-
];
|
|
9565
|
-
const buttons = Array.from(root.querySelectorAll("button")).filter((button) => {
|
|
9566
|
-
let parent = button.parentElement;
|
|
9567
|
-
while (parent && parent !== root) {
|
|
9568
|
-
if (parent.hasAttribute("data-window-drag")) return false;
|
|
9569
|
-
parent = parent.parentElement;
|
|
9570
|
-
}
|
|
9571
|
-
return true;
|
|
9572
|
-
});
|
|
9573
|
-
const visibleLabel = buttons.find((button) => {
|
|
9574
|
-
const text = button.textContent?.trim();
|
|
9575
|
-
if (!text) return false;
|
|
9576
|
-
return text.startsWith("新会话") || text.startsWith("New Session");
|
|
9577
|
-
});
|
|
9578
|
-
if (visibleLabel !== void 0) return visibleLabel;
|
|
9579
|
-
for (const label of labels) {
|
|
9580
|
-
const button = buttons.find((candidate) => candidate.getAttribute("aria-label") === label);
|
|
9581
|
-
if (button !== void 0) return button;
|
|
9582
|
-
}
|
|
9583
|
-
}
|
|
9584
|
-
function sidebarFooterCandidate(root) {
|
|
9585
|
-
return directChildWithin(root, root.querySelector("[data-worktree-mode-action]"));
|
|
9586
|
-
}
|
|
9587
|
-
/** Resolve the footer slot semantically, then validate its content boundary. */
|
|
9588
|
-
function resolveSidebarFooter(root, newSession) {
|
|
9589
|
-
if (!newSession) return void 0;
|
|
9590
|
-
const children = Array.from(root.children);
|
|
9591
|
-
const content = directChildWithin(root, newSession);
|
|
9592
|
-
const start = content === void 0 ? -1 : children.indexOf(content);
|
|
9593
|
-
if (start < 0) return void 0;
|
|
9594
|
-
const anchorRect = asRect(newSession);
|
|
9595
|
-
const rootRect = asRect(root);
|
|
9596
|
-
const candidate = sidebarFooterCandidate(root);
|
|
9597
|
-
if (!candidate || children.indexOf(candidate) <= start) return void 0;
|
|
9598
|
-
const rect = asRect(candidate);
|
|
9599
|
-
return [
|
|
9600
|
-
anchorRect.top,
|
|
9601
|
-
anchorRect.bottom,
|
|
9602
|
-
rootRect.top,
|
|
9603
|
-
rootRect.bottom,
|
|
9604
|
-
rect.top,
|
|
9605
|
-
rect.bottom
|
|
9606
|
-
].every(Number.isFinite) && anchorRect.bottom > anchorRect.top && rect.bottom > rect.top && rect.top >= anchorRect.bottom && rect.top >= rootRect.top && rect.bottom <= rootRect.bottom ? candidate : void 0;
|
|
9607
|
-
}
|
|
9608
|
-
/** Hide only the native content covered by the plugin, keeping chrome and footer alive. */
|
|
9609
|
-
function coveredSidebarChildren(root, newSession, footer) {
|
|
9610
|
-
if (!newSession || !footer) return [];
|
|
9611
|
-
const first = directChildWithin(root, newSession);
|
|
9612
|
-
const children = Array.from(root.children ?? []);
|
|
9613
|
-
const start = first === void 0 ? -1 : children.indexOf(first);
|
|
9614
|
-
const end = children.indexOf(footer);
|
|
9615
|
-
if (start < 0 || end <= start) return [];
|
|
9616
|
-
return children.slice(start, end).filter((element) => element instanceof HTMLElement);
|
|
9617
|
-
}
|
|
9618
|
-
function concealSidebarContent(element) {
|
|
9619
|
-
const restore = concealDashboardBackground(element);
|
|
9620
|
-
const opacity = element.style.getPropertyValue("opacity");
|
|
9621
|
-
const priority = element.style.getPropertyPriority("opacity");
|
|
9622
|
-
element.style.setProperty("opacity", "0");
|
|
9623
|
-
return () => {
|
|
9624
|
-
restore();
|
|
9625
|
-
if (element.style.getPropertyValue("opacity") !== "0") return;
|
|
9626
|
-
if (opacity) element.style.setProperty("opacity", opacity, priority);
|
|
9627
|
-
else element.style.removeProperty("opacity");
|
|
9628
|
-
};
|
|
9629
|
-
}
|
|
9630
|
-
function useSidebarOverlayGeometry(active) {
|
|
9631
|
-
const ref = (0, react.useRef)(null);
|
|
9632
|
-
const [width, setWidth] = (0, react.useState)(280);
|
|
9633
|
-
const [bounds, setBounds] = (0, react.useState)(EMPTY_BOUNDS);
|
|
9634
|
-
const [collapsed, setCollapsed] = (0, react.useState)(false);
|
|
9635
|
-
const [nativeCovered, setNativeCovered] = (0, react.useState)(false);
|
|
9636
|
-
(0, react.useLayoutEffect)(() => {
|
|
9637
|
-
if (!active) {
|
|
9638
|
-
setBounds(EMPTY_BOUNDS);
|
|
9639
|
-
setNativeCovered(false);
|
|
9640
|
-
return;
|
|
9641
|
-
}
|
|
9642
|
-
const surface = ref.current;
|
|
9643
|
-
const overlay = surface?.closest("[data-shell-overlay]");
|
|
9644
|
-
const frame = overlay?.parentElement;
|
|
9645
|
-
if (!(overlay instanceof HTMLElement) || !frame || !surface) {
|
|
9646
|
-
setBounds(EMPTY_BOUNDS);
|
|
9647
|
-
return;
|
|
9648
|
-
}
|
|
9649
|
-
const overlayElement = overlay;
|
|
9650
|
-
let frameHandle;
|
|
9651
|
-
let disposed = false;
|
|
9652
|
-
let observedNewSession;
|
|
9653
|
-
let observedFooter;
|
|
9654
|
-
let observedRoot;
|
|
9655
|
-
let observedSidebar;
|
|
9656
|
-
const hidden = /* @__PURE__ */ new Map();
|
|
9657
|
-
function restore() {
|
|
9658
|
-
for (const cleanup of hidden.values()) cleanup();
|
|
9659
|
-
hidden.clear();
|
|
9660
|
-
}
|
|
9661
|
-
function update() {
|
|
9662
|
-
if (disposed) return;
|
|
9663
|
-
const anchors = resolveAppFrame(surface);
|
|
9664
|
-
const sidebarElement = anchors?.sidebar;
|
|
9665
|
-
const currentRoot = sidebarElement && resolveNativeSidebarRoot(sidebarElement);
|
|
9666
|
-
observedSidebar = syncObservedElement(resizeObserver, observedSidebar, sidebarElement);
|
|
9667
|
-
observedRoot = syncObservedElement(resizeObserver, observedRoot, currentRoot);
|
|
9668
|
-
const nextWidth = sidebarElement?.getBoundingClientRect().width;
|
|
9669
|
-
const nextCollapsed = frame?.hasAttribute("data-sidebar-collapsed") === true || nextWidth !== void 0 && nextWidth <= 64;
|
|
9670
|
-
setCollapsed(nextCollapsed);
|
|
9671
|
-
if (nextWidth !== void 0 && Number.isFinite(nextWidth)) setWidth(Math.max(0, nextWidth));
|
|
9672
|
-
if (anchors?.frame !== frame || anchors?.overlay !== overlayElement || !(currentRoot instanceof HTMLElement) || !sidebarElement || nextWidth === void 0 || !Number.isFinite(nextWidth)) {
|
|
9673
|
-
observedNewSession = syncObservedElement(resizeObserver, observedNewSession, void 0);
|
|
9674
|
-
observedFooter = syncObservedElement(resizeObserver, observedFooter, void 0);
|
|
9675
|
-
restore();
|
|
9676
|
-
setNativeCovered(false);
|
|
9677
|
-
setBounds(EMPTY_BOUNDS);
|
|
9678
|
-
return;
|
|
9679
|
-
}
|
|
9680
|
-
const newSession = findNewSessionAnchor(currentRoot);
|
|
9681
|
-
const footer = resolveSidebarFooter(currentRoot, newSession);
|
|
9682
|
-
observedNewSession = syncObservedElement(resizeObserver, observedNewSession, newSession);
|
|
9683
|
-
observedFooter = syncObservedElement(resizeObserver, observedFooter, sidebarFooterCandidate(currentRoot));
|
|
9684
|
-
const nextBounds = computeOverlayBounds(asRect(overlayElement), newSession === void 0 ? void 0 : asRect(newSession), footer === void 0 ? void 0 : asRect(footer));
|
|
9685
|
-
setBounds(nextCollapsed ? EMPTY_BOUNDS : nextBounds);
|
|
9686
|
-
const covered = !nextCollapsed && nextBounds.ready && nextBounds.height > 0 ? coveredSidebarChildren(currentRoot, newSession, footer) : [];
|
|
9687
|
-
for (const [element, cleanup] of hidden) if (!covered.includes(element)) {
|
|
9688
|
-
cleanup();
|
|
9689
|
-
hidden.delete(element);
|
|
9690
|
-
}
|
|
9691
|
-
for (const element of covered) if (!hidden.has(element)) hidden.set(element, concealSidebarContent(element));
|
|
9692
|
-
setNativeCovered(covered.length > 0);
|
|
9693
|
-
}
|
|
9694
|
-
function scheduleUpdate() {
|
|
9695
|
-
if (disposed || frameHandle !== void 0) return;
|
|
9696
|
-
frameHandle = requestAnimationFrame(() => {
|
|
9697
|
-
frameHandle = void 0;
|
|
9698
|
-
update();
|
|
9699
|
-
});
|
|
9700
|
-
}
|
|
9701
|
-
const resizeObserver = typeof ResizeObserver === "function" ? new ResizeObserver(scheduleUpdate) : void 0;
|
|
9702
|
-
for (const element of [overlayElement, frame]) resizeObserver?.observe(element);
|
|
9703
|
-
update();
|
|
9704
|
-
const mutationObserver = typeof MutationObserver === "function" ? new MutationObserver(scheduleUpdate) : void 0;
|
|
9705
|
-
mutationObserver?.observe(frame, {
|
|
9706
|
-
childList: true,
|
|
9707
|
-
subtree: true,
|
|
9708
|
-
attributes: true,
|
|
9709
|
-
attributeFilter: [
|
|
9710
|
-
"data-sidebar-collapsed",
|
|
9711
|
-
"data-worktree-mode-action",
|
|
9712
|
-
"data-pane",
|
|
9713
|
-
"data-shell-overlay",
|
|
9714
|
-
"data-window-drag"
|
|
9715
|
-
]
|
|
9716
|
-
});
|
|
9717
|
-
if (frame?.parentElement) mutationObserver?.observe(frame.parentElement, { childList: true });
|
|
9718
|
-
return () => {
|
|
9719
|
-
disposed = true;
|
|
9720
|
-
resizeObserver?.disconnect();
|
|
9721
|
-
mutationObserver?.disconnect();
|
|
9722
|
-
if (frameHandle !== void 0) cancelAnimationFrame(frameHandle);
|
|
9723
|
-
restore();
|
|
9724
|
-
};
|
|
9725
|
-
}, [active]);
|
|
9726
|
-
return {
|
|
9727
|
-
ref,
|
|
9728
|
-
width,
|
|
9729
|
-
bounds,
|
|
9730
|
-
collapsed,
|
|
9731
|
-
nativeCovered
|
|
9497
|
+
collapsed,
|
|
9498
|
+
bounds: {
|
|
9499
|
+
ready: !collapsed && height > 0,
|
|
9500
|
+
top: 0,
|
|
9501
|
+
height
|
|
9502
|
+
}
|
|
9732
9503
|
};
|
|
9733
9504
|
}
|
|
9734
9505
|
//#endregion
|
|
@@ -9739,7 +9510,13 @@ window.__ModuleLoader__.load({
|
|
|
9739
9510
|
const mode = effectiveViewMode(preferredMode, available && manager !== void 0);
|
|
9740
9511
|
const sessions = useSessions((state) => state);
|
|
9741
9512
|
const sessionStatuses = useSessionStatus?.((state) => state);
|
|
9742
|
-
const
|
|
9513
|
+
const nativeWorkspaces = useWorkspaces((state) => state);
|
|
9514
|
+
const retainedWorkspaces = (0, react.useRef)();
|
|
9515
|
+
const workspaces = (0, react.useMemo)(() => {
|
|
9516
|
+
const next = retainPendingWorkspaces(retainedWorkspaces.current, nativeWorkspaces);
|
|
9517
|
+
retainedWorkspaces.current = next;
|
|
9518
|
+
return next;
|
|
9519
|
+
}, [nativeWorkspaces]);
|
|
9743
9520
|
const forkRecoveryStore = forkRecovery ?? EMPTY_FORK_RECOVERY_STORE;
|
|
9744
9521
|
const forkRecoverySnapshot = (0, react.useSyncExternalStore)(forkRecoveryStore.subscribe, forkRecoveryStore.getSnapshot, forkRecoveryStore.getSnapshot);
|
|
9745
9522
|
const currentSessionId = currentSessionIdFromList(sessions);
|
|
@@ -9749,7 +9526,7 @@ window.__ModuleLoader__.load({
|
|
|
9749
9526
|
const expandSnapshot = (0, react.useSyncExternalStore)(expandState.subscribe, expandState.getSnapshot, expandState.getSnapshot);
|
|
9750
9527
|
const sessionOrderSnapshot = (0, react.useSyncExternalStore)(sessionOrder.subscribe, sessionOrder.getSnapshot, sessionOrder.getSnapshot);
|
|
9751
9528
|
const sessionPresentations = (0, react.useMemo)(() => deriveSessionPresentationIndex(sessions, sessionStatuses), [sessions.byId, sessionStatuses]);
|
|
9752
|
-
const {
|
|
9529
|
+
const { bounds, collapsed } = useWorkspaceRegionGeometry(props.sidebarSeat);
|
|
9753
9530
|
return {
|
|
9754
9531
|
preferredMode,
|
|
9755
9532
|
mode,
|
|
@@ -9763,11 +9540,8 @@ window.__ModuleLoader__.load({
|
|
|
9763
9540
|
expandSnapshot,
|
|
9764
9541
|
sessionOrderSnapshot,
|
|
9765
9542
|
sessionPresentations,
|
|
9766
|
-
ref,
|
|
9767
|
-
width,
|
|
9768
9543
|
bounds,
|
|
9769
9544
|
collapsed,
|
|
9770
|
-
nativeCovered,
|
|
9771
9545
|
archivedSessionIds: workspaces.archivedSessionIds ?? []
|
|
9772
9546
|
};
|
|
9773
9547
|
}
|
|
@@ -10049,7 +9823,7 @@ window.__ModuleLoader__.load({
|
|
|
10049
9823
|
};
|
|
10050
9824
|
const defaultOpenInAppController = new OpenInAppController();
|
|
10051
9825
|
//#endregion
|
|
10052
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/Documents/Code/clutch-dsh/packages/clutch-dsh-worktree/.agents/clutch-worktrees/
|
|
9826
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/Documents/Code/clutch-dsh/packages/clutch-dsh-worktree/.agents/clutch-worktrees/wt_3fc76dafedb7/packages/clutch-dsh-worktree/src/client/dashboard/open-in-app.css.mjs
|
|
10053
9827
|
const css$4 = ".-cerbur-clutch-dsh-worktree-control {\n display: inline-flex;\n align-self: flex-end;\n}\n\n.-cerbur-clutch-dsh-worktree-split {\n display: inline-flex;\n align-items: stretch;\n box-sizing: border-box;\n height: 28px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: 14px;\n overflow: hidden;\n font-family: var(--dsw-font-family);\n}\n\n.-cerbur-clutch-dsh-worktree-split .-cerbur-clutch-dsh-worktree-main,\n.-cerbur-clutch-dsh-worktree-split .-cerbur-clutch-dsh-worktree-chevron {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n border: 0;\n background: none;\n color: var(--dsw-alias-label-primary);\n font-size: 11px;\n font-weight: 400;\n line-height: 16px;\n cursor: pointer;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-main {\n padding: 5px 6px 5px 7px;\n}\n\n.-cerbur-clutch-dsh-worktree-main:hover:not(:disabled),\n.-cerbur-clutch-dsh-worktree-main:focus-visible,\n.-cerbur-clutch-dsh-worktree-chevron:hover,\n.-cerbur-clutch-dsh-worktree-chevron:focus-visible {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.-cerbur-clutch-dsh-worktree-main:disabled {\n color: var(--dsw-alias-label-dimmed);\n cursor: wait;\n}\n\n.-cerbur-clutch-dsh-worktree-main[data-state='error'] {\n color: var(--dsw-alias-state-error-primary, #e03e3e);\n box-shadow: inset 0 0 0 1px var(--dsw-alias-state-error-primary, #e03e3e);\n}\n\n.-cerbur-clutch-dsh-worktree-split .-cerbur-clutch-dsh-worktree-chevron {\n padding: 5px 6px 5px 4px;\n border-left: 0.5px solid var(--dsw-alias-border-l4);\n color: var(--dsw-alias-label-secondary);\n}\n\n.-cerbur-clutch-dsh-worktree-icon {\n flex: none;\n}\n\n.-cerbur-clutch-dsh-worktree-split .-cerbur-clutch-dsh-worktree-icon {\n width: 16px;\n height: 16px;\n}\n\n.-cerbur-clutch-dsh-worktree-split .-cerbur-clutch-dsh-worktree-chevron svg {\n width: 12px;\n height: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-fallback {\n text-decoration: none;\n align-self: flex-end;\n}\n\nimg.-cerbur-clutch-dsh-worktree-icon {\n display: block;\n object-fit: contain;\n user-select: none;\n}\n";
|
|
10054
9828
|
const styleId$4 = "@cerbur/clutch-dsh-worktree/open-in-app.css";
|
|
10055
9829
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/open-in-app.css\"]") === null) {
|
|
@@ -10251,6 +10025,206 @@ window.__ModuleLoader__.load({
|
|
|
10251
10025
|
});
|
|
10252
10026
|
}
|
|
10253
10027
|
//#endregion
|
|
10028
|
+
//#region lib/client/layout/app-frame.js
|
|
10029
|
+
/** Public AppFrame anchors; never infer a column from sibling order or private classes. */
|
|
10030
|
+
function directChildWithin(parent, anchor) {
|
|
10031
|
+
let child = anchor;
|
|
10032
|
+
while (child && child.parentElement !== parent) child = child.parentElement;
|
|
10033
|
+
return child ?? void 0;
|
|
10034
|
+
}
|
|
10035
|
+
function resolveAppFrame(surface) {
|
|
10036
|
+
const overlay = surface.closest("[data-shell-overlay]");
|
|
10037
|
+
const frame = overlay?.parentElement;
|
|
10038
|
+
if (!(overlay instanceof HTMLElement) || !frame || !overlay.isConnected) return void 0;
|
|
10039
|
+
for (const selector of ["[data-worktree-mode-action]", "[data-pane=\"sidebar\"]"]) {
|
|
10040
|
+
const columns = new Set(Array.from(frame.querySelectorAll(selector)).map((anchor) => directChildWithin(frame, anchor)).filter((column) => column instanceof HTMLElement && column !== overlay && !column.hasAttribute("data-shell-overlay") && !column.hasAttribute("data-rightbar-col") && !column.hasAttribute("data-shell-leading")));
|
|
10041
|
+
if (columns.size > 1) return void 0;
|
|
10042
|
+
const sidebar = columns.values().next().value;
|
|
10043
|
+
if (sidebar) return {
|
|
10044
|
+
overlay,
|
|
10045
|
+
frame,
|
|
10046
|
+
sidebar
|
|
10047
|
+
};
|
|
10048
|
+
}
|
|
10049
|
+
}
|
|
10050
|
+
function finiteRect(rect) {
|
|
10051
|
+
return [
|
|
10052
|
+
rect.left,
|
|
10053
|
+
rect.right,
|
|
10054
|
+
rect.top,
|
|
10055
|
+
rect.bottom,
|
|
10056
|
+
rect.width,
|
|
10057
|
+
rect.height
|
|
10058
|
+
].every(Number.isFinite);
|
|
10059
|
+
}
|
|
10060
|
+
function resolveFrameContent(frame, overlay, sidebar) {
|
|
10061
|
+
const rightbars = Array.from(frame.querySelectorAll("[data-rightbar-col]")).filter((column) => directChildWithin(frame, column) !== overlay);
|
|
10062
|
+
if (rightbars.length > 1) return void 0;
|
|
10063
|
+
const column = rightbars[0];
|
|
10064
|
+
const rightbar = frame.hasAttribute("data-rightbar-collapsed") ? void 0 : column;
|
|
10065
|
+
const box = overlay.getBoundingClientRect();
|
|
10066
|
+
const boundary = sidebar.getBoundingClientRect();
|
|
10067
|
+
const columnRect = column?.getBoundingClientRect();
|
|
10068
|
+
if (!finiteRect(box) || !finiteRect(boundary) || rightbar && columnRect && !finiteRect(columnRect)) return;
|
|
10069
|
+
const centerEdges = [rightbar && columnRect ? columnRect.left : box.right];
|
|
10070
|
+
if (!rightbar && columnRect && finiteRect(columnRect)) centerEdges.push(columnRect.left);
|
|
10071
|
+
const excluded = column ? directChildWithin(frame, column) : void 0;
|
|
10072
|
+
const centers = Array.from(frame.children).filter((child) => {
|
|
10073
|
+
if (!(child instanceof HTMLElement) || child === sidebar || child === overlay || child === excluded || child.hasAttribute("data-shell-overlay") || child.hasAttribute("data-shell-leading") || child.hasAttribute("data-window-drag")) return false;
|
|
10074
|
+
const rect = child.getBoundingClientRect();
|
|
10075
|
+
return finiteRect(rect) && rect.width > 0 && rect.height > 0 && Math.abs(rect.left - boundary.right) <= 1 && centerEdges.some((edge) => Math.abs(rect.right - edge) <= 1) && rect.top >= box.top - 1 && rect.top < box.bottom && Math.abs(rect.bottom - box.bottom) <= 1;
|
|
10076
|
+
});
|
|
10077
|
+
if (centers.length !== 1) return void 0;
|
|
10078
|
+
return {
|
|
10079
|
+
center: centers[0],
|
|
10080
|
+
rightbar
|
|
10081
|
+
};
|
|
10082
|
+
}
|
|
10083
|
+
//#endregion
|
|
10084
|
+
//#region lib/client/dashboard/dashboard-overlay.js
|
|
10085
|
+
const SIDEBAR_RESIZE_HANDLE_HALF_WIDTH = 4;
|
|
10086
|
+
/** Reversible presentation only: leave the native React tree and Session alive. */
|
|
10087
|
+
function concealDashboardBackground(element) {
|
|
10088
|
+
const visibility = element.style.getPropertyValue("visibility");
|
|
10089
|
+
const priority = element.style.getPropertyPriority("visibility");
|
|
10090
|
+
const inert = element.getAttribute("inert");
|
|
10091
|
+
const hidden = element.getAttribute("aria-hidden");
|
|
10092
|
+
element.style.setProperty("visibility", "hidden");
|
|
10093
|
+
element.setAttribute("inert", "");
|
|
10094
|
+
element.setAttribute("aria-hidden", "true");
|
|
10095
|
+
return () => {
|
|
10096
|
+
if (element.style.getPropertyValue("visibility") === "hidden") if (visibility) element.style.setProperty("visibility", visibility, priority);
|
|
10097
|
+
else element.style.removeProperty("visibility");
|
|
10098
|
+
for (const [name, value] of [["inert", inert], ["aria-hidden", hidden]]) if (value === null) element.removeAttribute(name);
|
|
10099
|
+
else element.setAttribute(name, value);
|
|
10100
|
+
};
|
|
10101
|
+
}
|
|
10102
|
+
function isRightSidebarOpenFromDom(frame, rightbar) {
|
|
10103
|
+
return !frame.hasAttribute("data-rightbar-collapsed") && rightbar instanceof HTMLElement && frame.contains(rightbar) && (rightbar.hasAttribute("data-sidebar-right-open") || rightbar.querySelector("[data-sidebar-right-open]") !== null);
|
|
10104
|
+
}
|
|
10105
|
+
/** Layout seam shared with the existing Sidebar overlay; fail closed on frame/center loss. */
|
|
10106
|
+
function mountDashboardOverlay(surface, onPlacement, options) {
|
|
10107
|
+
const overlay = surface.closest("[data-shell-overlay]");
|
|
10108
|
+
const frame = overlay?.parentElement;
|
|
10109
|
+
if (!overlay || !frame) {
|
|
10110
|
+
onPlacement(void 0);
|
|
10111
|
+
options?.onRightSidebarChange?.(false);
|
|
10112
|
+
return () => {};
|
|
10113
|
+
}
|
|
10114
|
+
const hidden = /* @__PURE__ */ new Map();
|
|
10115
|
+
let observed = [];
|
|
10116
|
+
let scheduled;
|
|
10117
|
+
let disposed = false;
|
|
10118
|
+
let lastRightSidebarOpen;
|
|
10119
|
+
const restore = () => {
|
|
10120
|
+
for (const cleanup of hidden.values()) cleanup();
|
|
10121
|
+
hidden.clear();
|
|
10122
|
+
};
|
|
10123
|
+
const schedule = () => {
|
|
10124
|
+
if (disposed || scheduled !== void 0) return;
|
|
10125
|
+
scheduled = requestAnimationFrame(() => {
|
|
10126
|
+
scheduled = void 0;
|
|
10127
|
+
update();
|
|
10128
|
+
});
|
|
10129
|
+
};
|
|
10130
|
+
const resize = typeof ResizeObserver === "undefined" ? void 0 : new ResizeObserver(schedule);
|
|
10131
|
+
const update = () => {
|
|
10132
|
+
if (disposed) return;
|
|
10133
|
+
const anchors = resolveAppFrame(surface);
|
|
10134
|
+
const content = anchors?.frame === frame && anchors.overlay === overlay ? resolveFrameContent(frame, overlay, anchors.sidebar) : void 0;
|
|
10135
|
+
const nextObserved = [
|
|
10136
|
+
frame,
|
|
10137
|
+
overlay,
|
|
10138
|
+
...Array.from(frame.children),
|
|
10139
|
+
...Array.from(frame.querySelectorAll("[data-rightbar-col]"))
|
|
10140
|
+
];
|
|
10141
|
+
for (const old of observed) if (!nextObserved.includes(old)) resize?.unobserve(old);
|
|
10142
|
+
for (const next of nextObserved) if (!observed.includes(next)) resize?.observe(next);
|
|
10143
|
+
observed = nextObserved;
|
|
10144
|
+
if (!anchors || !content) {
|
|
10145
|
+
restore();
|
|
10146
|
+
onPlacement(void 0);
|
|
10147
|
+
if (lastRightSidebarOpen) {
|
|
10148
|
+
lastRightSidebarOpen = false;
|
|
10149
|
+
options?.onRightSidebarChange?.(false);
|
|
10150
|
+
}
|
|
10151
|
+
return;
|
|
10152
|
+
}
|
|
10153
|
+
const { sidebar } = anchors;
|
|
10154
|
+
const { center, rightbar } = content;
|
|
10155
|
+
const box = overlay.getBoundingClientRect();
|
|
10156
|
+
const boundary = sidebar.getBoundingClientRect();
|
|
10157
|
+
const rightBoundary = rightbar instanceof HTMLElement ? rightbar.getBoundingClientRect().left : box.right;
|
|
10158
|
+
const left = Math.max(0, boundary.right - box.left + SIDEBAR_RESIZE_HANDLE_HALF_WIDTH);
|
|
10159
|
+
const width = Math.min(box.right, rightBoundary) - box.left - left;
|
|
10160
|
+
if (width <= 0 || box.height <= 0) {
|
|
10161
|
+
restore();
|
|
10162
|
+
onPlacement(void 0);
|
|
10163
|
+
return;
|
|
10164
|
+
}
|
|
10165
|
+
const centerBox = center.getBoundingClientRect();
|
|
10166
|
+
const top = Math.max(0, centerBox.top - box.top);
|
|
10167
|
+
const height = Math.min(box.bottom, centerBox.bottom) - box.top - top;
|
|
10168
|
+
if (height <= 0) {
|
|
10169
|
+
restore();
|
|
10170
|
+
onPlacement(void 0);
|
|
10171
|
+
return;
|
|
10172
|
+
}
|
|
10173
|
+
for (const [element, cleanup] of hidden) if (element !== center) {
|
|
10174
|
+
cleanup();
|
|
10175
|
+
hidden.delete(element);
|
|
10176
|
+
}
|
|
10177
|
+
if (!hidden.has(center)) hidden.set(center, concealDashboardBackground(center));
|
|
10178
|
+
onPlacement({
|
|
10179
|
+
left,
|
|
10180
|
+
top,
|
|
10181
|
+
width,
|
|
10182
|
+
height
|
|
10183
|
+
});
|
|
10184
|
+
const isRightSidebarOpen = options?.isRightSidebarExpanded !== void 0 ? options.isRightSidebarExpanded() : isRightSidebarOpenFromDom(frame, rightbar);
|
|
10185
|
+
if (lastRightSidebarOpen !== isRightSidebarOpen) {
|
|
10186
|
+
lastRightSidebarOpen = isRightSidebarOpen;
|
|
10187
|
+
options?.onRightSidebarChange?.(isRightSidebarOpen);
|
|
10188
|
+
}
|
|
10189
|
+
};
|
|
10190
|
+
const mutation = typeof MutationObserver === "undefined" ? void 0 : new MutationObserver(schedule);
|
|
10191
|
+
try {
|
|
10192
|
+
mutation?.observe(frame, {
|
|
10193
|
+
childList: true,
|
|
10194
|
+
attributes: true,
|
|
10195
|
+
subtree: true,
|
|
10196
|
+
attributeFilter: [
|
|
10197
|
+
"data-rightbar-collapsed",
|
|
10198
|
+
"data-sidebar-right-open",
|
|
10199
|
+
"data-sidebar-right-panel",
|
|
10200
|
+
"data-rightbar-col",
|
|
10201
|
+
"data-worktree-mode-action",
|
|
10202
|
+
"data-pane",
|
|
10203
|
+
"data-window-drag",
|
|
10204
|
+
"data-shell-leading",
|
|
10205
|
+
"data-shell-overlay"
|
|
10206
|
+
]
|
|
10207
|
+
});
|
|
10208
|
+
} catch {
|
|
10209
|
+
mutation?.observe(frame, { childList: true });
|
|
10210
|
+
}
|
|
10211
|
+
if (frame.parentElement) try {
|
|
10212
|
+
mutation?.observe(frame.parentElement, { childList: true });
|
|
10213
|
+
} catch {}
|
|
10214
|
+
update();
|
|
10215
|
+
return () => {
|
|
10216
|
+
disposed = true;
|
|
10217
|
+
resize?.disconnect();
|
|
10218
|
+
mutation?.disconnect();
|
|
10219
|
+
if (scheduled !== void 0) cancelAnimationFrame(scheduled);
|
|
10220
|
+
restore();
|
|
10221
|
+
if (lastRightSidebarOpen) {
|
|
10222
|
+
lastRightSidebarOpen = false;
|
|
10223
|
+
options?.onRightSidebarChange?.(false);
|
|
10224
|
+
}
|
|
10225
|
+
};
|
|
10226
|
+
}
|
|
10227
|
+
//#endregion
|
|
10254
10228
|
//#region lib/client/dashboard/worktree-acquisition-facts.js
|
|
10255
10229
|
function selectWorktreeAcquisitionFacts(record) {
|
|
10256
10230
|
return {
|
|
@@ -10260,7 +10234,7 @@ window.__ModuleLoader__.load({
|
|
|
10260
10234
|
};
|
|
10261
10235
|
}
|
|
10262
10236
|
//#endregion
|
|
10263
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/Documents/Code/clutch-dsh/packages/clutch-dsh-worktree/.agents/clutch-worktrees/
|
|
10237
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/Documents/Code/clutch-dsh/packages/clutch-dsh-worktree/.agents/clutch-worktrees/wt_3fc76dafedb7/packages/clutch-dsh-worktree/src/client/dashboard/dashboard.css.mjs
|
|
10264
10238
|
const css$3 = ".-cerbur-clutch-dsh-worktree-dashboardSurface {\n position: absolute;\n box-sizing: border-box;\n z-index: 2;\n overflow: auto;\n overscroll-behavior: contain;\n pointer-events: auto;\n container-type: inline-size;\n background: var(--dsw-alias-bg-base, #fff);\n color: var(--dsw-alias-label-primary, #19212f);\n font-family: inherit;\n font-size: 14px;\n line-height: 1.5;\n}\n\n.-cerbur-clutch-dsh-worktree-dashboardSurface *,\n.-cerbur-clutch-dsh-worktree-dashboardSurface *::before,\n.-cerbur-clutch-dsh-worktree-dashboardSurface *::after {\n box-sizing: border-box;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSurface button:not(.-cerbur-clutch-dsh-worktree-dashboardRefButton) {\n font: inherit;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSurface svg {\n width: 18px;\n height: 18px;\n flex: none;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSurface code {\n font-family: ui-monospace, SFMono-Regular, Consolas, monospace;\n font-size: 12px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSurface button:focus-visible,\n.-cerbur-clutch-dsh-worktree-dashboardSurface a:focus-visible,\n.-cerbur-clutch-dsh-worktree-dashboardPanel:focus-visible {\n outline: 2px solid #497cd4;\n outline-offset: 3px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSurface h1:focus {\n outline: none;\n}\n.-cerbur-clutch-dsh-worktree-dashboardPage {\n max-width: 1240px;\n margin: 0 auto;\n padding: 24px 30px 28px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSessions {\n list-style: none;\n padding: 0;\n margin: 12px 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSessions button {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 12px 8px;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: inherit;\n text-align: left;\n cursor: pointer;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSessionLabel {\n flex: 1;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSessionMeta {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: flex-end;\n min-width: 28px;\n color: var(--dsw-alias-label-tertiary, #858e9d);\n}\n.-cerbur-clutch-dsh-worktree-dashboardChildPath {\n display: block;\n margin-top: 4px;\n font-size: 12px;\n color: var(--dsw-alias-label-secondary, #788191);\n overflow-wrap: anywhere;\n}\n.-cerbur-clutch-dsh-worktree-dashboardChildState {\n display: flex;\n flex: none;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n}\n\n.-cerbur-clutch-dsh-worktree-dashboardManageToolbar {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 12px;\n margin-top: 20px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardManageToolbar label,\n.-cerbur-clutch-dsh-worktree-dashboardManageStopped {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardManageHint {\n color: var(--dsw-alias-label-secondary, #788191);\n font-size: 12px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardManageList,\n.-cerbur-clutch-dsh-worktree-dashboardManageResults,\n.-cerbur-clutch-dsh-worktree-dashboardManageConfirmList {\n list-style: none;\n padding: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardManageList label {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px 8px;\n border-radius: 6px;\n cursor: pointer;\n}\n.-cerbur-clutch-dsh-worktree-dashboardManageList label:hover,\n.-cerbur-clutch-dsh-worktree-dashboardManageList label:has(input:checked) {\n background: var(--dsw-alias-interactive-bg-hover, #f1f3f6);\n}\n.-cerbur-clutch-dsh-worktree-dashboardManageList label:has(input:focus-visible) {\n outline: 2px solid #497cd4;\n outline-offset: 2px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardManageList input,\n.-cerbur-clutch-dsh-worktree-dashboardManageToolbar input,\n.-cerbur-clutch-dsh-worktree-dashboardManageStopped input {\n flex: none;\n accent-color: var(--dsw-alias-brand-primary, #497cd4);\n}\n.-cerbur-clutch-dsh-worktree-dashboardManageResults li,\n.-cerbur-clutch-dsh-worktree-dashboardManageConfirmList li {\n padding: 8px 0;\n overflow-wrap: anywhere;\n}\n.-cerbur-clutch-dsh-worktree-dashboardManageConfirmList {\n max-height: 260px;\n overflow: auto;\n}\n.-cerbur-clutch-dsh-worktree-dashboardManageConfirmList code {\n display: block;\n overflow-wrap: anywhere;\n}\n.-cerbur-clutch-dsh-worktree-dashboardManageResults [data-batch-result='failed'] {\n color: var(--dsw-alias-label-error, #d34b4b);\n}\n.-cerbur-clutch-dsh-worktree-dashboardSessionStatus {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSessionTime {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n line-height: 20px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSessions button:hover,\n.-cerbur-clutch-dsh-worktree-dashboardSessions button[aria-current] {\n background: var(--dsw-alias-interactive-bg-hover, #f1f3f6);\n}\n.-cerbur-clutch-dsh-worktree-dashboardSurface a {\n text-decoration: none;\n}\n.-cerbur-clutch-dsh-worktree-dashboardStartActions button:not(:disabled) {\n cursor: pointer;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTopline {\n position: sticky;\n top: 0;\n z-index: 3;\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n justify-content: space-between;\n gap: 8px 20px;\n min-height: 50px;\n padding: 10px 20px;\n border-bottom: 1px solid var(--dsw-alias-border-l3, #dfe3ea);\n background: var(--dsw-alias-bg-base, #fff);\n color: var(--dsw-alias-label-secondary, #677080);\n font-size: 13px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTopline > span {\n flex: 1 1 120px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTopline > span > span {\n margin: 0 8px;\n opacity: 0.5;\n}\n.-cerbur-clutch-dsh-worktree-dashboardToplineActions {\n display: inline-flex;\n flex-wrap: nowrap;\n flex-shrink: 0;\n align-items: center;\n gap: 8px;\n margin-inline-start: auto;\n max-width: 100%;\n -webkit-app-region: no-drag;\n}\n/* AppFrame's native reopen/New Session seat follows shell.-cerbur-clutch-dsh-worktree-overlay in DOM order.\n Keep its existing actions above the Dashboard, with its published clearance\n reserved in the title. This rule disappears as soon as the Dashboard closes. */\nhtml[data-platform='darwin']\n [data-sidebar-collapsed]:has([data-worktree-dashboard], [data-worktree-dashboard-request])\n > [data-shell-leading] {\n z-index: 21;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSidebarButton {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 6px;\n border: 0;\n border-radius: 28px;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #677080);\n cursor: pointer;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSidebarButton:hover {\n background: var(--dsw-alias-interactive-bg-hover, #f1f3f6);\n}\n.-cerbur-clutch-dsh-worktree-dashboardSidebarButton svg {\n width: 15px;\n height: 15px;\n transform: scaleX(-1);\n}\n.-cerbur-clutch-dsh-worktree-dashboardHeader {\n display: grid;\n grid-template-columns: minmax(0, 1fr) minmax(260px, 0.45fr);\n gap: 32px;\n margin-bottom: 15px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardIdentity {\n min-width: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTitleRow {\n display: flex;\n align-items: center;\n gap: 10px;\n flex-wrap: wrap;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTitleRow > svg {\n width: 24px;\n height: 24px;\n color: #3e73ca;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTitleRow h1 {\n font-size: 25px;\n letter-spacing: -0.6px;\n line-height: 1.3;\n font-weight: 650;\n margin: 0;\n flex: 0 1 auto;\n overflow: hidden;\n min-width: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardRefButton {\n display: block;\n max-width: 100%;\n padding: 0;\n border: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n cursor: pointer;\n}\n.-cerbur-clutch-dsh-worktree-dashboardHealth,\n.-cerbur-clutch-dsh-worktree-dashboardSoon {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n white-space: nowrap;\n border-radius: 6px;\n padding: 3px 7px;\n font-size: 11px;\n font-weight: 500;\n color: var(--dsw-alias-label-secondary, #687182);\n background: var(--dsw-alias-interactive-bg-hover, #f1f3f6);\n}\n.-cerbur-clutch-dsh-worktree-dashboardHealth[data-health='ready'] {\n background: color-mix(in srgb, #1eab78 13%, transparent);\n color: #21976f;\n}\n.-cerbur-clutch-dsh-worktree-dashboardHealth[data-health='repair'],\n.-cerbur-clutch-dsh-worktree-dashboardHealth[data-health='recovery-needed'],\n.-cerbur-clutch-dsh-worktree-dashboardHealth[data-health='branch-drift'] {\n background: color-mix(in srgb, #e7a839 14%, transparent);\n color: #b27a1e;\n}\n.-cerbur-clutch-dsh-worktree-dashboardPath {\n display: flex;\n align-items: flex-start;\n gap: 9px;\n margin-top: 12px;\n color: var(--dsw-alias-label-secondary, #697283);\n}\n.-cerbur-clutch-dsh-worktree-dashboardPath code {\n padding-top: 4px;\n overflow-wrap: anywhere;\n min-width: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardFieldLabel {\n font-size: 10px;\n border: 1px solid var(--dsw-alias-border-l3, #e5e7ed);\n border-radius: 4px;\n padding: 2px 5px;\n margin-top: 2px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardIconButton {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 29px;\n height: 29px;\n border: 0;\n border-radius: 5px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n}\n.-cerbur-clutch-dsh-worktree-dashboardIconButton:hover {\n background: var(--dsw-alias-interactive-bg-hover, #f1f3f6);\n}\n.-cerbur-clutch-dsh-worktree-dashboardCopyStatus {\n font-size: 12px;\n margin: 4px 0 0;\n min-height: 18px;\n color: #21976f;\n}\n.-cerbur-clutch-dsh-worktree-dashboardCopyStatus[role='alert'] {\n color: #bd5d43;\n}\n.-cerbur-clutch-dsh-worktree-dashboardHeaderAside {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 8px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardHeaderAside > button,\n.-cerbur-clutch-dsh-worktree-dashboardHeaderAside > a {\n align-self: flex-end;\n}\n.-cerbur-clutch-dsh-worktree-dashboardButton {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 7px;\n padding: 6px 11px;\n border: 1px solid var(--dsw-alias-border-l3, #dfe3ea);\n border-radius: 6px;\n background: var(--dsw-alias-bg-base, #fff);\n color: inherit;\n white-space: nowrap;\n cursor: pointer;\n font-size: 12px !important;\n line-height: 1.5;\n}\n.-cerbur-clutch-dsh-worktree-dashboardButton:disabled {\n color: var(--dsw-alias-label-secondary, #737e8e);\n cursor: not-allowed;\n}\n.-cerbur-clutch-dsh-worktree-dashboardButton:not(:disabled):hover {\n background: var(--dsw-alias-interactive-bg-hover, #f4f6f9);\n}\n.-cerbur-clutch-dsh-worktree-dashboardTabs {\n display: flex;\n gap: 22px;\n overflow-x: auto;\n border-bottom: 1px solid var(--dsw-alias-border-l3, #e1e5ed);\n margin-bottom: 24px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTabs button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n gap: 8px;\n padding: 12px 2px;\n border: 0;\n border-bottom: 2px solid transparent;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #6c7480);\n cursor: pointer;\n font-size: 13px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTabs button[aria-selected='true'] {\n color: #4276c8;\n border-bottom-color: #4276c8;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTabs svg {\n width: 16px;\n height: 16px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardPanel {\n min-width: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardGrid {\n display: grid;\n grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);\n gap: 20px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardColumn {\n display: flex;\n flex-direction: column;\n gap: 20px;\n min-width: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardCard,\n.-cerbur-clutch-dsh-worktree-dashboardStart {\n padding: 20px;\n border: 1px solid var(--dsw-alias-border-l3, #e5e8ef);\n border-radius: 11px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardCard h2,\n.-cerbur-clutch-dsh-worktree-dashboardStart h2 {\n display: flex;\n align-items: center;\n gap: 9px;\n font-size: 16px;\n font-weight: 620;\n line-height: 1.4;\n margin: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardCard p,\n.-cerbur-clutch-dsh-worktree-dashboardStart > p {\n font-size: 12px;\n color: var(--dsw-alias-label-secondary, #7b8290);\n margin: 8px 0 15px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardCardHeading {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 10px;\n margin-bottom: 7px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardStart {\n background: linear-gradient(\n 115deg,\n color-mix(in srgb, #6b9eff 9%, transparent),\n color-mix(in srgb, #6b9eff 3%, transparent)\n );\n}\n.-cerbur-clutch-dsh-worktree-dashboardStart h2 > svg {\n color: #477bc6;\n}\n.-cerbur-clutch-dsh-worktree-dashboardStartActions {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 13px;\n margin-top: 23px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardStartActions button {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n padding: 18px 14px;\n text-align: left;\n border: 1px solid color-mix(in srgb, #7299e7 28%, transparent);\n border-radius: 8px;\n background: color-mix(in srgb, #6b9eff 5%, transparent);\n color: #4673bc;\n cursor: not-allowed;\n min-width: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardStartActions button:nth-child(2) {\n color: #38846e;\n border-color: color-mix(in srgb, #4fba9a 25%, transparent);\n background: color-mix(in srgb, #4fba9a 5%, transparent);\n}\n.-cerbur-clutch-dsh-worktree-dashboardStartActions svg {\n width: 23px;\n height: 23px;\n margin-top: 3px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardStartActions strong {\n display: block;\n font-size: 14px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardStartActions small {\n display: block;\n margin-top: 6px;\n line-height: 1.6;\n font-size: 12px;\n color: var(--dsw-alias-label-secondary, #69788a);\n}\n.-cerbur-clutch-dsh-worktree-dashboardStartActions em {\n display: block;\n font-size: 10px;\n font-style: normal;\n margin-top: 10px;\n opacity: 0.75;\n}\n.-cerbur-clutch-dsh-worktree-dashboardInstructionPlaceholder {\n padding: 26px 20px;\n min-height: 177px;\n border: 1px dashed var(--dsw-alias-border-l3, #dfe4ed);\n border-radius: 7px;\n background: var(--dsw-alias-interactive-bg-hover, #f7f8fa);\n text-align: center;\n}\n.-cerbur-clutch-dsh-worktree-dashboardInstructionPlaceholder > svg {\n display: block;\n margin: 0 auto 10px;\n width: 25px;\n height: 25px;\n color: #929cac;\n}\n.-cerbur-clutch-dsh-worktree-dashboardInstructionPlaceholder strong {\n font-size: 13px;\n font-weight: 500;\n}\n.-cerbur-clutch-dsh-worktree-dashboardInstructionPlaceholder p {\n max-width: 310px;\n margin: 7px auto 12px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardEmpty {\n display: flex;\n flex-direction: column;\n gap: 8px;\n align-items: center;\n justify-content: center;\n min-height: 78px;\n padding: 10px 8px;\n text-align: center;\n}\n.-cerbur-clutch-dsh-worktree-dashboardEmpty p {\n max-width: 300px;\n margin: 0;\n line-height: 1.7;\n}\n.-cerbur-clutch-dsh-worktree-dashboardFacts {\n margin: 8px 0 14px;\n font-size: 12px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardFacts > div {\n display: grid;\n grid-template-columns: minmax(70px, 0.65fr) minmax(0, 1fr);\n gap: 12px;\n align-items: center;\n padding: 11px 0;\n border-bottom: 1px solid var(--dsw-alias-border-l3, #eef0f5);\n}\n.-cerbur-clutch-dsh-worktree-dashboardFacts > div:last-child {\n border: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardFacts dt {\n grid-column: 1;\n min-width: 0;\n color: var(--dsw-alias-label-secondary, #788191);\n /* Prefer normal break points (including trailing `/` and `-`) first. */\n overflow-wrap: break-word;\n word-break: normal;\n}\n.-cerbur-clutch-dsh-worktree-dashboardFacts dd {\n grid-column: 2;\n min-width: 0;\n margin: 0;\n text-align: right;\n /* Only split an unbreakable value after natural opportunities are exhausted. */\n overflow-wrap: break-word;\n word-break: normal;\n}\n.-cerbur-clutch-dsh-worktree-dashboardFacts > div:has(.-cerbur-clutch-dsh-worktree-dashboardFactAction > *) {\n grid-template-columns: minmax(70px, 0.65fr) minmax(0, 1fr) 29px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardFacts dd > span {\n max-width: 100%;\n flex-wrap: wrap;\n justify-content: flex-end;\n}\n.-cerbur-clutch-dsh-worktree-dashboardFactAction {\n display: flex;\n grid-column: 3;\n align-items: center;\n justify-content: flex-end;\n min-width: 29px;\n min-height: 29px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardFactAction:empty { display: none; }\n.-cerbur-clutch-dsh-worktree-dashboardHeaderFacts {\n width: 100%;\n margin: 0;\n padding: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardHeaderFacts > div,\n.-cerbur-clutch-dsh-worktree-dashboardHeaderFacts > div:has(.-cerbur-clutch-dsh-worktree-dashboardFactAction > *) {\n grid-template-columns: minmax(60px, 0.55fr) minmax(0, 1fr) 26px;\n gap: 8px;\n min-height: 34px;\n padding: 3px 0;\n border: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardHeaderFacts time {\n font-variant-numeric: tabular-nums;\n color: var(--dsw-alias-label-secondary, #687182);\n}\n.-cerbur-clutch-dsh-worktree-dashboardHeaderFacts .-cerbur-clutch-dsh-worktree-dashboardFactAction {\n min-width: 26px;\n min-height: 26px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardHeaderFacts .-cerbur-clutch-dsh-worktree-dashboardIconButton {\n width: 26px;\n height: 26px;\n border-radius: 6px;\n color: var(--dsw-alias-label-tertiary, #858e9d);\n}\n.-cerbur-clutch-dsh-worktree-dashboardHeaderFacts .-cerbur-clutch-dsh-worktree-dashboardIconButton:hover,\n.-cerbur-clutch-dsh-worktree-dashboardHeaderFacts .-cerbur-clutch-dsh-worktree-dashboardIconButton:focus-visible {\n background: transparent;\n color: var(--dsw-alias-label-primary, #19212f);\n}\n.-cerbur-clutch-dsh-worktree-dashboardHeaderFacts .-cerbur-clutch-dsh-worktree-dashboardIconButton svg {\n width: 14px;\n height: 14px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardHistorical {\n color: var(--dsw-alias-label-secondary, #788191);\n}\n.-cerbur-clutch-dsh-worktree-dashboardSyncOptions {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSyncOptions p {\n margin: 0;\n overflow-wrap: anywhere;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSyncOptions label {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n cursor: pointer;\n}\n.-cerbur-clutch-dsh-worktree-dashboardSyncOptions input {\n margin-top: 4px;\n accent-color: var(--dsw-alias-text-link, #3e73ca);\n}\n.-cerbur-clutch-dsh-worktree-dashboardSyncOptions small {\n display: block;\n margin-top: 4px;\n color: var(--dsw-alias-label-secondary, #788191);\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaseLink {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n max-width: 100%;\n padding: 0;\n border: 0;\n background: transparent;\n color: var(--dsw-alias-label-primary, #19212f);\n text-align: left;\n cursor: pointer;\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaseLink > span {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaseLink svg {\n width: 14px;\n height: 14px;\n color: var(--dsw-alias-label-tertiary, #858e9d);\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaseLink:hover,\n.-cerbur-clutch-dsh-worktree-dashboardBaseLink:focus-visible {\n color: var(--dsw-alias-text-link, #3e73ca);\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaseLink:hover svg,\n.-cerbur-clutch-dsh-worktree-dashboardBaseLink:focus-visible svg {\n color: inherit;\n}\n.-cerbur-clutch-dsh-worktree-dashboardIconButton:disabled {\n color: var(--dsw-alias-label-secondary, #788191);\n cursor: not-allowed;\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineModal {\n box-sizing: border-box;\n width: min(440px, calc(100vw - 48px));\n max-height: calc(100vh - 48px);\n max-height: calc(100dvh - 48px);\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineModalContent {\n box-sizing: border-box;\n min-height: 0;\n overflow-y: auto;\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselinePicker {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n min-width: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardLink {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n width: 100%;\n background: transparent;\n border: 1px solid var(--dsw-alias-border-l3, #e2e6ed);\n border-radius: 6px;\n padding: 7px 10px;\n font-size: 12px !important;\n color: inherit;\n cursor: pointer;\n margin-top: 8px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardLink:hover {\n background: var(--dsw-alias-interactive-bg-hover, #f5f7fa);\n}\n.-cerbur-clutch-dsh-worktree-dashboardQuickActions {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin-top: 16px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardQuickActions .-cerbur-clutch-dsh-worktree-dashboardButton {\n justify-content: flex-start;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTabPlaceholder {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n min-height: 390px;\n padding: 40px 24px;\n text-align: center;\n border: 1px dashed var(--dsw-alias-border-l3, #dde3ec);\n border-radius: 11px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTabPlaceholder > svg {\n width: 36px;\n height: 36px;\n color: #7c9bcf;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTabPlaceholder h2 {\n font-size: 20px;\n font-weight: 600;\n margin: 16px 0 4px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTabPlaceholder p {\n max-width: 420px;\n font-size: 13px;\n color: var(--dsw-alias-label-secondary, #7b8596);\n margin: 8px 0 18px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardFooter {\n margin: 23px 0 0;\n text-align: center;\n font-size: 11px;\n color: var(--dsw-alias-label-secondary, #8a92a0);\n}\n\n@container (max-width: 820px) {\n .-cerbur-clutch-dsh-worktree-dashboardPage {\n padding: 20px;\n }\n .-cerbur-clutch-dsh-worktree-dashboardHeader {\n grid-template-columns: minmax(0, 1fr);\n gap: 12px;\n }\n .-cerbur-clutch-dsh-worktree-dashboardHeaderAside {\n display: flex;\n }\n .-cerbur-clutch-dsh-worktree-dashboardGrid {\n grid-template-columns: minmax(0, 1fr);\n }\n .-cerbur-clutch-dsh-worktree-dashboardTabs {\n gap: 18px;\n }\n}\n\n@container (max-width: 440px) {\n .-cerbur-clutch-dsh-worktree-dashboardManageList label {\n display: grid;\n grid-template-columns: auto auto minmax(0, 1fr);\n gap: 8px;\n }\n .-cerbur-clutch-dsh-worktree-dashboardManageList .-cerbur-clutch-dsh-worktree-dashboardChildState {\n grid-column: 3;\n align-items: flex-start;\n flex-direction: row;\n flex-wrap: wrap;\n min-width: 0;\n }\n .-cerbur-clutch-dsh-worktree-dashboardManageList .-cerbur-clutch-dsh-worktree-dashboardHealth {\n white-space: normal;\n }\n .-cerbur-clutch-dsh-worktree-dashboardPage {\n padding: 16px 12px;\n }\n .-cerbur-clutch-dsh-worktree-dashboardTitleRow h1 {\n font-size: 22px;\n }\n .-cerbur-clutch-dsh-worktree-dashboardStartActions {\n grid-template-columns: minmax(0, 1fr);\n }\n .-cerbur-clutch-dsh-worktree-dashboardCard,\n .-cerbur-clutch-dsh-worktree-dashboardStart {\n padding: 16px;\n }\n .-cerbur-clutch-dsh-worktree-dashboardTopline {\n gap: 10px;\n }\n}\n.-cerbur-clutch-dsh-worktree-dashboardInstructionsText {\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n max-height: 240px;\n overflow: auto;\n}\n\n.-cerbur-clutch-dsh-worktree-dashboardInstructionsInput {\n box-sizing: border-box;\n width: 100%;\n resize: vertical;\n padding: 10px;\n border: 1px solid var(--dsw-alias-border-l4);\n border-radius: 8px;\n background: var(--dsw-alias-bg-base);\n color: var(--dsw-alias-label-primary);\n font: inherit;\n}\n\n.-cerbur-clutch-dsh-worktree-dashboardInstructionActions {\n display: flex;\n gap: 8px;\n margin-top: 8px;\n}\n";
|
|
10265
10239
|
const styleId$3 = "@cerbur/clutch-dsh-worktree/dashboard.css";
|
|
10266
10240
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/dashboard.css\"]") === null) {
|
|
@@ -10572,7 +10546,7 @@ window.__ModuleLoader__.load({
|
|
|
10572
10546
|
});
|
|
10573
10547
|
}
|
|
10574
10548
|
//#endregion
|
|
10575
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/Documents/Code/clutch-dsh/packages/clutch-dsh-worktree/.agents/clutch-worktrees/
|
|
10549
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/Documents/Code/clutch-dsh/packages/clutch-dsh-worktree/.agents/clutch-worktrees/wt_3fc76dafedb7/packages/clutch-dsh-worktree/src/client/dashboard/git/worktree-git.css.mjs
|
|
10576
10550
|
const css$2 = ".-cerbur-clutch-dsh-worktree-gitPanel {\n min-width: 0;\n min-height: 0;\n}\n.-cerbur-clutch-dsh-worktree-gitCommitStats {\n display: inline-flex;\n gap: 8px;\n color: var(--dsw-alias-label-secondary, #677080);\n font-variant-numeric: tabular-nums;\n}\n.-cerbur-clutch-dsh-worktree-gitFileRow {\n display: flex;\n min-width: 0;\n}\n.-cerbur-clutch-dsh-worktree-gitFileRow > button:first-child { flex: 1; min-width: 0; }\n.-cerbur-clutch-dsh-worktree-gitFileRow > .-cerbur-clutch-dsh-worktree-gitFileOpen { width: 28px; min-width: 28px; flex: none; padding: 4px; opacity: 0; }\n.-cerbur-clutch-dsh-worktree-gitFileRow > .-cerbur-clutch-dsh-worktree-gitFileOpen svg { width: 14px; height: 14px; }\n.-cerbur-clutch-dsh-worktree-gitFileRow:hover > .-cerbur-clutch-dsh-worktree-gitFileOpen,\n.-cerbur-clutch-dsh-worktree-gitFileRow:focus-within > .-cerbur-clutch-dsh-worktree-gitFileOpen { opacity: 1; }\n\n.-cerbur-clutch-dsh-worktree-gitPanelHeader {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 20px;\n margin-bottom: 18px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitPanelHeader h2 {\n margin: 0;\n font-size: 18px;\n font-weight: 620;\n}\n\n.-cerbur-clutch-dsh-worktree-gitPanelHeading {\n min-width: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselineSelector {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n margin-top: 10px;\n color: var(--dsw-alias-label-secondary, #6f7887);\n font-size: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselinePrompt {\n padding: 22px;\n border: 1px dashed var(--dsw-alias-border-l3, #dfe3ea);\n border-radius: 10px;\n background: var(--dsw-alias-bg-base, #fff);\n color: var(--dsw-alias-label-secondary, #6f7887);\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselinePrompt strong {\n display: block;\n margin-bottom: 6px;\n color: var(--dsw-alias-label-primary, #273142);\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselinePrompt p {\n margin: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselineFacts {\n display: flex;\n flex-wrap: wrap;\n gap: 8px 20px;\n margin: 10px 0 0;\n color: var(--dsw-alias-label-secondary, #6f7887);\n font-size: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselineFacts > div {\n display: flex;\n gap: 6px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselineFacts dt::after {\n content: ':';\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselineFacts dd {\n margin: 0;\n color: var(--dsw-alias-label-primary, #273142);\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselineFacts code {\n margin-left: 4px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDerived {\n margin-left: 7px;\n color: var(--dsw-alias-state-warn-label, #9a6e22);\n}\n\n.-cerbur-clutch-dsh-worktree-gitRefresh {\n flex: none;\n padding: 6px 11px;\n border: 1px solid var(--dsw-alias-border-l3, #dfe3ea);\n border-radius: 6px;\n background: var(--dsw-alias-bg-base, #fff);\n color: inherit;\n cursor: pointer;\n font-size: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitRefresh:disabled {\n color: var(--dsw-alias-label-secondary, #7d8795);\n cursor: wait;\n}\n\n/*\n * One 3x3 grid carries both layouts: commit and changed-file panes sit around a\n * row divider, the diff sits beside them across a column divider. Wide layouts\n * place the stack in the left column, narrow layouts place all three panes on\n * three rows. Both shares are custom properties the dividers drag, and both are\n * clamped so each pane keeps a usable size.\n */\n.-cerbur-clutch-dsh-worktree-gitColumns {\n /* Keep the Git surface bounded by the viewport, never by its data volume. */\n --git-columns-height: clamp(360px, calc(100vh - 300px), 560px);\n --git-columns-height: clamp(360px, calc(100dvh - 300px), 560px);\n /* Leading-pane shares: the row divider and the column divider drag these. */\n --git-rows-top: 45%;\n --git-columns-left: 38%;\n display: grid;\n grid-template-columns:\n minmax(240px, min(var(--git-columns-left), calc(100% - 247px)))\n 7px\n minmax(240px, 1fr);\n grid-template-rows:\n minmax(140px, min(var(--git-rows-top), calc(100% - 147px)))\n 7px\n minmax(140px, 1fr);\n height: var(--git-columns-height);\n min-height: 0;\n border: 1px solid var(--dsw-alias-border-l3, #e5e8ef);\n border-radius: 10px;\n overflow: hidden;\n resize: none;\n}\n\n/* Wide: commits over changed files in the left column, diff down the right column. */\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-pane='commits'] {\n grid-area: 1 / 1;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-splitter='rows'] {\n grid-area: 2 / 1;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-pane='changed-files'] {\n grid-area: 3 / 1;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-splitter='columns'] {\n grid-area: 1 / 2 / -1 / 3;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-pane='diff'] {\n grid-area: 1 / 3 / -1 / -1;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumnSplitter {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--dsw-alias-bg-base, #fff);\n touch-action: none;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumnSplitter::before {\n content: '';\n border-radius: 999px;\n background: var(--dsw-alias-border-l2, #cbd2dc);\n transition: background 0.15s ease;\n}\n\n/* Widen the grab area without moving the visible divider line. */\n.-cerbur-clutch-dsh-worktree-gitColumnSplitter::after {\n content: '';\n position: absolute;\n}\n\n/* Both divider panes draw a full border box, so the pane above and the pane below\n (or the pane left and the pane right) are each closed by their own edge. */\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-splitter='rows'] {\n box-sizing: border-box;\n height: 7px;\n cursor: row-resize;\n border-top: 1px solid var(--dsw-alias-border-l3, #e5e8ef);\n border-bottom: 1px solid var(--dsw-alias-border-l3, #e5e8ef);\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-splitter='rows']::before {\n width: 30px;\n height: 2px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-splitter='rows']::after {\n inset: -3px 0;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-splitter='columns'] {\n box-sizing: border-box;\n width: 7px;\n cursor: col-resize;\n border-left: 1px solid var(--dsw-alias-border-l3, #e5e8ef);\n border-right: 1px solid var(--dsw-alias-border-l3, #e5e8ef);\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-splitter='columns']::before {\n width: 2px;\n height: 30px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-splitter='columns']::after {\n inset: 0 -3px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumnSplitter:hover::before,\n.-cerbur-clutch-dsh-worktree-gitColumnSplitter:focus-visible::before,\n.-cerbur-clutch-dsh-worktree-gitColumnSplitter[data-dashboard-git-splitting='true']::before {\n background: var(--dsw-alias-state-business-primary, #467bc8);\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumnSplitter:focus-visible {\n outline: 2px solid #497cd4;\n outline-offset: -2px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumn {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex-direction: column;\n overflow: hidden;\n background: var(--dsw-alias-bg-base, #fff);\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumnHeader {\n display: flex;\n flex: none;\n align-items: baseline;\n justify-content: space-between;\n gap: 8px;\n min-height: 43px;\n padding: 12px 13px 9px;\n border-bottom: 1px solid var(--dsw-alias-border-l3, #edf0f4);\n color: var(--dsw-alias-label-secondary, #6f7887);\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumnHeader h3 {\n margin: 0;\n color: var(--dsw-alias-label-primary, #273142);\n font-size: 12px;\n font-weight: 620;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumnHeader span,\n.-cerbur-clutch-dsh-worktree-gitColumnHeader code {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 10px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumnHeaderMeta {\n display: flex;\n min-width: 0;\n align-items: baseline;\n justify-content: flex-end;\n gap: 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumnHeader .-cerbur-clutch-dsh-worktree-gitLineStats,\n.-cerbur-clutch-dsh-worktree-gitColumnHeader .-cerbur-clutch-dsh-worktree-gitLineStats > span {\n overflow: visible;\n text-overflow: clip;\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitColumnHeaderUnknown {\n color: var(--dsw-alias-label-tertiary, #8a94a3);\n}\n\n/* Right side of the commits header: the truncation note and the multi-select switch. */\n.-cerbur-clutch-dsh-worktree-gitColumnHeaderControls {\n display: flex;\n min-width: 0;\n align-self: center;\n align-items: center;\n justify-content: flex-end;\n gap: 10px;\n}\n\n/*\n * A native checkbox owns the state, focus and keyboard behavior; the track and\n * thumb below are presentational and follow :checked through the sibling selector.\n */\n.-cerbur-clutch-dsh-worktree-gitCommitMultiSelect {\n position: relative;\n display: inline-flex;\n flex: none;\n align-items: center;\n gap: 6px;\n cursor: pointer;\n user-select: none;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitMultiSelect input {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n border: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitMultiSelectTrack {\n position: relative;\n display: block;\n flex: none;\n width: 24px;\n height: 14px;\n border-radius: 999px;\n background: var(--dsw-alias-border-l2, #cbd2dc);\n transition: background 0.15s ease;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitMultiSelectThumb {\n position: absolute;\n top: 2px;\n left: 2px;\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background: var(--dsw-alias-bg-base, #fff);\n box-shadow: 0 1px 2px rgb(15 23 42 / 25%);\n transition: transform 0.15s ease;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitMultiSelect input:checked + .-cerbur-clutch-dsh-worktree-gitCommitMultiSelectTrack {\n background: var(--dsw-alias-state-business-primary, #467bc8);\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitMultiSelect input:checked + .-cerbur-clutch-dsh-worktree-gitCommitMultiSelectTrack .-cerbur-clutch-dsh-worktree-gitCommitMultiSelectThumb {\n transform: translateX(10px);\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitMultiSelect input:focus-visible + .-cerbur-clutch-dsh-worktree-gitCommitMultiSelectTrack {\n outline: 2px solid #497cd4;\n outline-offset: 2px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSummaryButton {\n display: flex;\n width: calc(100% - 10px);\n flex-direction: column;\n gap: 3px;\n margin: 5px;\n padding: 8px;\n border: 1px solid var(--dsw-alias-border-l3, #dfe3ea);\n border-radius: 6px;\n background: var(--dsw-alias-bg-base, #fff);\n color: var(--dsw-alias-label-primary, #273142);\n text-align: left;\n cursor: pointer;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSummaryButton:hover,\n.-cerbur-clutch-dsh-worktree-gitSummaryButton[aria-pressed='true'] {\n border-color: var(--dsw-alias-state-business-primary, #467bc8);\n background: var(--dsw-alias-interactive-bg-hover, #f1f3f6);\n}\n\n.-cerbur-clutch-dsh-worktree-gitSummaryButton span {\n font-size: 12px;\n font-weight: 620;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSummaryButton small {\n color: var(--dsw-alias-label-secondary, #6f7887);\n font-size: 10px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSummaryToggle {\n display: flex;\n align-items: flex-start;\n gap: 7px;\n width: calc(100% - 20px);\n margin: 3px 10px 8px;\n color: var(--dsw-alias-label-primary, #273142);\n cursor: pointer;\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSummaryToggle input {\n flex: none;\n margin: 2px 0 0;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSummaryToggle span {\n display: flex;\n min-width: 0;\n flex-direction: column;\n gap: 2px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSummaryToggle strong {\n font-weight: 560;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSummaryToggle small {\n color: var(--dsw-alias-label-secondary, #6f7887);\n font-size: 10px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSummaryToggle input:disabled,\n.-cerbur-clutch-dsh-worktree-gitSummaryToggle:has(input:disabled) {\n cursor: wait;\n opacity: 0.65;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSelectionToolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 5px 10px;\n border-bottom: 1px solid var(--dsw-alias-border-l3, #edf0f4);\n color: var(--dsw-alias-label-secondary, #6f7887);\n font-size: 10px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSelectionToolbar button {\n border: 0;\n background: transparent;\n color: var(--dsw-alias-state-business-primary, #467bc8);\n cursor: pointer;\n font: inherit;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitList,\n.-cerbur-clutch-dsh-worktree-gitChangedFileList {\n display: block;\n flex: 1 1 auto;\n min-height: 0;\n overflow-x: hidden;\n overflow-y: auto;\n overscroll-behavior: contain;\n scrollbar-gutter: stable;\n list-style: none;\n padding: 5px;\n margin: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-gitChangedFileList {\n overflow-x: auto;\n}\n\n.-cerbur-clutch-dsh-worktree-gitChangedFileList > li,\n.-cerbur-clutch-dsh-worktree-gitChangedFileList .-cerbur-clutch-dsh-worktree-gitFolderChildren,\n.-cerbur-clutch-dsh-worktree-gitChangedFileList .-cerbur-clutch-dsh-worktree-gitFolderChildren > li {\n width: max-content;\n min-width: 100%;\n}\n\n.-cerbur-clutch-dsh-worktree-gitFolderChildren {\n list-style: none;\n padding: 0 0 0 12px;\n margin: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-gitChangedFileList .-cerbur-clutch-dsh-worktree-gitFolderButton {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 7px 8px;\n color: var(--dsw-alias-label-secondary, #6f7887);\n font-size: 11px;\n font-weight: 620;\n}\n\n.-cerbur-clutch-dsh-worktree-gitChangedFileList .-cerbur-clutch-dsh-worktree-gitFolderButton:hover,\n.-cerbur-clutch-dsh-worktree-gitChangedFileList .-cerbur-clutch-dsh-worktree-gitFolderButton:focus-visible {\n background: var(--dsw-alias-interactive-bg-hover, #f1f3f6);\n color: var(--dsw-alias-label-primary, #273142);\n}\n\n.-cerbur-clutch-dsh-worktree-gitFolderIcon {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n color: var(--dsw-alias-label-secondary, #6f7887);\n}\n\n.-cerbur-clutch-dsh-worktree-gitFolderIcon > svg {\n width: 16px;\n height: 16px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitFolderName {\n min-width: max-content;\n overflow: visible;\n text-overflow: clip;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitList button,\n.-cerbur-clutch-dsh-worktree-gitChangedFileList button {\n display: block;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitList button {\n display: grid;\n width: 100%;\n grid-template-columns: 15px minmax(0, 1fr);\n padding: 9px 8px;\n}\n\n/* Without the multi-select marks a row has a single column, so the subject and meta align with it. */\n.-cerbur-clutch-dsh-worktree-gitCommitList[data-dashboard-git-commit-multiselect='off'] button {\n grid-template-columns: minmax(0, 1fr);\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitList[data-dashboard-git-commit-multiselect='off'] .-cerbur-clutch-dsh-worktree-gitCommitSubject,\n.-cerbur-clutch-dsh-worktree-gitCommitList[data-dashboard-git-commit-multiselect='off'] .-cerbur-clutch-dsh-worktree-gitCommitMeta {\n grid-column: 1;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitSelectionMark {\n grid-row: 1 / span 2;\n color: var(--dsw-alias-state-business-primary, #467bc8);\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitList button:hover,\n.-cerbur-clutch-dsh-worktree-gitCommitList button[aria-selected='true'],\n.-cerbur-clutch-dsh-worktree-gitChangedFileList button:hover,\n.-cerbur-clutch-dsh-worktree-gitChangedFileList button[aria-selected='true'] {\n background: var(--dsw-alias-interactive-bg-hover, #f1f3f6);\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitList button[aria-selected='true'] {\n box-shadow: inset 2px 0 var(--dsw-alias-state-business-primary, #467bc8);\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitList button[data-dashboard-git-commit-kind='working-tree'] {\n background: var(--dsw-alias-state-warn-tertiary, #f8f5ed);\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitList button[data-dashboard-git-commit-kind='working-tree'][aria-selected='true'] {\n box-shadow: inset 2px 0 var(--dsw-alias-state-warn-primary, #b18435);\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitSubject {\n grid-column: 2;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitMeta {\n grid-column: 2;\n display: flex;\n gap: 7px;\n margin-top: 4px;\n overflow: hidden;\n color: var(--dsw-alias-label-secondary, #7c8594);\n font-size: 10px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitMeta span,\n.-cerbur-clutch-dsh-worktree-gitCommitMeta time {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitMeta time {\n margin-left: auto;\n}\n\n.-cerbur-clutch-dsh-worktree-gitCommitWorkingTree {\n color: var(--dsw-alias-state-warn-label, #8a6728);\n font-weight: 620;\n}\n\n.-cerbur-clutch-dsh-worktree-gitChangedFileList button {\n display: flex;\n width: max-content;\n min-width: 100%;\n box-sizing: border-box;\n align-items: flex-start;\n gap: 7px;\n padding: 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitFileIcon {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n color: var(--dsw-alias-label-secondary, #6f7887);\n}\n\n.-cerbur-clutch-dsh-worktree-gitFileIconGlyph {\n width: 16px;\n height: 16px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitFilePath {\n min-width: max-content;\n flex: 0 0 auto;\n overflow: visible;\n text-overflow: clip;\n white-space: nowrap;\n font-family: ui-monospace, SFMono-Regular, Consolas, monospace;\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitFilePath[data-status='added'] {\n color: var(--dsw-alias-state-success-primary, #23845f);\n}\n\n.-cerbur-clutch-dsh-worktree-gitFilePath[data-status='deleted'] {\n color: var(--dsw-alias-state-error-secondary, #bd5d55);\n}\n\n.-cerbur-clutch-dsh-worktree-gitFilePath[data-status='modified'],\n.-cerbur-clutch-dsh-worktree-gitFilePath[data-status='renamed'],\n.-cerbur-clutch-dsh-worktree-gitFilePath[data-status='copied'],\n.-cerbur-clutch-dsh-worktree-gitFilePath[data-status='type-changed'] {\n color: var(--dsw-alias-state-business-primary, #467bc8);\n}\n\n.-cerbur-clutch-dsh-worktree-gitFileContributors {\n flex: none;\n max-width: 9em;\n overflow: hidden;\n color: var(--dsw-alias-label-tertiary, #65758d);\n font-size: 9px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-gitLineStats {\n display: inline-flex;\n flex: none;\n gap: 6px;\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n\n.-cerbur-clutch-dsh-worktree-gitChangedFileList .-cerbur-clutch-dsh-worktree-gitLineStats {\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitLineAdded {\n color: var(--dsw-alias-state-success-primary, #23845f);\n font-weight: 620;\n}\n\n.-cerbur-clutch-dsh-worktree-gitLineRemoved {\n color: var(--dsw-alias-state-error-secondary, #bd5d55);\n font-weight: 620;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffContainer {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n overflow: hidden;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffToolbar {\n display: flex;\n flex: none;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 6px 12px;\n border-bottom: 1px solid var(--dsw-alias-border-l3, #edf0f4);\n background: var(--dsw-alias-bg-base, #ffffff);\n color: var(--dsw-alias-label-secondary, #6f7887);\n font-size: 11px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffPath {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: ui-monospace, SFMono-Regular, Consolas, monospace;\n color: var(--dsw-alias-label-primary, #263342);\n font-weight: 560;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffOpenInSidebar {\n display: inline-flex;\n flex: none;\n align-items: center;\n gap: 5px;\n padding: 3px 8px;\n border: 1px solid var(--dsw-alias-border-l3, #dfe3ea);\n border-radius: 4px;\n background: var(--dsw-alias-bg-base, #ffffff);\n color: var(--dsw-alias-label-secondary, #6f7887);\n font-size: 11px;\n line-height: 16px;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n/* The square 16px arrow keeps its aspect ratio; pin the box so it centers on the label. */\n.-cerbur-clutch-dsh-worktree-gitDiffOpenIcon {\n flex: none;\n width: 14px;\n height: 14px;\n color: var(--dsw-alias-label-tertiary, #8a94a3);\n transition: color 0.15s ease;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffOpenInSidebar:hover {\n background: var(--dsw-alias-interactive-bg-hover, #f1f3f6);\n color: var(--dsw-alias-label-primary, #263342);\n border-color: var(--dsw-alias-border-l2, #cbd2dc);\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffOpenInSidebar:hover .-cerbur-clutch-dsh-worktree-gitDiffOpenIcon {\n color: var(--dsw-alias-label-primary, #263342);\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiff {\n display: block;\n flex: 1 1 auto;\n min-width: 0;\n min-height: 0;\n overflow: auto;\n padding: 7px 0 12px;\n background: var(--dsw-alias-markdown-code-block, #fafbfc);\n color: var(--dsw-alias-label-primary, #263342);\n font: 11px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffSegment {\n margin-bottom: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffSegmentHeader {\n padding: 5px 12px;\n border-bottom: 1px solid var(--dsw-alias-border-l3, #e5e8ef);\n background: var(--dsw-alias-interactive-bg-hover, #f1f3f6);\n color: var(--dsw-alias-label-secondary, #6f7887);\n font-size: 10px;\n font-weight: 620;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffSegmentHeader code {\n color: var(--dsw-alias-label-primary, #273142);\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffHunk {\n margin-bottom: 10px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffHunkHeader {\n padding: 3px 12px;\n background: var(--dsw-alias-markdown-code-block-banner, #edf3fb);\n color: var(--dsw-alias-state-business-primary, #4a70a1);\n box-shadow: inset 0 1px 0 var(--dsw-alias-border-l1, rgba(0, 0, 0, 0.04)), inset 0 -1px 0 var(--dsw-alias-border-l1, rgba(0, 0, 0, 0.04));\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffLine {\n display: grid;\n grid-template-columns: 44px 44px minmax(0, 1fr);\n min-width: max-content;\n padding-right: 12px;\n white-space: pre;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffLineadd {\n background: color-mix(\n in srgb,\n var(--dsw-alias-state-success-primary, #23845f) 18%,\n var(--dsw-alias-markdown-code-block, #fafbfc)\n );\n box-shadow: inset 2px 0 var(--dsw-alias-state-success-primary, #23845f);\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffLinedelete {\n background: color-mix(\n in srgb,\n var(--dsw-alias-state-error-secondary, #bd5d55) 18%,\n var(--dsw-alias-markdown-code-block, #fafbfc)\n );\n box-shadow: inset 2px 0 var(--dsw-alias-state-error-secondary, #bd5d55);\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffLineNumber {\n padding-right: 8px;\n color: var(--dsw-alias-label-tertiary, #9aa3af);\n text-align: right;\n user-select: none;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffLine code {\n min-width: 0;\n color: inherit;\n}\n\n.-cerbur-clutch-dsh-worktree-gitSrOnly {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffEmpty,\n.-cerbur-clutch-dsh-worktree-gitDiffMessage,\n.-cerbur-clutch-dsh-worktree-gitEmpty,\n.-cerbur-clutch-dsh-worktree-gitLoading,\n.-cerbur-clutch-dsh-worktree-gitUnavailable,\n.-cerbur-clutch-dsh-worktree-gitError {\n padding: 24px 16px;\n color: var(--dsw-alias-label-secondary, #727d8d);\n font-size: 12px;\n text-align: center;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffMessage,\n.-cerbur-clutch-dsh-worktree-gitUnavailable {\n min-height: 150px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitUnavailable strong {\n display: block;\n margin-bottom: 7px;\n color: var(--dsw-alias-label-primary, #273142);\n font-size: 14px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitUnavailable p {\n max-width: 500px;\n margin: 0 auto;\n line-height: 1.7;\n}\n\n.-cerbur-clutch-dsh-worktree-gitError {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n padding: 9px 12px;\n color: var(--dsw-alias-state-error-primary, #ae5c4c);\n text-align: left;\n}\n\n.-cerbur-clutch-dsh-worktree-gitError p {\n margin: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-gitError button {\n flex: none;\n border: 1px solid currentColor;\n border-radius: 5px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n font-size: 11px;\n padding: 3px 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffFolded {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 10px 12px;\n border-top: 1px dashed var(--dsw-alias-border-l3, #dfe3ea);\n background: var(--dsw-alias-bg-base, #fff);\n color: var(--dsw-alias-label-secondary, #6f7887);\n font-size: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-gitDiffShowAll {\n padding: 2px 8px;\n border: 1px solid var(--dsw-alias-border-l3, #dfe3ea);\n border-radius: 6px;\n background: transparent;\n color: var(--dsw-alias-label-primary, #273142);\n cursor: pointer;\n font: inherit;\n}\n\n.-cerbur-clutch-dsh-worktree-gitRawDiff {\n display: block;\n flex: 1 1 auto;\n min-height: 0;\n max-height: none;\n overflow: auto;\n padding: 12px;\n margin: 0;\n white-space: pre;\n background: var(--dsw-alias-markdown-code-block, #fafbfc);\n color: var(--dsw-alias-label-primary, #263342);\n font: 11px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;\n}\n\n@container (min-width: 901px) {\n .-cerbur-clutch-dsh-worktree-gitColumns {\n /* Two stacked panes need more vertical room than three side-by-side panes. */\n --git-columns-height: clamp(440px, calc(100vh - 300px), 720px);\n --git-columns-height: clamp(440px, calc(100dvh - 300px), 720px);\n }\n}\n\n@container (max-width: 900px) {\n /* Narrow layout keeps the two-row arrangement: commits and changed files side by\n side on the first row, with the summary diff across the second row. Both\n dividers move with the panes, so either axis stays adjustable. */\n .-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-pane='commits'] {\n grid-area: 1 / 1;\n }\n .-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-splitter='columns'] {\n grid-area: 1 / 2;\n }\n .-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-pane='changed-files'] {\n grid-area: 1 / 3;\n }\n .-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-splitter='rows'] {\n grid-area: 2 / 1 / 3 / -1;\n }\n .-cerbur-clutch-dsh-worktree-gitColumns > [data-dashboard-git-pane='diff'] {\n grid-area: 3 / 1 / -1 / -1;\n }\n}\n\n@container (max-width: 520px) {\n .-cerbur-clutch-dsh-worktree-gitPanelHeader {\n flex-direction: column;\n gap: 10px;\n }\n .-cerbur-clutch-dsh-worktree-gitRefresh {\n align-self: flex-end;\n }\n .-cerbur-clutch-dsh-worktree-gitColumns {\n display: block;\n height: auto;\n min-height: 0;\n }\n .-cerbur-clutch-dsh-worktree-gitColumnSplitter {\n display: none;\n }\n .-cerbur-clutch-dsh-worktree-gitColumn {\n height: clamp(260px, calc(100vh - 360px), 360px);\n height: clamp(260px, calc(100dvh - 360px), 360px);\n min-height: 260px;\n border-bottom: 1px solid var(--dsw-alias-border-l3, #e5e8ef);\n }\n .-cerbur-clutch-dsh-worktree-gitColumn:has(> .-cerbur-clutch-dsh-worktree-gitEmpty),\n .-cerbur-clutch-dsh-worktree-gitColumn:has(.-cerbur-clutch-dsh-worktree-gitDiffEmpty) { height: auto; min-height: 100px; }\n .-cerbur-clutch-dsh-worktree-gitColumns > .-cerbur-clutch-dsh-worktree-gitColumn:last-child {\n border-bottom: 0;\n }\n}\n";
|
|
10577
10551
|
const styleId$2 = "@cerbur/clutch-dsh-worktree/worktree-git.css";
|
|
10578
10552
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/worktree-git.css\"]") === null) {
|
|
@@ -12749,7 +12723,7 @@ window.__ModuleLoader__.load({
|
|
|
12749
12723
|
});
|
|
12750
12724
|
}
|
|
12751
12725
|
//#endregion
|
|
12752
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/Documents/Code/clutch-dsh/packages/clutch-dsh-worktree/.agents/clutch-worktrees/
|
|
12726
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/Documents/Code/clutch-dsh/packages/clutch-dsh-worktree/.agents/clutch-worktrees/wt_3fc76dafedb7/packages/clutch-dsh-worktree/src/client/settings/settings.css.mjs
|
|
12753
12727
|
const css$1 = ".-cerbur-clutch-dsh-worktree-settings {\n display: flex;\n flex-direction: column;\n gap: 12px;\n width: 100%;\n min-width: 0;\n max-width: 720px;\n color: var(--dsw-alias-label-primary);\n font-size: var(--dsh-content-font-size, 14px);\n line-height: calc(var(--dsh-content-font-size, 14px) + 8px);\n}\n\n[data-worktree-settings-nav-icon] > svg:not(.-cerbur-clutch-dsh-worktree-settingsNavIcon) {\n display: none;\n}\n\n.-cerbur-clutch-dsh-worktree-settingsNavIcon {\n order: -1;\n flex: 0 0 auto;\n width: 16px;\n height: 16px;\n}\n\n.-cerbur-clutch-dsh-worktree-toolSettings {\n display: flex;\n flex-direction: column;\n gap: 20px;\n min-width: 0;\n padding: 20px;\n border: 0.5px solid var(--dsw-alias-settings-card-stroke, var(--dsw-alias-border-l4));\n border-radius: var(--dsw-radius-xl, 16px);\n background: var(--dsw-alias-settings-card-fill, var(--dsw-alias-bg-layer-2));\n}\n\n.-cerbur-clutch-dsh-worktree-toolHeader,\n.-cerbur-clutch-dsh-worktree-toolRow {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 24px;\n}\n\n.-cerbur-clutch-dsh-worktree-toolHeader > div,\n.-cerbur-clutch-dsh-worktree-toolRow > div {\n min-width: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-toolTitle {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n margin-bottom: 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-toolHeader h3 {\n margin: 0;\n font-size: calc(var(--dsh-content-font-size, 14px) + 2px);\n font-weight: 600;\n}\n\n.-cerbur-clutch-dsh-worktree-toolHeader p,\n.-cerbur-clutch-dsh-worktree-toolOptionsHeading p,\n.-cerbur-clutch-dsh-worktree-toolRow p {\n margin: 0;\n color: var(--dsw-alias-label-tertiary);\n font-size: var(--dsh-content-font-size-secondary, calc(var(--dsh-content-font-size, 14px) - 1px));\n line-height: 1.5;\n overflow-wrap: anywhere;\n}\n\n.-cerbur-clutch-dsh-worktree-toolOptions {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding-top: 20px;\n border-top: 0.5px solid var(--dsw-alias-settings-card-stroke, var(--dsw-alias-border-l4));\n}\n\n.-cerbur-clutch-dsh-worktree-toolOptionsHeading h4 {\n margin: 0 0 6px;\n color: var(--dsw-alias-label-secondary);\n font-size: var(--dsh-content-font-size, 14px);\n font-weight: 500;\n}\n\n.-cerbur-clutch-dsh-worktree-toolList {\n padding-left: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-toolRow {\n padding: 12px 0;\n}\n\n.-cerbur-clutch-dsh-worktree-toolRow + .-cerbur-clutch-dsh-worktree-toolRow {\n border-top: 0.5px solid var(--dsw-alias-border-l4);\n}\n\n.-cerbur-clutch-dsh-worktree-toolRow h5 {\n margin: 0 0 6px;\n font-size: var(--dsh-content-font-size, 14px);\n font-weight: 500;\n}\n\n.-cerbur-clutch-dsh-worktree-settingsTitle {\n margin: 0;\n font-size: calc(var(--dsh-content-font-size, 14px) + 2px);\n line-height: calc(var(--dsh-content-font-size, 14px) + 10px);\n font-weight: 500;\n}\n\n.-cerbur-clutch-dsh-worktree-settingsTabs {\n width: 100%;\n box-sizing: border-box;\n}\n\n/* Native controls keep their palette and keyboard behavior; text and control\n height follow the body's font-size preference even on older DSH themes. */\n.-cerbur-clutch-dsh-worktree-settings .-cerbur-clutch-dsh-worktree-settingsTabs [role='tab'] {\n height: auto;\n min-height: 34px;\n padding-block: 6px;\n font-size: inherit;\n line-height: calc(var(--dsh-content-font-size, 14px) + 6px);\n white-space: normal;\n overflow-wrap: anywhere;\n}\n\n.-cerbur-clutch-dsh-worktree-settingsPanel,\n.-cerbur-clutch-dsh-worktree-issueList {\n display: flex;\n flex-direction: column;\n min-width: 0;\n gap: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-issueList {\n gap: 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-settingsDescription,\n.-cerbur-clutch-dsh-worktree-settingsHint,\n.-cerbur-clutch-dsh-worktree-settingsEmpty,\n.-cerbur-clutch-dsh-worktree-issueMessage {\n margin: 0;\n overflow-wrap: anywhere;\n}\n\n.-cerbur-clutch-dsh-worktree-settingsDescription,\n.-cerbur-clutch-dsh-worktree-settingsHint,\n.-cerbur-clutch-dsh-worktree-settingsEmpty {\n color: var(--dsw-alias-label-tertiary);\n}\n\n.-cerbur-clutch-dsh-worktree-settingsHint {\n font-size: var(--dsh-content-font-size-secondary, calc(var(--dsh-content-font-size, 14px) - 1px));\n line-height: 1.5;\n}\n\n.-cerbur-clutch-dsh-worktree-settingsToolbar {\n display: flex;\n align-items: flex-start;\n flex-wrap: wrap;\n gap: 12px;\n padding: 16px 0;\n border-bottom: 0.5px solid var(--dsw-alias-border-l2);\n}\n\n.-cerbur-clutch-dsh-worktree-settingsToolbar > .-cerbur-clutch-dsh-worktree-settingsHint {\n flex: 1 1 240px;\n min-width: 0;\n}\n\n.-cerbur-clutch-dsh-worktree-settingsEmpty {\n padding-block: 16px;\n}\n\n.-cerbur-clutch-dsh-worktree-issue {\n display: flex;\n flex-direction: column;\n gap: 10px;\n min-width: 0;\n padding: 12px 14px;\n border: 0.5px solid var(--dsw-alias-settings-card-stroke, var(--dsw-alias-border-l4));\n border-radius: var(--dsw-radius-xl, 16px);\n background: var(--dsw-alias-settings-card-fill, var(--dsw-alias-bg-layer-2));\n}\n\n.-cerbur-clutch-dsh-worktree-issueHeader {\n display: flex;\n align-items: baseline;\n flex-wrap: wrap;\n gap: 6px 10px;\n}\n\n.-cerbur-clutch-dsh-worktree-issueTitle {\n flex: 1 1 240px;\n min-width: 0;\n margin: 0;\n font-size: inherit;\n line-height: inherit;\n font-weight: 500;\n overflow-wrap: anywhere;\n}\n\n.-cerbur-clutch-dsh-worktree-settings .-cerbur-clutch-dsh-worktree-issueStatus,\n.-cerbur-clutch-dsh-worktree-settings .-cerbur-clutch-dsh-worktree-settingsAction {\n font-size: calc(var(--dsh-content-font-size, 14px) - 2px);\n line-height: calc(var(--dsh-content-font-size, 14px) + 4px);\n}\n\n.-cerbur-clutch-dsh-worktree-settings .-cerbur-clutch-dsh-worktree-settingsAction {\n flex: none;\n height: auto;\n min-height: 28px;\n padding-block: 4px;\n font-family: inherit;\n white-space: normal;\n overflow-wrap: anywhere;\n max-width: 100%;\n}\n\n.-cerbur-clutch-dsh-worktree-issueActions {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.-cerbur-clutch-dsh-worktree-issueDiagnostics {\n min-width: 0;\n padding-top: 10px;\n border-top: 0.5px solid var(--dsw-alias-border-l2);\n}\n\n.-cerbur-clutch-dsh-worktree-issueDiagnostics summary {\n width: fit-content;\n max-width: 100%;\n color: var(--dsw-alias-label-secondary);\n font-size: var(--dsh-content-font-size-secondary, calc(var(--dsh-content-font-size, 14px) - 1px));\n line-height: 1.5;\n cursor: pointer;\n overflow-wrap: anywhere;\n}\n\n.-cerbur-clutch-dsh-worktree-issueDiagnostics summary:focus-visible,\n.-cerbur-clutch-dsh-worktree-settings .-cerbur-clutch-dsh-worktree-settingsAction:focus-visible {\n outline: var(--dsw-focus-ring-width, 2px) solid\n var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));\n outline-offset: 2px;\n border-radius: var(--dsw-radius-xs, 4px);\n}\n\n.-cerbur-clutch-dsh-worktree-issueDiagnostics pre {\n box-sizing: border-box;\n max-width: 100%;\n max-height: 320px;\n overflow: auto;\n margin: 10px 0 0;\n padding: 10px 12px;\n border-radius: var(--dsw-radius-md, 12px);\n background: var(--dsw-alias-bg-module-platform);\n color: var(--dsw-alias-label-secondary);\n font-family: var(--ds-font-family-code, monospace);\n font-size: var(--dsh-content-font-size-secondary, calc(var(--dsh-content-font-size, 14px) - 1px));\n line-height: 1.5;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n user-select: text;\n}\n";
|
|
12754
12728
|
const styleId$1 = "@cerbur/clutch-dsh-worktree/settings.css";
|
|
12755
12729
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/settings.css\"]") === null) {
|
|
@@ -14249,10 +14223,10 @@ window.__ModuleLoader__.load({
|
|
|
14249
14223
|
//#endregion
|
|
14250
14224
|
//#region lib/client/dashboard/dashboard-sessions.js
|
|
14251
14225
|
/** Join retained snapshots without reading, mutating, or applying Sidebar search. */
|
|
14252
|
-
function dashboardSessionIds(record, sessions, bindings, archivedSessionIds, orderedIds = [], workspaceSessionIds = []) {
|
|
14226
|
+
function dashboardSessionIds(record, sessions, bindings, archivedSessionIds, orderedIds = [], workspaceSessionIds = [], knownSessionIds) {
|
|
14253
14227
|
if (isMainWorktreeId$1(record.worktreeId)) {
|
|
14254
14228
|
const boundSessionIds = new Set(bindings.filter((binding) => binding.workspaceId === record.workspaceId && binding.status !== "detached").map((binding) => binding.sessionId));
|
|
14255
|
-
const visible = filterVisibleSessionIds(filterArchivedSessionIds(workspaceSessionIds.filter((sessionId) => !boundSessionIds.has(sessionId)), archivedSessionIds), sessions);
|
|
14229
|
+
const visible = filterVisibleSessionIds(filterArchivedSessionIds(workspaceSessionIds.filter((sessionId) => !boundSessionIds.has(sessionId) && (knownSessionIds === void 0 || knownSessionIds.includes(sessionId))), archivedSessionIds), sessions);
|
|
14256
14230
|
const visibleIds = new Set(visible);
|
|
14257
14231
|
return [.../* @__PURE__ */ new Set([...orderedIds, ...visible])].filter((id) => visibleIds.has(id));
|
|
14258
14232
|
}
|
|
@@ -14402,7 +14376,7 @@ window.__ModuleLoader__.load({
|
|
|
14402
14376
|
}
|
|
14403
14377
|
//#endregion
|
|
14404
14378
|
//#region lib/client/WorktreeSurface.js
|
|
14405
|
-
/**
|
|
14379
|
+
/** Retains shared state/actions and portals navigation into the workspace slot. */
|
|
14406
14380
|
function WorktreeSurface(inputProps) {
|
|
14407
14381
|
const [internalDashboard, setInternalDashboard] = (0, react.useState)();
|
|
14408
14382
|
const pendingDashboard = (0, react.useRef)();
|
|
@@ -14477,7 +14451,7 @@ window.__ModuleLoader__.load({
|
|
|
14477
14451
|
const openDashboard = (0, react.useCallback)((record) => {
|
|
14478
14452
|
const workspace = source.workspaces.items.find((candidate) => candidate.workspaceId === record.workspaceId);
|
|
14479
14453
|
const view = read.viewByWorkspace.get(record.workspaceId);
|
|
14480
|
-
const navigation = prepareDashboardNavigation(record, dashboardSessionIds(record, source.sessions, view?.bindings ?? [], source.archivedSessionIds, isMainWorktreeId$1(record.worktreeId) ? ordering.orderedSessionIdsByAccount.get(`main:${record.workspaceId}`) : ordering.orderedSessionIdsByAccount.get(`worktree:${record.worktreeId}`), workspace === void 0 ? [] : workspaceSessionIds(source.workspaces, workspace.workspaceId, source.sessions.ids)), source.currentSessionId, source.sessions.phase ?? "ready");
|
|
14454
|
+
const navigation = prepareDashboardNavigation(record, dashboardSessionIds(record, source.sessions, view?.bindings ?? [], source.archivedSessionIds, isMainWorktreeId$1(record.worktreeId) ? ordering.orderedSessionIdsByAccount.get(`main:${record.workspaceId}`) : ordering.orderedSessionIdsByAccount.get(`worktree:${record.worktreeId}`), workspace === void 0 ? [] : workspaceSessionIds(source.workspaces, workspace.workspaceId, source.sessions.ids), view?.knownSessionIds ?? []), source.currentSessionId, source.sessions.phase ?? "ready");
|
|
14481
14455
|
if (navigation.waitForSessionList === true) {
|
|
14482
14456
|
pendingDashboard.current = void 0;
|
|
14483
14457
|
pendingDashboardRecord.current = record;
|
|
@@ -14614,30 +14588,18 @@ window.__ModuleLoader__.load({
|
|
|
14614
14588
|
dashboardWorkspace
|
|
14615
14589
|
]);
|
|
14616
14590
|
if (source.mode !== "worktree") return null;
|
|
14617
|
-
const {
|
|
14591
|
+
const { collapsed } = source;
|
|
14618
14592
|
const { t } = props;
|
|
14619
14593
|
return (0, react_jsx_runtime.jsxs)(NotificationProvider, {
|
|
14620
14594
|
t,
|
|
14621
14595
|
openSettings: props.openErrorSettings,
|
|
14622
14596
|
children: [
|
|
14623
|
-
(0, react_jsx_runtime.jsxs)("aside", {
|
|
14624
|
-
ref,
|
|
14597
|
+
props.sidebarSeat && (0, react_dom.createPortal)((0, react_jsx_runtime.jsxs)("aside", {
|
|
14625
14598
|
className: worktree_css_default.surface,
|
|
14626
14599
|
"data-worktree-surface": true,
|
|
14627
14600
|
"data-collapsed": collapsed || void 0,
|
|
14628
|
-
"data-native-sidebar-covered": source.nativeCovered || void 0,
|
|
14629
14601
|
"aria-hidden": collapsed || void 0,
|
|
14630
14602
|
"aria-label": t("mode.navigation"),
|
|
14631
|
-
style: {
|
|
14632
|
-
width: `${width}px`,
|
|
14633
|
-
...bounds.ready ? {
|
|
14634
|
-
top: `${bounds.top}px`,
|
|
14635
|
-
height: `${bounds.height}px`
|
|
14636
|
-
} : {
|
|
14637
|
-
height: "0px",
|
|
14638
|
-
visibility: "hidden"
|
|
14639
|
-
}
|
|
14640
|
-
},
|
|
14641
14603
|
children: [
|
|
14642
14604
|
(0, react_jsx_runtime.jsxs)("div", {
|
|
14643
14605
|
className: worktree_css_default.wideContent,
|
|
@@ -14685,11 +14647,11 @@ window.__ModuleLoader__.load({
|
|
|
14685
14647
|
session
|
|
14686
14648
|
})
|
|
14687
14649
|
]
|
|
14688
|
-
}),
|
|
14650
|
+
}), props.sidebarSeat.element),
|
|
14689
14651
|
dashboard !== void 0 && dashboardRecord === void 0 && dashboard.sessionId === source.currentSessionId && source.workspaceIds.includes(dashboard.workspaceId) && targetView === void 0 && (0, react_jsx_runtime.jsx)(DashboardRequest, {
|
|
14690
14652
|
context: targetWorkspace === void 0 ? dashboard.workspaceId : targetWorkspace.title + " · " + targetWorkspace.path,
|
|
14691
14653
|
t,
|
|
14692
|
-
error: read.readState.error ??
|
|
14654
|
+
error: read.readState.error ?? read.readState.targetErrors?.[dashboard.workspaceId],
|
|
14693
14655
|
onClose: closeDashboard,
|
|
14694
14656
|
onRetry: () => {
|
|
14695
14657
|
read.refresh({
|
|
@@ -14763,7 +14725,7 @@ window.__ModuleLoader__.load({
|
|
|
14763
14725
|
workspaceTitle: dashboardWorkspace?.title ?? "",
|
|
14764
14726
|
sessions: source.sessions,
|
|
14765
14727
|
sessionPresentations: source.sessionPresentations,
|
|
14766
|
-
sessionIds: dashboardSessionIds(dashboardRecord, source.sessions, dashboardView?.bindings ?? [], source.archivedSessionIds, isMainWorktreeId$1(dashboardRecord.worktreeId) ? ordering.orderedSessionIdsByAccount.get(`main:${dashboardRecord.workspaceId}`) : ordering.orderedSessionIdsByAccount.get(`worktree:${dashboardRecord.worktreeId}`), dashboardWorkspace === void 0 ? [] : workspaceSessionIds(source.workspaces, dashboardWorkspace.workspaceId, source.sessions.ids)),
|
|
14728
|
+
sessionIds: dashboardSessionIds(dashboardRecord, source.sessions, dashboardView?.bindings ?? [], source.archivedSessionIds, isMainWorktreeId$1(dashboardRecord.worktreeId) ? ordering.orderedSessionIdsByAccount.get(`main:${dashboardRecord.workspaceId}`) : ordering.orderedSessionIdsByAccount.get(`worktree:${dashboardRecord.worktreeId}`), dashboardWorkspace === void 0 ? [] : workspaceSessionIds(source.workspaces, dashboardWorkspace.workspaceId, source.sessions.ids), dashboardView?.knownSessionIds ?? []),
|
|
14767
14729
|
actionPending: mutation.actionPending,
|
|
14768
14730
|
onSyncBaseline: props.manager?.syncWorktreeBaseline !== void 0 && dashboardManagedRecord !== void 0 && dashboardCanCreate && (dashboardRecord.health === void 0 || dashboardRecord.health === "ready") ? async (strategy, baseBranch, requestId) => {
|
|
14769
14731
|
let completed = false;
|
|
@@ -14823,9 +14785,45 @@ window.__ModuleLoader__.load({
|
|
|
14823
14785
|
}
|
|
14824
14786
|
//#endregion
|
|
14825
14787
|
//#region lib/client/overlay/WorktreeOverlay.js
|
|
14826
|
-
/**
|
|
14788
|
+
/** Keep view state and center overlays alive while the workspace slot changes occupants. */
|
|
14827
14789
|
function WorktreeOverlay(props) {
|
|
14828
|
-
|
|
14790
|
+
const [sidebarSeat, setSidebarSeat] = (0, react.useState)();
|
|
14791
|
+
const active = props.useStore((state) => state.viewMode) === "worktree" && props.available && props.manager !== void 0;
|
|
14792
|
+
(0, react.useLayoutEffect)(() => {
|
|
14793
|
+
if (!active) return;
|
|
14794
|
+
return props.mountWorkspaceSidebar(setSidebarSeat);
|
|
14795
|
+
}, [active, props.mountWorkspaceSidebar]);
|
|
14796
|
+
return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(WorktreeHeroContext, { ...props }), (0, react_jsx_runtime.jsx)(WorktreeSurface, {
|
|
14797
|
+
...props,
|
|
14798
|
+
sidebarSeat
|
|
14799
|
+
})] });
|
|
14800
|
+
}
|
|
14801
|
+
//#endregion
|
|
14802
|
+
//#region lib/client/view/sidebar-workspace-slot.js
|
|
14803
|
+
/** The shell owns placement and fold state; no native DOM discovery is needed. */
|
|
14804
|
+
function WorktreeWorkspaceSeat({ wide, publish }) {
|
|
14805
|
+
const ref = (0, react.useRef)(null);
|
|
14806
|
+
(0, react.useLayoutEffect)(() => {
|
|
14807
|
+
const element = ref.current;
|
|
14808
|
+
if (element) publish({
|
|
14809
|
+
element,
|
|
14810
|
+
wide
|
|
14811
|
+
});
|
|
14812
|
+
return () => publish(void 0);
|
|
14813
|
+
}, [wide, publish]);
|
|
14814
|
+
return (0, react_jsx_runtime.jsx)("div", {
|
|
14815
|
+
ref,
|
|
14816
|
+
className: worktree_css_default.workspaceSeat,
|
|
14817
|
+
"data-worktree-workspace-seat": true
|
|
14818
|
+
});
|
|
14819
|
+
}
|
|
14820
|
+
/** Shadow only the browsing region, preserving the native registration and its children. */
|
|
14821
|
+
function workspaceSidebarMount(slots) {
|
|
14822
|
+
return (publish) => slots.inject("sidebar.workspaces", () => slots.register({
|
|
14823
|
+
name: "sidebar.workspaces",
|
|
14824
|
+
priority: -10,
|
|
14825
|
+
inject: () => ({ publish })
|
|
14826
|
+
}, WorktreeWorkspaceSeat));
|
|
14829
14827
|
}
|
|
14830
14828
|
//#endregion
|
|
14831
14829
|
//#region lib/client/settings/WorktreeSettings.js
|
|
@@ -15210,7 +15208,7 @@ window.__ModuleLoader__.load({
|
|
|
15210
15208
|
}, "clutch-dsh-worktree: steer activity");
|
|
15211
15209
|
}
|
|
15212
15210
|
//#endregion
|
|
15213
|
-
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/Documents/Code/clutch-dsh/packages/clutch-dsh-worktree/.agents/clutch-worktrees/
|
|
15211
|
+
//#region \0clutch-dsh-worktree-css:/Users/yuancheng/Documents/Code/clutch-dsh/packages/clutch-dsh-worktree/.agents/clutch-worktrees/wt_3fc76dafedb7/packages/clutch-dsh-worktree/src/client/steer/steer.css.mjs
|
|
15214
15212
|
const css = ".-cerbur-clutch-dsh-worktree-strip {\n box-sizing: border-box;\n flex: none;\n min-width: 0;\n width: calc(100% - var(--dsh-composer-side-clearance, 16px) - var(--dsh-composer-side-clearance, 16px));\n max-width: var(--dsh-composer-card-max-width, 760px);\n margin: 0 auto;\n padding: 8px 12px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 12px;\n background: var(--dsw-alias-bg-layer-1);\n color: var(--dsw-alias-label-secondary);\n font-size: 12px;\n}\n.-cerbur-clutch-dsh-worktree-title { font-weight: 600; margin-bottom: 4px; }\n.-cerbur-clutch-dsh-worktree-items { max-height: 200px; overflow: auto; }\n.-cerbur-clutch-dsh-worktree-item summary { display: flex; align-items: baseline; gap: 8px; cursor: pointer; padding: 4px 0; }\n.-cerbur-clutch-dsh-worktree-item summary::before { content: '›'; flex: none; }\n.-cerbur-clutch-dsh-worktree-item[open] summary::before { transform: rotate(90deg); }\n.-cerbur-clutch-dsh-worktree-status { flex: none; }\n.-cerbur-clutch-dsh-worktree-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.-cerbur-clutch-dsh-worktree-body { padding: 4px 0 8px; overflow-wrap: anywhere; }\n.-cerbur-clutch-dsh-worktree-body p { margin: 6px 0; white-space: pre-wrap; }\n.-cerbur-clutch-dsh-worktree-sender { font-family: monospace; }\n";
|
|
15215
15213
|
const styleId = "@cerbur/clutch-dsh-worktree/steer.css";
|
|
15216
15214
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/steer.css\"]") === null) {
|
|
@@ -15659,6 +15657,9 @@ window.__ModuleLoader__.load({
|
|
|
15659
15657
|
sync([...bindings.filter((current) => current.sessionId !== binding.sessionId), binding]);
|
|
15660
15658
|
},
|
|
15661
15659
|
sync,
|
|
15660
|
+
syncWorkspace(workspaceId, nextBindings) {
|
|
15661
|
+
sync([...bindings.filter((binding) => binding.workspaceId !== workspaceId), ...nextBindings.filter((binding) => binding.workspaceId === workspaceId)]);
|
|
15662
|
+
},
|
|
15662
15663
|
removeSession(sessionId) {
|
|
15663
15664
|
sync(bindings.filter((binding) => binding.sessionId !== sessionId));
|
|
15664
15665
|
},
|
|
@@ -16012,11 +16013,18 @@ window.__ModuleLoader__.load({
|
|
|
16012
16013
|
en
|
|
16013
16014
|
}), "clutch-dsh-worktree: locale dictionaries");
|
|
16014
16015
|
const manager = createWorktreeConnectionAdapter(ctx.connection.rpc);
|
|
16015
|
-
const viewReader = createWorktreeViewReader(manager)
|
|
16016
|
+
const viewReader = createWorktreeViewReader(manager, (workspaceId) => {
|
|
16017
|
+
const snapshot = ctx.workspaces.list.getSnapshot();
|
|
16018
|
+
return {
|
|
16019
|
+
sessionIds: snapshot.items.find((item) => item.workspaceId === workspaceId)?.sessionIds ?? [],
|
|
16020
|
+
pending: snapshot.phase !== void 0 && snapshot.phase !== "ready"
|
|
16021
|
+
};
|
|
16022
|
+
});
|
|
16016
16023
|
const restartNotice = new RestartNotice((signal) => manager.probeHost(signal));
|
|
16017
16024
|
const dashboardStore = createSnapshotStore(void 0);
|
|
16018
16025
|
const sessions = ctx.sessions;
|
|
16019
16026
|
const slots = ctx.slots;
|
|
16027
|
+
const mountWorkspaceSidebar = workspaceSidebarMount(slots);
|
|
16020
16028
|
slots.inject("conversation.input.dock", () => slots.register({
|
|
16021
16029
|
name: "conversation.input.dock",
|
|
16022
16030
|
id: "clutch-dsh-worktree-steer",
|
|
@@ -16099,6 +16107,9 @@ window.__ModuleLoader__.load({
|
|
|
16099
16107
|
const syncSessionWorkspaces = (bindings) => {
|
|
16100
16108
|
virtualWorkspaceMembership.sync(bindings);
|
|
16101
16109
|
};
|
|
16110
|
+
const syncWorkspaceSessions = (workspaceId, bindings) => {
|
|
16111
|
+
virtualWorkspaceMembership.syncWorkspace(workspaceId, bindings);
|
|
16112
|
+
};
|
|
16102
16113
|
const forkableSessions = ctx.sessions;
|
|
16103
16114
|
const nativeFork = forkableSessions.fork;
|
|
16104
16115
|
const workspaceBindingReads = /* @__PURE__ */ new Map();
|
|
@@ -16273,6 +16284,7 @@ window.__ModuleLoader__.load({
|
|
|
16273
16284
|
store: viewStore,
|
|
16274
16285
|
locale: WORKTREE_NS,
|
|
16275
16286
|
inject: () => ({
|
|
16287
|
+
mountWorkspaceSidebar,
|
|
16276
16288
|
available: true,
|
|
16277
16289
|
openErrorSettings: () => openWorktreeErrorSettings(ctx.slots),
|
|
16278
16290
|
openResource: (address, options) => {
|
|
@@ -16338,6 +16350,7 @@ window.__ModuleLoader__.load({
|
|
|
16338
16350
|
archiveSession: (sessionId) => ctx.workspaces.archiveSession(sessionId),
|
|
16339
16351
|
ensureSessionWorkspace,
|
|
16340
16352
|
syncSessionWorkspaces,
|
|
16353
|
+
syncWorkspaceSessions,
|
|
16341
16354
|
forkRecovery: forkCoordinator?.recovery,
|
|
16342
16355
|
retryForkSession: forkCoordinator === void 0 ? void 0 : async (key) => {
|
|
16343
16356
|
await forkCoordinator.retry(key);
|