@cerbur/clutch-dsh-worktree 0.1.17 → 0.1.18

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.
Files changed (177) hide show
  1. package/README.md +105 -33
  2. package/README.zh.md +92 -29
  3. package/lib/client/WorktreeSurface.d.ts.map +1 -1
  4. package/lib/client/WorktreeSurface.js +37 -10
  5. package/lib/client/WorktreeSurface.js.map +1 -1
  6. package/lib/client/branch/GitBranchSelector.d.ts +23 -0
  7. package/lib/client/branch/GitBranchSelector.d.ts.map +1 -0
  8. package/lib/client/branch/GitBranchSelector.js +142 -0
  9. package/lib/client/branch/GitBranchSelector.js.map +1 -0
  10. package/lib/client/context/worktree-context-store.d.ts.map +1 -1
  11. package/lib/client/context/worktree-context-store.js +1 -0
  12. package/lib/client/context/worktree-context-store.js.map +1 -1
  13. package/lib/client/context/worktree-context.d.ts +3 -2
  14. package/lib/client/context/worktree-context.d.ts.map +1 -1
  15. package/lib/client/context/worktree-context.js +5 -3
  16. package/lib/client/context/worktree-context.js.map +1 -1
  17. package/lib/client/dashboard/WorktreeDashboard.d.ts +4 -1
  18. package/lib/client/dashboard/WorktreeDashboard.d.ts.map +1 -1
  19. package/lib/client/dashboard/WorktreeDashboard.js +67 -69
  20. package/lib/client/dashboard/WorktreeDashboard.js.map +1 -1
  21. package/lib/client/dashboard/dashboard-selection.d.ts +4 -3
  22. package/lib/client/dashboard/dashboard-selection.d.ts.map +1 -1
  23. package/lib/client/dashboard/dashboard-selection.js +6 -4
  24. package/lib/client/dashboard/dashboard-selection.js.map +1 -1
  25. package/lib/client/dashboard/git/GitChangedFiles.d.ts +2 -1
  26. package/lib/client/dashboard/git/GitChangedFiles.d.ts.map +1 -1
  27. package/lib/client/dashboard/git/GitChangedFiles.js +8 -6
  28. package/lib/client/dashboard/git/GitChangedFiles.js.map +1 -1
  29. package/lib/client/dashboard/git/GitCommitList.d.ts +6 -1
  30. package/lib/client/dashboard/git/GitCommitList.d.ts.map +1 -1
  31. package/lib/client/dashboard/git/GitCommitList.js +34 -29
  32. package/lib/client/dashboard/git/GitCommitList.js.map +1 -1
  33. package/lib/client/dashboard/git/GitCommitStats.d.ts +8 -0
  34. package/lib/client/dashboard/git/GitCommitStats.d.ts.map +1 -0
  35. package/lib/client/dashboard/git/GitCommitStats.js +7 -0
  36. package/lib/client/dashboard/git/GitCommitStats.js.map +1 -0
  37. package/lib/client/dashboard/git/WorktreeGitOverview.d.ts.map +1 -1
  38. package/lib/client/dashboard/git/WorktreeGitOverview.js +2 -1
  39. package/lib/client/dashboard/git/WorktreeGitOverview.js.map +1 -1
  40. package/lib/client/dashboard/git/WorktreeGitPanel.d.ts +1 -1
  41. package/lib/client/dashboard/git/WorktreeGitPanel.d.ts.map +1 -1
  42. package/lib/client/dashboard/git/WorktreeGitPanel.js +28 -9
  43. package/lib/client/dashboard/git/WorktreeGitPanel.js.map +1 -1
  44. package/lib/client/dashboard/git/file-address.d.ts +5 -2
  45. package/lib/client/dashboard/git/file-address.d.ts.map +1 -1
  46. package/lib/client/dashboard/git/file-address.js +50 -7
  47. package/lib/client/dashboard/git/file-address.js.map +1 -1
  48. package/lib/client/dashboard/git/git-facts.js +1 -1
  49. package/lib/client/dashboard/git/git-facts.js.map +1 -1
  50. package/lib/client/dashboard/git/useWorktreeGitState.d.ts +7 -2
  51. package/lib/client/dashboard/git/useWorktreeGitState.d.ts.map +1 -1
  52. package/lib/client/dashboard/git/useWorktreeGitState.js +84 -21
  53. package/lib/client/dashboard/git/useWorktreeGitState.js.map +1 -1
  54. package/lib/client/dsh-icons.d.ts +2 -0
  55. package/lib/client/dsh-icons.d.ts.map +1 -1
  56. package/lib/client/dsh-icons.js +2 -0
  57. package/lib/client/dsh-icons.js.map +1 -1
  58. package/lib/client/locales.d.ts +40 -2
  59. package/lib/client/locales.d.ts.map +1 -1
  60. package/lib/client/locales.js +46 -8
  61. package/lib/client/locales.js.map +1 -1
  62. package/lib/client/select/SearchableSingleSelect.d.ts +44 -0
  63. package/lib/client/select/SearchableSingleSelect.d.ts.map +1 -0
  64. package/lib/client/select/SearchableSingleSelect.js +180 -0
  65. package/lib/client/select/SearchableSingleSelect.js.map +1 -0
  66. package/lib/client/select/WorktreeSelector.d.ts +14 -0
  67. package/lib/client/select/WorktreeSelector.d.ts.map +1 -0
  68. package/lib/client/select/WorktreeSelector.js +11 -0
  69. package/lib/client/select/WorktreeSelector.js.map +1 -0
  70. package/lib/client/surface/actions/useLifecycleActions.js +1 -1
  71. package/lib/client/surface/actions/useLifecycleActions.js.map +1 -1
  72. package/lib/client/surface/actions/useWorktreeRegistration.d.ts +1 -1
  73. package/lib/client/surface/actions/useWorktreeRegistration.d.ts.map +1 -1
  74. package/lib/client/surface/actions/useWorktreeRegistration.js +32 -11
  75. package/lib/client/surface/actions/useWorktreeRegistration.js.map +1 -1
  76. package/lib/client/surface/components/RegistrationDialog.d.ts +3 -3
  77. package/lib/client/surface/components/RegistrationDialog.d.ts.map +1 -1
  78. package/lib/client/surface/components/RegistrationDialog.js +70 -5
  79. package/lib/client/surface/components/RegistrationDialog.js.map +1 -1
  80. package/lib/client/surface/components/WorkspaceTree.d.ts.map +1 -1
  81. package/lib/client/surface/components/WorkspaceTree.js +11 -8
  82. package/lib/client/surface/components/WorkspaceTree.js.map +1 -1
  83. package/lib/client/surface/components/dialogs.d.ts +1 -1
  84. package/lib/client/surface/components/dialogs.d.ts.map +1 -1
  85. package/lib/client/surface/components/dialogs.js +24 -15
  86. package/lib/client/surface/components/dialogs.js.map +1 -1
  87. package/lib/client/surface/state/useRegistrationState.d.ts +6 -1
  88. package/lib/client/surface/state/useRegistrationState.d.ts.map +1 -1
  89. package/lib/client/surface/state/useRegistrationState.js +7 -0
  90. package/lib/client/surface/state/useRegistrationState.js.map +1 -1
  91. package/lib/client/surface/types.d.ts +5 -1
  92. package/lib/client/surface/types.d.ts.map +1 -1
  93. package/lib/client/view/worktree-error-copy.d.ts.map +1 -1
  94. package/lib/client/view/worktree-error-copy.js +4 -0
  95. package/lib/client/view/worktree-error-copy.js.map +1 -1
  96. package/lib/client/view/worktree-view-read.d.ts +4 -2
  97. package/lib/client/view/worktree-view-read.d.ts.map +1 -1
  98. package/lib/client/view/worktree-view-read.js +34 -17
  99. package/lib/client/view/worktree-view-read.js.map +1 -1
  100. package/lib/client/worktree-connection.d.ts +3 -0
  101. package/lib/client/worktree-connection.d.ts.map +1 -1
  102. package/lib/client/worktree-connection.js +18 -1
  103. package/lib/client/worktree-connection.js.map +1 -1
  104. package/lib/client.js +1386 -434
  105. package/lib/client.js.map +1 -1
  106. package/lib/contract/index.contract.js +15 -0
  107. package/lib/contract/index.contract.js.map +1 -1
  108. package/lib/contract/index.d.ts +69 -12
  109. package/lib/contract/index.d.ts.map +1 -1
  110. package/lib/contract/index.js +3 -0
  111. package/lib/contract/index.js.map +1 -1
  112. package/lib/host/remote.d.ts.map +1 -1
  113. package/lib/host/remote.js +7 -0
  114. package/lib/host/remote.js.map +1 -1
  115. package/lib/host/service.d.ts +13 -6
  116. package/lib/host/service.d.ts.map +1 -1
  117. package/lib/host/service.js +18 -0
  118. package/lib/host/service.js.map +1 -1
  119. package/lib/manage/manager-git-history.d.ts +5 -7
  120. package/lib/manage/manager-git-history.d.ts.map +1 -1
  121. package/lib/manage/manager-git-history.js +158 -65
  122. package/lib/manage/manager-git-history.js.map +1 -1
  123. package/lib/manage/manager-git-paths.d.ts +7 -0
  124. package/lib/manage/manager-git-paths.d.ts.map +1 -0
  125. package/lib/manage/manager-git-paths.js +62 -0
  126. package/lib/manage/manager-git-paths.js.map +1 -0
  127. package/lib/manage/manager-worktrees.d.ts +9 -1
  128. package/lib/manage/manager-worktrees.d.ts.map +1 -1
  129. package/lib/manage/manager-worktrees.js +69 -14
  130. package/lib/manage/manager-worktrees.js.map +1 -1
  131. package/lib/manage/manager.d.ts +12 -5
  132. package/lib/manage/manager.d.ts.map +1 -1
  133. package/lib/manage/manager.js +64 -3
  134. package/lib/manage/manager.js.map +1 -1
  135. package/lib/provider/git/adapter.d.ts +13 -12
  136. package/lib/provider/git/adapter.d.ts.map +1 -1
  137. package/lib/provider/git/adapter.js +152 -29
  138. package/lib/provider/git/adapter.js.map +1 -1
  139. package/lib/provider/git/branch-name.d.ts +5 -0
  140. package/lib/provider/git/branch-name.d.ts.map +1 -0
  141. package/lib/provider/git/branch-name.js +16 -0
  142. package/lib/provider/git/branch-name.js.map +1 -0
  143. package/lib/provider/git/branches.d.ts +11 -0
  144. package/lib/provider/git/branches.d.ts.map +1 -0
  145. package/lib/provider/git/branches.js +37 -0
  146. package/lib/provider/git/branches.js.map +1 -0
  147. package/lib/provider/sidecar/repository.d.ts.map +1 -1
  148. package/lib/provider/sidecar/repository.js +2 -1
  149. package/lib/provider/sidecar/repository.js.map +1 -1
  150. package/lib/provider/sidecar/sidecar-schema.d.ts.map +1 -1
  151. package/lib/provider/sidecar/sidecar-schema.js +2 -0
  152. package/lib/provider/sidecar/sidecar-schema.js.map +1 -1
  153. package/lib/provider/transaction/operations/create.d.ts.map +1 -1
  154. package/lib/provider/transaction/operations/create.js +18 -6
  155. package/lib/provider/transaction/operations/create.js.map +1 -1
  156. package/lib/provider/transaction/recovery/failure-recovery.d.ts.map +1 -1
  157. package/lib/provider/transaction/recovery/failure-recovery.js +3 -2
  158. package/lib/provider/transaction/recovery/failure-recovery.js.map +1 -1
  159. package/lib/provider/transaction/recovery/recover.d.ts.map +1 -1
  160. package/lib/provider/transaction/recovery/recover.js +8 -5
  161. package/lib/provider/transaction/recovery/recover.js.map +1 -1
  162. package/lib/provider/transaction/support/journal.d.ts.map +1 -1
  163. package/lib/provider/transaction/support/journal.js +1 -0
  164. package/lib/provider/transaction/support/journal.js.map +1 -1
  165. package/lib/provider/types.d.ts +24 -4
  166. package/lib/provider/types.d.ts.map +1 -1
  167. package/lib/provider/types.js.map +1 -1
  168. package/lib/tool/list-worktrees.d.ts.map +1 -1
  169. package/lib/tool/list-worktrees.js +9 -2
  170. package/lib/tool/list-worktrees.js.map +1 -1
  171. package/lib/tool/new-worktree.js +2 -2
  172. package/lib/tool/new-worktree.js.map +1 -1
  173. package/lib/typert.host.js +216 -46
  174. package/lib/typert.remote-client.d.ts +11 -5
  175. package/lib/typert.remote-client.d.ts.map +1 -1
  176. package/lib/typert.remote-client.js +216 -46
  177. package/package.json +4 -2
package/lib/client.js CHANGED
@@ -780,6 +780,9 @@ window.__ModuleLoader__.load({
780
780
  //#region lib/client/locales.js
781
781
  const WORKTREE_NS = "worktree";
782
782
  const zh = {
783
+ "dashboard.mainReady": "本地 checkout",
784
+ "dashboard.git.sessionRequired": "请先为此工作目录新建会话,再在侧栏打开文件。",
785
+ "dashboard.git.outsideSession": "文件位于此会话工作目录之外。请在 IDE 中打开,或使用仓库根目录的会话。",
783
786
  "tools.experimental": "实验性",
784
787
  "tools.loading": "正在加载工具设置…",
785
788
  "settings.general": "通用",
@@ -846,9 +849,12 @@ window.__ModuleLoader__.load({
846
849
  "dashboard.git.baselineSelector": "基线分支",
847
850
  "dashboard.git.selectBaseline": "选择基线分支",
848
851
  "dashboard.git.selectBaselineTitle": "请选择基线分支",
849
- "dashboard.git.selectBaselineDescription": "选择一个本地 branch 作为比较起点,然后查看提交、变更文件和 Diff。",
852
+ "dashboard.git.selectBaselineDescription": "选择本地或已获取的远端 branch 作为比较起点,然后查看提交、变更文件和 Diff。",
850
853
  "dashboard.git.base": "基线",
851
854
  "dashboard.git.head": "HEAD",
855
+ "dashboard.refKind.tag": "标签",
856
+ "dashboard.refKind.commit": "提交",
857
+ "worktree.headOption": "当前 HEAD ({name})",
852
858
  "dashboard.git.commit": "提交",
853
859
  "dashboard.git.commits": "提交",
854
860
  "dashboard.git.commitCount": "{n} 个提交",
@@ -857,7 +863,7 @@ window.__ModuleLoader__.load({
857
863
  "dashboard.git.workingTree": "工作区",
858
864
  "dashboard.git.changedFiles": "变更文件",
859
865
  "dashboard.git.lineStats": "+{additions} 行,-{deletions} 行",
860
- "dashboard.git.aheadBehindStats": "+{ahead} 领先,-{behind} 落后",
866
+ "dashboard.git.aheadBehindStats": "领先 {ahead} 个提交,落后 {behind} 个提交",
861
867
  "dashboard.git.diff": "Diff",
862
868
  "dashboard.git.resizeRows": "拖动调整上下两栏高度,双击恢复默认",
863
869
  "dashboard.git.resizeColumns": "拖动调整左右两栏宽度,双击恢复默认",
@@ -895,7 +901,9 @@ window.__ModuleLoader__.load({
895
901
  "dashboard.git.selectCommit": "选择一个提交或工作区改动查看详情。",
896
902
  "dashboard.git.selectFile": "选择一个文件查看 Diff。",
897
903
  "dashboard.git.untitledCommit": "(无提交标题)",
898
- "dashboard.git.truncatedHistory": "仅显示前 200 个提交。",
904
+ "dashboard.git.noBaseline": "无",
905
+ "dashboard.git.loadingMore": "正在加载更多提交…",
906
+ "dashboard.git.loadMore": "加载后续 50 个提交",
899
907
  "dashboard.git.truncatedFiles": "变更文件过多,无法完整列出。",
900
908
  "dashboard.git.binary": "二进制文件没有可显示的文本 Diff。",
901
909
  "dashboard.git.diffTruncated": "Diff 太大,无法在 Dashboard 中完整显示;请在 IDE 中检查完整变更。",
@@ -933,7 +941,7 @@ window.__ModuleLoader__.load({
933
941
  "dashboard.cancelInstructions": "取消",
934
942
  "dashboard.instructionsSaveFailed": "保存失败,草稿已保留。可重试;若其他窗口已修改指令,请取消并重新打开编辑。",
935
943
  "dashboard.editBase": "编辑基线",
936
- "dashboard.editBaseDescription": "选择一个本地 branch 作为 Git 与变更的比较基线。",
944
+ "dashboard.editBaseDescription": "选择本地或已获取的远端 branch 作为 Git 与变更的比较基线。",
937
945
  "dashboard.searchBranches": "搜索 branch",
938
946
  "dashboard.noMatchingBranches": "没有匹配的 branch",
939
947
  "dashboard.selectBaseBranch": "选择基线分支",
@@ -1052,6 +1060,8 @@ window.__ModuleLoader__.load({
1052
1060
  "worktree.importLoading": "正在查找可导入的 Worktree…",
1053
1061
  "worktree.importEmpty": "没有可导入的 Worktree。",
1054
1062
  "worktree.importPlaceholder": "请选择要导入的 Worktree",
1063
+ "worktree.searchWorktrees": "搜索分支或路径",
1064
+ "worktree.noMatchingWorktrees": "没有匹配的 Worktree",
1055
1065
  "worktree.importSelected": "已选择",
1056
1066
  "worktree.baseBranch": "Worktree 基线分支",
1057
1067
  "worktree.noLocalBranch": "没有本地分支",
@@ -1152,6 +1162,15 @@ window.__ModuleLoader__.load({
1152
1162
  "error.worktreeSessionUnavailable": "这个 Worktree 无法用于打开或创建 Session。请确认目录存在、尚未清理且无需恢复,再刷新列表重试。",
1153
1163
  "error.sessionArchived": "这个 Session 已归档,无法重新绑定。请先在 DSH 中恢复它,或在目标 Worktree 中创建新会话。",
1154
1164
  "branch.current": "(当前)",
1165
+ "branch.local": "本地分支",
1166
+ "branch.all": "全部分支",
1167
+ "branch.fetch": "获取所有远端分支",
1168
+ "select.loading": "正在加载…",
1169
+ "branch.fetching": "正在获取远端分支…",
1170
+ "branch.fetched": "远端分支已更新",
1171
+ "branch.fetchRetry": "获取失败,重试",
1172
+ "branch.fetchFailed": "获取远端分支失败。请检查网络和 Git 认证,再点击获取按钮重试。",
1173
+ "branch.remote": "远端分支",
1155
1174
  "branch.checkedOut": "(已检出)",
1156
1175
  "notice.recovery": "恢复操作",
1157
1176
  "notice.sessionRecovery": "Session:{sessionId}",
@@ -1173,6 +1192,9 @@ window.__ModuleLoader__.load({
1173
1192
  "error.unexpected": "操作失败(错误码:{code})。请刷新后重试;若仍失败,请将错误码和 DSH 日志提供给维护者。"
1174
1193
  };
1175
1194
  const en = {
1195
+ "dashboard.mainReady": "Local checkout",
1196
+ "dashboard.git.sessionRequired": "Create a Session for this working directory before opening files in the sidebar.",
1197
+ "dashboard.git.outsideSession": "This file is outside the Session working directory. Open it in an IDE or use a Session at the repository root.",
1176
1198
  "tools.experimental": "Experimental",
1177
1199
  "tools.loading": "Loading tool settings…",
1178
1200
  "settings.general": "General",
@@ -1239,9 +1261,12 @@ window.__ModuleLoader__.load({
1239
1261
  "dashboard.git.baselineSelector": "Baseline branch",
1240
1262
  "dashboard.git.selectBaseline": "Select a baseline branch",
1241
1263
  "dashboard.git.selectBaselineTitle": "Select a baseline branch",
1242
- "dashboard.git.selectBaselineDescription": "Choose a local branch as the comparison point to view commits, changed files, and diffs.",
1264
+ "dashboard.git.selectBaselineDescription": "Choose a local or fetched remote branch as the comparison point to view commits, changed files, and diffs.",
1243
1265
  "dashboard.git.base": "Base",
1244
1266
  "dashboard.git.head": "HEAD",
1267
+ "dashboard.refKind.tag": "Tag",
1268
+ "dashboard.refKind.commit": "Commit",
1269
+ "worktree.headOption": "HEAD ({name})",
1245
1270
  "dashboard.git.commit": "Commit",
1246
1271
  "dashboard.git.commits": "Commits",
1247
1272
  "dashboard.git.commitCount": "{n} commits",
@@ -1250,7 +1275,7 @@ window.__ModuleLoader__.load({
1250
1275
  "dashboard.git.workingTree": "Working tree",
1251
1276
  "dashboard.git.changedFiles": "Changed files",
1252
1277
  "dashboard.git.lineStats": "+{additions} lines, -{deletions} lines",
1253
- "dashboard.git.aheadBehindStats": "+{ahead} ahead, -{behind} behind",
1278
+ "dashboard.git.aheadBehindStats": "{ahead} commits ahead, {behind} commits behind",
1254
1279
  "dashboard.git.diff": "Diff",
1255
1280
  "dashboard.git.resizeRows": "Drag to resize the stacked panes; double-click to reset",
1256
1281
  "dashboard.git.resizeColumns": "Drag to resize the side-by-side panes; double-click to reset",
@@ -1288,7 +1313,9 @@ window.__ModuleLoader__.load({
1288
1313
  "dashboard.git.selectCommit": "Select a commit or working-tree change to view its details.",
1289
1314
  "dashboard.git.selectFile": "Select a file to view its diff.",
1290
1315
  "dashboard.git.untitledCommit": "(untitled commit)",
1291
- "dashboard.git.truncatedHistory": "Showing the first 200 commits.",
1316
+ "dashboard.git.noBaseline": "None",
1317
+ "dashboard.git.loadingMore": "Loading more commits…",
1318
+ "dashboard.git.loadMore": "Load the next 50 commits",
1292
1319
  "dashboard.git.truncatedFiles": "Too many changed files to list completely.",
1293
1320
  "dashboard.git.binary": "Binary files have no text diff to display.",
1294
1321
  "dashboard.git.diffTruncated": "The diff is too large to display completely; inspect the full change in your IDE.",
@@ -1326,7 +1353,7 @@ window.__ModuleLoader__.load({
1326
1353
  "dashboard.cancelInstructions": "Cancel",
1327
1354
  "dashboard.instructionsSaveFailed": "Save failed; your draft is retained. Retry, or cancel and reopen if another window changed the instructions.",
1328
1355
  "dashboard.editBase": "Edit baseline",
1329
- "dashboard.editBaseDescription": "Choose a local branch as the Git & Changes comparison baseline.",
1356
+ "dashboard.editBaseDescription": "Choose a local or fetched remote branch as the Git & Changes comparison baseline.",
1330
1357
  "dashboard.searchBranches": "Search branches",
1331
1358
  "dashboard.noMatchingBranches": "No matching branches",
1332
1359
  "dashboard.selectBaseBranch": "Select a baseline branch",
@@ -1445,6 +1472,8 @@ window.__ModuleLoader__.load({
1445
1472
  "worktree.importLoading": "Finding importable Worktrees…",
1446
1473
  "worktree.importEmpty": "No importable Worktrees found.",
1447
1474
  "worktree.importPlaceholder": "Select a Worktree to import",
1475
+ "worktree.searchWorktrees": "Search branches or paths",
1476
+ "worktree.noMatchingWorktrees": "No matching Worktrees",
1448
1477
  "worktree.importSelected": "Selected",
1449
1478
  "worktree.baseBranch": "Worktree base branch",
1450
1479
  "worktree.noLocalBranch": "No local branch",
@@ -1545,6 +1574,15 @@ window.__ModuleLoader__.load({
1545
1574
  "error.worktreeSessionUnavailable": "This Worktree cannot open or create a Session. Check that its directory exists, has not been cleaned up, and does not need recovery, then refresh and retry.",
1546
1575
  "error.sessionArchived": "This Session is archived and cannot be rebound. Restore it in DSH or create a new Session in the target Worktree.",
1547
1576
  "branch.current": " (current)",
1577
+ "branch.local": "Local branches",
1578
+ "branch.all": "All branches",
1579
+ "branch.fetch": "Fetch all remote branches",
1580
+ "select.loading": "Loading…",
1581
+ "branch.fetching": "Fetching remote branches…",
1582
+ "branch.fetched": "Remote branches updated",
1583
+ "branch.fetchRetry": "Fetch failed, retry",
1584
+ "branch.fetchFailed": "Could not fetch remote branches. Check your connection and Git authentication, then use the fetch button to retry.",
1585
+ "branch.remote": "Remote branches",
1548
1586
  "branch.checkedOut": " (checked out)",
1549
1587
  "notice.recovery": "Recovery actions",
1550
1588
  "notice.sessionRecovery": "Session: {sessionId}",
@@ -1574,6 +1612,7 @@ window.__ModuleLoader__.load({
1574
1612
  * the browser call surface auditable without making React know wire names.
1575
1613
  */
1576
1614
  const WORKTREE_CONNECTION_ENDPOINTS = Object.freeze({
1615
+ getWorkspaceGitState: "worktreeManager/getWorkspaceGitState",
1577
1616
  getToolSettings: "worktreeManager/getToolSettings",
1578
1617
  updateToolSettings: "worktreeManager/updateToolSettings",
1579
1618
  watchToolChanges: "worktreeManager/watchToolChanges",
@@ -1583,6 +1622,8 @@ window.__ModuleLoader__.load({
1583
1622
  getWorktreeCommitFileDiff: "worktreeManager/getWorktreeCommitFileDiff",
1584
1623
  listImportCandidates: "worktreeManager/listImportCandidates",
1585
1624
  listBranches: "worktreeManager/listBranches",
1625
+ fetchRemoteBranches: "worktreeManager/fetchRemoteBranches",
1626
+ getWorkspaceCheckout: "worktreeManager/getWorkspaceCheckout",
1586
1627
  createWorktree: "worktreeManager/createWorktree",
1587
1628
  importWorktree: "worktreeManager/importWorktree",
1588
1629
  removeWorktree: "worktreeManager/removeWorktree",
@@ -1677,6 +1718,7 @@ window.__ModuleLoader__.load({
1677
1718
  */
1678
1719
  function createWorktreeConnectionAdapter(rpc) {
1679
1720
  const inFlight = /* @__PURE__ */ new Set();
1721
+ const branchReads = /* @__PURE__ */ new Map();
1680
1722
  let disposed = false;
1681
1723
  async function call(method, input, signal) {
1682
1724
  if (disposed) throw disposedError();
@@ -1709,11 +1751,22 @@ window.__ModuleLoader__.load({
1709
1751
  watchToolChanges: async (afterRevision, signal) => unwrap(WORKTREE_CONNECTION_ENDPOINTS.watchToolChanges, await call("watchToolChanges", { afterRevision }, signal)),
1710
1752
  probeHost: (signal) => call("listBindings", { workspaceId: "" }, signal),
1711
1753
  listWorktrees: (input) => invoke("listWorktrees", input),
1754
+ getWorkspaceGitState: (input) => invoke("getWorkspaceGitState", input),
1712
1755
  listWorktreeCommits: (input) => invoke("listWorktreeCommits", input),
1713
1756
  listWorktreeCommitFiles: (input) => invoke("listWorktreeCommitFiles", input),
1714
1757
  getWorktreeCommitFileDiff: (input) => invoke("getWorktreeCommitFileDiff", input),
1715
1758
  listImportCandidates: (input) => invoke("listImportCandidates", input),
1716
- listBranches: (input) => invoke("listBranches", input),
1759
+ listBranches: (input) => {
1760
+ const current = branchReads.get(input.workspaceId);
1761
+ if (current) return current;
1762
+ const request = invoke("listBranches", input).finally(() => {
1763
+ if (branchReads.get(input.workspaceId) === request) branchReads.delete(input.workspaceId);
1764
+ });
1765
+ branchReads.set(input.workspaceId, request);
1766
+ return request;
1767
+ },
1768
+ fetchRemoteBranches: (input) => invoke("fetchRemoteBranches", input),
1769
+ getWorkspaceCheckout: (input) => invoke("getWorkspaceCheckout", input),
1717
1770
  createWorktree: (input) => invoke("createWorktree", input),
1718
1771
  importWorktree: (input) => invoke("importWorktree", input),
1719
1772
  async removeWorktree(input) {
@@ -1911,6 +1964,8 @@ window.__ModuleLoader__.load({
1911
1964
  //#endregion
1912
1965
  //#region lib/client/dsh-icons.js
1913
1966
  const exports$1 = _deepseek_ai_dsh_client_ui_primitives;
1967
+ const IconDownloadOutline16 = createDshIconAlias(exports$1, "IconDownloadOutline16", "IconDownloadOutlineRegular");
1968
+ const IconLoadingOutline16 = createDshIconAlias(exports$1, "IconLoadingOutline16", "IconLoadingOutlineRegular");
1914
1969
  const IconArchiveOutline20 = createDshIconAlias(exports$1, "IconArchiveOutline20", "IconArchiveOutlineRegular");
1915
1970
  const IconBranchOutline16 = createDshIconAlias(exports$1, "IconBranchOutline16", "IconBranchOutlineRegular");
1916
1971
  const IconChevronDownOutline14 = createDshIconAlias(exports$1, "IconChevronDownOutline14", "IconChevronDownOutlineRegular");
@@ -1931,14 +1986,14 @@ window.__ModuleLoader__.load({
1931
1986
  const IconSearchOutline16 = createDshIconAlias(exports$1, "IconSearchOutline16", "IconSearchOutlineRegular");
1932
1987
  const IconTrashOutline16 = createDshIconAlias(exports$1, "IconTrashOutline16", "IconTrashOutlineRegular");
1933
1988
  //#endregion
1934
- //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_ece6fafadbd1/packages/clutch-dsh-worktree/src/client/context/worktree-context.css.mjs
1935
- const css$6 = ".-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";
1936
- const styleId$6 = "@cerbur/clutch-dsh-worktree/worktree-context.css";
1989
+ //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_ef7f6cd81f87/packages/clutch-dsh-worktree/src/client/context/worktree-context.css.mjs
1990
+ const css$8 = ".-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";
1991
+ const styleId$8 = "@cerbur/clutch-dsh-worktree/worktree-context.css";
1937
1992
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/worktree-context.css\"]") === null) {
1938
1993
  const tag = document.createElement("style");
1939
1994
  tag.dataset.plugin = "@cerbur/clutch-dsh-worktree";
1940
- tag.dataset.pluginCss = styleId$6;
1941
- tag.textContent = css$6;
1995
+ tag.dataset.pluginCss = styleId$8;
1996
+ tag.textContent = css$8;
1942
1997
  document.head.appendChild(tag);
1943
1998
  }
1944
1999
  var worktree_context_css_default = {
@@ -1995,14 +2050,14 @@ window.__ModuleLoader__.load({
1995
2050
  globalSetViewMode?.(mode);
1996
2051
  }
1997
2052
  //#endregion
1998
- //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_ece6fafadbd1/packages/clutch-dsh-worktree/src/client/worktree.css.mjs
1999
- const css$5 = ".-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-worktreeModalTabs {\n display: flex;\n gap: 8px;\n margin-bottom: 12px;\n}\n\n.-cerbur-clutch-dsh-worktree-worktreeModalTab {\n border: 0;\n border-bottom: 2px solid transparent;\n padding: 4px 0;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n font: inherit;\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-worktreeImportSelect {\n width: 100%;\n min-width: 0;\n padding: 7px 8px;\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: 13px;\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.-cerbur-clutch-dsh-worktree-worktreeImportSelect: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-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";
2000
- const styleId$5 = "@cerbur/clutch-dsh-worktree/worktree.css";
2053
+ //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_ef7f6cd81f87/packages/clutch-dsh-worktree/src/client/worktree.css.mjs
2054
+ const css$7 = ".-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-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";
2055
+ const styleId$7 = "@cerbur/clutch-dsh-worktree/worktree.css";
2001
2056
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/worktree.css\"]") === null) {
2002
2057
  const tag = document.createElement("style");
2003
2058
  tag.dataset.plugin = "@cerbur/clutch-dsh-worktree";
2004
- tag.dataset.pluginCss = styleId$5;
2005
- tag.textContent = css$5;
2059
+ tag.dataset.pluginCss = styleId$7;
2060
+ tag.textContent = css$7;
2006
2061
  document.head.appendChild(tag);
2007
2062
  }
2008
2063
  var worktree_css_default = {
@@ -2011,10 +2066,13 @@ window.__ModuleLoader__.load({
2011
2066
  "surface": "-cerbur-clutch-dsh-worktree-surface",
2012
2067
  "motionExits": "-cerbur-clutch-dsh-worktree-motionExits",
2013
2068
  "wideContent": "-cerbur-clutch-dsh-worktree-wideContent",
2069
+ "worktreeRegistrationDialog": "-cerbur-clutch-dsh-worktree-worktreeRegistrationDialog",
2070
+ "worktreeRegistrationBody": "-cerbur-clutch-dsh-worktree-worktreeRegistrationBody",
2071
+ "modalField": "-cerbur-clutch-dsh-worktree-modalField",
2072
+ "renameInput": "-cerbur-clutch-dsh-worktree-renameInput",
2014
2073
  "worktreeModalTabs": "-cerbur-clutch-dsh-worktree-worktreeModalTabs",
2015
2074
  "worktreeModalTab": "-cerbur-clutch-dsh-worktree-worktreeModalTab",
2016
2075
  "worktreeImportCandidates": "-cerbur-clutch-dsh-worktree-worktreeImportCandidates",
2017
- "worktreeImportSelect": "-cerbur-clutch-dsh-worktree-worktreeImportSelect",
2018
2076
  "worktreeImportError": "-cerbur-clutch-dsh-worktree-worktreeImportError",
2019
2077
  "closeButton": "-cerbur-clutch-dsh-worktree-closeButton",
2020
2078
  "header": "-cerbur-clutch-dsh-worktree-header",
@@ -2092,11 +2150,9 @@ window.__ModuleLoader__.load({
2092
2150
  "sessionStatus": "-cerbur-clutch-dsh-worktree-sessionStatus",
2093
2151
  "sessionTime": "-cerbur-clutch-dsh-worktree-sessionTime",
2094
2152
  "sessionOverflowButton": "-cerbur-clutch-dsh-worktree-sessionOverflowButton",
2095
- "renameInput": "-cerbur-clutch-dsh-worktree-renameInput",
2096
2153
  "renameError": "-cerbur-clutch-dsh-worktree-renameError",
2097
2154
  "emptyNested": "-cerbur-clutch-dsh-worktree-emptyNested",
2098
2155
  "archivedGroup": "-cerbur-clutch-dsh-worktree-archivedGroup",
2099
- "modalField": "-cerbur-clutch-dsh-worktree-modalField",
2100
2156
  "worktreeHoverDetails": "-cerbur-clutch-dsh-worktree-worktreeHoverDetails"
2101
2157
  };
2102
2158
  //#endregion
@@ -2175,14 +2231,14 @@ window.__ModuleLoader__.load({
2175
2231
  });
2176
2232
  }
2177
2233
  //#endregion
2178
- //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_ece6fafadbd1/packages/clutch-dsh-worktree/src/client/dashboard/dashboard-header-action.css.mjs
2179
- const css$4 = "/* 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";
2180
- const styleId$4 = "@cerbur/clutch-dsh-worktree/dashboard-header-action.css";
2234
+ //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_ef7f6cd81f87/packages/clutch-dsh-worktree/src/client/dashboard/dashboard-header-action.css.mjs
2235
+ const css$6 = "/* 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";
2236
+ const styleId$6 = "@cerbur/clutch-dsh-worktree/dashboard-header-action.css";
2181
2237
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/dashboard-header-action.css\"]") === null) {
2182
2238
  const tag = document.createElement("style");
2183
2239
  tag.dataset.plugin = "@cerbur/clutch-dsh-worktree";
2184
- tag.dataset.pluginCss = styleId$4;
2185
- tag.textContent = css$4;
2240
+ tag.dataset.pluginCss = styleId$6;
2241
+ tag.textContent = css$6;
2186
2242
  document.head.appendChild(tag);
2187
2243
  }
2188
2244
  var dashboard_header_action_css_default = { "headerDashboardButton": "-cerbur-clutch-dsh-worktree-headerDashboardButton" };
@@ -2454,6 +2510,7 @@ window.__ModuleLoader__.load({
2454
2510
  return record.gitRootPath ?? record.absolutePath;
2455
2511
  }
2456
2512
  Object.freeze([
2513
+ "getWorkspaceGitState",
2457
2514
  "getToolSettings",
2458
2515
  "updateToolSettings",
2459
2516
  "watchToolChanges",
@@ -2466,6 +2523,8 @@ window.__ModuleLoader__.load({
2466
2523
  "getWorktreeCommitFileDiff",
2467
2524
  "listImportCandidates",
2468
2525
  "listBranches",
2526
+ "fetchRemoteBranches",
2527
+ "getWorkspaceCheckout",
2469
2528
  "createWorktree",
2470
2529
  "importWorktree",
2471
2530
  "removeWorktree",
@@ -2596,6 +2655,8 @@ window.__ModuleLoader__.load({
2596
2655
  case "WORKTREE_RECOVERY_REQUIRED": return t("error.worktreeRecoveryRequired");
2597
2656
  case "WORKTREE_IDENTITY_CHANGED": return t("error.worktreeIdentityChanged");
2598
2657
  case "WORKTREE_REGISTRATION_SESSION_UNAVAILABLE": return t("error.worktreeRegistrationSessionUnavailable");
2658
+ case "GIT_FILE_SESSION_REQUIRED": return t("dashboard.git.sessionRequired");
2659
+ case "GIT_FILE_OUTSIDE_SESSION": return t("dashboard.git.outsideSession");
2599
2660
  case "WORKSPACE_RENAME_UNAVAILABLE": return t("error.workspaceRenameUnavailable");
2600
2661
  case "WORKSPACE_DELETE_UNAVAILABLE": return t("error.workspaceDeleteUnavailable");
2601
2662
  case "SESSION_RENAME_UNAVAILABLE": return t("error.sessionRenameUnavailable");
@@ -2795,6 +2856,419 @@ window.__ModuleLoader__.load({
2795
2856
  }, current.key);
2796
2857
  }
2797
2858
  //#endregion
2859
+ //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_ef7f6cd81f87/packages/clutch-dsh-worktree/src/client/select/single-select.css.mjs
2860
+ const css$5 = ".-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";
2861
+ const styleId$5 = "@cerbur/clutch-dsh-worktree/single-select.css";
2862
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/single-select.css\"]") === null) {
2863
+ const tag = document.createElement("style");
2864
+ tag.dataset.plugin = "@cerbur/clutch-dsh-worktree";
2865
+ tag.dataset.pluginCss = styleId$5;
2866
+ tag.textContent = css$5;
2867
+ document.head.appendChild(tag);
2868
+ }
2869
+ var single_select_css_default = {
2870
+ "singleSelectRoot": "-cerbur-clutch-dsh-worktree-singleSelectRoot",
2871
+ "singleSelectTrigger": "-cerbur-clutch-dsh-worktree-singleSelectTrigger",
2872
+ "singleSelectOption": "-cerbur-clutch-dsh-worktree-singleSelectOption",
2873
+ "singleSelectPopup": "-cerbur-clutch-dsh-worktree-singleSelectPopup",
2874
+ "singleSelectPicker": "-cerbur-clutch-dsh-worktree-singleSelectPicker",
2875
+ "singleSelectSearch": "-cerbur-clutch-dsh-worktree-singleSelectSearch",
2876
+ "singleSelectLoading": "-cerbur-clutch-dsh-worktree-singleSelectLoading",
2877
+ "singleSelectFilters": "-cerbur-clutch-dsh-worktree-singleSelectFilters",
2878
+ "singleSelectViewport": "-cerbur-clutch-dsh-worktree-singleSelectViewport",
2879
+ "singleSelectEmpty": "-cerbur-clutch-dsh-worktree-singleSelectEmpty",
2880
+ "singleSelectGroup": "-cerbur-clutch-dsh-worktree-singleSelectGroup",
2881
+ "singleSelectText": "-cerbur-clutch-dsh-worktree-singleSelectText",
2882
+ "singleSelectName": "-cerbur-clutch-dsh-worktree-singleSelectName",
2883
+ "singleSelectDescription": "-cerbur-clutch-dsh-worktree-singleSelectDescription",
2884
+ "singleSelectBadge": "-cerbur-clutch-dsh-worktree-singleSelectBadge"
2885
+ };
2886
+ //#endregion
2887
+ //#region lib/client/select/SearchableSingleSelect.js
2888
+ const NO_GROUPS = [];
2889
+ /** Domain-neutral single selection. Arrow navigation never commits a value. */
2890
+ function SingleSelectPicker({ options, groups = NO_GROUPS, allLabel, value, onChange, searchLabel, noMatchesLabel, disabled, loading = false, loadingLabel = "Loading…", onClose, preparing = false, onRefresh }) {
2891
+ const [query, setQuery] = (0, react.useState)("");
2892
+ const [filter, setFilter] = (0, react.useState)(void 0);
2893
+ const [highlight, setHighlight] = (0, react.useState)(value);
2894
+ const id = (0, react.useId)();
2895
+ const refs = (0, react.useRef)([]);
2896
+ const viewport = (0, react.useRef)(null);
2897
+ const [scrollTop, setScrollTop] = (0, react.useState)(0);
2898
+ const refresh = (0, react.useRef)(onRefresh);
2899
+ refresh.current = onRefresh;
2900
+ const canRefresh = onRefresh !== void 0;
2901
+ (0, react.useEffect)(() => {
2902
+ if (preparing || !canRefresh) return;
2903
+ refresh.current?.();
2904
+ }, [preparing, canRefresh]);
2905
+ const search = query.trim().toLocaleLowerCase();
2906
+ const busy = loading || preparing;
2907
+ const { sections, visible, height } = (0, react.useMemo)(() => {
2908
+ const matched = preparing ? [] : options.filter((option) => (filter === void 0 || option.group === filter) && (option.searchText ?? [option.label, option.description].join(" ")).toLocaleLowerCase().includes(search));
2909
+ let top = 0;
2910
+ let index = 0;
2911
+ const sections = [{
2912
+ value: void 0,
2913
+ label: void 0,
2914
+ action: void 0,
2915
+ options: matched.filter((option) => option.group === void 0 || !groups.some((group) => group.value === option.group))
2916
+ }, ...groups.map((group) => ({
2917
+ ...group,
2918
+ options: matched.filter((option) => option.group === group.value)
2919
+ }))].filter((section) => section.options.length > 0 || section.action && (filter === void 0 || filter === section.value)).map((section) => {
2920
+ const offset = top;
2921
+ if (section.label) top += 36;
2922
+ const rows = section.options.map((option) => {
2923
+ const row = {
2924
+ option,
2925
+ index: index++,
2926
+ top,
2927
+ height: option.description ? 48 : 34
2928
+ };
2929
+ top += row.height;
2930
+ return row;
2931
+ });
2932
+ return {
2933
+ ...section,
2934
+ rows,
2935
+ top: offset,
2936
+ height: top - offset
2937
+ };
2938
+ });
2939
+ return {
2940
+ sections,
2941
+ visible: sections.flatMap((section) => section.rows),
2942
+ height: top
2943
+ };
2944
+ }, [
2945
+ options,
2946
+ groups,
2947
+ filter,
2948
+ search,
2949
+ preparing
2950
+ ]);
2951
+ const virtual = visible.length > 80;
2952
+ const windowTop = Math.min(scrollTop, Math.max(0, height - 300)) - (busy ? 80 : 0);
2953
+ const rendered = virtual ? visible.filter((row) => row.top + row.height >= windowTop - 120 && row.top <= windowTop + 420) : visible;
2954
+ const renderedIndexes = new Set(rendered.map((row) => row.index));
2955
+ const active = Math.max(0, visible.findIndex((row) => row.option.value === highlight));
2956
+ const choose = (next) => {
2957
+ if (!disabled && !busy) onChange(next);
2958
+ };
2959
+ const resetScroll = () => {
2960
+ setScrollTop(0);
2961
+ if (viewport.current) viewport.current.scrollTop = 0;
2962
+ };
2963
+ const onKeyDown = (event) => {
2964
+ if (event.nativeEvent?.isComposing) return;
2965
+ if (event.key === "Escape" && onClose !== void 0) {
2966
+ event.preventDefault();
2967
+ event.stopPropagation();
2968
+ onClose();
2969
+ } else if (!disabled && (event.key === "ArrowDown" || event.key === "ArrowUp") && visible.length > 0) {
2970
+ event.preventDefault();
2971
+ const next = (active + (event.key === "ArrowDown" ? 1 : -1) + visible.length) % visible.length;
2972
+ setHighlight(visible[next].option.value);
2973
+ if (virtual && !renderedIndexes.has(next)) {
2974
+ const top = Math.max(0, visible[next].top - 120 + (busy ? 80 : 0));
2975
+ setScrollTop(top);
2976
+ if (viewport.current) viewport.current.scrollTop = top;
2977
+ } else refs.current[next]?.scrollIntoView({ block: "nearest" });
2978
+ } else if (!disabled && event.key === "Enter" && visible.length > 0) {
2979
+ event.preventDefault();
2980
+ choose(visible[active].option.value);
2981
+ }
2982
+ };
2983
+ const row = ({ option, index, top, height }, sectionTop) => {
2984
+ return (0, react_jsx_runtime.jsxs)("button", {
2985
+ type: "button",
2986
+ id: id + "-option-" + index,
2987
+ ref: (element) => {
2988
+ refs.current[index] = element;
2989
+ },
2990
+ className: single_select_css_default.singleSelectOption,
2991
+ role: "option",
2992
+ tabIndex: -1,
2993
+ style: virtual ? {
2994
+ position: "absolute",
2995
+ top: top - sectionTop,
2996
+ height
2997
+ } : void 0,
2998
+ "data-description": option.description ? true : void 0,
2999
+ "aria-posinset": index + 1,
3000
+ "aria-setsize": visible.length,
3001
+ title: [option.label, option.description].filter(Boolean).join(" — "),
3002
+ "data-single-select-option": option.value,
3003
+ "data-highlighted": index === active ? true : void 0,
3004
+ "aria-selected": option.value === value,
3005
+ disabled: disabled || busy,
3006
+ onMouseEnter: () => setHighlight(option.value),
3007
+ onMouseDown: (event) => event.preventDefault(),
3008
+ onClick: () => choose(option.value),
3009
+ children: [
3010
+ option.icon,
3011
+ (0, react_jsx_runtime.jsxs)("span", {
3012
+ className: single_select_css_default.singleSelectText,
3013
+ children: [(0, react_jsx_runtime.jsx)("span", {
3014
+ className: single_select_css_default.singleSelectName,
3015
+ children: option.label
3016
+ }), option.description && (0, react_jsx_runtime.jsx)("span", {
3017
+ className: single_select_css_default.singleSelectDescription,
3018
+ children: option.description
3019
+ })]
3020
+ }),
3021
+ option.badge && (0, react_jsx_runtime.jsx)("span", {
3022
+ className: single_select_css_default.singleSelectBadge,
3023
+ children: option.badge
3024
+ }),
3025
+ option.value === value && (0, react_jsx_runtime.jsx)(IconCheckOutline16, {})
3026
+ ]
3027
+ }, option.value);
3028
+ };
3029
+ return (0, react_jsx_runtime.jsxs)("div", {
3030
+ className: single_select_css_default.singleSelectPicker,
3031
+ "data-single-select-picker": true,
3032
+ "data-preparing": preparing || void 0,
3033
+ "aria-busy": busy,
3034
+ children: [
3035
+ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
3036
+ icon: (0, react_jsx_runtime.jsx)(IconSearchOutline16, {}),
3037
+ className: single_select_css_default.singleSelectSearch,
3038
+ "data-modal-autofocus": true,
3039
+ disabled,
3040
+ role: "combobox",
3041
+ "aria-label": searchLabel,
3042
+ placeholder: searchLabel,
3043
+ "aria-autocomplete": "list",
3044
+ "aria-haspopup": "listbox",
3045
+ "aria-expanded": visible.length > 0,
3046
+ "aria-controls": visible.length > 0 ? id + "-options" : void 0,
3047
+ "aria-activedescendant": renderedIndexes.has(active) ? id + "-option-" + active : void 0,
3048
+ "data-single-select-search": true,
3049
+ value: query,
3050
+ onKeyDown,
3051
+ onChange: (event) => {
3052
+ setQuery(event.currentTarget.value);
3053
+ setHighlight(value);
3054
+ resetScroll();
3055
+ }
3056
+ }),
3057
+ allLabel !== void 0 && groups.length > 0 && (0, react_jsx_runtime.jsx)("div", {
3058
+ className: single_select_css_default.singleSelectFilters,
3059
+ "aria-label": searchLabel,
3060
+ role: "group",
3061
+ children: [{
3062
+ value: void 0,
3063
+ label: allLabel
3064
+ }, ...groups].map((group) => (0, react_jsx_runtime.jsx)("button", {
3065
+ type: "button",
3066
+ "aria-pressed": filter === group.value,
3067
+ disabled,
3068
+ onClick: () => {
3069
+ setFilter(group.value);
3070
+ setHighlight(value);
3071
+ resetScroll();
3072
+ },
3073
+ children: group.label
3074
+ }, group.value ?? "all"))
3075
+ }),
3076
+ (0, react_jsx_runtime.jsxs)("div", {
3077
+ ref: viewport,
3078
+ className: single_select_css_default.singleSelectViewport,
3079
+ "data-single-select-options": true,
3080
+ onScroll: (event) => setScrollTop(event.currentTarget.scrollTop),
3081
+ children: [
3082
+ busy && (0, react_jsx_runtime.jsxs)("div", {
3083
+ className: single_select_css_default.singleSelectLoading,
3084
+ "data-single-select-loading": true,
3085
+ role: "status",
3086
+ children: [(0, react_jsx_runtime.jsx)(IconLoadingOutline16, {}), (0, react_jsx_runtime.jsx)("span", { children: loadingLabel })]
3087
+ }),
3088
+ sections.length > 0 ? (0, react_jsx_runtime.jsx)("div", {
3089
+ id: id + "-options",
3090
+ role: "listbox",
3091
+ "aria-label": searchLabel,
3092
+ "data-single-select-virtual": virtual || void 0,
3093
+ style: virtual ? {
3094
+ position: "relative",
3095
+ height
3096
+ } : void 0,
3097
+ children: sections.map((section) => (0, react_jsx_runtime.jsxs)("div", {
3098
+ role: section.label ? "group" : void 0,
3099
+ style: virtual ? {
3100
+ position: "absolute",
3101
+ top: section.top,
3102
+ height: section.height,
3103
+ width: "100%"
3104
+ } : void 0,
3105
+ "aria-labelledby": section.label ? id + "-group-" + section.value : void 0,
3106
+ children: [section.label && (0, react_jsx_runtime.jsxs)("div", {
3107
+ className: single_select_css_default.singleSelectGroup,
3108
+ children: [(0, react_jsx_runtime.jsx)("span", {
3109
+ id: id + "-group-" + section.value,
3110
+ children: section.label
3111
+ }), section.action]
3112
+ }), section.rows.filter((row) => renderedIndexes.has(row.index)).map((item) => row(item, section.top))]
3113
+ }, section.value ?? "ungrouped"))
3114
+ }) : null,
3115
+ !busy && visible.length === 0 && (0, react_jsx_runtime.jsx)("div", {
3116
+ className: single_select_css_default.singleSelectEmpty,
3117
+ "data-single-select-empty": true,
3118
+ role: "status",
3119
+ children: noMatchesLabel
3120
+ })
3121
+ ]
3122
+ })
3123
+ ]
3124
+ });
3125
+ }
3126
+ /** Anchored dropdown using DSH's menu material, including its macOS backing. */
3127
+ function SearchableSingleSelect({ label, placeholder, icon, size = "standard", ...props }) {
3128
+ const [open, setOpen] = (0, react.useState)(false);
3129
+ const [prepared, setPrepared] = (0, react.useState)(false);
3130
+ const [position, setPosition] = (0, react.useState)({
3131
+ left: 0,
3132
+ top: 0,
3133
+ width: 320,
3134
+ viewportHeight: 220
3135
+ });
3136
+ const root = (0, react.useRef)(null);
3137
+ const trigger = (0, react.useRef)(null);
3138
+ const popup = (0, react.useRef)(null);
3139
+ const id = (0, react.useId)();
3140
+ const close = (restoreFocus = true) => {
3141
+ setOpen(false);
3142
+ setPrepared(false);
3143
+ if (restoreFocus) trigger.current?.focus();
3144
+ };
3145
+ (0, react.useEffect)(() => {
3146
+ if (props.disabled) {
3147
+ setOpen(false);
3148
+ setPrepared(false);
3149
+ }
3150
+ }, [props.disabled]);
3151
+ (0, react.useEffect)(() => {
3152
+ if (!open) return;
3153
+ let frame = requestAnimationFrame(() => {
3154
+ frame = requestAnimationFrame(() => setPrepared(true));
3155
+ });
3156
+ return () => cancelAnimationFrame(frame);
3157
+ }, [open]);
3158
+ (0, react.useLayoutEffect)(() => {
3159
+ if (!open) return;
3160
+ const place = () => {
3161
+ const rect = trigger.current?.getBoundingClientRect();
3162
+ if (!rect) return;
3163
+ const width = Math.min(Math.max(rect.width, 320), Math.max(0, window.innerWidth - 24));
3164
+ const viewport = popup.current?.querySelector("[data-single-select-options]");
3165
+ const chromeHeight = popup.current && viewport ? popup.current.offsetHeight - viewport.offsetHeight : 90;
3166
+ const below = Math.max(0, window.innerHeight - 12 - rect.bottom - 4);
3167
+ const above = Math.max(0, rect.top - 4 - 12);
3168
+ const downward = below >= chromeHeight + 96 || below >= above;
3169
+ const viewportHeight = Math.min(220, Math.max(0, (downward ? below : above) - chromeHeight));
3170
+ const height = chromeHeight + Math.min(viewport?.scrollHeight ?? viewportHeight, viewportHeight);
3171
+ const next = {
3172
+ width,
3173
+ viewportHeight,
3174
+ left: Math.max(12, Math.min(rect.left, window.innerWidth - width - 12)),
3175
+ top: Math.max(12, downward ? rect.bottom + 4 : rect.top - height - 4)
3176
+ };
3177
+ setPosition((current) => current.width === next.width && current.left === next.left && current.top === next.top && current.viewportHeight === next.viewportHeight ? current : next);
3178
+ };
3179
+ place();
3180
+ popup.current?.querySelector("input")?.focus();
3181
+ const outside = (event) => {
3182
+ if (event.target instanceof Node && !root.current?.contains(event.target)) close(false);
3183
+ };
3184
+ document.addEventListener("pointerdown", outside);
3185
+ window.addEventListener("resize", place);
3186
+ window.addEventListener("scroll", place, true);
3187
+ const observer = new ResizeObserver(place);
3188
+ if (popup.current) observer.observe(popup.current);
3189
+ if (trigger.current) observer.observe(trigger.current);
3190
+ return () => {
3191
+ observer.disconnect();
3192
+ document.removeEventListener("pointerdown", outside);
3193
+ window.removeEventListener("resize", place);
3194
+ window.removeEventListener("scroll", place, true);
3195
+ };
3196
+ }, [open]);
3197
+ const selected = (0, react.useMemo)(() => props.options.find((option) => option.value === props.value), [props.options, props.value]);
3198
+ return (0, react_jsx_runtime.jsxs)("div", {
3199
+ ref: root,
3200
+ className: single_select_css_default.singleSelectRoot,
3201
+ "data-single-select": true,
3202
+ "data-size": size,
3203
+ onKeyDown: (event) => {
3204
+ if (open && event.key === "Escape" && !event.nativeEvent.isComposing) {
3205
+ event.preventDefault();
3206
+ event.stopPropagation();
3207
+ close();
3208
+ }
3209
+ },
3210
+ children: [(0, react_jsx_runtime.jsxs)("button", {
3211
+ ref: trigger,
3212
+ type: "button",
3213
+ className: single_select_css_default.singleSelectTrigger,
3214
+ "aria-label": label,
3215
+ "aria-haspopup": "dialog",
3216
+ "aria-expanded": open,
3217
+ "aria-controls": open ? id : void 0,
3218
+ disabled: props.disabled,
3219
+ onClick: () => open ? close() : setOpen(true),
3220
+ onKeyDown: (event) => {
3221
+ if (event.key === "ArrowDown" || event.key === "ArrowUp") {
3222
+ event.preventDefault();
3223
+ setOpen(true);
3224
+ }
3225
+ },
3226
+ children: [
3227
+ icon,
3228
+ (0, react_jsx_runtime.jsx)("span", {
3229
+ className: single_select_css_default.singleSelectName,
3230
+ title: selected?.description ?? props.value,
3231
+ children: selected?.label ?? (props.value || placeholder || label)
3232
+ }),
3233
+ (0, react_jsx_runtime.jsx)(IconChevronDownOutline14, {})
3234
+ ]
3235
+ }), open && (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MenuSurface, {
3236
+ ref: popup,
3237
+ id,
3238
+ className: single_select_css_default.singleSelectPopup,
3239
+ style: {
3240
+ left: position.left,
3241
+ top: position.top,
3242
+ width: position.width,
3243
+ "--single-select-viewport-height": position.viewportHeight + "px"
3244
+ },
3245
+ role: "dialog",
3246
+ "aria-label": label,
3247
+ children: (0, react_jsx_runtime.jsx)(SingleSelectPicker, {
3248
+ ...props,
3249
+ preparing: !prepared,
3250
+ onClose: close,
3251
+ onChange: (value) => {
3252
+ props.onChange(value);
3253
+ close();
3254
+ }
3255
+ })
3256
+ })]
3257
+ });
3258
+ }
3259
+ //#endregion
3260
+ //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_ef7f6cd81f87/packages/clutch-dsh-worktree/src/client/branch/git-branch.css.mjs
3261
+ const css$4 = ".-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";
3262
+ const styleId$4 = "@cerbur/clutch-dsh-worktree/git-branch.css";
3263
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/git-branch.css\"]") === null) {
3264
+ const tag = document.createElement("style");
3265
+ tag.dataset.plugin = "@cerbur/clutch-dsh-worktree";
3266
+ tag.dataset.pluginCss = styleId$4;
3267
+ tag.textContent = css$4;
3268
+ document.head.appendChild(tag);
3269
+ }
3270
+ var git_branch_css_default = { "branchFetch": "-cerbur-clutch-dsh-worktree-branchFetch" };
3271
+ //#endregion
2798
3272
  //#region lib/client/view/worktree-view-errors.js
2799
3273
  /** A DSH Session exists even when the external Worktree binding needs repair. */
2800
3274
  var WorktreeSessionBindingError = class extends Error {
@@ -3015,11 +3489,13 @@ window.__ModuleLoader__.load({
3015
3489
  }
3016
3490
  /** Prefer the branch checked out by the DSH Workspace, then fall back to any local branch. */
3017
3491
  function selectDefaultBaseBranch(branches) {
3018
- return branches.find((branch) => branch.isCurrent)?.name ?? branches[0]?.name ?? "";
3492
+ const branch = branches.find((branch) => branch.kind !== "remote" && branch.isCurrent) ?? branches.find((branch) => branch.kind !== "remote") ?? branches[0];
3493
+ return branch?.ref ?? branch?.name ?? "";
3019
3494
  }
3020
3495
  /** Keep a valid user choice across branch-list refreshes, otherwise choose the current branch. */
3021
3496
  function reconcileBaseBranchSelection(selectedBranch, branches) {
3022
- if (branches.some((branch) => branch.name === selectedBranch)) return selectedBranch;
3497
+ if (branches.some((branch) => (branch.ref ?? branch.name) === selectedBranch)) return selectedBranch;
3498
+ if (branches.some((branch) => branch.name === selectedBranch || branch.kind === "remote" && "remotes/" + branch.name === selectedBranch)) return selectedBranch;
3023
3499
  return selectDefaultBaseBranch(branches);
3024
3500
  }
3025
3501
  /** Return copyable, read-only setup commands for a Git readiness state. */
@@ -3121,37 +3597,44 @@ window.__ModuleLoader__.load({
3121
3597
  }
3122
3598
  };
3123
3599
  }
3124
- /** Read the Worktree, branch, binding, and Workspace-root Main projections in one refresh. */
3600
+ /** Read Worktree, Git readiness/HEAD, binding, and Workspace-root Main projections. */
3125
3601
  async function loadWorktreeView(manager, workspaceId) {
3126
- const [worktreesResult, branchesResult, bindingsResult, mainInstructionsResult] = await Promise.allSettled([
3602
+ const [worktreesResult, branchesResult, bindingsResult, mainInstructionsResult, checkoutResult] = await Promise.allSettled([
3127
3603
  manager.listWorktrees({ workspaceId }),
3128
- manager.listBranches({ workspaceId }),
3604
+ typeof manager.getWorkspaceGitState === "function" ? manager.getWorkspaceGitState({ workspaceId }) : manager.listBranches({ workspaceId }),
3129
3605
  manager.listBindings({ workspaceId }),
3130
3606
  typeof manager.getWorktreeInstructions === "function" ? manager.getWorktreeInstructions({
3131
3607
  workspaceId,
3132
3608
  worktreeId: `main:${workspaceId}`
3133
- }) : Promise.resolve("")
3609
+ }) : Promise.resolve(""),
3610
+ Promise.resolve().then(() => manager.getWorkspaceCheckout?.({ workspaceId }))
3134
3611
  ]);
3135
3612
  if (worktreesResult.status === "rejected") throw worktreesResult.reason;
3136
3613
  if (bindingsResult.status === "rejected") throw bindingsResult.reason;
3137
3614
  if (mainInstructionsResult.status === "rejected") throw mainInstructionsResult.reason;
3138
3615
  if (branchesResult.status === "rejected") {
3139
3616
  const readiness = readinessFromBranchError(branchesResult.reason);
3140
- if (readiness !== void 0) return {
3617
+ if (readiness === void 0) throw branchesResult.reason;
3618
+ return {
3141
3619
  worktrees: worktreesResult.value,
3142
3620
  branches: [],
3143
3621
  bindings: bindingsResult.value,
3144
3622
  mainInstructions: mainInstructionsResult.value,
3145
3623
  readiness
3146
3624
  };
3147
- throw branchesResult.reason;
3148
3625
  }
3626
+ const checkout = checkoutResult.status === "fulfilled" ? checkoutResult.value : void 0;
3627
+ const state = branchesResult.status === "fulfilled" ? branchesResult.value : [];
3628
+ const branches = Array.isArray(state) ? state : [];
3629
+ const currentBranch = Array.isArray(state) ? branches.find((branch) => branch.isCurrent)?.name : state.currentBranch;
3149
3630
  return {
3631
+ ...checkout !== void 0 ? { checkout } : {},
3150
3632
  worktrees: worktreesResult.value,
3151
- branches: branchesResult.value,
3633
+ branches,
3634
+ ...currentBranch === void 0 ? {} : { currentBranch },
3152
3635
  bindings: bindingsResult.value,
3153
3636
  mainInstructions: mainInstructionsResult.value,
3154
- readiness: branchesResult.value.length > 0 ? { status: "ready" } : { status: "noLocalBranch" }
3637
+ readiness: branches.length > 0 || checkout?.currentHead !== void 0 ? { status: "ready" } : { status: "noLocalBranch" }
3155
3638
  };
3156
3639
  }
3157
3640
  /** Isolate modal-target callbacks while sharing the Client Workspace reader. */
@@ -3169,6 +3652,208 @@ window.__ModuleLoader__.load({
3169
3652
  return sessionIds.filter((sessionId) => !archivedSessionIds.includes(sessionId));
3170
3653
  }
3171
3654
  //#endregion
3655
+ //#region lib/client/branch/GitBranchSelector.js
3656
+ /** Branch facts and translations adapt to the shared single-selection view. */
3657
+ function useBranchPickerProps({ branches: source, t, emptyLabel, onFetch, onLoad, ...props }) {
3658
+ const [fetched, setFetched] = (0, react.useState)();
3659
+ const [status, setStatus] = (0, react.useState)("idle");
3660
+ const pending = (0, react.useRef)(false);
3661
+ const alive = (0, react.useRef)(true);
3662
+ const resetTimer = (0, react.useRef)();
3663
+ const [reading, setReading] = (0, react.useState)(false);
3664
+ const [readError, setReadError] = (0, react.useState)();
3665
+ const [fetchError, setFetchError] = (0, react.useState)();
3666
+ const generation = (0, react.useRef)(0);
3667
+ const readRequest = (0, react.useRef)();
3668
+ const latestSource = (0, react.useRef)(source);
3669
+ const latestReload = (0, react.useRef)();
3670
+ latestSource.current = source;
3671
+ const scope = (0, react.useId)();
3672
+ (0, react.useEffect)(() => {
3673
+ alive.current = true;
3674
+ if (readRequest.current && readRequest.current.generation !== generation.current) latestReload.current?.();
3675
+ return () => {
3676
+ alive.current = false;
3677
+ generation.current++;
3678
+ pending.current = false;
3679
+ clearTimeout(resetTimer.current);
3680
+ };
3681
+ }, []);
3682
+ const branches = fetched?.source === source ? fetched.branches : source;
3683
+ const legacyMatches = branches.filter((branch) => branch.name === props.value || branch.kind === "remote" && "remotes/" + branch.name === props.value);
3684
+ const value = props.value.startsWith("refs/") ? props.value : legacyMatches.length === 1 ? legacyMatches[0].ref ?? legacyMatches[0].name : props.value;
3685
+ const reload = () => {
3686
+ if (!alive.current || !onLoad || props.disabled || pending.current) return Promise.resolve();
3687
+ if (readRequest.current?.source === source && readRequest.current.generation === generation.current) return readRequest.current.promise;
3688
+ setReading(true);
3689
+ setReadError(void 0);
3690
+ const token = generation.current;
3691
+ const request = {
3692
+ source,
3693
+ generation: token,
3694
+ promise: Promise.resolve()
3695
+ };
3696
+ readRequest.current = request;
3697
+ request.promise = (async () => {
3698
+ try {
3699
+ const next = await onLoad();
3700
+ if (alive.current && generation.current === token && readRequest.current === request && latestSource.current === source) setFetched({
3701
+ source,
3702
+ branches: next
3703
+ });
3704
+ } catch (error) {
3705
+ if (alive.current && generation.current === token && readRequest.current === request && latestSource.current === source) setReadError(toWorktreeViewError(error));
3706
+ } finally {
3707
+ if (readRequest.current === request && generation.current === token) {
3708
+ readRequest.current = void 0;
3709
+ if (alive.current) setReading(false);
3710
+ }
3711
+ }
3712
+ })();
3713
+ return request.promise;
3714
+ };
3715
+ latestReload.current = reload;
3716
+ const fetchBranches = async () => {
3717
+ if (!alive.current || !onFetch || pending.current || reading || status === "success" || props.disabled || props.loading) return;
3718
+ const token = generation.current;
3719
+ clearTimeout(resetTimer.current);
3720
+ pending.current = true;
3721
+ setStatus("pending");
3722
+ try {
3723
+ const next = await onFetch();
3724
+ if (alive.current && generation.current === token) {
3725
+ setFetched({
3726
+ source,
3727
+ branches: next
3728
+ });
3729
+ setFetchError(void 0);
3730
+ setStatus("success");
3731
+ resetTimer.current = setTimeout(() => {
3732
+ if (alive.current && generation.current === token) setStatus("idle");
3733
+ }, 2e3);
3734
+ }
3735
+ } catch (error) {
3736
+ if (alive.current && generation.current === token) {
3737
+ setFetchError(toWorktreeViewError(error));
3738
+ setStatus("error");
3739
+ }
3740
+ } finally {
3741
+ if (generation.current === token) pending.current = false;
3742
+ }
3743
+ };
3744
+ const actionLabel = t(status === "pending" ? "branch.fetching" : status === "success" ? "branch.fetched" : status === "error" ? "branch.fetchFailed" : "branch.fetch");
3745
+ const action = onFetch === void 0 ? void 0 : (0, react_jsx_runtime.jsx)("button", {
3746
+ type: "button",
3747
+ className: git_branch_css_default.branchFetch,
3748
+ "data-branch-fetch": true,
3749
+ "data-fetch-status": status,
3750
+ title: fetchError === void 0 ? actionLabel : [
3751
+ actionLabel,
3752
+ fetchError.code,
3753
+ fetchError.message,
3754
+ fetchError.details === void 0 ? void 0 : JSON.stringify(fetchError.details, null, 2)
3755
+ ].filter(Boolean).join("\n"),
3756
+ "aria-label": actionLabel,
3757
+ "aria-live": "polite",
3758
+ "aria-busy": status === "pending",
3759
+ disabled: props.disabled || props.loading || reading || status === "pending" || status === "success",
3760
+ onClick: () => void fetchBranches(),
3761
+ children: status === "success" ? t("branch.fetched") : status === "error" ? (0, react_jsx_runtime.jsx)("span", {
3762
+ role: "alert",
3763
+ children: t("branch.fetchRetry")
3764
+ }) : status === "pending" ? (0, react_jsx_runtime.jsx)(IconLoadingOutline16, {}) : (0, react_jsx_runtime.jsx)(IconDownloadOutline16, {})
3765
+ });
3766
+ return {
3767
+ status,
3768
+ notice: (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(ErrorToast, {
3769
+ error: readError,
3770
+ t,
3771
+ scope: "branch-read:" + scope,
3772
+ context: t("dashboard.searchBranches"),
3773
+ actions: [{
3774
+ label: t("action.retry"),
3775
+ disabled: reading,
3776
+ onClick: () => void reload()
3777
+ }]
3778
+ }), (0, react_jsx_runtime.jsx)(ErrorToast, {
3779
+ error: fetchError,
3780
+ t,
3781
+ scope: "branch-fetch:" + scope,
3782
+ context: t("branch.fetch"),
3783
+ actions: [{
3784
+ label: t("branch.fetchRetry"),
3785
+ disabled: props.disabled || props.loading || reading || status === "pending",
3786
+ onClick: () => void fetchBranches()
3787
+ }]
3788
+ })] }),
3789
+ picker: {
3790
+ ...props,
3791
+ value,
3792
+ loading: props.loading || reading,
3793
+ onRefresh: onLoad === void 0 ? void 0 : () => {
3794
+ reload();
3795
+ },
3796
+ loadingLabel: t("select.loading"),
3797
+ searchLabel: t("dashboard.searchBranches"),
3798
+ noMatchesLabel: t("dashboard.noMatchingBranches"),
3799
+ allLabel: t("branch.all"),
3800
+ groups: [{
3801
+ value: "local",
3802
+ label: t("branch.local")
3803
+ }, {
3804
+ value: "remote",
3805
+ label: t("branch.remote"),
3806
+ action
3807
+ }],
3808
+ options: [...emptyLabel !== void 0 ? [{
3809
+ value: "",
3810
+ label: emptyLabel,
3811
+ icon: (0, react_jsx_runtime.jsx)(IconBranchOutline16, {})
3812
+ }] : [], ...branches.map((branch) => ({
3813
+ value: branch.ref ?? branch.name,
3814
+ label: branch.name,
3815
+ group: branch.kind === "remote" ? "remote" : "local",
3816
+ icon: (0, react_jsx_runtime.jsx)(IconBranchOutline16, {}),
3817
+ badge: branch.kind === "remote" ? branch.remote : branch.isCurrent ? t("branch.current") : branch.checkedOut ? t("branch.checkedOut") : void 0
3818
+ }))]
3819
+ }
3820
+ };
3821
+ }
3822
+ function GitBranchPicker(props) {
3823
+ const { picker, notice } = useBranchPickerProps(props);
3824
+ return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(SingleSelectPicker, { ...picker }), notice] });
3825
+ }
3826
+ function GitBranchSelector({ label, placeholder, size, ...props }) {
3827
+ const { picker, notice } = useBranchPickerProps(props);
3828
+ return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(SearchableSingleSelect, {
3829
+ ...picker,
3830
+ label,
3831
+ placeholder,
3832
+ size,
3833
+ icon: (0, react_jsx_runtime.jsx)(IconBranchOutline16, {})
3834
+ }), notice] });
3835
+ }
3836
+ //#endregion
3837
+ //#region lib/client/select/WorktreeSelector.js
3838
+ /** Path is the selection identity; both branch and path participate in search. */
3839
+ function WorktreeSelector({ candidates, t, ...props }) {
3840
+ return (0, react_jsx_runtime.jsx)(SearchableSingleSelect, {
3841
+ ...props,
3842
+ label: t("worktree.tabImport"),
3843
+ placeholder: t("worktree.importPlaceholder"),
3844
+ searchLabel: t("worktree.searchWorktrees"),
3845
+ noMatchesLabel: t("worktree.noMatchingWorktrees"),
3846
+ loadingLabel: t("worktree.importLoading"),
3847
+ icon: (0, react_jsx_runtime.jsx)(IconBranchOutline16, {}),
3848
+ options: candidates.map((candidate) => ({
3849
+ value: candidate.absolutePath,
3850
+ label: candidate.branch,
3851
+ description: candidate.absolutePath,
3852
+ icon: (0, react_jsx_runtime.jsx)(IconBranchOutline16, {})
3853
+ }))
3854
+ });
3855
+ }
3856
+ //#endregion
3172
3857
  //#region lib/client/session/session-selection.js
3173
3858
  /** Prefer the legacy selected-id field; DSH 1.7 represents selection by mainView retention. */
3174
3859
  function currentSessionIdFromList(sessions) {
@@ -3656,12 +4341,18 @@ window.__ModuleLoader__.load({
3656
4341
  })
3657
4342
  });
3658
4343
  }
3659
- function WorktreeCreateDialog({ t, workspace, view, readError, setupStatus, canCreate, mode, importCandidates, selectedImportPath, selectedBranch, newBranch, actionPending, onClose, onRetry, onModeChange, onRetryImportCandidates, onSelectedImportPathChange, onSelectedBranchChange, onNewBranchChange, onSubmit }) {
4344
+ function WorktreeCreateDialog({ t, workspace, view, readError, setupStatus, canCreate, branchesLoading = view === void 0 && setupStatus === void 0 && readError === void 0, pickerKey, mode, importCandidates, selectedImportPath, selectedBranch, newBranch, actionPending, onClose, onRetry, onModeChange, onRetryImportCandidates, onSelectedImportPathChange, onSelectedBranchChange, onFetchBranches, onLoadBranches, onNewBranchChange, onSubmit }) {
3660
4345
  if (workspace === void 0) return null;
3661
4346
  const setupCommands = setupStatus === void 0 ? [] : worktreeSetupCommands(setupStatus);
3662
4347
  const importing = mode === "import";
4348
+ const branchOptions = [...view?.checkout?.currentHead !== void 0 ? [{
4349
+ ref: "HEAD",
4350
+ name: t("worktree.headOption", { name: view.checkout.currentHead.name }),
4351
+ isCurrent: false,
4352
+ checkedOut: false
4353
+ }] : [], ...view?.branches ?? []];
3663
4354
  const importBlocked = actionPending || importCandidates.status === "loading" || selectedImportPath === void 0;
3664
- return (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
4355
+ return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
3665
4356
  open: true,
3666
4357
  onClose: () => {
3667
4358
  if (actionPending) return;
@@ -3669,6 +4360,7 @@ window.__ModuleLoader__.load({
3669
4360
  },
3670
4361
  closeLabel: t("dialog.closeWorktreeCreate"),
3671
4362
  title: t("worktree.createTitle"),
4363
+ className: worktree_css_default.worktreeRegistrationDialog,
3672
4364
  description: importing ? t("worktree.importDescription", { name: workspace.title }) : t("worktree.createDescription", { name: workspace.title }),
3673
4365
  footer: (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
3674
4366
  variant: "outline",
@@ -3683,141 +4375,120 @@ window.__ModuleLoader__.load({
3683
4375
  },
3684
4376
  children: importing ? t("worktree.import") : t("worktree.create")
3685
4377
  })] }),
3686
- children: [(0, react_jsx_runtime.jsxs)("div", {
3687
- className: worktree_css_default.worktreeModalTabs,
3688
- role: "tablist",
3689
- "aria-label": t("worktree.title"),
3690
- children: [(0, react_jsx_runtime.jsx)("button", {
3691
- className: worktree_css_default.worktreeModalTab,
3692
- type: "button",
3693
- role: "tab",
3694
- "aria-selected": mode === "create",
3695
- disabled: actionPending,
3696
- onClick: () => {
3697
- onModeChange("create");
3698
- },
3699
- children: t("worktree.tabCreate")
3700
- }), (0, react_jsx_runtime.jsx)("button", {
3701
- className: worktree_css_default.worktreeModalTab,
3702
- type: "button",
3703
- role: "tab",
3704
- "aria-selected": mode === "import",
3705
- disabled: actionPending,
3706
- onClick: () => {
3707
- onModeChange("import");
3708
- },
3709
- children: t("worktree.tabImport")
3710
- })]
3711
- }), importing ? (0, react_jsx_runtime.jsxs)("div", {
3712
- className: worktree_css_default.worktreeImportCandidates,
3713
- role: "tabpanel",
3714
- children: [
3715
- importCandidates.status === "loading" && importCandidates.candidates.length === 0 && (0, react_jsx_runtime.jsx)("p", {
3716
- className: worktree_css_default.message,
3717
- children: t("worktree.importLoading")
3718
- }),
3719
- importCandidates.status === "error" && (0, react_jsx_runtime.jsx)("div", {
3720
- className: worktree_css_default.recoveryActions,
3721
- children: (0, react_jsx_runtime.jsx)(ErrorToast, {
3722
- error: importCandidates.error,
3723
- t,
3724
- scope: "import:" + workspace.workspaceId,
3725
- context: t("settings.import") + " · " + workspace.title + " · " + workspace.path,
3726
- actions: [{
3727
- label: t("action.retry"),
4378
+ children: (0, react_jsx_runtime.jsxs)("div", {
4379
+ className: worktree_css_default.worktreeRegistrationBody,
4380
+ children: [(0, react_jsx_runtime.jsxs)("div", {
4381
+ className: worktree_css_default.worktreeModalTabs,
4382
+ role: "tablist",
4383
+ "aria-label": t("worktree.title"),
4384
+ children: [(0, react_jsx_runtime.jsx)("button", {
4385
+ className: worktree_css_default.worktreeModalTab,
4386
+ type: "button",
4387
+ role: "tab",
4388
+ "aria-selected": mode === "create",
4389
+ disabled: actionPending,
4390
+ onClick: () => {
4391
+ onModeChange("create");
4392
+ },
4393
+ children: t("worktree.tabCreate")
4394
+ }), (0, react_jsx_runtime.jsx)("button", {
4395
+ className: worktree_css_default.worktreeModalTab,
4396
+ type: "button",
4397
+ role: "tab",
4398
+ "aria-selected": mode === "import",
4399
+ disabled: actionPending,
4400
+ onClick: () => {
4401
+ onModeChange("import");
4402
+ },
4403
+ children: t("worktree.tabImport")
4404
+ })]
4405
+ }), importing ? (0, react_jsx_runtime.jsxs)("div", {
4406
+ className: worktree_css_default.worktreeImportCandidates,
4407
+ role: "tabpanel",
4408
+ children: [
4409
+ importCandidates.status === "error" && (0, react_jsx_runtime.jsx)("div", {
4410
+ className: worktree_css_default.recoveryActions,
4411
+ children: (0, react_jsx_runtime.jsx)(ErrorToast, {
4412
+ error: importCandidates.error,
4413
+ t,
4414
+ scope: "import:" + workspace.workspaceId,
4415
+ context: t("settings.import") + " · " + workspace.title + " · " + workspace.path,
4416
+ actions: [{
4417
+ label: t("action.retry"),
4418
+ disabled: actionPending,
4419
+ onClick: onRetryImportCandidates
4420
+ }]
4421
+ })
4422
+ }),
4423
+ importCandidates.candidates.length === 0 && importCandidates.status === "ready" && (0, react_jsx_runtime.jsx)("p", {
4424
+ className: worktree_css_default.message,
4425
+ children: t("worktree.importEmpty")
4426
+ }),
4427
+ (0, react_jsx_runtime.jsxs)("div", {
4428
+ className: worktree_css_default.modalField,
4429
+ children: [t("worktree.tabImport"), (0, react_jsx_runtime.jsx)(WorktreeSelector, {
4430
+ t,
4431
+ candidates: importCandidates.candidates,
4432
+ value: selectedImportPath ?? "",
3728
4433
  disabled: actionPending,
3729
- onClick: onRetryImportCandidates
3730
- }]
4434
+ loading: importCandidates.status === "idle" || importCandidates.status === "loading",
4435
+ onChange: onSelectedImportPathChange
4436
+ }, pickerKey)]
3731
4437
  })
3732
- }),
3733
- importCandidates.candidates.length === 0 && importCandidates.status === "ready" && (0, react_jsx_runtime.jsx)("p", {
3734
- className: worktree_css_default.message,
3735
- children: t("worktree.importEmpty")
3736
- }),
3737
- importCandidates.candidates.length > 0 && (0, react_jsx_runtime.jsxs)("label", {
3738
- className: worktree_css_default.modalField,
3739
- children: [t("worktree.tabImport"), (0, react_jsx_runtime.jsxs)("select", {
3740
- className: worktree_css_default.worktreeImportSelect,
3741
- "data-worktree-import-select": true,
3742
- "aria-label": t("worktree.tabImport"),
3743
- value: selectedImportPath ?? "",
4438
+ ]
4439
+ }) : readError !== void 0 ? (0, react_jsx_runtime.jsx)("div", {
4440
+ className: worktree_css_default.gitReadiness,
4441
+ "data-worktree-readiness": "error",
4442
+ children: (0, react_jsx_runtime.jsx)(ErrorToast, {
4443
+ error: readError,
4444
+ t,
4445
+ scope: "modal-read:" + workspace.workspaceId,
4446
+ context: t("settings.create") + " · " + workspace.title + " · " + workspace.path,
4447
+ actions: readError.retryable && onRetry !== void 0 ? [{
4448
+ label: t("action.retry"),
3744
4449
  disabled: actionPending,
3745
- onChange: (event) => {
3746
- onSelectedImportPathChange(event.currentTarget.value);
3747
- },
3748
- children: [(0, react_jsx_runtime.jsx)("option", {
3749
- value: "",
3750
- disabled: true,
3751
- children: t("worktree.importPlaceholder")
3752
- }), importCandidates.candidates.map((candidate) => (0, react_jsx_runtime.jsxs)("option", {
3753
- value: candidate.absolutePath,
3754
- children: [
3755
- candidate.branch,
3756
- " — ",
3757
- candidate.absolutePath
3758
- ]
3759
- }, candidate.absolutePath))]
3760
- })]
4450
+ onClick: onRetry
4451
+ }] : []
3761
4452
  })
3762
- ]
3763
- }) : readError !== void 0 ? (0, react_jsx_runtime.jsx)("div", {
3764
- className: worktree_css_default.gitReadiness,
3765
- "data-worktree-readiness": "error",
3766
- children: (0, react_jsx_runtime.jsx)(ErrorToast, {
3767
- error: readError,
3768
- t,
3769
- scope: "modal-read:" + workspace.workspaceId,
3770
- context: t("settings.create") + " · " + workspace.title + " · " + workspace.path,
3771
- actions: readError.retryable && onRetry !== void 0 ? [{
3772
- label: t("action.retry"),
4453
+ }) : canCreate || branchesLoading && setupStatus === void 0 ? (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)("div", {
4454
+ className: worktree_css_default.modalField,
4455
+ children: [t("worktree.baseBranch"), (0, react_jsx_runtime.jsx)(GitBranchSelector, {
4456
+ t,
4457
+ branches: branchOptions,
4458
+ label: t("worktree.baseBranch"),
4459
+ value: selectedBranch,
3773
4460
  disabled: actionPending,
3774
- onClick: onRetry
3775
- }] : []
3776
- })
3777
- }) : canCreate ? (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)("label", {
3778
- className: worktree_css_default.modalField,
3779
- children: [t("worktree.baseBranch"), (0, react_jsx_runtime.jsx)("select", {
3780
- className: worktree_css_default.actionSelect,
3781
- "aria-label": t("worktree.baseBranch"),
3782
- value: selectedBranch,
3783
- disabled: actionPending,
3784
- onChange: (event) => {
3785
- onSelectedBranchChange(event.currentTarget.value);
3786
- },
3787
- children: view?.branches.map((branch) => (0, react_jsx_runtime.jsxs)("option", {
3788
- value: branch.name,
3789
- children: [
3790
- branch.name,
3791
- branch.isCurrent ? t("branch.current") : "",
3792
- branch.checkedOut ? t("branch.checkedOut") : ""
3793
- ]
3794
- }, branch.name))
3795
- })]
3796
- }), (0, react_jsx_runtime.jsxs)("label", {
3797
- className: worktree_css_default.modalField,
3798
- children: [t("worktree.name"), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
3799
- className: worktree_css_default.renameInput,
3800
- "aria-label": t("worktree.name"),
3801
- value: newBranch,
3802
- placeholder: "dsh/12345678",
3803
- disabled: actionPending,
3804
- onChange: (event) => {
3805
- onNewBranchChange(event.currentTarget.value);
3806
- }
3807
- })]
3808
- })] }) : (0, react_jsx_runtime.jsxs)("div", {
3809
- className: worktree_css_default.gitReadiness,
3810
- "data-worktree-readiness": setupStatus ?? "loading",
3811
- role: "status",
3812
- children: [(0, react_jsx_runtime.jsx)("p", {
3813
- className: worktree_css_default.message,
3814
- children: setupStatus === void 0 ? t("status.loading") : worktreeSetupMessage(setupStatus, t)
3815
- }), setupCommands.length > 0 && (0, react_jsx_runtime.jsx)("pre", {
3816
- className: worktree_css_default.commandBlock,
3817
- "aria-label": t("worktree.setup.commands"),
3818
- children: setupCommands.join("\n")
4461
+ loading: branchesLoading,
4462
+ onChange: onSelectedBranchChange,
4463
+ onFetch: onFetchBranches,
4464
+ onLoad: onLoadBranches
4465
+ }, pickerKey)]
4466
+ }), (0, react_jsx_runtime.jsxs)("label", {
4467
+ className: worktree_css_default.modalField,
4468
+ children: [t("worktree.name"), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
4469
+ className: worktree_css_default.renameInput,
4470
+ "aria-label": t("worktree.name"),
4471
+ value: newBranch,
4472
+ placeholder: "dsh/12345678",
4473
+ disabled: actionPending,
4474
+ onChange: (event) => {
4475
+ onNewBranchChange(event.currentTarget.value);
4476
+ }
4477
+ })]
4478
+ })] }) : (0, react_jsx_runtime.jsxs)("div", {
4479
+ className: worktree_css_default.gitReadiness,
4480
+ "data-worktree-readiness": setupStatus ?? "loading",
4481
+ role: "status",
4482
+ children: [(0, react_jsx_runtime.jsx)("p", {
4483
+ className: worktree_css_default.message,
4484
+ children: setupStatus === void 0 ? t("status.loading") : worktreeSetupMessage(setupStatus, t)
4485
+ }), setupCommands.length > 0 && (0, react_jsx_runtime.jsx)("pre", {
4486
+ className: worktree_css_default.commandBlock,
4487
+ "aria-label": t("worktree.setup.commands"),
4488
+ children: setupCommands.join("\n")
4489
+ })]
3819
4490
  })]
3820
- })]
4491
+ })
3821
4492
  });
3822
4493
  }
3823
4494
  function WorktreeRemovalDialog({ t, worktree, actionPending, onClose, onSubmit }) {
@@ -4261,39 +4932,110 @@ window.__ModuleLoader__.load({
4261
4932
  function RegistrationDialog({ props, registration, registrationState, mutation, read }) {
4262
4933
  const { t } = props;
4263
4934
  const { modalWorkspace, modalView, modalSetupStatus, modalCanCreate, closeWorktreeCreator, changeWorktreeModalMode, loadImportCandidates, submitWorktree } = registration;
4264
- const { modalReadError, worktreeModalMode, importCandidates, selectedImportPath, selectedBranch, newBranch, worktreeModalWorkspaceId, modalReadViewRef, setSelectedBranch, setNewBranch, setSelectedImportPath } = registrationState;
4935
+ const { modalReadError, modalReadLoading, worktreeModalMode, importCandidates, selectedImportPath, selectedBranch, newBranch, worktreeModalWorkspaceId, modalReadViewRef, modalWorkspaceIdRef, modalGenerationRef, modalLifetimeRef, setModalBranches, setSelectedBranch, setNewBranch, setSelectedImportPath } = registrationState;
4265
4936
  const { actionPending } = mutation;
4266
4937
  const { loadModalWorktreeView } = read;
4938
+ const shell = (0, react.useRef)({
4939
+ workspaceId: worktreeModalWorkspaceId,
4940
+ manager: props.manager,
4941
+ lifetime: modalLifetimeRef.current,
4942
+ generation: 0
4943
+ });
4944
+ if (shell.current.workspaceId !== worktreeModalWorkspaceId || shell.current.manager !== props.manager || shell.current.lifetime !== modalLifetimeRef.current) shell.current = {
4945
+ workspaceId: worktreeModalWorkspaceId,
4946
+ manager: props.manager,
4947
+ lifetime: modalLifetimeRef.current,
4948
+ generation: shell.current.generation + 1
4949
+ };
4950
+ const lifecycle = (0, react.useRef)({
4951
+ workspaceId: worktreeModalWorkspaceId,
4952
+ manager: props.manager,
4953
+ mode: worktreeModalMode,
4954
+ ownerGeneration: modalGenerationRef.current,
4955
+ generation: 0
4956
+ });
4957
+ if (lifecycle.current.workspaceId !== worktreeModalWorkspaceId || lifecycle.current.manager !== props.manager || lifecycle.current.mode !== worktreeModalMode || lifecycle.current.ownerGeneration !== modalGenerationRef.current) lifecycle.current = {
4958
+ workspaceId: worktreeModalWorkspaceId,
4959
+ manager: props.manager,
4960
+ mode: worktreeModalMode,
4961
+ ownerGeneration: modalGenerationRef.current,
4962
+ generation: lifecycle.current.generation + 1
4963
+ };
4964
+ const alive = (0, react.useRef)(true);
4965
+ (0, react.useEffect)(() => {
4966
+ alive.current = true;
4967
+ return () => {
4968
+ alive.current = false;
4969
+ };
4970
+ }, []);
4971
+ const generation = lifecycle.current.generation;
4972
+ const ownerGeneration = modalGenerationRef.current;
4973
+ const isCurrent = () => alive.current && lifecycle.current.generation === generation && modalGenerationRef.current === ownerGeneration && modalWorkspaceIdRef.current === worktreeModalWorkspaceId;
4267
4974
  return (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: (0, react_jsx_runtime.jsx)(WorktreeCreateDialog, {
4975
+ pickerKey: generation,
4268
4976
  t,
4269
4977
  workspace: modalWorkspace,
4270
4978
  view: modalView,
4271
4979
  readError: modalReadError,
4272
4980
  setupStatus: modalSetupStatus,
4273
4981
  canCreate: modalCanCreate,
4982
+ branchesLoading: modalReadLoading || modalView === void 0,
4274
4983
  mode: worktreeModalMode,
4275
4984
  importCandidates,
4276
4985
  selectedImportPath,
4277
4986
  selectedBranch,
4278
4987
  newBranch,
4279
4988
  actionPending,
4280
- onClose: closeWorktreeCreator,
4989
+ onClose: () => {
4990
+ if (actionPending || !isCurrent()) return;
4991
+ lifecycle.current.generation++;
4992
+ closeWorktreeCreator();
4993
+ },
4281
4994
  onRetry: () => {
4282
- if (worktreeModalWorkspaceId === void 0) return;
4995
+ if (worktreeModalWorkspaceId === void 0 || !isCurrent()) return;
4996
+ lifecycle.current.generation++;
4283
4997
  modalReadViewRef.current = void 0;
4284
4998
  setSelectedBranch("");
4285
4999
  setNewBranch("");
4286
5000
  loadModalWorktreeView(worktreeModalWorkspaceId);
4287
5001
  },
4288
- onModeChange: changeWorktreeModalMode,
5002
+ onModeChange: (mode) => {
5003
+ if (!isCurrent()) return;
5004
+ if (mode !== worktreeModalMode) lifecycle.current.generation++;
5005
+ changeWorktreeModalMode(mode);
5006
+ },
4289
5007
  onRetryImportCandidates: () => {
4290
5008
  if (worktreeModalWorkspaceId !== void 0) loadImportCandidates(worktreeModalWorkspaceId);
4291
5009
  },
4292
5010
  onSelectedImportPathChange: setSelectedImportPath,
4293
5011
  onSelectedBranchChange: setSelectedBranch,
5012
+ onLoadBranches: props.manager === void 0 || worktreeModalWorkspaceId === void 0 ? void 0 : async () => {
5013
+ if (!isCurrent()) return [];
5014
+ const branches = await props.manager.listBranches({ workspaceId: worktreeModalWorkspaceId });
5015
+ if (isCurrent()) setModalBranches(branches);
5016
+ return branches;
5017
+ },
5018
+ onFetchBranches: props.manager?.fetchRemoteBranches === void 0 || worktreeModalWorkspaceId === void 0 ? void 0 : async () => {
5019
+ if (!isCurrent()) return [];
5020
+ const workspaceId = worktreeModalWorkspaceId;
5021
+ try {
5022
+ const branches = await props.manager.fetchRemoteBranches({ workspaceId });
5023
+ if (isCurrent()) setModalBranches(branches);
5024
+ return branches;
5025
+ } finally {
5026
+ if (isCurrent()) await read.refresh({
5027
+ preserveCurrent: true,
5028
+ invalidateContext: false,
5029
+ scope: {
5030
+ kind: "workspace",
5031
+ workspaceId
5032
+ }
5033
+ });
5034
+ }
5035
+ },
4294
5036
  onNewBranchChange: setNewBranch,
4295
5037
  onSubmit: submitWorktree
4296
- }) });
5038
+ }, shell.current.generation) });
4297
5039
  }
4298
5040
  //#endregion
4299
5041
  //#region lib/client/surface/shared.js
@@ -4532,13 +5274,17 @@ window.__ModuleLoader__.load({
4532
5274
  function isManagedDashboardRecord(record) {
4533
5275
  return !isMainWorktreeId$1(record.worktreeId);
4534
5276
  }
4535
- function createMainWorktreeRecord(workspace, currentBranch, instructions = "") {
5277
+ function createMainWorktreeRecord(workspace, currentBranch, instructions = "", checkout) {
4536
5278
  return {
4537
5279
  worktreeId: `main:${workspace.workspaceId}`,
4538
5280
  workspaceId: workspace.workspaceId,
4539
- branch: currentBranch ?? "",
4540
- currentBranch,
4541
- absolutePath: workspace.path,
5281
+ branch: checkout?.currentHead?.name ?? currentBranch ?? "",
5282
+ currentBranch: checkout?.currentHead === void 0 ? currentBranch : checkout.currentHead.kind === "branch" ? checkout.currentHead.name : null,
5283
+ ...checkout === void 0 ? {} : {
5284
+ gitRootPath: checkout.gitRootPath,
5285
+ currentHead: checkout.currentHead
5286
+ },
5287
+ absolutePath: checkout?.workspacePath ?? workspace.path,
4542
5288
  status: "active",
4543
5289
  instructions
4544
5290
  };
@@ -5733,8 +6479,10 @@ window.__ModuleLoader__.load({
5733
6479
  children: t("workspace.noMatches")
5734
6480
  }) : visibleWorkspaces.map((workspace) => {
5735
6481
  const view = viewByWorkspace.get(workspace.workspaceId);
5736
- const currentBranch = view?.branches.find((branch) => branch.isCurrent)?.name;
5737
- const mainLabel = currentBranch === void 0 ? t("worktree.main") : t("worktree.mainWithBranch", { branch: currentBranch });
6482
+ const currentBranch = view?.currentBranch === null ? void 0 : view?.currentBranch ?? view?.branches.find((branch) => branch.isCurrent)?.name;
6483
+ const currentHead = view?.checkout?.currentHead;
6484
+ const mainRef = currentHead?.name ?? currentBranch;
6485
+ const mainLabel = mainRef === void 0 ? t("worktree.main") : t("worktree.mainWithBranch", { branch: mainRef });
5738
6486
  const expanded = isWorkspaceExpanded(expandSnapshot, workspace.workspaceId) || isCurrentSessionReveal("workspace:" + workspace.workspaceId);
5739
6487
  const workspaceMatchesQuery = includesText(workspace.title, query);
5740
6488
  const allWorkspaceSessionIds = filterArchivedSessionIds(workspaceSessionIds(workspaces, workspace.workspaceId, sessions.ids), archivedSessionIds);
@@ -5828,20 +6576,20 @@ window.__ModuleLoader__.load({
5828
6576
  },
5829
6577
  showDashboardAction: props.openDashboard !== void 0,
5830
6578
  menu: {
5831
- onDashboard: props.openDashboard === void 0 ? void 0 : () => props.openDashboard?.(createMainWorktreeRecord(workspace, currentBranch)),
6579
+ onDashboard: props.openDashboard === void 0 ? void 0 : () => props.openDashboard?.(createMainWorktreeRecord(workspace, currentBranch, view?.mainInstructions, view?.checkout)),
5832
6580
  open: openMainMenuId === workspace.workspaceId,
5833
6581
  label: mainLabel,
5834
6582
  copyPath: workspace.path,
5835
- showCreate: currentBranch !== void 0,
6583
+ showCreate: mainRef !== void 0,
5836
6584
  showRemove: false,
5837
6585
  disabled: actionPending,
5838
6586
  onOpenChange: (open) => {
5839
6587
  setOpenMainMenuId(open ? workspace.workspaceId : void 0);
5840
6588
  },
5841
- onCreateWorktree: currentBranch === void 0 ? void 0 : () => {
6589
+ onCreateWorktree: mainRef === void 0 ? void 0 : () => {
5842
6590
  openWorktreeCreator(workspace, {
5843
- baseBranch: currentBranch,
5844
- newBranch: createNumberedWorktreeName(currentBranch, workspaceWorktreeNames)
6591
+ baseBranch: currentHead?.kind !== "branch" && currentHead !== void 0 ? "HEAD" : currentBranch,
6592
+ newBranch: createNumberedWorktreeName(mainRef, workspaceWorktreeNames)
5845
6593
  });
5846
6594
  }
5847
6595
  },
@@ -6822,7 +7570,7 @@ window.__ModuleLoader__.load({
6822
7570
  if (isCurrent()) setActionPending(false);
6823
7571
  }
6824
7572
  };
6825
- const branchLabel = (record) => record.health === "branch-drift" ? `${record.branch} → ${record.currentBranch ?? t("worktree.detachedHead")}` : record.branch;
7573
+ const branchLabel = (record) => record.health === "branch-drift" ? `${record.branch} → ${record.currentHead?.name ?? record.currentBranch ?? t("worktree.detachedHead")}` : record.branch;
6826
7574
  return {
6827
7575
  latestLifecycleTarget,
6828
7576
  cleanDiskTarget,
@@ -7047,6 +7795,7 @@ window.__ModuleLoader__.load({
7047
7795
  const [worktreeModalWorkspaceId, setWorktreeModalWorkspaceId] = (0, react.useState)();
7048
7796
  const [modalReadError, setModalReadError] = (0, react.useState)();
7049
7797
  const [modalReadLoading, setModalReadLoading] = (0, react.useState)(false);
7798
+ const [modalBranches, setModalBranches] = (0, react.useState)();
7050
7799
  const [worktreeModalMode, setWorktreeModalMode] = (0, react.useState)("create");
7051
7800
  const [importCandidates, setImportCandidates] = (0, react.useState)({
7052
7801
  status: "idle",
@@ -7059,6 +7808,8 @@ window.__ModuleLoader__.load({
7059
7808
  const modalReadViewRef = (0, react.useRef)();
7060
7809
  const importCandidatesGuard = (0, react.useRef)(createWorktreeRefreshGuard());
7061
7810
  const modalWorkspaceIdRef = (0, react.useRef)(worktreeModalWorkspaceId);
7811
+ const modalGenerationRef = (0, react.useRef)(0);
7812
+ const modalLifetimeRef = (0, react.useRef)(0);
7062
7813
  modalWorkspaceIdRef.current = worktreeModalWorkspaceId;
7063
7814
  return {
7064
7815
  worktreeModalWorkspaceId,
@@ -7067,6 +7818,8 @@ window.__ModuleLoader__.load({
7067
7818
  setModalReadError,
7068
7819
  modalReadLoading,
7069
7820
  setModalReadLoading,
7821
+ modalBranches,
7822
+ setModalBranches,
7070
7823
  worktreeModalMode,
7071
7824
  setWorktreeModalMode,
7072
7825
  importCandidates,
@@ -7080,7 +7833,9 @@ window.__ModuleLoader__.load({
7080
7833
  modalReadLoader,
7081
7834
  modalReadViewRef,
7082
7835
  importCandidatesGuard,
7083
- modalWorkspaceIdRef
7836
+ modalWorkspaceIdRef,
7837
+ modalGenerationRef,
7838
+ modalLifetimeRef
7084
7839
  };
7085
7840
  }
7086
7841
  //#endregion
@@ -8547,29 +9302,38 @@ window.__ModuleLoader__.load({
8547
9302
  //#region lib/client/surface/actions/useWorktreeRegistration.js
8548
9303
  function useWorktreeRegistration({ source, registrationState, read, props, mutation, session }) {
8549
9304
  const { workspaces } = source;
8550
- const { worktreeModalWorkspaceId, modalReadLoading, setSelectedBranch, setNewBranch, setImportCandidates, importCandidatesGuard, modalWorkspaceIdRef, modalReadLoader, modalReadViewRef, setWorktreeModalWorkspaceId, setModalReadError, setModalReadLoading, setWorktreeModalMode, setSelectedImportPath, importCandidates, newBranch, selectedImportPath, worktreeModalMode, selectedBranch } = registrationState;
9305
+ const { worktreeModalWorkspaceId, modalReadLoading, modalBranches, setModalBranches, setSelectedBranch, setNewBranch, setImportCandidates, importCandidatesGuard, modalWorkspaceIdRef, modalGenerationRef, modalLifetimeRef, modalReadLoader, modalReadViewRef, setWorktreeModalWorkspaceId, setModalReadError, setModalReadLoading, setWorktreeModalMode, setSelectedImportPath, importCandidates, newBranch, selectedImportPath, worktreeModalMode, selectedBranch } = registrationState;
8551
9306
  const { viewByWorkspace, loadModalWorktreeView, refresh } = read;
8552
9307
  const { manager, createSessionForWorktree: createSessionCallback } = props;
8553
9308
  const { actionPending, setActionError, setActionPending } = mutation;
8554
9309
  const { setPendingSessionBinding } = session;
8555
9310
  const modalWorkspace = workspaces.items.find((workspace) => workspace.workspaceId === worktreeModalWorkspaceId);
8556
- const modalView = worktreeModalWorkspaceId === void 0 ? void 0 : viewByWorkspace.get(worktreeModalWorkspaceId);
9311
+ const modalProjection = worktreeModalWorkspaceId === void 0 ? void 0 : modalReadViewRef.current?.workspaceId === worktreeModalWorkspaceId ? modalReadViewRef.current : viewByWorkspace.get(worktreeModalWorkspaceId);
9312
+ const modalView = (0, react.useMemo)(() => modalProjection === void 0 || modalBranches === void 0 ? modalProjection : {
9313
+ ...modalProjection,
9314
+ branches: modalBranches
9315
+ }, [modalProjection, modalBranches]);
8557
9316
  const modalReadiness = modalView?.readiness;
8558
- const modalSetupStatus = modalView === void 0 ? void 0 : modalReadiness?.status === "ready" ? modalView.branches.length === 0 ? "noLocalBranch" : void 0 : modalReadiness?.status;
9317
+ const modalSetupStatus = modalView === void 0 ? void 0 : modalReadiness?.status === "ready" ? void 0 : modalReadiness?.status;
8559
9318
  const modalCanCreate = !modalReadLoading && modalSetupStatus === void 0 && modalReadiness?.status === "ready";
8560
9319
  (0, react.useEffect)(() => {
8561
9320
  if (worktreeModalWorkspaceId === void 0 || modalView === void 0) return;
9321
+ if (modalReadLoading) return;
8562
9322
  if (modalView.readiness.status !== "ready") {
8563
9323
  setSelectedBranch("");
8564
9324
  setNewBranch("");
8565
9325
  return;
8566
9326
  }
8567
- setSelectedBranch((current) => reconcileBaseBranchSelection(current, modalView.branches));
9327
+ setSelectedBranch((current) => current === "HEAD" && modalView.checkout?.currentHead !== void 0 ? current : modalView.checkout?.currentHead?.kind !== "branch" && modalView.checkout?.currentHead !== void 0 && current === "" ? "HEAD" : modalView.branches.length > 0 ? reconcileBaseBranchSelection(current, modalView.branches) : current || modalView.currentBranch || "HEAD");
8568
9328
  setNewBranch((current) => {
8569
9329
  if (current.length > 0) return current;
8570
9330
  return createDefaultWorktreeName([...modalView.branches.map((branch) => branch.name), ...modalView.worktrees.map((worktree) => worktree.branch)]);
8571
9331
  });
8572
- }, [modalView, worktreeModalWorkspaceId]);
9332
+ }, [
9333
+ modalView,
9334
+ worktreeModalWorkspaceId,
9335
+ modalReadLoading
9336
+ ]);
8573
9337
  const loadImportCandidates = (0, react.useCallback)(async (workspaceId) => {
8574
9338
  if (manager === void 0) return;
8575
9339
  setImportCandidates((current) => ({
@@ -8593,19 +9357,25 @@ window.__ModuleLoader__.load({
8593
9357
  }, [manager]);
8594
9358
  const closeWorktreeCreator = (force = false) => {
8595
9359
  if (actionPending && !force) return;
9360
+ modalGenerationRef.current++;
9361
+ modalLifetimeRef.current++;
8596
9362
  modalReadLoader.current.invalidate();
8597
9363
  modalReadViewRef.current = void 0;
8598
9364
  importCandidatesGuard.current.invalidate();
8599
9365
  setWorktreeModalWorkspaceId(void 0);
8600
9366
  setModalReadError(void 0);
8601
9367
  setModalReadLoading(false);
9368
+ setModalBranches(void 0);
8602
9369
  };
8603
9370
  const openWorktreeCreator = (workspace, defaults = {}) => {
8604
9371
  const view = viewByWorkspace.get(workspace.workspaceId);
9372
+ modalGenerationRef.current++;
9373
+ modalLifetimeRef.current++;
8605
9374
  modalReadLoader.current.invalidate();
8606
9375
  modalReadViewRef.current = void 0;
8607
9376
  importCandidatesGuard.current.invalidate();
8608
9377
  setWorktreeModalWorkspaceId(workspace.workspaceId);
9378
+ setModalBranches(void 0);
8609
9379
  setWorktreeModalMode("create");
8610
9380
  setImportCandidates({
8611
9381
  status: "idle",
@@ -8615,16 +9385,18 @@ window.__ModuleLoader__.load({
8615
9385
  setActionError(void 0);
8616
9386
  setModalReadError(void 0);
8617
9387
  setModalReadLoading(false);
8618
- if (view === void 0) {
9388
+ if (view === void 0 || view.branches.length === 0) {
8619
9389
  setSelectedBranch(defaults.baseBranch ?? "");
8620
9390
  setNewBranch(defaults.newBranch ?? "");
8621
9391
  loadModalWorktreeView(workspace.workspaceId);
8622
9392
  return;
8623
9393
  }
8624
- setSelectedBranch(defaults.baseBranch ?? selectDefaultBaseBranch(view.branches));
9394
+ setSelectedBranch(defaults.baseBranch ?? (view.checkout?.currentHead !== void 0 && view.checkout.currentHead.kind !== "branch" ? "HEAD" : selectDefaultBaseBranch(view.branches)));
8625
9395
  setNewBranch(defaults.newBranch ?? createDefaultWorktreeName([...view.branches.map((branch) => branch.name), ...view.worktrees.map((worktree) => worktree.branch)]));
9396
+ loadModalWorktreeView(workspace.workspaceId);
8626
9397
  };
8627
9398
  const changeWorktreeModalMode = (mode) => {
9399
+ if (mode !== worktreeModalMode) modalGenerationRef.current++;
8628
9400
  setWorktreeModalMode(mode);
8629
9401
  if (mode === "import" && worktreeModalWorkspaceId !== void 0 && importCandidates.status === "idle") loadImportCandidates(worktreeModalWorkspaceId);
8630
9402
  };
@@ -8689,6 +9461,10 @@ window.__ModuleLoader__.load({
8689
9461
  input: {
8690
9462
  workspaceId: modalWorkspace.workspaceId,
8691
9463
  branch: selectedBranch,
9464
+ ...selectedBranch === "HEAD" ? {
9465
+ fromHead: true,
9466
+ expectedHeadCommit: modalView?.checkout?.currentHead?.commit
9467
+ } : {},
8692
9468
  newBranch: worktreeName
8693
9469
  }
8694
9470
  }) : await executeWorktreeAction(manager, {
@@ -8827,7 +9603,7 @@ window.__ModuleLoader__.load({
8827
9603
  };
8828
9604
  const defaultOpenInAppController = new OpenInAppController();
8829
9605
  //#endregion
8830
- //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_ece6fafadbd1/packages/clutch-dsh-worktree/src/client/dashboard/open-in-app.css.mjs
9606
+ //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_ef7f6cd81f87/packages/clutch-dsh-worktree/src/client/dashboard/open-in-app.css.mjs
8831
9607
  const css$3 = ".-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";
8832
9608
  const styleId$3 = "@cerbur/clutch-dsh-worktree/open-in-app.css";
8833
9609
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/open-in-app.css\"]") === null) {
@@ -9038,8 +9814,8 @@ window.__ModuleLoader__.load({
9038
9814
  };
9039
9815
  }
9040
9816
  //#endregion
9041
- //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_ece6fafadbd1/packages/clutch-dsh-worktree/src/client/dashboard/dashboard.css.mjs
9042
- const css$2 = ".-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 {\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-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: wrap;\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: wrap;\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) 225px;\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 overflow-wrap: anywhere;\n min-width: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTitleRow[role='button'] {\n cursor: pointer;\n}\n.-cerbur-clutch-dsh-worktree-dashboardTitleRow[role='button']:focus-visible {\n outline: 2px solid #497cd4;\n outline-offset: 3px;\n border-radius: 4px;\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 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(90px, 0.85fr) minmax(0, 1fr) 29px;\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-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-dashboardHeaderAside .-cerbur-clutch-dsh-worktree-dashboardFacts > div {\n padding: 4px 0;\n border: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardHistorical {\n color: var(--dsw-alias-label-secondary, #788191);\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-dashboardBaselineSearch {\n box-sizing: border-box;\n flex: none;\n display: flex;\n width: 100%;\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineOptions {\n box-sizing: border-box;\n display: flex;\n flex: none;\n flex-direction: column;\n width: 100%;\n min-width: min(220px, 100%);\n max-width: min(420px, calc(100vw - 32px));\n /* Constant frame: six rows on compact windows, seven on normal ones. Search\n swaps the rows inside this fixed box, so the modal never resizes. */\n height: clamp(258px, 48vh, 300px);\n height: clamp(258px, 48dvh, 300px);\n padding: 4px;\n overflow-y: auto;\n overscroll-behavior: contain;\n border: 0;\n border-radius: 20px;\n background: var(--dsw-specific-menu, var(--dsw-alias-bg-layer-3, #fff));\n --dsw-elevation-stroke-color: var(--dsw-alias-border-l1);\n --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);\n --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);\n box-shadow: var(--dsw-elevation-prominent, 0 8px 24px rgb(25 33 47 / 12%));\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineList {\n display: flex;\n flex-direction: column;\n gap: 2px;\n width: 100%;\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineOption {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n min-height: 40px;\n padding: 8px 10px;\n border: 0;\n border-radius: 10px;\n outline: none;\n background: transparent;\n color: var(--dsw-alias-label-primary, #19212f);\n text-align: left;\n cursor: pointer;\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineOption:hover,\n.-cerbur-clutch-dsh-worktree-dashboardBaselineOption[data-highlighted='true'],\n.-cerbur-clutch-dsh-worktree-dashboardBaselineOption[aria-selected='true'] {\n background: var(--dsw-alias-interactive-bg-hover, #f0f3f8);\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineOption:focus-visible {\n outline: 2px solid #497cd4;\n outline-offset: -2px;\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineOption > svg {\n width: 16px;\n height: 16px;\n color: var(--dsw-alias-label-secondary, #788191);\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineOption[aria-selected='true'] > svg:last-child {\n color: var(--dsw-alias-label-primary, #19212f);\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineOptionLabel {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineEmpty {\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n padding: 8px 10px;\n color: var(--dsw-alias-label-secondary, #788191);\n text-align: center;\n}\n/* Zero-height anchor: the save error floats over the list instead of growing\n the modal, so the frame keeps its size in every state. */\n.-cerbur-clutch-dsh-worktree-dashboardBaselineStatus {\n position: relative;\n box-sizing: border-box;\n min-height: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardBaselineError {\n position: absolute;\n right: 4px;\n bottom: 12px;\n left: 4px;\n z-index: 1;\n box-sizing: border-box;\n padding: 6px 10px;\n border-radius: 10px;\n background: var(--dsw-alias-bg-layer-2, #fff);\n background: color-mix(\n in srgb,\n var(--dsw-alias-state-error-label, #bd5d43) 10%,\n var(--dsw-alias-bg-layer-2, #fff)\n );\n box-shadow:\n inset 0 0 0 1px color-mix(in srgb, var(--dsw-alias-state-error-label, #bd5d43) 32%, transparent),\n var(--dsw-elevation-prominent, 0 8px 24px rgb(25 33 47 / 12%));\n color: var(--dsw-alias-state-error-label, #bd5d43);\n font-size: 12px;\n line-height: 16px;\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-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";
9817
+ //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_ef7f6cd81f87/packages/clutch-dsh-worktree/src/client/dashboard/dashboard.css.mjs
9818
+ const css$2 = ".-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-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-dashboardHeaderAside .-cerbur-clutch-dsh-worktree-dashboardFacts > div {\n padding: 4px 0;\n border: 0;\n}\n.-cerbur-clutch-dsh-worktree-dashboardHistorical {\n color: var(--dsw-alias-label-secondary, #788191);\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-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";
9043
9819
  const styleId$2 = "@cerbur/clutch-dsh-worktree/dashboard.css";
9044
9820
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/dashboard.css\"]") === null) {
9045
9821
  const tag = document.createElement("style");
@@ -9050,6 +9826,7 @@ window.__ModuleLoader__.load({
9050
9826
  }
9051
9827
  var dashboard_css_default = {
9052
9828
  "dashboardSurface": "-cerbur-clutch-dsh-worktree-dashboardSurface",
9829
+ "dashboardRefButton": "-cerbur-clutch-dsh-worktree-dashboardRefButton",
9053
9830
  "dashboardPanel": "-cerbur-clutch-dsh-worktree-dashboardPanel",
9054
9831
  "dashboardPage": "-cerbur-clutch-dsh-worktree-dashboardPage",
9055
9832
  "dashboardSessions": "-cerbur-clutch-dsh-worktree-dashboardSessions",
@@ -9087,14 +9864,6 @@ window.__ModuleLoader__.load({
9087
9864
  "dashboardBaselineModal": "-cerbur-clutch-dsh-worktree-dashboardBaselineModal",
9088
9865
  "dashboardBaselineModalContent": "-cerbur-clutch-dsh-worktree-dashboardBaselineModalContent",
9089
9866
  "dashboardBaselinePicker": "-cerbur-clutch-dsh-worktree-dashboardBaselinePicker",
9090
- "dashboardBaselineSearch": "-cerbur-clutch-dsh-worktree-dashboardBaselineSearch",
9091
- "dashboardBaselineOptions": "-cerbur-clutch-dsh-worktree-dashboardBaselineOptions",
9092
- "dashboardBaselineList": "-cerbur-clutch-dsh-worktree-dashboardBaselineList",
9093
- "dashboardBaselineOption": "-cerbur-clutch-dsh-worktree-dashboardBaselineOption",
9094
- "dashboardBaselineOptionLabel": "-cerbur-clutch-dsh-worktree-dashboardBaselineOptionLabel",
9095
- "dashboardBaselineEmpty": "-cerbur-clutch-dsh-worktree-dashboardBaselineEmpty",
9096
- "dashboardBaselineStatus": "-cerbur-clutch-dsh-worktree-dashboardBaselineStatus",
9097
- "dashboardBaselineError": "-cerbur-clutch-dsh-worktree-dashboardBaselineError",
9098
9867
  "dashboardLink": "-cerbur-clutch-dsh-worktree-dashboardLink",
9099
9868
  "dashboardQuickActions": "-cerbur-clutch-dsh-worktree-dashboardQuickActions",
9100
9869
  "dashboardTabPlaceholder": "-cerbur-clutch-dsh-worktree-dashboardTabPlaceholder",
@@ -9222,7 +9991,7 @@ window.__ModuleLoader__.load({
9222
9991
  /** A baseline equal to the current Worktree branch is not a usable default. */
9223
9992
  function normalizeBaselineBranch(value, currentBranch) {
9224
9993
  const baseline = normalizeBranch$1(value);
9225
- return baseline === void 0 || baseline === currentBranch ? void 0 : baseline;
9994
+ return baseline === void 0 || baseline === currentBranch || baseline === "refs/heads/" + currentBranch ? void 0 : baseline;
9226
9995
  }
9227
9996
  /**
9228
9997
  * Sum the known text-file additions/deletions. Binary files have no line
@@ -9346,8 +10115,8 @@ window.__ModuleLoader__.load({
9346
10115
  });
9347
10116
  }
9348
10117
  //#endregion
9349
- //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_ece6fafadbd1/packages/clutch-dsh-worktree/src/client/dashboard/git/worktree-git.css.mjs
9350
- const css$1 = ".-cerbur-clutch-dsh-worktree-gitPanel {\n min-width: 0;\n min-height: 0;\n}\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-gitBaselineSelector select {\n min-width: 180px;\n max-width: min(360px, 60vw);\n padding: 5px 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 font: inherit;\n}\n\n.-cerbur-clutch-dsh-worktree-gitBaselineSelector select:disabled {\n cursor: wait;\n opacity: 0.7;\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-gitColumns > .-cerbur-clutch-dsh-worktree-gitColumn:last-child {\n border-bottom: 0;\n }\n}\n";
10118
+ //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_ef7f6cd81f87/packages/clutch-dsh-worktree/src/client/dashboard/git/worktree-git.css.mjs
10119
+ const css$1 = ".-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";
9351
10120
  const styleId$1 = "@cerbur/clutch-dsh-worktree/worktree-git.css";
9352
10121
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/worktree-git.css\"]") === null) {
9353
10122
  const tag = document.createElement("style");
@@ -9358,6 +10127,9 @@ window.__ModuleLoader__.load({
9358
10127
  }
9359
10128
  var worktree_git_css_default = {
9360
10129
  "gitPanel": "-cerbur-clutch-dsh-worktree-gitPanel",
10130
+ "gitCommitStats": "-cerbur-clutch-dsh-worktree-gitCommitStats",
10131
+ "gitFileRow": "-cerbur-clutch-dsh-worktree-gitFileRow",
10132
+ "gitFileOpen": "-cerbur-clutch-dsh-worktree-gitFileOpen",
9361
10133
  "gitPanelHeader": "-cerbur-clutch-dsh-worktree-gitPanelHeader",
9362
10134
  "gitPanelHeading": "-cerbur-clutch-dsh-worktree-gitPanelHeading",
9363
10135
  "gitBaselineSelector": "-cerbur-clutch-dsh-worktree-gitBaselineSelector",
@@ -9477,7 +10249,7 @@ window.__ModuleLoader__.load({
9477
10249
  function folderId(treeId, path) {
9478
10250
  return "dashboard-git-folder-" + treeId + "-" + encodeURIComponent(path);
9479
10251
  }
9480
- function renderTreeNodes({ treeId, level, nodes, collapsedFolders, toggleFolder, selectedPath, onSelect, t }) {
10252
+ function renderTreeNodes({ treeId, level, nodes, collapsedFolders, toggleFolder, selectedPath, onSelect, onOpenFile, t }) {
9481
10253
  return nodes.map((node, index) => {
9482
10254
  if (node.kind === "folder") {
9483
10255
  const collapsed = collapsedFolders.has(node.path);
@@ -9527,6 +10299,7 @@ window.__ModuleLoader__.load({
9527
10299
  toggleFolder,
9528
10300
  selectedPath,
9529
10301
  onSelect,
10302
+ onOpenFile,
9530
10303
  t
9531
10304
  })
9532
10305
  })]
@@ -9535,13 +10308,14 @@ window.__ModuleLoader__.load({
9535
10308
  const { file } = node;
9536
10309
  const isSelected = selectedPath === file.path || selectedPath === file.oldPath;
9537
10310
  const statusText = fileTitle(file) + " · " + t(STATUS_LABELS[file.status]);
9538
- return (0, react_jsx_runtime.jsx)("li", {
10311
+ return (0, react_jsx_runtime.jsxs)("li", {
9539
10312
  role: "treeitem",
9540
10313
  "aria-level": level,
9541
10314
  "aria-posinset": index + 1,
9542
10315
  "aria-setsize": nodes.length,
9543
10316
  "aria-selected": isSelected,
9544
- children: (0, react_jsx_runtime.jsxs)("button", {
10317
+ className: worktree_git_css_default.gitFileRow,
10318
+ children: [(0, react_jsx_runtime.jsxs)("button", {
9545
10319
  type: "button",
9546
10320
  "aria-selected": isSelected,
9547
10321
  "data-dashboard-git-file": file.path,
@@ -9577,12 +10351,20 @@ window.__ModuleLoader__.load({
9577
10351
  children: file.commits.map(shortCommit$2).join(", ")
9578
10352
  })
9579
10353
  ]
9580
- })
10354
+ }), onOpenFile !== void 0 && file.status !== "deleted" && (0, react_jsx_runtime.jsx)("button", {
10355
+ type: "button",
10356
+ className: worktree_git_css_default.gitFileOpen,
10357
+ title: t("dashboard.git.openInSidebar"),
10358
+ "aria-label": t("dashboard.git.openInSidebar"),
10359
+ "data-dashboard-git-open-file": file.path,
10360
+ onClick: () => onOpenFile(file.path),
10361
+ children: (0, react_jsx_runtime.jsx)(IconRightUpOutline16, {})
10362
+ })]
9581
10363
  }, "file:" + (file.oldPath ?? "") + "\0" + file.path);
9582
10364
  });
9583
10365
  }
9584
10366
  /** Changed-file tree; only paths returned by Host are selectable. */
9585
- function GitChangedFiles({ files, selectedPath, onSelect, t }) {
10367
+ function GitChangedFiles({ files, selectedPath, onSelect, onOpenFile, t }) {
9586
10368
  const treeInstanceId = (0, react.useId)().replaceAll(":", "");
9587
10369
  const [collapsedFolders, setCollapsedFolders] = (0, react.useState)(() => /* @__PURE__ */ new Set());
9588
10370
  const tree = (0, react.useMemo)(() => buildGitFileTree(files), [files]);
@@ -9607,18 +10389,33 @@ window.__ModuleLoader__.load({
9607
10389
  toggleFolder,
9608
10390
  selectedPath,
9609
10391
  onSelect,
10392
+ onOpenFile,
9610
10393
  t
9611
10394
  })
9612
10395
  });
9613
10396
  }
9614
10397
  //#endregion
10398
+ //#region lib/client/dashboard/git/GitCommitStats.js
10399
+ /** Commit divergence is a neutral count, separate from added/deleted code lines. */
10400
+ function GitCommitStats({ ahead, behind, t }) {
10401
+ return (0, react_jsx_runtime.jsxs)("span", {
10402
+ className: worktree_git_css_default.gitCommitStats,
10403
+ "data-dashboard-git-commit-stats": true,
10404
+ "aria-label": t("dashboard.git.aheadBehindStats", {
10405
+ ahead,
10406
+ behind
10407
+ }),
10408
+ children: [(0, react_jsx_runtime.jsxs)("span", { children: ["↑ ", ahead] }), (0, react_jsx_runtime.jsxs)("span", { children: ["↓ ", behind] })]
10409
+ });
10410
+ }
10411
+ //#endregion
9615
10412
  //#region lib/client/dashboard/git/GitCommitList.js
9616
10413
  function commitDate(value) {
9617
10414
  const date = new Date(value);
9618
10415
  return Number.isNaN(date.getTime()) ? value : date.toLocaleString();
9619
10416
  }
9620
10417
  /** Keyboard-navigable, optionally multi-selectable, graph-free commit list for the Dashboard. */
9621
- function GitCommitList({ commits, selectedCommit, selectedCommits = [], multiSelect = false, onSelect, onToggle, t }) {
10418
+ function GitCommitList({ commits, selectedCommit, selectedCommits = [], multiSelect = false, onSelect, onToggle, hasMore, loadingMore, loadMoreError, refreshRequired, onLoadMore, t }) {
9622
10419
  const itemRefs = (0, react.useRef)([]);
9623
10420
  const move = (index, direction) => {
9624
10421
  const nextIndex = direction === "first" ? 0 : direction === "last" ? commits.length - 1 : Math.max(0, Math.min(commits.length - 1, index + direction));
@@ -9628,14 +10425,19 @@ window.__ModuleLoader__.load({
9628
10425
  if (!multiSelect || commit.kind === "working-tree" || onToggle === void 0) onSelect(commit.sha);
9629
10426
  else onToggle(commit.sha);
9630
10427
  };
9631
- return (0, react_jsx_runtime.jsx)("ul", {
10428
+ return (0, react_jsx_runtime.jsxs)("ul", {
9632
10429
  className: worktree_git_css_default.gitCommitList,
9633
10430
  role: "listbox",
9634
10431
  "aria-multiselectable": multiSelect,
9635
10432
  "data-dashboard-git-commit-multiselect": multiSelect ? "on" : "off",
9636
10433
  "aria-label": t("dashboard.git.commits"),
9637
10434
  "aria-describedby": multiSelect ? "dashboard-git-commit-selection-hint" : void 0,
9638
- children: commits.map((commit, index) => {
10435
+ "aria-busy": loadingMore,
10436
+ onScroll: (event) => {
10437
+ const list = event.currentTarget;
10438
+ if (hasMore && !loadingMore && !loadMoreError && list.scrollHeight - list.scrollTop - list.clientHeight <= 24) onLoadMore?.();
10439
+ },
10440
+ children: [commits.map((commit, index) => {
9639
10441
  const isWorkingTree = commit.kind === "working-tree";
9640
10442
  const isSelected = isWorkingTree ? selectedCommit === commit.sha : selectedCommits.includes(commit.sha);
9641
10443
  return (0, react_jsx_runtime.jsx)("li", { children: (0, react_jsx_runtime.jsxs)("button", {
@@ -9695,7 +10497,13 @@ window.__ModuleLoader__.load({
9695
10497
  })
9696
10498
  ]
9697
10499
  }) }, commit.sha);
9698
- })
10500
+ }), hasMore && (0, react_jsx_runtime.jsx)("li", { children: (0, react_jsx_runtime.jsx)("button", {
10501
+ type: "button",
10502
+ "data-dashboard-git-load-more": true,
10503
+ disabled: loadingMore,
10504
+ onClick: onLoadMore,
10505
+ children: t(loadingMore ? "dashboard.git.loadingMore" : refreshRequired ? "dashboard.git.refresh" : "dashboard.git.loadMore")
10506
+ }) })]
9699
10507
  });
9700
10508
  }
9701
10509
  //#endregion
@@ -10168,6 +10976,7 @@ window.__ModuleLoader__.load({
10168
10976
  branches: { status: "idle" },
10169
10977
  baselineBranch: normalizeBranch(defaultBaselineBranch),
10170
10978
  history: { status: "idle" },
10979
+ loadingMore: false,
10171
10980
  view: main ? "commits" : "summary",
10172
10981
  includeWorkingTree: false,
10173
10982
  selectedCommits: [],
@@ -10184,7 +10993,7 @@ window.__ModuleLoader__.load({
10184
10993
  const main = isMainWorktreeId(input.worktreeId);
10185
10994
  const capturedBaseline = input.capturedBaseline === true;
10186
10995
  const canRead = (baselineBranch) => main || capturedBaseline || baselineBranch !== void 0;
10187
- let state = emptyState(input.defaultBaselineBranch, main);
10996
+ let state = emptyState(main ? void 0 : input.defaultBaselineBranch, main);
10188
10997
  let disposed = false;
10189
10998
  let branchesLoaded = false;
10190
10999
  let branchesRequest = 0;
@@ -10194,6 +11003,7 @@ window.__ModuleLoader__.load({
10194
11003
  let diffRequest = 0;
10195
11004
  let branchesInFlight;
10196
11005
  let historyInFlight;
11006
+ let moreInFlight;
10197
11007
  const filesInFlight = /* @__PURE__ */ new Map();
10198
11008
  const diffInFlight = /* @__PURE__ */ new Map();
10199
11009
  const listeners = /* @__PURE__ */ new Set();
@@ -10430,13 +11240,14 @@ window.__ModuleLoader__.load({
10430
11240
  });
10431
11241
  };
10432
11242
  const selectBaselineBranch = (branch) => {
10433
- if (disposed || main) return;
11243
+ if (disposed) return;
10434
11244
  const nextBranch = normalizeBranch(branch);
10435
11245
  if (state.baselineBranch === nextBranch) return;
10436
11246
  ++historyRequest;
10437
11247
  ++filesRequest;
10438
11248
  ++diffRequest;
10439
11249
  historyInFlight = void 0;
11250
+ moreInFlight = void 0;
10440
11251
  historyLoaded = false;
10441
11252
  filesInFlight.clear();
10442
11253
  diffInFlight.clear();
@@ -10445,18 +11256,29 @@ window.__ModuleLoader__.load({
10445
11256
  update({
10446
11257
  ...state,
10447
11258
  baselineBranch: nextBranch,
10448
- history: { status: "idle" },
10449
- view: "summary",
11259
+ ...!canRead(nextBranch) ? {
11260
+ history: {
11261
+ status: "ready",
11262
+ value: {
11263
+ commits: [],
11264
+ truncated: false,
11265
+ unavailableReason: "baseline-unselected"
11266
+ }
11267
+ },
11268
+ files: { status: "idle" },
11269
+ selectedPath: void 0,
11270
+ diff: { status: "idle" }
11271
+ } : {},
11272
+ loadingMore: false,
11273
+ loadMoreError: void 0,
11274
+ view: main && nextBranch === void 0 ? "commits" : "summary",
10450
11275
  selectedCommit: void 0,
10451
- selectedCommits: [],
10452
- files: { status: "idle" },
10453
- selectedPath: void 0,
10454
- diff: { status: "idle" }
11276
+ selectedCommits: []
10455
11277
  });
10456
- if (nextBranch !== void 0 || capturedBaseline) loadHistory();
11278
+ if (canRead(nextBranch)) loadHistory(true);
10457
11279
  };
10458
11280
  const selectSummary = () => {
10459
- if (disposed || main || !canRead(state.baselineBranch)) return;
11281
+ if (disposed || main && state.baselineBranch === void 0 || !canRead(state.baselineBranch)) return;
10460
11282
  const target = {
10461
11283
  kind: "selection",
10462
11284
  selection: summarySelection(state.includeWorkingTree)
@@ -10469,7 +11291,7 @@ window.__ModuleLoader__.load({
10469
11291
  loadFiles(target);
10470
11292
  };
10471
11293
  const setIncludeWorkingTree = (includeWorkingTree) => {
10472
- if (disposed || main || state.includeWorkingTree === includeWorkingTree) return;
11294
+ if (disposed || main && state.baselineBranch === void 0 || state.includeWorkingTree === includeWorkingTree) return;
10473
11295
  if (state.view !== "summary" || !canRead(state.baselineBranch)) {
10474
11296
  update({
10475
11297
  ...state,
@@ -10602,7 +11424,7 @@ window.__ModuleLoader__.load({
10602
11424
  loadDiff(target, selectedPath, changedFile.path);
10603
11425
  };
10604
11426
  const loadBranches = (refresh = false) => {
10605
- if (disposed || main) return Promise.resolve();
11427
+ if (disposed) return Promise.resolve();
10606
11428
  if (branchesInFlight !== void 0) return branchesInFlight;
10607
11429
  if (!refresh && branchesLoaded) return Promise.resolve();
10608
11430
  const request = ++branchesRequest;
@@ -10693,6 +11515,12 @@ window.__ModuleLoader__.load({
10693
11515
  if (!refresh && historyLoaded) return Promise.resolve();
10694
11516
  const baselineBranch = state.baselineBranch;
10695
11517
  const request = ++historyRequest;
11518
+ moreInFlight = void 0;
11519
+ update({
11520
+ ...state,
11521
+ loadingMore: false,
11522
+ loadMoreError: void 0
11523
+ });
10696
11524
  const previous = state.history;
10697
11525
  const refreshesWorkingTree = refresh && state.selectedCommit === "working-tree";
10698
11526
  if (refresh) {
@@ -10787,7 +11615,7 @@ window.__ModuleLoader__.load({
10787
11615
  kind: "commit",
10788
11616
  commit: nextSelectedCommit
10789
11617
  };
10790
- loadFiles(target, refreshesWorkingTree);
11618
+ loadFiles(target, refresh);
10791
11619
  }
10792
11620
  } catch (error) {
10793
11621
  if (disposed || request !== historyRequest || state.baselineBranch !== baselineBranch) return;
@@ -10824,19 +11652,85 @@ window.__ModuleLoader__.load({
10824
11652
  historyInFlight = promise;
10825
11653
  return promise;
10826
11654
  };
11655
+ const loadMore = () => {
11656
+ if (moreInFlight !== void 0) return moreInFlight;
11657
+ if (disposed || historyInFlight !== void 0 || state.history.status !== "ready" || state.history.refreshing || state.history.value.nextOffset === void 0) return Promise.resolve();
11658
+ const previous = state.history.value;
11659
+ const baselineBranch = state.baselineBranch;
11660
+ const request = historyRequest;
11661
+ update({
11662
+ ...state,
11663
+ loadingMore: true,
11664
+ loadMoreError: void 0
11665
+ });
11666
+ const run = async () => {
11667
+ try {
11668
+ const page = await input.manager.listWorktreeCommits({
11669
+ workspaceId: input.workspaceId,
11670
+ worktreeId: input.worktreeId,
11671
+ baseBranch: baselineBranch,
11672
+ offset: previous.nextOffset,
11673
+ expectedHeadCommit: previous.headCommit,
11674
+ expectedBaselineCommit: previous.baseline?.commit
11675
+ });
11676
+ if (disposed || request !== historyRequest || baselineBranch !== state.baselineBranch) return;
11677
+ if (page.headCommit !== previous.headCommit || page.baseline?.commit !== previous.baseline?.commit || page.unavailableReason !== void 0) throw Object.assign(/* @__PURE__ */ new Error("Git history changed; refresh before loading more"), { code: "WORKTREE_STATE_CONFLICT" });
11678
+ const existing = new Set(previous.commits.map((commit) => commit.sha));
11679
+ update({
11680
+ ...state,
11681
+ loadingMore: false,
11682
+ history: {
11683
+ status: "ready",
11684
+ value: {
11685
+ ...page,
11686
+ commits: [...previous.commits, ...page.commits.filter((commit) => !existing.has(commit.sha))]
11687
+ }
11688
+ }
11689
+ });
11690
+ } catch (error) {
11691
+ if (disposed || request !== historyRequest || baselineBranch !== state.baselineBranch) return;
11692
+ update({
11693
+ ...state,
11694
+ loadingMore: false,
11695
+ loadMoreError: asError(error)
11696
+ });
11697
+ }
11698
+ };
11699
+ const promise = run().finally(() => {
11700
+ if (moreInFlight === promise) moreInFlight = void 0;
11701
+ });
11702
+ moreInFlight = promise;
11703
+ return promise;
11704
+ };
10827
11705
  return {
10828
11706
  getSnapshot: () => state,
10829
11707
  subscribe: (listener) => {
10830
11708
  listeners.add(listener);
10831
11709
  return () => listeners.delete(listener);
10832
11710
  },
10833
- loadBranches: () => loadBranches(false),
11711
+ loadBranches,
11712
+ readFreshBranches: async () => {
11713
+ await loadBranches(true);
11714
+ const branches = state.branches;
11715
+ if (branches.status === "error" || branches.status === "ready" && branches.error) throw branches.error;
11716
+ return branches.status === "ready" ? branches.value : [];
11717
+ },
10834
11718
  loadHistory: () => loadHistory(false),
10835
- refresh: () => {
10836
- const branchesTask = loadBranches(true);
10837
- const historyTask = loadHistory(true);
10838
- return Promise.all([branchesTask, historyTask]).then(() => void 0);
11719
+ loadMore,
11720
+ acceptBranches: (branches) => {
11721
+ if (disposed) return;
11722
+ ++branchesRequest;
11723
+ branchesLoaded = true;
11724
+ branchesInFlight = void 0;
11725
+ update({
11726
+ ...state,
11727
+ branches: {
11728
+ status: "ready",
11729
+ value: branches
11730
+ }
11731
+ });
10839
11732
  },
11733
+ refresh: () => loadHistory(true),
10840
11734
  selectBaselineBranch,
10841
11735
  selectView,
10842
11736
  selectSummary,
@@ -10868,14 +11762,16 @@ window.__ModuleLoader__.load({
10868
11762
  ]);
10869
11763
  const snapshot = (0, react.useSyncExternalStore)(controller.subscribe, controller.getSnapshot, controller.getSnapshot);
10870
11764
  (0, react.useEffect)(() => {
10871
- controller.loadBranches();
10872
11765
  controller.loadHistory();
10873
11766
  return controller.dispose;
10874
11767
  }, [controller]);
10875
11768
  return {
10876
11769
  ...snapshot,
10877
11770
  loadBranches: controller.loadBranches,
11771
+ readFreshBranches: controller.readFreshBranches,
11772
+ acceptBranches: controller.acceptBranches,
10878
11773
  loadHistory: controller.loadHistory,
11774
+ loadMore: controller.loadMore,
10879
11775
  refresh: controller.refresh,
10880
11776
  selectBaselineBranch: controller.selectBaselineBranch,
10881
11777
  selectView: controller.selectView,
@@ -10898,7 +11794,7 @@ window.__ModuleLoader__.load({
10898
11794
  return history?.commits.find((commit) => commit.sha === sha);
10899
11795
  }
10900
11796
  function commitCountLabel(history, t) {
10901
- const committedCount = history.commits.filter((commit) => commit.kind !== "working-tree").length;
11797
+ const committedCount = history.ahead ?? history.commits.filter((commit) => commit.kind !== "working-tree").length;
10902
11798
  return history.commits.some((commit) => commit.kind === "working-tree") ? t("dashboard.git.commitCountWithWorkingTree", { commits: committedCount }) : t("dashboard.git.commitCount", { n: committedCount });
10903
11799
  }
10904
11800
  function commitLabel(commit, t) {
@@ -10956,24 +11852,28 @@ window.__ModuleLoader__.load({
10956
11852
  fallback: 38
10957
11853
  });
10958
11854
  const historyValue = state.history.status === "ready" ? state.history.value : void 0;
11855
+ const comparison = !isMain || historyValue?.baseline !== void 0;
10959
11856
  const commit = selectedCommit(historyValue, state.selectedCommit);
10960
11857
  const files = state.files.status === "ready" ? readyFiles(state.files.value) : [];
10961
11858
  const diff = state.diff.status === "ready" ? state.diff.value : void 0;
10962
11859
  const refreshing = state.history.status === "ready" && state.history.refreshing === true;
10963
11860
  const unavailable = historyValue?.unavailableReason;
10964
- const branchOptions = (state.branches.status === "ready" ? state.branches.value : []).filter((branch) => branch.name !== currentBranch);
11861
+ const branchRoster = state.branches.status === "ready" ? state.branches.value : void 0;
11862
+ const branchOptions = (0, react.useMemo)(() => (branchRoster ?? []).filter((branch) => branch.kind === "remote" || branch.name !== currentBranch), [branchRoster, currentBranch]);
10965
11863
  const branchError = state.branches.status === "error" ? state.branches.error : state.branches.status === "ready" ? state.branches.error : void 0;
10966
11864
  const baselineCommit = historyValue?.baseline?.commit;
10967
11865
  const baselineRef = state.baselineBranch ?? historyValue?.baseline?.ref;
10968
11866
  const targetLabel = state.view === "summary" ? t("dashboard.git.baselineSummary") : state.selectedCommits.length > 1 ? t("dashboard.git.selectedCommitCount", { n: state.selectedCommits.length }) : commit === void 0 ? void 0 : commitLabel(commit, t);
10969
11867
  const hasTarget = state.view === "summary" || commit !== void 0;
10970
11868
  const lineTotals = state.files.status === "ready" && hasTarget ? sumLineTotals(files) : void 0;
11869
+ const refreshRequired = state.loadMoreError !== void 0 && toWorktreeViewError(state.loadMoreError).code === "WORKTREE_STATE_CONFLICT";
10971
11870
  return (0, react_jsx_runtime.jsxs)("section", {
10972
11871
  className: worktree_git_css_default.gitPanel,
10973
11872
  "data-dashboard-git-panel": true,
10974
11873
  children: [
10975
11874
  (0, react_jsx_runtime.jsx)(NotificationToasts, { notices: [
10976
11875
  ["branches", branchError],
11876
+ ["pagination", state.loadMoreError],
10977
11877
  ["history", state.history.status === "error" || state.history.status === "ready" ? state.history.error : void 0],
10978
11878
  ["files", state.files.status === "error" || state.files.status === "ready" ? state.files.error : void 0],
10979
11879
  ["diff", state.diff.status === "error" ? state.diff.error : void 0]
@@ -11006,6 +11906,7 @@ window.__ModuleLoader__.load({
11006
11906
  label: t("dashboard.git.retry"),
11007
11907
  onClick: () => {
11008
11908
  if (scope === "branches") state.loadBranches();
11909
+ else if (scope === "pagination" && diagnostic.code !== "WORKTREE_STATE_CONFLICT") state.loadMore();
11009
11910
  else state.refresh();
11010
11911
  }
11011
11912
  }]
@@ -11017,50 +11918,48 @@ window.__ModuleLoader__.load({
11017
11918
  className: worktree_git_css_default.gitPanelHeading,
11018
11919
  children: [
11019
11920
  (0, react_jsx_runtime.jsx)("h2", { children: t("dashboard.git.title") }),
11020
- !isMain && (0, react_jsx_runtime.jsxs)("label", {
11921
+ (0, react_jsx_runtime.jsxs)("div", {
11021
11922
  className: worktree_git_css_default.gitBaselineSelector,
11022
- children: [(0, react_jsx_runtime.jsx)("span", { children: t("dashboard.git.baselineSelector") }), (0, react_jsx_runtime.jsxs)("select", {
11923
+ children: [(0, react_jsx_runtime.jsx)("span", { children: t("dashboard.git.baselineSelector") }), (0, react_jsx_runtime.jsx)(GitBranchSelector, {
11924
+ t,
11925
+ size: "compact",
11926
+ label: t("dashboard.git.baselineSelector"),
11927
+ placeholder: t(isMain ? "dashboard.git.noBaseline" : "dashboard.git.selectBaseline"),
11928
+ emptyLabel: t(isMain ? "dashboard.git.noBaseline" : "dashboard.git.selectBaseline"),
11929
+ branches: branchOptions,
11023
11930
  value: state.baselineBranch ?? "",
11024
- "data-dashboard-git-baseline": true,
11025
- disabled: state.branches.status === "loading",
11026
- onChange: (event) => state.selectBaselineBranch(event.currentTarget.value || void 0),
11027
- children: [
11028
- (0, react_jsx_runtime.jsx)("option", {
11029
- value: "",
11030
- children: t("dashboard.git.selectBaseline")
11031
- }),
11032
- state.baselineBranch !== void 0 && !branchOptions.some((branch) => branch.name === state.baselineBranch) && (0, react_jsx_runtime.jsx)("option", {
11033
- value: state.baselineBranch,
11034
- children: state.baselineBranch
11035
- }),
11036
- branchOptions.map((branch) => (0, react_jsx_runtime.jsx)("option", {
11037
- value: branch.name,
11038
- children: branch.name
11039
- }, branch.name))
11040
- ]
11931
+ loading: state.branches.status === "loading" || state.branches.status === "ready" && state.branches.refreshing === true,
11932
+ onFetch: manager?.fetchRemoteBranches === void 0 ? void 0 : async () => {
11933
+ try {
11934
+ const branches = await manager.fetchRemoteBranches({ workspaceId });
11935
+ state.acceptBranches(branches);
11936
+ return branches.filter((branch) => branch.kind === "remote" || branch.name !== currentBranch);
11937
+ } finally {
11938
+ await state.refresh();
11939
+ }
11940
+ },
11941
+ onChange: (value) => state.selectBaselineBranch(value || void 0),
11942
+ onLoad: manager?.listBranches === void 0 ? void 0 : async () => (await state.readFreshBranches()).filter((branch) => branch.kind === "remote" || branch.name !== currentBranch)
11041
11943
  })]
11042
11944
  }),
11043
11945
  baselineCommit !== void 0 && (0, react_jsx_runtime.jsxs)("dl", {
11044
11946
  className: worktree_git_css_default.gitBaselineFacts,
11045
- children: [(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("dashboard.git.base") }), (0, react_jsx_runtime.jsxs)("dd", { children: [baselineRef !== void 0 ? (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [baselineRef, (0, react_jsx_runtime.jsxs)("code", { children: ["@ ", shortCommit(baselineCommit)] })] }) : (0, react_jsx_runtime.jsx)("code", { children: shortCommit(baselineCommit) }), historyValue?.baseline?.source === "derived" && (0, react_jsx_runtime.jsx)("span", {
11947
+ children: [(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("dashboard.git.base") }), (0, react_jsx_runtime.jsxs)("dd", { children: [baselineRef !== void 0 ? (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [baselineRef.replace(/^refs\/(heads|remotes)\//u, ""), (0, react_jsx_runtime.jsxs)("code", { children: ["@ ", shortCommit(baselineCommit)] })] }) : (0, react_jsx_runtime.jsx)("code", { children: shortCommit(baselineCommit) }), historyValue?.baseline?.source === "derived" && (0, react_jsx_runtime.jsx)("span", {
11046
11948
  className: worktree_git_css_default.gitDerived,
11047
11949
  children: t("dashboard.git.derived")
11048
11950
  })] })] }), historyValue !== void 0 && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
11049
11951
  (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("dashboard.git.head") }), (0, react_jsx_runtime.jsx)("dd", { children: (0, react_jsx_runtime.jsx)("code", { children: shortCommit(historyValue.headCommit) }) })] }),
11050
11952
  (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("dashboard.git.commits") }), (0, react_jsx_runtime.jsx)("dd", { children: commitCountLabel(historyValue, t) })] }),
11051
- historyValue.ahead !== void 0 && historyValue.behind !== void 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("dashboard.aheadBehind") }), (0, react_jsx_runtime.jsx)("dd", { children: (0, react_jsx_runtime.jsx)(GitLineStats, {
11052
- additions: historyValue.ahead,
11053
- deletions: historyValue.behind,
11054
- ariaLabel: t("dashboard.git.aheadBehindStats", {
11055
- ahead: historyValue.ahead,
11056
- behind: historyValue.behind
11057
- })
11953
+ historyValue.ahead !== void 0 && historyValue.behind !== void 0 && (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("dashboard.aheadBehind") }), (0, react_jsx_runtime.jsx)("dd", { children: (0, react_jsx_runtime.jsx)(GitCommitStats, {
11954
+ ahead: historyValue.ahead,
11955
+ behind: historyValue.behind,
11956
+ t
11058
11957
  }) })] })
11059
11958
  ] })]
11060
11959
  }),
11061
- isMain && historyValue !== void 0 && (0, react_jsx_runtime.jsxs)("dl", {
11960
+ isMain && historyValue !== void 0 && baselineCommit === void 0 && (0, react_jsx_runtime.jsx)("dl", {
11062
11961
  className: worktree_git_css_default.gitBaselineFacts,
11063
- children: [(0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("dashboard.git.head") }), (0, react_jsx_runtime.jsx)("dd", { children: (0, react_jsx_runtime.jsx)("code", { children: shortCommit(historyValue.headCommit) }) })] }), (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("dashboard.git.commits") }), (0, react_jsx_runtime.jsx)("dd", { children: commitCountLabel(historyValue, t) })] })]
11962
+ children: (0, react_jsx_runtime.jsxs)("div", { children: [(0, react_jsx_runtime.jsx)("dt", { children: t("dashboard.git.head") }), (0, react_jsx_runtime.jsx)("dd", { children: (0, react_jsx_runtime.jsx)("code", { children: shortCommit(historyValue.headCommit) }) })] })
11064
11963
  })
11065
11964
  ]
11066
11965
  }), (0, react_jsx_runtime.jsx)("button", {
@@ -11100,7 +11999,10 @@ window.__ModuleLoader__.load({
11100
11999
  className: worktree_git_css_default.gitColumnHeader,
11101
12000
  children: [(0, react_jsx_runtime.jsx)("h3", { children: t("dashboard.git.commits") }), (0, react_jsx_runtime.jsxs)("div", {
11102
12001
  className: worktree_git_css_default.gitColumnHeaderControls,
11103
- children: [historyValue.truncated && (0, react_jsx_runtime.jsx)("span", { children: t("dashboard.git.truncatedHistory") }), (0, react_jsx_runtime.jsxs)("label", {
12002
+ children: [state.loadingMore && (0, react_jsx_runtime.jsx)("span", {
12003
+ role: "status",
12004
+ children: t("dashboard.git.loadingMore")
12005
+ }), (0, react_jsx_runtime.jsxs)("label", {
11104
12006
  className: worktree_git_css_default.gitCommitMultiSelect,
11105
12007
  title: t("dashboard.git.multiSelectCommitsDescription"),
11106
12008
  children: [
@@ -11125,7 +12027,7 @@ window.__ModuleLoader__.load({
11125
12027
  })]
11126
12028
  })]
11127
12029
  }),
11128
- !isMain && (0, react_jsx_runtime.jsxs)("button", {
12030
+ comparison && (0, react_jsx_runtime.jsxs)("button", {
11129
12031
  type: "button",
11130
12032
  className: worktree_git_css_default.gitSummaryButton,
11131
12033
  "data-dashboard-git-summary": true,
@@ -11133,7 +12035,7 @@ window.__ModuleLoader__.load({
11133
12035
  onClick: state.selectSummary,
11134
12036
  children: [(0, react_jsx_runtime.jsx)("span", { children: t("dashboard.git.baselineSummary") }), (0, react_jsx_runtime.jsx)("small", { children: t("dashboard.git.baselineSummaryDescription") })]
11135
12037
  }),
11136
- !isMain && state.view === "summary" && (0, react_jsx_runtime.jsxs)("label", {
12038
+ comparison && state.view === "summary" && (0, react_jsx_runtime.jsxs)("label", {
11137
12039
  className: worktree_git_css_default.gitSummaryToggle,
11138
12040
  "data-dashboard-git-include-working-tree": true,
11139
12041
  children: [(0, react_jsx_runtime.jsx)("input", {
@@ -11159,8 +12061,17 @@ window.__ModuleLoader__.load({
11159
12061
  multiSelect: state.commitMultiSelect,
11160
12062
  onSelect: state.selectCommit,
11161
12063
  onToggle: state.toggleCommit,
12064
+ hasMore: historyValue.nextOffset !== void 0,
12065
+ loadingMore: state.loadingMore,
12066
+ loadMoreError: state.loadMoreError !== void 0,
12067
+ onLoadMore: () => void (refreshRequired ? state.refresh() : state.loadMore()),
12068
+ refreshRequired,
11162
12069
  t
11163
- })
12070
+ }, JSON.stringify([
12071
+ state.baselineBranch,
12072
+ historyValue.headCommit,
12073
+ baselineCommit
12074
+ ]))
11164
12075
  ]
11165
12076
  }),
11166
12077
  (0, react_jsx_runtime.jsx)(GitSplitter, {
@@ -11219,6 +12130,7 @@ window.__ModuleLoader__.load({
11219
12130
  files,
11220
12131
  selectedPath: state.selectedPath,
11221
12132
  onSelect: state.selectPath,
12133
+ onOpenFile,
11222
12134
  t
11223
12135
  })] })
11224
12136
  ]
@@ -11355,13 +12267,10 @@ window.__ModuleLoader__.load({
11355
12267
  className: dashboard_css_default.dashboardHistorical,
11356
12268
  children: t("dashboard.notConnected")
11357
12269
  });
11358
- return (0, react_jsx_runtime.jsx)(GitLineStats, {
11359
- additions: ahead,
11360
- deletions: behind,
11361
- ariaLabel: t("dashboard.git.aheadBehindStats", {
11362
- ahead,
11363
- behind
11364
- })
12270
+ return (0, react_jsx_runtime.jsx)(GitCommitStats, {
12271
+ ahead,
12272
+ behind,
12273
+ t
11365
12274
  });
11366
12275
  }
11367
12276
  if (state.history.unavailableReason !== void 0) return (0, react_jsx_runtime.jsx)("span", {
@@ -11383,7 +12292,7 @@ window.__ModuleLoader__.load({
11383
12292
  });
11384
12293
  }
11385
12294
  //#endregion
11386
- //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_ece6fafadbd1/packages/clutch-dsh-worktree/src/client/settings/settings.css.mjs
12295
+ //#region \0clutch-dsh-worktree-css:/Users/yuancheng/.dsh/clutch-dsh-worktree/worktree/wt_ef7f6cd81f87/packages/clutch-dsh-worktree/src/client/settings/settings.css.mjs
11387
12296
  const css = ".-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";
11388
12297
  const styleId = "@cerbur/clutch-dsh-worktree/settings.css";
11389
12298
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"@cerbur/clutch-dsh-worktree/settings.css\"]") === null) {
@@ -11619,24 +12528,30 @@ window.__ModuleLoader__.load({
11619
12528
  children
11620
12529
  });
11621
12530
  }
11622
- function WorktreeBaselineEditor({ value, branches, currentBranch, onSave, t, disabled, context }) {
12531
+ function WorktreeBaselineEditor({ value, branches, loading, currentBranch, onSave, onFetch, onLoad, t, disabled, context }) {
11623
12532
  const [saved, setSaved] = (0, react.useState)(value);
11624
12533
  const [draft, setDraft] = (0, react.useState)();
11625
- const [search, setSearch] = (0, react.useState)("");
11626
12534
  const [pending, setPending] = (0, react.useState)(false);
11627
12535
  const [error, setError] = (0, react.useState)();
11628
12536
  const busy = (0, react.useRef)(false);
11629
12537
  const alive = (0, react.useRef)(true);
11630
- const optionRefs = (0, react.useRef)([]);
11631
12538
  const trigger = (0, react.useRef)(null);
11632
12539
  const wasOpen = (0, react.useRef)(false);
11633
12540
  const expected = (0, react.useRef)(value);
11634
- const pickerId = (0, react.useId)();
11635
- const options = branches.filter((branch) => branch.name !== currentBranch);
12541
+ const [fetched, setFetched] = (0, react.useState)();
12542
+ const [reading, setReading] = (0, react.useState)(false);
12543
+ const editorOpen = (0, react.useRef)(false);
12544
+ const editorGeneration = (0, react.useRef)(0);
12545
+ const requestGeneration = (0, react.useRef)(0);
12546
+ const roster = fetched ?? branches;
12547
+ const options = (0, react.useMemo)(() => roster.filter((branch) => branch.kind === "remote" || branch.name !== currentBranch), [roster, currentBranch]);
12548
+ const validDraft = options.filter((branch) => (branch.ref ?? branch.name) === draft || !draft?.startsWith("refs/") && (branch.name === draft || branch.kind === "remote" && "remotes/" + branch.name === draft)).length === 1;
11636
12549
  (0, react.useEffect)(() => {
11637
12550
  alive.current = true;
11638
12551
  return () => {
11639
12552
  alive.current = false;
12553
+ editorGeneration.current++;
12554
+ requestGeneration.current++;
11640
12555
  };
11641
12556
  }, []);
11642
12557
  (0, react.useEffect)(() => {
@@ -11649,43 +12564,38 @@ window.__ModuleLoader__.load({
11649
12564
  }, [draft]);
11650
12565
  const closeEditor = () => {
11651
12566
  if (pending) return;
12567
+ editorOpen.current = false;
12568
+ editorGeneration.current++;
12569
+ requestGeneration.current++;
12570
+ setReading(false);
11652
12571
  setDraft(void 0);
11653
- setSearch("");
11654
12572
  setError(void 0);
11655
12573
  };
11656
12574
  const openEditor = () => {
12575
+ editorOpen.current = true;
12576
+ editorGeneration.current++;
12577
+ requestGeneration.current++;
12578
+ setReading(false);
11657
12579
  expected.current = saved;
11658
12580
  setDraft(saved ?? "");
11659
- setSearch("");
11660
12581
  setError(void 0);
11661
12582
  };
11662
- const query = search.trim().toLowerCase();
11663
- const filteredOptions = query.length === 0 ? options : options.filter((branch) => branch.name.toLowerCase().includes(query));
11664
- const activeIndex = filteredOptions.findIndex((branch) => branch.name === draft);
11665
- const listOpen = filteredOptions.length > 0;
11666
- const selectOption = (index) => {
11667
- if (pending) return;
11668
- const branch = filteredOptions[index];
11669
- if (branch === void 0) return;
11670
- setDraft(branch.name);
11671
- };
11672
- const moveOption = (offset) => {
11673
- if (filteredOptions.length === 0) return;
11674
- const nextIndex = activeIndex < 0 ? offset > 0 ? 0 : filteredOptions.length - 1 : (activeIndex + offset + filteredOptions.length) % filteredOptions.length;
11675
- selectOption(nextIndex);
11676
- optionRefs.current[nextIndex]?.scrollIntoView({ block: "nearest" });
11677
- };
11678
- const onSearchKeyDown = (event) => {
11679
- if (event.key === "ArrowDown" || event.key === "ArrowUp") {
11680
- event.preventDefault();
11681
- moveOption(event.key === "ArrowDown" ? 1 : -1);
11682
- } else if (event.key === "Enter" && filteredOptions.length > 0) {
11683
- event.preventDefault();
11684
- selectOption(activeIndex < 0 ? 0 : activeIndex);
12583
+ const lifetime = editorGeneration.current;
12584
+ const readBranches = async (read) => {
12585
+ if (!alive.current || !editorOpen.current || editorGeneration.current !== lifetime) return options;
12586
+ const request = ++requestGeneration.current;
12587
+ const isCurrent = () => alive.current && editorOpen.current && editorGeneration.current === lifetime && requestGeneration.current === request;
12588
+ setReading(true);
12589
+ try {
12590
+ const next = await read();
12591
+ if (isCurrent()) setFetched(next);
12592
+ return next.filter((branch) => branch.kind === "remote" || branch.name !== currentBranch);
12593
+ } finally {
12594
+ if (isCurrent()) setReading(false);
11685
12595
  }
11686
12596
  };
11687
12597
  const save = async () => {
11688
- if (busy.current || draft === void 0 || onSave === void 0 || !options.some((branch) => branch.name === draft)) return;
12598
+ if (busy.current || draft === void 0 || onSave === void 0 || loading || reading || !validDraft) return;
11689
12599
  busy.current = true;
11690
12600
  setPending(true);
11691
12601
  setError(void 0);
@@ -11694,8 +12604,10 @@ window.__ModuleLoader__.load({
11694
12604
  if (alive.current) {
11695
12605
  setSaved(result);
11696
12606
  expected.current = result;
12607
+ editorOpen.current = false;
12608
+ editorGeneration.current++;
12609
+ requestGeneration.current++;
11697
12610
  setDraft(void 0);
11698
- setSearch("");
11699
12611
  }
11700
12612
  } catch (cause) {
11701
12613
  if (alive.current) setError(toWorktreeViewError(cause));
@@ -11711,7 +12623,7 @@ window.__ModuleLoader__.load({
11711
12623
  label: t("dashboard.editBase"),
11712
12624
  side: "bottom",
11713
12625
  delayMs: 500,
11714
- disabled: disabled || options.length === 0,
12626
+ disabled: disabled || options.length === 0 && onLoad === void 0,
11715
12627
  children: (0, react_jsx_runtime.jsx)("button", {
11716
12628
  type: "button",
11717
12629
  ref: trigger,
@@ -11721,7 +12633,7 @@ window.__ModuleLoader__.load({
11721
12633
  title: t("dashboard.editBase"),
11722
12634
  "aria-haspopup": "dialog",
11723
12635
  "aria-expanded": draft !== void 0,
11724
- disabled: disabled || options.length === 0,
12636
+ disabled: disabled || options.length === 0 && onLoad === void 0,
11725
12637
  onClick: openEditor,
11726
12638
  children: (0, react_jsx_runtime.jsx)(IconEditOutline16, {})
11727
12639
  })
@@ -11731,7 +12643,8 @@ window.__ModuleLoader__.load({
11731
12643
  children: t("dashboard.historicalUnavailable")
11732
12644
  }) : (0, react_jsx_runtime.jsx)("span", {
11733
12645
  "data-dashboard-baseline-value": true,
11734
- children: saved
12646
+ title: saved,
12647
+ children: saved.replace(/^refs\/(heads|remotes)\//u, "")
11735
12648
  })
11736
12649
  }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
11737
12650
  open: draft !== void 0,
@@ -11749,94 +12662,48 @@ window.__ModuleLoader__.load({
11749
12662
  }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
11750
12663
  variant: "primary",
11751
12664
  "data-dashboard-baseline-save": true,
11752
- disabled: pending || disabled || !options.some((branch) => branch.name === draft),
12665
+ disabled: pending || disabled || loading || reading || !validDraft,
11753
12666
  onClick: () => void save(),
11754
12667
  children: t(pending ? "dashboard.savingBase" : "dashboard.saveBase")
11755
12668
  })] }),
11756
12669
  children: (0, react_jsx_runtime.jsxs)("div", {
11757
12670
  className: dashboard_css_default.dashboardBaselinePicker,
11758
12671
  "data-dashboard-baseline-modal": true,
11759
- children: [
11760
- (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
11761
- icon: (0, react_jsx_runtime.jsx)(IconSearchOutline16, {}),
11762
- className: dashboard_css_default.dashboardBaselineSearch,
11763
- "aria-label": t("dashboard.searchBranches"),
11764
- role: "combobox",
11765
- "aria-autocomplete": "list",
11766
- "aria-controls": listOpen ? `${pickerId}-options` : void 0,
11767
- "aria-expanded": listOpen,
11768
- "aria-haspopup": "listbox",
11769
- "aria-activedescendant": listOpen && activeIndex >= 0 ? `${pickerId}-option-${activeIndex}` : void 0,
11770
- "data-dashboard-baseline-search": true,
11771
- disabled: pending || disabled,
11772
- placeholder: t("dashboard.searchBranches"),
11773
- value: search,
11774
- onKeyDown: onSearchKeyDown,
11775
- onChange: (event) => setSearch(event.currentTarget.value)
11776
- }),
11777
- (0, react_jsx_runtime.jsx)("div", {
11778
- className: dashboard_css_default.dashboardBaselineOptions,
11779
- "data-dashboard-baseline-options": true,
11780
- children: listOpen ? (0, react_jsx_runtime.jsx)("div", {
11781
- id: `${pickerId}-options`,
11782
- className: dashboard_css_default.dashboardBaselineList,
11783
- role: "listbox",
11784
- "aria-label": t("dashboard.searchBranches"),
11785
- children: filteredOptions.map((branch, index) => (0, react_jsx_runtime.jsxs)("button", {
11786
- type: "button",
11787
- ref: (element) => {
11788
- optionRefs.current[index] = element;
11789
- },
11790
- id: `${pickerId}-option-${index}`,
11791
- className: dashboard_css_default.dashboardBaselineOption,
11792
- "data-dashboard-baseline-option": branch.name,
11793
- "data-highlighted": activeIndex === index ? true : void 0,
11794
- role: "option",
11795
- "aria-selected": branch.name === draft,
11796
- onClick: () => selectOption(index),
11797
- children: [
11798
- (0, react_jsx_runtime.jsx)(IconBranchOutline16, {}),
11799
- (0, react_jsx_runtime.jsx)("span", {
11800
- className: dashboard_css_default.dashboardBaselineOptionLabel,
11801
- children: branch.name
11802
- }),
11803
- branch.name === draft && (0, react_jsx_runtime.jsx)(IconCheckOutline16, {})
11804
- ]
11805
- }, branch.name))
11806
- }) : (0, react_jsx_runtime.jsx)("div", {
11807
- className: dashboard_css_default.dashboardBaselineEmpty,
11808
- "data-dashboard-baseline-empty": true,
11809
- role: "status",
11810
- "aria-live": "polite",
11811
- children: t("dashboard.noMatchingBranches")
11812
- })
11813
- }),
11814
- (0, react_jsx_runtime.jsx)(NotificationToasts, { notices: error === void 0 ? [] : [{
11815
- key: JSON.stringify([
11816
- "baseline",
11817
- context,
11818
- error.code,
11819
- error.details
11820
- ]),
12672
+ children: [draft !== void 0 && (0, react_jsx_runtime.jsx)(GitBranchPicker, {
12673
+ branches: options,
12674
+ value: draft,
12675
+ onChange: setDraft,
12676
+ t,
12677
+ disabled: pending || disabled,
12678
+ loading,
12679
+ onClose: closeEditor,
12680
+ onLoad: onLoad === void 0 ? void 0 : () => readBranches(onLoad),
12681
+ onFetch: onFetch === void 0 ? void 0 : () => readBranches(onFetch)
12682
+ }, lifetime), (0, react_jsx_runtime.jsx)(NotificationToasts, { notices: error === void 0 ? [] : [{
12683
+ key: JSON.stringify([
12684
+ "baseline",
11821
12685
  context,
11822
- error,
11823
- actions: [{
11824
- label: t("action.retry"),
11825
- disabled: pending || disabled,
11826
- onClick: () => {
11827
- save();
11828
- }
11829
- }],
11830
- describe: (translate) => translate("dashboard.base") + " · " + (context ?? ""),
11831
- message: (translate) => translate("dashboard.baseSaveFailed") + (error.code === "WORKTREE_VIEW_FAILED" ? "" : " " + formatWorktreeViewError(error, translate)),
11832
- text: t("dashboard.baseSaveFailed") + (error.code === "WORKTREE_VIEW_FAILED" ? "" : " " + formatWorktreeViewError(error, t))
11833
- }] })
11834
- ]
12686
+ error.code,
12687
+ error.details
12688
+ ]),
12689
+ context,
12690
+ error,
12691
+ actions: [{
12692
+ label: t("action.retry"),
12693
+ disabled: pending || disabled,
12694
+ onClick: () => {
12695
+ save();
12696
+ }
12697
+ }],
12698
+ describe: (translate) => translate("dashboard.base") + " · " + (context ?? ""),
12699
+ message: (translate) => translate("dashboard.baseSaveFailed") + (error.code === "WORKTREE_VIEW_FAILED" ? "" : " " + formatWorktreeViewError(error, translate)),
12700
+ text: t("dashboard.baseSaveFailed") + (error.code === "WORKTREE_VIEW_FAILED" ? "" : " " + formatWorktreeViewError(error, t))
12701
+ }] })]
11835
12702
  })
11836
12703
  })] });
11837
12704
  }
11838
12705
  /** A managed Worktree or browser Main projection with explicit unavailable states for inapplicable facts. */
11839
- function WorktreeDashboard({ manager, record, workspaceTitle, t, onClose, onOpenSidebar, isRightSidebarExpanded, sessions, sessionPresentations, sessionIds, actionPending, onOpenSession, onCreateSession, onCreateWorktree, onArchiveWorktree, onOpenFile, onSaveInstructions, onSaveBaseline, branches = [] }) {
12706
+ function WorktreeDashboard({ manager, record, workspaceTitle, t, onClose, onOpenSidebar, isRightSidebarExpanded, sessions, sessionPresentations, sessionIds, actionPending, onOpenSession, onCreateSession, onCreateWorktree, onArchiveWorktree, onOpenFile, onSaveInstructions, onSaveBaseline, onFetchBranches, onLoadBranches, branches = [], branchesLoading = false }) {
11840
12707
  const surface = (0, react.useRef)(null);
11841
12708
  const heading = (0, react.useRef)(null);
11842
12709
  const [placement, setPlacement] = (0, react.useState)();
@@ -11885,7 +12752,11 @@ window.__ModuleLoader__.load({
11885
12752
  return () => {
11886
12753
  branchCopyGeneration.current += 1;
11887
12754
  };
11888
- }, [record.branch]);
12755
+ }, [
12756
+ record.branch,
12757
+ record.currentBranch,
12758
+ record.currentHead?.name
12759
+ ]);
11889
12760
  const copyPath = async () => {
11890
12761
  if (copyPending.current) return;
11891
12762
  copyPending.current = true;
@@ -11900,15 +12771,17 @@ window.__ModuleLoader__.load({
11900
12771
  if (generation === copyGeneration.current) copyPending.current = false;
11901
12772
  }
11902
12773
  };
11903
- const branchAvailable = record.branch.length > 0;
11904
- const displayBranch = branchAvailable ? record.branch : t("dashboard.branchUnavailable");
12774
+ const isMain = isMainWorktreeId$1(record.worktreeId);
12775
+ const refName = record.currentHead?.name ?? record.currentBranch ?? record.branch;
12776
+ const branchAvailable = refName.length > 0;
12777
+ const displayBranch = branchAvailable ? refName : t("dashboard.branchUnavailable");
11905
12778
  const copyBranch = async () => {
11906
12779
  if (!branchAvailable || branchCopyPending.current) return;
11907
12780
  branchCopyPending.current = true;
11908
12781
  const generation = branchCopyGeneration.current;
11909
12782
  setBranchCopyState("pending");
11910
12783
  try {
11911
- const copied = await (0, _deepseek_ai_dsh_client_ui_primitives.writeClipboard)(record.branch);
12784
+ const copied = await (0, _deepseek_ai_dsh_client_ui_primitives.writeClipboard)(refName);
11912
12785
  if (generation === branchCopyGeneration.current) setBranchCopyState(copied ? "copied" : "failed");
11913
12786
  } catch {
11914
12787
  if (generation === branchCopyGeneration.current) setBranchCopyState("failed");
@@ -11916,8 +12789,8 @@ window.__ModuleLoader__.load({
11916
12789
  if (generation === branchCopyGeneration.current) branchCopyPending.current = false;
11917
12790
  }
11918
12791
  };
11919
- const healthKey = record.health === "ready" ? "worktree.ready" : record.health === "repair" ? "worktree.repair" : record.health === "recovery-needed" ? "worktree.recovery" : record.health === "branch-drift" ? "worktree.branchDrift" : record.health === "cleaned" ? "dashboard.cleaned" : "dashboard.unknown";
11920
- const liveBranch = record.currentBranch === null ? t("dashboard.detached") : record.currentBranch ?? (branchAvailable ? record.branch : t("dashboard.branchUnavailable"));
12792
+ const healthKey = isMain ? "dashboard.mainReady" : record.health === "ready" ? "worktree.ready" : record.health === "repair" ? "worktree.repair" : record.health === "recovery-needed" ? "worktree.recovery" : record.health === "branch-drift" ? "worktree.branchDrift" : record.health === "cleaned" ? "dashboard.cleaned" : "dashboard.unknown";
12793
+ const liveBranch = record.currentHead?.name ?? (record.currentBranch === null ? t("dashboard.detached") : record.currentBranch ?? (branchAvailable ? record.branch : t("dashboard.branchUnavailable")));
11921
12794
  const baselineCurrentBranch = record.currentBranch === void 0 ? record.branch : record.currentBranch ?? void 0;
11922
12795
  const persistBaseline = onSaveBaseline === void 0 ? void 0 : async (baseBranch, expectedBaseBranch) => {
11923
12796
  const result = await onSaveBaseline(baseBranch, expectedBaseBranch);
@@ -11953,9 +12826,15 @@ window.__ModuleLoader__.load({
11953
12826
  children: "→"
11954
12827
  })]
11955
12828
  });
11956
- const sessionList = (ids) => ids.length === 0 ? (0, react_jsx_runtime.jsx)("div", {
12829
+ const sessionList = (ids) => ids.length === 0 ? (0, react_jsx_runtime.jsxs)("div", {
11957
12830
  className: dashboard_css_default.dashboardEmpty,
11958
- children: (0, react_jsx_runtime.jsx)("p", { children: t("dashboard.noSessions") })
12831
+ children: [(0, react_jsx_runtime.jsx)("p", { children: t("dashboard.noSessions") }), onCreateSession !== void 0 && (0, react_jsx_runtime.jsx)("button", {
12832
+ type: "button",
12833
+ className: dashboard_css_default.dashboardButton,
12834
+ disabled: actionPending,
12835
+ onClick: onCreateSession,
12836
+ children: t("dashboard.newSession")
12837
+ })]
11959
12838
  }) : (0, react_jsx_runtime.jsx)("ul", {
11960
12839
  className: dashboard_css_default.dashboardSessions,
11961
12840
  children: ids.map((sessionId) => {
@@ -12012,6 +12891,7 @@ window.__ModuleLoader__.load({
12012
12891
  onKeyDown: (event) => {
12013
12892
  if (event.defaultPrevented) return;
12014
12893
  if (event.key === "Escape") {
12894
+ if (event.target?.closest?.("[data-single-select-picker]")) return;
12015
12895
  if (event.currentTarget.querySelector("[role=\"menu\"]")) return;
12016
12896
  event.stopPropagation();
12017
12897
  onClose();
@@ -12078,30 +12958,31 @@ window.__ModuleLoader__.load({
12078
12958
  children: [
12079
12959
  (0, react_jsx_runtime.jsxs)("div", {
12080
12960
  className: dashboard_css_default.dashboardTitleRow,
12081
- "data-dashboard-copy": "branch",
12082
- role: branchAvailable ? "button" : void 0,
12083
- tabIndex: branchAvailable ? 0 : void 0,
12084
- "aria-label": branchAvailable ? t("dashboard.copyBranch") : void 0,
12085
- title: branchAvailable ? t("dashboard.copyBranch") : void 0,
12086
- "aria-busy": branchAvailable && branchCopyState === "pending" ? true : void 0,
12087
- onClick: branchAvailable ? () => void copyBranch() : void 0,
12088
- onKeyDown: branchAvailable ? (event) => {
12089
- if (event.key === "Enter" || event.key === " ") {
12090
- event.preventDefault();
12091
- copyBranch();
12092
- }
12093
- } : void 0,
12094
12961
  children: [
12095
12962
  (0, react_jsx_runtime.jsx)(IconBranchOutline16, {}),
12096
12963
  (0, react_jsx_runtime.jsx)("h1", {
12097
12964
  id: `${id}-title`,
12098
12965
  ref: heading,
12099
12966
  tabIndex: -1,
12100
- children: displayBranch
12967
+ children: (0, react_jsx_runtime.jsx)("button", {
12968
+ type: "button",
12969
+ className: dashboard_css_default.dashboardRefButton,
12970
+ "data-dashboard-copy": "branch",
12971
+ disabled: !branchAvailable,
12972
+ "aria-label": branchAvailable ? t("dashboard.copyBranch") : void 0,
12973
+ title: branchAvailable ? t("dashboard.copyBranch") : void 0,
12974
+ "aria-busy": branchAvailable && branchCopyState === "pending" ? true : void 0,
12975
+ onClick: branchAvailable ? () => void copyBranch() : void 0,
12976
+ children: displayBranch
12977
+ })
12978
+ }),
12979
+ record.currentHead?.kind !== void 0 && record.currentHead.kind !== "branch" && (0, react_jsx_runtime.jsx)("span", {
12980
+ className: dashboard_css_default.dashboardSoon,
12981
+ children: t(record.currentHead.kind === "tag" ? "dashboard.refKind.tag" : "dashboard.refKind.commit")
12101
12982
  }),
12102
12983
  (0, react_jsx_runtime.jsxs)("span", {
12103
12984
  className: dashboard_css_default.dashboardHealth,
12104
- "data-health": record.health ?? "unknown",
12985
+ "data-health": isMain ? "local" : record.health ?? "unknown",
12105
12986
  children: [(0, react_jsx_runtime.jsx)("span", {
12106
12987
  "aria-hidden": "true",
12107
12988
  children: "●"
@@ -12156,7 +13037,7 @@ window.__ModuleLoader__.load({
12156
13037
  children: (0, react_jsx_runtime.jsxs)("dl", {
12157
13038
  className: dashboard_css_default.dashboardFacts,
12158
13039
  children: [
12159
- (0, react_jsx_runtime.jsx)(DashboardFactRow, {
13040
+ !isMain && (0, react_jsx_runtime.jsx)(DashboardFactRow, {
12160
13041
  label: t(acquisitionLabel),
12161
13042
  children: acquisitionFacts.timestamp ? (0, react_jsx_runtime.jsx)("time", {
12162
13043
  dateTime: acquisitionFacts.timestamp,
@@ -12166,22 +13047,25 @@ window.__ModuleLoader__.load({
12166
13047
  children: t("dashboard.historicalUnavailable")
12167
13048
  })
12168
13049
  }),
12169
- !isMainWorktreeId$1(record.worktreeId) && persistBaseline !== void 0 ? (0, react_jsx_runtime.jsx)(WorktreeBaselineEditor, {
13050
+ !isMain && (persistBaseline !== void 0 ? (0, react_jsx_runtime.jsx)(WorktreeBaselineEditor, {
12170
13051
  context: workspaceTitle + " · " + record.branch + " · " + record.absolutePath,
12171
13052
  value: baselineBranch,
12172
13053
  branches,
13054
+ loading: branchesLoading,
12173
13055
  currentBranch: baselineCurrentBranch,
12174
13056
  onSave: persistBaseline,
13057
+ onFetch: onFetchBranches,
13058
+ onLoad: onLoadBranches,
12175
13059
  t,
12176
13060
  disabled: record.status !== "active" || record.health === "recovery-needed"
12177
13061
  }) : (0, react_jsx_runtime.jsx)(DashboardFactRow, {
12178
13062
  label: t("dashboard.base"),
12179
13063
  baseline: true,
12180
- children: displayedBaseline ?? (0, react_jsx_runtime.jsx)("span", {
13064
+ children: displayedBaseline?.replace(/^refs\/(heads|remotes)\//u, "") ?? (0, react_jsx_runtime.jsx)("span", {
12181
13065
  className: dashboard_css_default.dashboardHistorical,
12182
13066
  children: t("dashboard.historicalUnavailable")
12183
13067
  })
12184
- }),
13068
+ })),
12185
13069
  (0, react_jsx_runtime.jsx)(DashboardFactRow, {
12186
13070
  label: t("dashboard.source"),
12187
13071
  children: isMainWorktreeId$1(record.worktreeId) ? t("worktree.main") : t(record.source === "external" ? "dashboard.external" : "dashboard.plugin")
@@ -12284,9 +13168,9 @@ window.__ModuleLoader__.load({
12284
13168
  label: t("dashboard.branch"),
12285
13169
  children: liveBranch
12286
13170
  }),
12287
- (0, react_jsx_runtime.jsx)(DashboardFactRow, {
13171
+ !isMain && (0, react_jsx_runtime.jsx)(DashboardFactRow, {
12288
13172
  label: t("dashboard.base"),
12289
- children: displayedBaseline ?? (0, react_jsx_runtime.jsx)("span", {
13173
+ children: displayedBaseline?.replace(/^refs\/(heads|remotes)\//u, "") ?? (0, react_jsx_runtime.jsx)("span", {
12290
13174
  className: dashboard_css_default.dashboardHistorical,
12291
13175
  children: t("dashboard.historicalUnavailable")
12292
13176
  })
@@ -12363,9 +13247,9 @@ window.__ModuleLoader__.load({
12363
13247
  defaultBaselineBranch: displayedBaseline,
12364
13248
  currentBranch: baselineCurrentBranch,
12365
13249
  capturedBaseline: record.baseCommit !== void 0,
12366
- onOpenFile: (filePath) => {
13250
+ onOpenFile: onOpenFile === void 0 ? void 0 : (filePath) => {
12367
13251
  onOpenFile?.(filePath);
12368
- setRightSidebarOpen(true);
13252
+ setRightSidebarOpen(isRightSidebarExpanded?.() ?? false);
12369
13253
  },
12370
13254
  t
12371
13255
  }) : tab === "sessions" ? (0, react_jsx_runtime.jsx)(Card, {
@@ -12603,10 +13487,38 @@ window.__ModuleLoader__.load({
12603
13487
  }
12604
13488
  //#endregion
12605
13489
  //#region lib/client/dashboard/git/file-address.js
12606
- /** Resolve checkout-relative Git paths against the actual Session cwd. */
12607
- function buildSessionFileAddress(sessionId, path, gitRootPath, cwd) {
13490
+ var GitFileAddressError = class extends Error {
13491
+ code = "GIT_FILE_OUTSIDE_SESSION";
13492
+ };
13493
+ function absoluteDirectory(value) {
13494
+ const absolute = stripExtendedWindowsPrefix(value).replace(/\\/g, "/");
13495
+ if (!absolute.startsWith("/") && !/^[A-Za-z]:\//u.test(absolute)) throw new GitFileAddressError("Workspace directory, Git root and Session cwd must be absolute");
13496
+ const normalized = absolute.replace(/\/+$/u, "");
13497
+ if (normalized.split("/").some((segment) => segment === "." || segment === "..")) throw new GitFileAddressError("Ambiguous directory path");
13498
+ return normalized;
13499
+ }
13500
+ /** Resolve Workspace-relative Git paths against the actual Session cwd. */
13501
+ function buildSessionFileAddress(sessionId, path, workspacePath, cwd, gitRootPath = workspacePath) {
12608
13502
  const normalized = path.replace(/\\/g, "/").replace(/^(?:\.\/)+/, "");
12609
- return fileAddressFor(sessionId, cwd, gitRootPath === void 0 ? normalized : gitRootPath.replace(/\\/g, "/").replace(/\/$/, "") + "/" + normalized);
13503
+ if (!normalized || normalized.startsWith("/") || /^[A-Za-z]:/u.test(normalized) || normalized.includes("\0") || normalized.split("/").some((segment) => segment === "." || segment === "")) throw new GitFileAddressError("Expected a Workspace-relative Git file path");
13504
+ if (workspacePath === void 0) {
13505
+ if (normalized.split("/").includes("..")) throw new GitFileAddressError("Workspace directory is required");
13506
+ return fileAddressFor(sessionId, cwd, normalized);
13507
+ }
13508
+ const root = absoluteDirectory(workspacePath);
13509
+ const sessionRoot = absoluteDirectory(cwd ?? workspacePath);
13510
+ const checkoutRoot = absoluteDirectory(gitRootPath ?? workspacePath);
13511
+ const parts = root.split("/");
13512
+ const rootSegments = root.startsWith("//") ? 4 : 1;
13513
+ for (const segment of normalized.split("/")) if (segment === "..") {
13514
+ if (parts.length <= rootSegments) throw new GitFileAddressError("Path escapes the filesystem root");
13515
+ parts.pop();
13516
+ } else parts.push(segment);
13517
+ const target = parts.join("/");
13518
+ const windows = isWindowsPath(workspacePath) || isWindowsPath(cwd ?? workspacePath) || root.startsWith("//");
13519
+ const identity = (value) => windows ? value.toLowerCase() : value;
13520
+ if (!identity(target).startsWith(identity(checkoutRoot) + "/") || !identity(target).startsWith(identity(sessionRoot) + "/")) throw new GitFileAddressError("The changed file is outside the Session working directory");
13521
+ return fileAddressFor(sessionId, cwd, target.slice(sessionRoot.length + 1));
12610
13522
  }
12611
13523
  //#endregion
12612
13524
  //#region lib/client/WorktreeSurface.js
@@ -12654,8 +13566,8 @@ window.__ModuleLoader__.load({
12654
13566
  });
12655
13567
  const targetWorkspace = dashboard === void 0 ? void 0 : source.workspaces.items.find((workspace) => workspace.workspaceId === dashboard.workspaceId);
12656
13568
  const targetView = dashboard === void 0 ? void 0 : read.viewByWorkspace.get(dashboard.workspaceId);
12657
- const dashboardMainBranch = targetView?.branches.find((branch) => branch.isCurrent)?.name;
12658
- const dashboardMainRecord = targetWorkspace === void 0 ? void 0 : createMainWorktreeRecord(targetWorkspace, dashboardMainBranch, targetView?.mainInstructions);
13569
+ const dashboardMainBranch = targetView?.currentBranch === null ? void 0 : targetView?.currentBranch ?? targetView?.branches.find((branch) => branch.isCurrent)?.name;
13570
+ const dashboardMainRecord = targetWorkspace === void 0 ? void 0 : createMainWorktreeRecord(targetWorkspace, dashboardMainBranch, targetView?.mainInstructions, targetView?.checkout);
12659
13571
  const dashboardRecord = resolveDashboardRecord(dashboard, source.mode, source.currentSessionId, source.workspaceIds, dashboard === void 0 ? void 0 : targetView?.worktrees, dashboardMainRecord);
12660
13572
  (0, react.useEffect)(() => {
12661
13573
  if (dashboard !== void 0 && dashboardRecord === void 0 && (source.mode !== "worktree" || dashboard.sessionId !== void 0 && dashboard.sessionId !== source.currentSessionId || !source.workspaceIds.includes(dashboard.workspaceId) || targetView !== void 0)) setDashboard(void 0);
@@ -12772,12 +13684,34 @@ window.__ModuleLoader__.load({
12772
13684
  const onOpenFile = (0, react.useCallback)((filePath, options) => {
12773
13685
  if (typeof props.openResource !== "function" || dashboardRecord === void 0) return;
12774
13686
  const worktreeSessions = 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));
12775
- const targetSessionId = source.currentSessionId !== void 0 && worktreeSessions.includes(source.currentSessionId) ? source.currentSessionId : void 0;
12776
- if (targetSessionId === void 0) return;
12777
- const address = buildSessionFileAddress(targetSessionId, filePath, dashboardRecord.gitRootPath ?? dashboardRecord.absolutePath, source.sessions.byId[targetSessionId]?.cwd ?? dashboardRecord.absolutePath);
13687
+ const targetSessionId = source.currentSessionId !== void 0 && worktreeSessions.includes(source.currentSessionId) ? source.currentSessionId : worktreeSessions[0];
13688
+ if (targetSessionId === void 0) {
13689
+ mutation.setActionError({
13690
+ code: "GIT_FILE_SESSION_REQUIRED",
13691
+ message: props.t("dashboard.git.sessionRequired"),
13692
+ retryable: false
13693
+ });
13694
+ return;
13695
+ }
13696
+ let address;
13697
+ try {
13698
+ address = buildSessionFileAddress(targetSessionId, filePath, dashboardRecord.absolutePath, isMainWorktreeId$1(dashboardRecord.worktreeId) && source.sessions.byId[targetSessionId]?.cwd === dashboardWorkspace?.path ? dashboardRecord.absolutePath : source.sessions.byId[targetSessionId]?.cwd ?? dashboardRecord.absolutePath, dashboardRecord.gitRootPath ?? dashboardRecord.absolutePath);
13699
+ } catch (error) {
13700
+ if (!(error instanceof GitFileAddressError)) throw error;
13701
+ mutation.setActionError({
13702
+ code: error.code,
13703
+ message: props.t("dashboard.git.outsideSession"),
13704
+ retryable: false
13705
+ });
13706
+ return;
13707
+ }
12778
13708
  props.openResource(address, options);
13709
+ props.openRightSidebar?.();
12779
13710
  }, [
12780
13711
  props.openResource,
13712
+ props.openRightSidebar,
13713
+ props.t,
13714
+ mutation.setActionError,
12781
13715
  dashboardRecord,
12782
13716
  source.currentSessionId,
12783
13717
  source.sessions,
@@ -12918,6 +13852,21 @@ window.__ModuleLoader__.load({
12918
13852
  }
12919
13853
  } : void 0,
12920
13854
  branches: dashboardView?.branches ?? [],
13855
+ branchesLoading: dashboardView === void 0 && read.readState.status === "loading",
13856
+ onLoadBranches: props.manager === void 0 ? void 0 : () => props.manager.listBranches({ workspaceId: dashboardRecord.workspaceId }),
13857
+ onFetchBranches: props.manager?.fetchRemoteBranches === void 0 ? void 0 : async () => {
13858
+ try {
13859
+ return await props.manager.fetchRemoteBranches({ workspaceId: dashboardRecord.workspaceId });
13860
+ } finally {
13861
+ read.refresh({
13862
+ preserveCurrent: true,
13863
+ scope: {
13864
+ kind: "workspace",
13865
+ workspaceId: dashboardRecord.workspaceId
13866
+ }
13867
+ });
13868
+ }
13869
+ },
12921
13870
  workspaceTitle: dashboardWorkspace?.title ?? "",
12922
13871
  sessions: source.sessions,
12923
13872
  sessionPresentations: source.sessionPresentations,
@@ -12935,11 +13884,11 @@ window.__ModuleLoader__.load({
12935
13884
  cwd: dashboardRecord.absolutePath
12936
13885
  });
12937
13886
  } : void 0,
12938
- onCreateWorktree: dashboardCanCreate && dashboardRecord.currentBranch !== null && dashboardRecord.branch.length > 0 && dashboardWorkspace !== void 0 && dashboardView !== void 0 ? () => {
13887
+ onCreateWorktree: dashboardCanCreate && (dashboardRecord.currentBranch !== null || isMainWorktreeId$1(dashboardRecord.worktreeId)) && dashboardRecord.branch.length > 0 && dashboardWorkspace !== void 0 && dashboardView !== void 0 ? () => {
12939
13888
  if (mutation.actionPending) return;
12940
13889
  const branch = dashboardRecord.currentBranch ?? dashboardRecord.branch;
12941
13890
  registration.openWorktreeCreator(dashboardWorkspace, {
12942
- baseBranch: branch,
13891
+ baseBranch: dashboardRecord.currentBranch === null ? "HEAD" : branch,
12943
13892
  newBranch: createNumberedWorktreeName(branch, [...dashboardView.branches.map((candidate) => candidate.name), ...dashboardView.worktrees.map((candidate) => candidate.branch)])
12944
13893
  });
12945
13894
  } : void 0,
@@ -13229,12 +14178,14 @@ window.__ModuleLoader__.load({
13229
14178
  };
13230
14179
  }
13231
14180
  const currentBranch = input.branches.find(({ isCurrent }) => isCurrent);
13232
- if (currentBranch === void 0 || currentBranch.name.length === 0) return none("not-ready");
14181
+ const currentHead = input.checkout?.currentHead;
14182
+ const label = currentHead?.name ?? currentBranch?.name;
14183
+ if (label === void 0 || label.length === 0) return none("not-ready");
13233
14184
  return {
13234
14185
  kind: "main",
13235
14186
  workspaceId: workspace.workspaceId,
13236
- label: currentBranch.name,
13237
- source: "current-branch"
14187
+ label,
14188
+ source: currentHead !== void 0 && currentHead.kind !== "branch" ? "current-head" : "current-branch"
13238
14189
  };
13239
14190
  }
13240
14191
  //#endregion
@@ -13286,6 +14237,7 @@ window.__ModuleLoader__.load({
13286
14237
  currentWorkspaceId: identity.workspaceId,
13287
14238
  workspaces: input.workspaces.getSnapshot().items,
13288
14239
  branches: data.branches,
14240
+ checkout: data.checkout,
13289
14241
  worktrees: data.worktrees,
13290
14242
  bindings: data.bindings
13291
14243
  });