@band-app/server 0.23.0 → 0.24.0

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 (163) hide show
  1. package/dist/client/assets/{DockviewBrowserContainer-c5TBCFK6.js → DockviewBrowserContainer-Bh7ygcym.js} +2 -2
  2. package/dist/client/assets/{DockviewTerminalContainer-De1DHQ5S.js → DockviewTerminalContainer-BA10dl2w.js} +2 -2
  3. package/dist/client/assets/{TerminalPanel-DR6CDpEJ.js → TerminalPanel-C40mohhY.js} +1 -1
  4. package/dist/client/assets/{_basePickBy-DjS8T81h.js → _basePickBy-BoN5C7c3.js} +1 -1
  5. package/dist/client/assets/{_baseUniq-BoA3Q22r.js → _baseUniq-hs8Z8eGG.js} +1 -1
  6. package/dist/client/assets/{arc-DzFH-F6i.js → arc-DStHWz7g.js} +1 -1
  7. package/dist/client/assets/{architectureDiagram-VXUJARFQ-DpWdRDqh.js → architectureDiagram-VXUJARFQ-BmuwLrzR.js} +1 -1
  8. package/dist/client/assets/{blockDiagram-VD42YOAC-In-FvNuA.js → blockDiagram-VD42YOAC-CpfEplz4.js} +1 -1
  9. package/dist/client/assets/{c4Diagram-YG6GDRKO-uWim35od.js → c4Diagram-YG6GDRKO-DFNXKd12.js} +1 -1
  10. package/dist/client/assets/channel-cGiKwLh2.js +1 -0
  11. package/dist/client/assets/{chunk-4BX2VUAB-uNqF21Qn.js → chunk-4BX2VUAB-BhKLwyZj.js} +1 -1
  12. package/dist/client/assets/{chunk-55IACEB6-BEB0DppO.js → chunk-55IACEB6--1nGJwoJ.js} +1 -1
  13. package/dist/client/assets/{chunk-B4BG7PRW-Csf_UWBG.js → chunk-B4BG7PRW-DfW_4HED.js} +1 -1
  14. package/dist/client/assets/{chunk-DI55MBZ5-ehQAiitH.js → chunk-DI55MBZ5-BBLPj3y_.js} +1 -1
  15. package/dist/client/assets/{chunk-FMBD7UC4-Ddw3wom4.js → chunk-FMBD7UC4-22_QzB6-.js} +1 -1
  16. package/dist/client/assets/{chunk-QN33PNHL-ICAdKyID.js → chunk-QN33PNHL-BsNBNA8p.js} +1 -1
  17. package/dist/client/assets/{chunk-QZHKN3VN-CWKRx0Nc.js → chunk-QZHKN3VN-t5QozrKy.js} +1 -1
  18. package/dist/client/assets/{chunk-TZMSLE5B-DEAJFNe9.js → chunk-TZMSLE5B-DTbuaeiD.js} +1 -1
  19. package/dist/client/assets/classDiagram-2ON5EDUG-aEV-2-qP.js +1 -0
  20. package/dist/client/assets/classDiagram-v2-WZHVMYZB-aEV-2-qP.js +1 -0
  21. package/dist/client/assets/clone-CArWpwXp.js +1 -0
  22. package/dist/client/assets/{cose-bilkent-S5V4N54A-CbS4okPK.js → cose-bilkent-S5V4N54A-HZO5t4GF.js} +1 -1
  23. package/dist/client/assets/{dagre-6UL2VRFP-BsLKz8AK.js → dagre-6UL2VRFP-DnOsaGGD.js} +1 -1
  24. package/dist/client/assets/{diagram-PSM6KHXK-M6PnJuei.js → diagram-PSM6KHXK-tirWXx7b.js} +1 -1
  25. package/dist/client/assets/{diagram-QEK2KX5R-B__5YbI4.js → diagram-QEK2KX5R-Cjtr8l3E.js} +1 -1
  26. package/dist/client/assets/{diagram-S2PKOQOG-DKHL_M-B.js → diagram-S2PKOQOG-CuNpvzLc.js} +1 -1
  27. package/dist/client/assets/{erDiagram-Q2GNP2WA-BfFW0JbE.js → erDiagram-Q2GNP2WA-D2Rb5UvQ.js} +1 -1
  28. package/dist/client/assets/{flowDiagram-NV44I4VS-DjhRrkWq.js → flowDiagram-NV44I4VS-BSQxdSDJ.js} +1 -1
  29. package/dist/client/assets/{ganttDiagram-JELNMOA3-COYeUCef.js → ganttDiagram-JELNMOA3-Cj0PWn4F.js} +3 -3
  30. package/dist/client/assets/{gitGraphDiagram-V2S2FVAM-BxnB-BVL.js → gitGraphDiagram-V2S2FVAM-DMoH-grQ.js} +1 -1
  31. package/dist/client/assets/{graph-B6AmaXta.js → graph-B7ABrrXm.js} +1 -1
  32. package/dist/client/assets/{highlighted-body-B3W2YXNL-wXSbO2Nz.js → highlighted-body-B3W2YXNL-DCQslkUR.js} +1 -1
  33. package/dist/client/assets/{index-B_tLkjtQ.js → index-8PaDaRYT.js} +1 -1
  34. package/dist/client/assets/{index-dPGgxYg7.js → index-9FCRbBun.js} +1 -1
  35. package/dist/client/assets/{index-CXAmq9J9.js → index-B22f7bFn.js} +1 -1
  36. package/dist/client/assets/{index-BR4JJgox.js → index-BCA8lija.js} +1 -1
  37. package/dist/client/assets/{index-DQcyjj1n.js → index-BG3Ltnuv.js} +1 -1
  38. package/dist/client/assets/index-BQhRobL8.js +1 -0
  39. package/dist/client/assets/{index-DOipD6Mc.js → index-BaT5I2xy.js} +1 -1
  40. package/dist/client/assets/{index-C9my7XIp.js → index-BsEwdsSv.js} +1 -1
  41. package/dist/client/assets/{index-Bu4tJzS5.js → index-C99EKoUY.js} +1 -1
  42. package/dist/client/assets/{index-CFh_QYgy.js → index-CBLjtUwT.js} +1 -1
  43. package/dist/client/assets/{index-DPAcHZUY.js → index-COql1I_y.js} +1 -1
  44. package/dist/client/assets/{index-YemckZzk.js → index-D9SknX6B.js} +1 -1
  45. package/dist/client/assets/{index-B-xrNHzx.js → index-DWj9bxNA.js} +1 -1
  46. package/dist/client/assets/{index-DKFuGU2w.js → index-DWqvtyLc.js} +1 -1
  47. package/dist/client/assets/{index-oWFAyhhb.js → index-DaWbWCgj.js} +1 -1
  48. package/dist/client/assets/{index-e6iwsWag.js → index-Diyv48F3.js} +1 -1
  49. package/dist/client/assets/{index-DjFJyRsb.js → index-DjFlwM8l.js} +1 -1
  50. package/dist/client/assets/{index-C5FWnSNO.js → index-Myu-_U8q.js} +1 -1
  51. package/dist/client/assets/{infoDiagram-HS3SLOUP-8jgZTWHc.js → infoDiagram-HS3SLOUP-C_wVpnnp.js} +1 -1
  52. package/dist/client/assets/{journeyDiagram-XKPGCS4Q-C7UnOrYP.js → journeyDiagram-XKPGCS4Q-DcF--XQH.js} +1 -1
  53. package/dist/client/assets/{kanban-definition-3W4ZIXB7-BfAJ2XMs.js → kanban-definition-3W4ZIXB7-BA1w8rep.js} +1 -1
  54. package/dist/client/assets/{layout-BFiS4INQ.js → layout-DVMDYrln.js} +1 -1
  55. package/dist/client/assets/{main-SDku1HcN.js → main-B6t1j7Kr.js} +231 -231
  56. package/dist/client/assets/main-i-GTiqUd.css +1 -0
  57. package/dist/client/assets/{mindmap-definition-VGOIOE7T-CHJqgPgK.js → mindmap-definition-VGOIOE7T-C1vA0wr2.js} +1 -1
  58. package/dist/client/assets/{pieDiagram-ADFJNKIX-v1PBCyig.js → pieDiagram-ADFJNKIX-Q71p26az.js} +2 -2
  59. package/dist/client/assets/{quadrantDiagram-AYHSOK5B-BmSciYlO.js → quadrantDiagram-AYHSOK5B-Bxcd0mzk.js} +1 -1
  60. package/dist/client/assets/{requirementDiagram-UZGBJVZJ-Cpc8-ItX.js → requirementDiagram-UZGBJVZJ-DWqCIKiG.js} +1 -1
  61. package/dist/client/assets/{sankeyDiagram-TZEHDZUN-BimDWo8J.js → sankeyDiagram-TZEHDZUN-D9rSnLVX.js} +1 -1
  62. package/dist/client/assets/{sequenceDiagram-WL72ISMW-CL72CIvP.js → sequenceDiagram-WL72ISMW-Co2Jz6Fl.js} +1 -1
  63. package/dist/client/assets/{square-terminal-DAh77hNm.js → square-terminal-C3zI_mkt.js} +1 -1
  64. package/dist/client/assets/{stateDiagram-FKZM4ZOC-DPD5YOcB.js → stateDiagram-FKZM4ZOC-CXLDkeLY.js} +1 -1
  65. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-R8LzGctw.js +1 -0
  66. package/dist/client/assets/{timeline-definition-IT6M3QCI-UujIEPPc.js → timeline-definition-IT6M3QCI-BXxZZYsm.js} +1 -1
  67. package/dist/client/assets/{treemap-GDKQZRPO-CnxwYqSA.js → treemap-GDKQZRPO-BgMoU0kM.js} +1 -1
  68. package/dist/client/assets/workspace._workspaceId-Bww_ZNFK.js +2 -0
  69. package/dist/client/assets/{workspace._workspaceId--WY7ydFH.js → workspace._workspaceId-C_KGLGyB.js} +1 -1
  70. package/dist/client/assets/{xychartDiagram-PRI3JC2R-QNPzTKdU.js → xychartDiagram-PRI3JC2R-BQxVaOKh.js} +1 -1
  71. package/dist/migrations/20260703151516_add_worktree_name/migration.sql +2 -0
  72. package/dist/migrations/20260703151516_add_worktree_name/snapshot.json +1167 -0
  73. package/dist/openapi.json +26 -16
  74. package/dist/server/assets/{DockviewBrowserContainer-B8W-NI5l.js → DockviewBrowserContainer-C6QVux14.js} +1 -1
  75. package/dist/server/assets/{DockviewTerminalContainer-D6ZTAITZ.js → DockviewTerminalContainer-OevWE65L.js} +3 -3
  76. package/dist/server/assets/{TerminalPanel-D1qOucYL.js → TerminalPanel-BhOjwcFW.js} +1 -1
  77. package/dist/server/assets/{_basePickBy-DCBLSYIo.js → _basePickBy-DVK5KtlH.js} +2 -2
  78. package/dist/server/assets/{_baseUniq-D6dm-LAQ.js → _baseUniq-DSFYYhGd.js} +1 -1
  79. package/dist/server/assets/_tanstack-start-manifest_v-C_7Mj4aJ.js +4 -0
  80. package/dist/server/assets/{arc-BAoORaWl.js → arc-BpwEbxUR.js} +1 -1
  81. package/dist/server/assets/{architecture-7HQA4BMR-bh4pvUjy.js → architecture-7HQA4BMR-CNyHLOO7.js} +6 -6
  82. package/dist/server/assets/{architectureDiagram-VXUJARFQ-B6S0AQBn.js → architectureDiagram-VXUJARFQ-DVUpIskI.js} +6 -6
  83. package/dist/server/assets/{blockDiagram-VD42YOAC-DLnnO4-n.js → blockDiagram-VD42YOAC-CRv2pc0L.js} +6 -6
  84. package/dist/server/assets/{c4Diagram-YG6GDRKO-CqN2DKBx.js → c4Diagram-YG6GDRKO-CBv74bWb.js} +2 -2
  85. package/dist/server/assets/{channel-f3Ahc3R0.js → channel-C_c7u4ky.js} +1 -1
  86. package/dist/server/assets/{chunk-4BX2VUAB-CuDavVBE.js → chunk-4BX2VUAB-85OXnz_P.js} +1 -1
  87. package/dist/server/assets/{chunk-55IACEB6-D_qe5s0S.js → chunk-55IACEB6-Cl8taExZ.js} +1 -1
  88. package/dist/server/assets/{chunk-B4BG7PRW-C0ML39A6.js → chunk-B4BG7PRW-C7W_R9n6.js} +4 -4
  89. package/dist/server/assets/{chunk-DI55MBZ5-DGj3ha0C.js → chunk-DI55MBZ5-CTi30KuT.js} +3 -3
  90. package/dist/server/assets/{chunk-FMBD7UC4-D-f7FIcf.js → chunk-FMBD7UC4-CsuoPD3I.js} +1 -1
  91. package/dist/server/assets/{chunk-QN33PNHL-DSo_m7vF.js → chunk-QN33PNHL-BHHMj_a1.js} +1 -1
  92. package/dist/server/assets/{chunk-QZHKN3VN-gT8icS8l.js → chunk-QZHKN3VN-DwwXlOCl.js} +1 -1
  93. package/dist/server/assets/{chunk-TZMSLE5B-CoUTe4U3.js → chunk-TZMSLE5B-ECyN9wrL.js} +1 -1
  94. package/dist/server/assets/{classDiagram-v2-WZHVMYZB-CbQuH3ni.js → classDiagram-2ON5EDUG-qbF8ds74.js} +5 -5
  95. package/dist/server/assets/{classDiagram-2ON5EDUG-CbQuH3ni.js → classDiagram-v2-WZHVMYZB-qbF8ds74.js} +5 -5
  96. package/dist/server/assets/{clone-DhkQMQiL.js → clone-BCajbdd5.js} +1 -1
  97. package/dist/server/assets/{cose-bilkent-S5V4N54A-Q7Nl8Zqm.js → cose-bilkent-S5V4N54A-D5-w_t4l.js} +1 -1
  98. package/dist/server/assets/{dagre-6UL2VRFP-RuiqkM_u.js → dagre-6UL2VRFP-CCIdAwdB.js} +6 -6
  99. package/dist/server/assets/{diagram-PSM6KHXK-mvCbaKci.js → diagram-PSM6KHXK-CWGITxy9.js} +7 -7
  100. package/dist/server/assets/{diagram-QEK2KX5R-B30M6IEM.js → diagram-QEK2KX5R-B07zrGgY.js} +6 -6
  101. package/dist/server/assets/{diagram-S2PKOQOG-BapZgpGh.js → diagram-S2PKOQOG-XGIpbjo1.js} +6 -6
  102. package/dist/server/assets/{erDiagram-Q2GNP2WA-LKD5sOpF.js → erDiagram-Q2GNP2WA-DYHtO3j9.js} +4 -4
  103. package/dist/server/assets/{flowDiagram-NV44I4VS-Cg70kWHZ.js → flowDiagram-NV44I4VS-Cs7hS9X4.js} +5 -5
  104. package/dist/server/assets/{ganttDiagram-JELNMOA3-CpgS7Gbo.js → ganttDiagram-JELNMOA3-BhLp8xvm.js} +1 -1
  105. package/dist/server/assets/{gitGraph-G5XIXVHT-BX-0wA2S.js → gitGraph-G5XIXVHT-B46gW1OX.js} +6 -6
  106. package/dist/server/assets/{gitGraphDiagram-V2S2FVAM-BNe2zRpL.js → gitGraphDiagram-V2S2FVAM-CZHNGOm0.js} +7 -7
  107. package/dist/server/assets/{graph-BohWfDeQ.js → graph-4bVECaJM.js} +2 -2
  108. package/dist/server/assets/{highlighted-body-B3W2YXNL-DpfzVM5P.js → highlighted-body-B3W2YXNL-DSf8s2aV.js} +1 -1
  109. package/dist/server/assets/{index-Cznd5qP8.js → index-14dCbIAi.js} +5 -5
  110. package/dist/server/assets/{index-y6X09Ksj.js → index-1OK7lyTa.js} +2 -2
  111. package/dist/server/assets/{index-B6FFge5B.js → index-8EiXP0Bf.js} +2 -2
  112. package/dist/server/assets/{index-z7NiBua9.js → index-B72BPMJQ.js} +3 -3
  113. package/dist/server/assets/{index-Cvf2IVNx.js → index-BLv-1MtR.js} +5 -5
  114. package/dist/server/assets/{index-Cvmi6T35.js → index-BRzkEVRG.js} +1 -1
  115. package/dist/server/assets/{index-CTCq_dqo.js → index-C7lRWZi8.js} +4 -4
  116. package/dist/server/assets/{index-DF9DvOkv.js → index-CDG7KvBY.js} +2 -2
  117. package/dist/server/assets/{index-DsRToCeg.js → index-CHvqm6Lz.js} +5 -5
  118. package/dist/server/assets/{index-BMCwJ6BW.js → index-CKPuU6Za.js} +2 -2
  119. package/dist/server/assets/{index-Cyz3st2N.js → index-CWr-Kh5M.js} +2 -2
  120. package/dist/server/assets/{index-CnNg602B.js → index-D2uLA4oe.js} +2 -2
  121. package/dist/server/assets/{index-W2MLsk-k.js → index-DAq8fRkd.js} +2 -2
  122. package/dist/server/assets/{index-CWhqy8Ta.js → index-Dz2mzfvS.js} +2 -2
  123. package/dist/server/assets/{index-C4lG0OWB.js → index-Tq3ajWxh.js} +2 -2
  124. package/dist/server/assets/{index-CUej4Ihg.js → index-U3tOcUUV.js} +2 -2
  125. package/dist/server/assets/{index-CE_oTIBT.js → index-pFRKwTv2.js} +2 -2
  126. package/dist/server/assets/{index-DoAhyHsE.js → index-rT9xGtRW.js} +3 -3
  127. package/dist/server/assets/{info-VBDWY6EO-BQ8N2eDS.js → info-VBDWY6EO-DrELfFR0.js} +6 -6
  128. package/dist/server/assets/{infoDiagram-HS3SLOUP-I1ZLYjFY.js → infoDiagram-HS3SLOUP-D40Crb-p.js} +5 -5
  129. package/dist/server/assets/{journeyDiagram-XKPGCS4Q-lFTyhPiV.js → journeyDiagram-XKPGCS4Q-dtlVBwV2.js} +4 -4
  130. package/dist/server/assets/{kanban-definition-3W4ZIXB7-BEr5w27W.js → kanban-definition-3W4ZIXB7-72vgA7Jl.js} +2 -2
  131. package/dist/server/assets/{layout-2KXyirN2.js → layout-DJ0Eul-X.js} +4 -4
  132. package/dist/server/assets/{mermaid-3ZIDBTTL-BfFd_m4-.js → mermaid-3ZIDBTTL-DGEHf_at.js} +1 -1
  133. package/dist/server/assets/{mermaid-parser.core-SoqLW9t8.js → mermaid-parser.core-C1UfVEF8.js} +11 -11
  134. package/dist/server/assets/{mindmap-definition-VGOIOE7T-D9ZbRdf_.js → mindmap-definition-VGOIOE7T-DYfEp2uH.js} +3 -3
  135. package/dist/server/assets/{packet-DYOGHKS2-B2EvMQj5.js → packet-DYOGHKS2-IHYchS32.js} +6 -6
  136. package/dist/server/assets/{pie-VRWISCQL-YRbpkB5e.js → pie-VRWISCQL-R6SvOU4g.js} +6 -6
  137. package/dist/server/assets/{pieDiagram-ADFJNKIX-Bat_eWvt.js → pieDiagram-ADFJNKIX-EgffZsud.js} +7 -7
  138. package/dist/server/assets/{quadrantDiagram-AYHSOK5B-CtqGnRnF.js → quadrantDiagram-AYHSOK5B-n2oJWllV.js} +1 -1
  139. package/dist/server/assets/{radar-ZZBFDIW7-DvOi2qX_.js → radar-ZZBFDIW7-BX2ya_Na.js} +6 -6
  140. package/dist/server/assets/{requirementDiagram-UZGBJVZJ-CtysqbZ4.js → requirementDiagram-UZGBJVZJ-CzCXruFj.js} +3 -3
  141. package/dist/server/assets/{router-ChvYGLZB.js → router-BC8bCsa3.js} +985 -673
  142. package/dist/server/assets/{sankeyDiagram-TZEHDZUN-BTLsDOUO.js → sankeyDiagram-TZEHDZUN-C0GqwqSS.js} +1 -1
  143. package/dist/server/assets/{sequenceDiagram-WL72ISMW-CK0kbINT.js → sequenceDiagram-WL72ISMW-BfX0R0LP.js} +3 -3
  144. package/dist/server/assets/{square-terminal-BLO1pEjb.js → square-terminal-BWcJU95Z.js} +1 -1
  145. package/dist/server/assets/{stateDiagram-FKZM4ZOC-D5FS7RFa.js → stateDiagram-FKZM4ZOC-QowlLVwh.js} +8 -8
  146. package/dist/server/assets/{stateDiagram-v2-4FDKWEC3-DoCLlTuy.js → stateDiagram-v2-4FDKWEC3-DVHzQlOF.js} +4 -4
  147. package/dist/server/assets/{timeline-definition-IT6M3QCI-jFqO_Cet.js → timeline-definition-IT6M3QCI-DUoaC7rz.js} +2 -2
  148. package/dist/server/assets/{treemap-GDKQZRPO-CuHJYOCT.js → treemap-GDKQZRPO-B5KIzomx.js} +6 -6
  149. package/dist/server/assets/{workspace._workspaceId-CGq293LY.js → workspace._workspaceId-DRK2dblR.js} +101 -11
  150. package/dist/server/assets/{workspace._workspaceId-B0M_Sxj3.js → workspace._workspaceId-hnIpuUNX.js} +1 -1
  151. package/dist/server/assets/{xychartDiagram-PRI3JC2R-DPvU_7PC.js → xychartDiagram-PRI3JC2R-aNxYxejD.js} +1 -1
  152. package/dist/server/server.js +2 -2
  153. package/dist/start-server.mjs +349 -266
  154. package/package.json +4 -4
  155. package/dist/client/assets/channel-BwZLW4yW.js +0 -1
  156. package/dist/client/assets/classDiagram-2ON5EDUG-CVjdMCqG.js +0 -1
  157. package/dist/client/assets/classDiagram-v2-WZHVMYZB-CVjdMCqG.js +0 -1
  158. package/dist/client/assets/clone-Dj_6A90e.js +0 -1
  159. package/dist/client/assets/index-baLsgCNJ.js +0 -1
  160. package/dist/client/assets/main-tmFPjHOC.css +0 -1
  161. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-BAf0jK91.js +0 -1
  162. package/dist/client/assets/workspace._workspaceId-jpBhz8sr.js +0 -2
  163. package/dist/server/assets/_tanstack-start-manifest_v-BffwvUC-.js +0 -4
@@ -30213,7 +30213,7 @@ var init_claude_code = __esm({
30213
30213
  }
30214
30214
  }
30215
30215
  async listSessions(dir) {
30216
- log2.info({ dir }, "listSessions");
30216
+ log2.debug({ dir }, "listSessions");
30217
30217
  const sessions = await c7$({ dir });
30218
30218
  const filtered = sessions.filter((s6) => s6.cwd === dir);
30219
30219
  const lastPrompts = await Promise.all(
@@ -32358,7 +32358,7 @@ var init_codex = __esm({
32358
32358
  };
32359
32359
  }
32360
32360
  async listSessions(dir) {
32361
- log4.info({ dir }, "listSessions");
32361
+ log4.debug({ dir }, "listSessions");
32362
32362
  const sessions = await readCodexSessions();
32363
32363
  return sessions.filter((s6) => s6.cwd === dir).sort((a6, b10) => b10.lastModified - a6.lastModified);
32364
32364
  }
@@ -33244,7 +33244,7 @@ var init_opencode = __esm({
33244
33244
  }
33245
33245
  async listSessions(dir) {
33246
33246
  const sessions = await fetchOpenCodeSessions(this.executablePath, dir);
33247
- log6.info({ dir, count: sessions.length }, "listSessions");
33247
+ log6.debug({ dir, count: sessions.length }, "listSessions");
33248
33248
  return sessions.map((s6) => ({
33249
33249
  sessionId: s6.id,
33250
33250
  summary: s6.title || "Untitled session",
@@ -101797,6 +101797,16 @@ var projects = sqliteTable("projects", {
101797
101797
  var worktrees = sqliteTable("worktrees", {
101798
101798
  id: integer2("id").primaryKey({ autoIncrement: true }),
101799
101799
  projectName: text2("project_name").notNull().references(() => projects.name, { onDelete: "cascade" }),
101800
+ // Immutable workspace identity, set once at creation to the (slugified)
101801
+ // branch name. The workspace id is derived from this (`toWorkspaceId`),
101802
+ // NOT from `branch` — so switching the git branch inside the worktree
101803
+ // doesn't change the id (and everything keyed by it) or the projects-list
101804
+ // label. Sync updates `branch` to track git; it never touches `name`.
101805
+ // Backfilled to `branch` for pre-existing rows by the migration.
101806
+ name: text2("name").notNull(),
101807
+ // Live git branch checked out in the worktree. Reconciled against git by
101808
+ // `syncWorktrees` and used as the target of git operations. Distinct from
101809
+ // `name` above once the branch is switched.
101800
101810
  branch: text2("branch").notNull(),
101801
101811
  path: text2("path").notNull(),
101802
101812
  head: text2("head"),
@@ -111585,11 +111595,27 @@ function DialogOverlay2({
111585
111595
  }
111586
111596
  );
111587
111597
  }
111598
+ var DIALOG_CONTENT_VARIANTS = {
111599
+ default: "fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",
111600
+ "bottom-sheet": [
111601
+ // Shared
111602
+ "fixed z-50 flex flex-col bg-background shadow-lg duration-200 outline-none",
111603
+ "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
111604
+ // Mobile (< lg): bottom drawer
111605
+ "inset-x-0 bottom-0 w-full max-w-none rounded-t-2xl border border-b-0 p-6",
111606
+ "max-h-[calc(100dvh-env(safe-area-inset-top)-1.5rem)]",
111607
+ "max-lg:data-[state=open]:slide-in-from-bottom max-lg:data-[state=closed]:slide-out-to-bottom",
111608
+ // Desktop (lg+): revert to the centred modal
111609
+ "lg:inset-auto lg:top-[50%] lg:left-[50%] lg:bottom-auto lg:w-full lg:max-w-lg lg:max-h-[85vh] lg:translate-x-[-50%] lg:translate-y-[-50%] lg:rounded-lg lg:border-b",
111610
+ "lg:data-[state=open]:zoom-in-95 lg:data-[state=closed]:zoom-out-95"
111611
+ ].join(" ")
111612
+ };
111588
111613
  function DialogContent2({
111589
111614
  className,
111590
111615
  overlayClassName,
111591
111616
  children,
111592
111617
  showCloseButton = true,
111618
+ variant = "default",
111593
111619
  ...props
111594
111620
  }) {
111595
111621
  return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(DialogPortal2, { "data-slot": "dialog-portal", children: [
@@ -111598,10 +111624,8 @@ function DialogContent2({
111598
111624
  dist_exports2.Content,
111599
111625
  {
111600
111626
  "data-slot": "dialog-content",
111601
- className: cn(
111602
- "fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",
111603
- className
111604
- ),
111627
+ "data-variant": variant,
111628
+ className: cn(DIALOG_CONTENT_VARIANTS[variant], className),
111605
111629
  ...props,
111606
111630
  children: [
111607
111631
  children,
@@ -111771,19 +111795,22 @@ var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
111771
111795
  // ../../packages/ui/src/components/select.tsx
111772
111796
  var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
111773
111797
 
111774
- // ../../packages/ui/src/components/spinner.tsx
111798
+ // ../../packages/ui/src/components/sheet.tsx
111775
111799
  var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
111776
111800
 
111777
- // ../../packages/ui/src/components/switch.tsx
111801
+ // ../../packages/ui/src/components/spinner.tsx
111778
111802
  var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
111779
111803
 
111780
- // ../../packages/ui/src/components/tooltip.tsx
111804
+ // ../../packages/ui/src/components/switch.tsx
111781
111805
  var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
111806
+
111807
+ // ../../packages/ui/src/components/tooltip.tsx
111808
+ var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
111782
111809
  function Tooltip2({ ...props }) {
111783
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(dist_exports8.Root, { "data-slot": "tooltip", ...props });
111810
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(dist_exports8.Root, { "data-slot": "tooltip", ...props });
111784
111811
  }
111785
111812
  function TooltipTrigger2({ ...props }) {
111786
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(dist_exports8.Trigger, { "data-slot": "tooltip-trigger", ...props });
111813
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(dist_exports8.Trigger, { "data-slot": "tooltip-trigger", ...props });
111787
111814
  }
111788
111815
  function TooltipContent2({
111789
111816
  className,
@@ -111791,7 +111818,7 @@ function TooltipContent2({
111791
111818
  children,
111792
111819
  ...props
111793
111820
  }) {
111794
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(dist_exports8.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
111821
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(dist_exports8.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
111795
111822
  dist_exports8.Content,
111796
111823
  {
111797
111824
  "data-slot": "tooltip-content",
@@ -111803,7 +111830,7 @@ function TooltipContent2({
111803
111830
  ...props,
111804
111831
  children: [
111805
111832
  children,
111806
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(dist_exports8.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })
111833
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(dist_exports8.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })
111807
111834
  ]
111808
111835
  }
111809
111836
  ) });
@@ -113946,7 +113973,7 @@ var QueryClient = class {
113946
113973
 
113947
113974
  // ../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
113948
113975
  var React31 = __toESM(require_react(), 1);
113949
- var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
113976
+ var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
113950
113977
  var QueryClientContext = React31.createContext(
113951
113978
  void 0
113952
113979
  );
@@ -114026,7 +114053,7 @@ function useRawDashboardStore() {
114026
114053
  }
114027
114054
 
114028
114055
  // src/dashboard/context.tsx
114029
- var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
114056
+ var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
114030
114057
  var DashboardContext = (0, import_react5.createContext)(null);
114031
114058
  function useAdapter() {
114032
114059
  const ctx = (0, import_react5.useContext)(DashboardContext);
@@ -114052,15 +114079,18 @@ function useRemoveWorkspace() {
114052
114079
  const openWorkspace = useDashboardStore((s6) => s6.openWorkspace);
114053
114080
  const store2 = useRawDashboardStore();
114054
114081
  return useMutation({
114055
- mutationFn: ({ project, branch }) => adapter.removeWorkspace(project, branch),
114056
- onSuccess: (_data, { project, branch }) => {
114082
+ mutationFn: ({ project, name: name3 }) => adapter.removeWorkspace(project, name3),
114083
+ onSuccess: (_data, { project, name: name3 }) => {
114057
114084
  queryClient2.invalidateQueries({ queryKey: queryKeys.projects });
114058
- const deletedWorkspaceId = toWorkspaceId(project, branch);
114085
+ const deletedWorkspaceId = toWorkspaceId(project, name3);
114059
114086
  if (store2.getState().activeWorkspaceId === deletedWorkspaceId) {
114060
114087
  const projects2 = queryClient2.getQueryData(queryKeys.projects);
114061
114088
  const projectInfo = projects2?.find((p6) => p6.name === project);
114062
114089
  if (projectInfo) {
114063
- openWorkspace(toWorkspaceId(project, projectInfo.defaultBranch));
114090
+ const mainWt = projectInfo.worktrees.find(
114091
+ (wt) => wt.name === projectInfo.defaultBranch || wt.branch === projectInfo.defaultBranch
114092
+ );
114093
+ openWorkspace(toWorkspaceId(project, mainWt?.name ?? projectInfo.defaultBranch));
114064
114094
  }
114065
114095
  }
114066
114096
  },
@@ -114071,14 +114101,14 @@ function useRemoveWorkspace() {
114071
114101
  }
114072
114102
 
114073
114103
  // src/dashboard/components/AddProjectDialog.tsx
114074
- var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
114104
+ var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
114075
114105
 
114076
114106
  // src/dashboard/components/AgentStatusIndicator.tsx
114077
114107
  var import_lucide_react2 = __toESM(require_lucide_react(), 1);
114078
- var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
114108
+ var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
114079
114109
  function AgentStatusIndicator({ agent, isActive }) {
114080
114110
  if (!agent || agent.status !== "working" && agent.status !== "needs_attention") {
114081
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
114111
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
114082
114112
  import_lucide_react2.GitBranch,
114083
114113
  {
114084
114114
  className: `size-3 shrink-0 ${isActive ? "text-primary" : "text-muted-foreground"}`
@@ -114089,18 +114119,18 @@ function AgentStatusIndicator({ agent, isActive }) {
114089
114119
  const color = isWorking ? "bg-status-working" : "bg-status-needs-attention";
114090
114120
  const tooltip = isWorking ? "Agent running..." : "Needs your attention";
114091
114121
  const animation = isWorking ? "" : "animate-status-pulse";
114092
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Tooltip2, { children: [
114093
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: `inline-block size-2 shrink-0 rounded-full ${color} ${animation}` }) }),
114094
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TooltipContent2, { side: "top", children: tooltip })
114122
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Tooltip2, { children: [
114123
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: `inline-block size-2 shrink-0 rounded-full ${color} ${animation}` }) }),
114124
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TooltipContent2, { side: "top", children: tooltip })
114095
114125
  ] });
114096
114126
  }
114097
114127
 
114098
114128
  // src/dashboard/components/agent-icons.tsx
114099
- var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
114129
+ var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
114100
114130
 
114101
114131
  // src/dashboard/components/CIStatusIndicator.tsx
114102
114132
  var import_lucide_react3 = __toESM(require_lucide_react(), 1);
114103
- var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
114133
+ var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
114104
114134
  function CIStatusIndicator({ ci }) {
114105
114135
  const capabilities = useCapabilities();
114106
114136
  const handleOpenUrl = (url, e2) => {
@@ -114110,63 +114140,63 @@ function CIStatusIndicator({ ci }) {
114110
114140
  const clickable = !!ci.url && !!capabilities.openUrl;
114111
114141
  const cursorClass = clickable ? "cursor-pointer" : "";
114112
114142
  if (ci.state === "merged") {
114113
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Tooltip2, { children: [
114114
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
114143
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Tooltip2, { children: [
114144
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
114115
114145
  import_lucide_react3.GitMerge,
114116
114146
  {
114117
114147
  className: `size-3.5 shrink-0 text-violet-600 dark:text-violet-400 ${cursorClass}`,
114118
114148
  onClick: (e2) => handleOpenUrl(ci.url, e2)
114119
114149
  }
114120
114150
  ) }),
114121
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TooltipContent2, { children: "Merged" })
114151
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TooltipContent2, { children: "Merged" })
114122
114152
  ] });
114123
114153
  }
114124
114154
  if (ci.state === "success") {
114125
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Tooltip2, { children: [
114126
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
114155
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Tooltip2, { children: [
114156
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
114127
114157
  import_lucide_react3.CircleCheck,
114128
114158
  {
114129
114159
  className: `size-3.5 shrink-0 text-green-600 dark:text-green-400 ${cursorClass}`,
114130
114160
  onClick: (e2) => handleOpenUrl(ci.url, e2)
114131
114161
  }
114132
114162
  ) }),
114133
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TooltipContent2, { children: "CI passed" })
114163
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TooltipContent2, { children: "CI passed" })
114134
114164
  ] });
114135
114165
  }
114136
114166
  if (ci.state === "failure") {
114137
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Tooltip2, { children: [
114138
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
114167
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Tooltip2, { children: [
114168
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
114139
114169
  import_lucide_react3.CircleAlert,
114140
114170
  {
114141
114171
  className: `size-3.5 shrink-0 text-red-600 dark:text-red-400 ${cursorClass}`,
114142
114172
  onClick: (e2) => handleOpenUrl(ci.url, e2)
114143
114173
  }
114144
114174
  ) }),
114145
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TooltipContent2, { children: "CI failed" })
114175
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TooltipContent2, { children: "CI failed" })
114146
114176
  ] });
114147
114177
  }
114148
114178
  if (ci.state === "running" || ci.state === "pending") {
114149
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Tooltip2, { children: [
114150
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
114179
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Tooltip2, { children: [
114180
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
114151
114181
  import_lucide_react3.Loader,
114152
114182
  {
114153
114183
  className: `size-3.5 shrink-0 text-yellow-600 dark:text-yellow-400 animate-spin ${cursorClass}`,
114154
114184
  onClick: (e2) => handleOpenUrl(ci.url, e2)
114155
114185
  }
114156
114186
  ) }),
114157
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TooltipContent2, { children: ci.state === "running" ? "CI running" : "CI pending" })
114187
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TooltipContent2, { children: ci.state === "running" ? "CI running" : "CI pending" })
114158
114188
  ] });
114159
114189
  }
114160
114190
  if (ci.state === "cancelled") {
114161
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Tooltip2, { children: [
114162
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
114191
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Tooltip2, { children: [
114192
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
114163
114193
  import_lucide_react3.Ban,
114164
114194
  {
114165
114195
  className: `size-3.5 shrink-0 text-gray-600 dark:text-gray-400 ${cursorClass}`,
114166
114196
  onClick: (e2) => handleOpenUrl(ci.url, e2)
114167
114197
  }
114168
114198
  ) }),
114169
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TooltipContent2, { children: "CI cancelled" })
114199
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TooltipContent2, { children: "CI cancelled" })
114170
114200
  ] });
114171
114201
  }
114172
114202
  return null;
@@ -114515,19 +114545,19 @@ function legacyCopy(text3) {
114515
114545
  var setSelectionTooltip = StateEffect.define();
114516
114546
 
114517
114547
  // src/dashboard/components/CodeMirrorEditor.tsx
114518
- var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
114548
+ var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
114519
114549
 
114520
114550
  // src/dashboard/components/CodeMirrorViewer.tsx
114521
114551
  var import_react9 = __toESM(require_react(), 1);
114522
- var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
114552
+ var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
114523
114553
 
114524
114554
  // src/dashboard/components/CommandPaletteDialog.tsx
114525
114555
  var import_react10 = __toESM(require_react(), 1);
114526
- var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
114556
+ var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
114527
114557
 
114528
114558
  // src/dashboard/components/CommitDialog.tsx
114529
114559
  var import_react11 = __toESM(require_react(), 1);
114530
- var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
114560
+ var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
114531
114561
 
114532
114562
  // src/dashboard/components/DashboardShell.tsx
114533
114563
  var import_react25 = __toESM(require_react(), 1);
@@ -114566,7 +114596,7 @@ var import_react22 = __toESM(require_react(), 1);
114566
114596
  var import_react19 = __toESM(require_react(), 1);
114567
114597
 
114568
114598
  // src/dashboard/components/DeleteWorkspaceDialog.tsx
114569
- var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
114599
+ var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
114570
114600
 
114571
114601
  // src/dashboard/components/NewWorkspaceForm.tsx
114572
114602
  var import_react20 = __toESM(require_react(), 1);
@@ -114577,17 +114607,17 @@ function slugifyBranchName(input) {
114577
114607
  }
114578
114608
 
114579
114609
  // src/dashboard/components/NewWorkspaceForm.tsx
114580
- var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
114610
+ var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
114581
114611
 
114582
114612
  // src/dashboard/components/PromoteToGitDialog.tsx
114583
- var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
114613
+ var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
114584
114614
 
114585
114615
  // src/dashboard/components/WorkspaceCard.tsx
114586
114616
  var import_lucide_react5 = __toESM(require_lucide_react(), 1);
114587
114617
  var import_react21 = __toESM(require_react(), 1);
114588
114618
 
114589
114619
  // src/dashboard/components/GitStatusIndicator.tsx
114590
- var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
114620
+ var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
114591
114621
  function GitStatusIndicator({ git }) {
114592
114622
  const parts = [];
114593
114623
  if (git.conflict) {
@@ -114619,27 +114649,27 @@ function GitStatusIndicator({ git }) {
114619
114649
  });
114620
114650
  }
114621
114651
  if (parts.length === 0) return null;
114622
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Tooltip2, { children: [
114623
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "inline-flex items-center gap-0.5 font-mono text-[11px] leading-none shrink-0 pr-0.5", children: parts.map((p6) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: p6.color, children: p6.text }, p6.text)) }) }),
114624
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TooltipContent2, { children: parts.map((p6) => p6.tooltip).join(", ") })
114652
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Tooltip2, { children: [
114653
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "inline-flex items-center gap-0.5 font-mono text-[11px] leading-none shrink-0 pr-0.5", children: parts.map((p6) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: p6.color, children: p6.text }, p6.text)) }) }),
114654
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TooltipContent2, { children: parts.map((p6) => p6.tooltip).join(", ") })
114625
114655
  ] });
114626
114656
  }
114627
114657
 
114628
114658
  // src/dashboard/components/SetupStatusIndicator.tsx
114629
114659
  var import_lucide_react4 = __toESM(require_lucide_react(), 1);
114630
- var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
114660
+ var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
114631
114661
  function SetupStatusIndicator({ setup }) {
114632
114662
  if (!setup) return null;
114633
114663
  if (setup.state === "running") {
114634
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Tooltip2, { children: [
114635
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react4.Loader, { className: "size-3.5 shrink-0 text-blue-600 dark:text-blue-400 animate-spin" }) }),
114636
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TooltipContent2, { side: "top", children: "Setting up workspace..." })
114664
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Tooltip2, { children: [
114665
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react4.Loader, { className: "size-3.5 shrink-0 text-blue-600 dark:text-blue-400 animate-spin" }) }),
114666
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TooltipContent2, { side: "top", children: "Setting up workspace..." })
114637
114667
  ] });
114638
114668
  }
114639
114669
  if (setup.state === "failed") {
114640
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Tooltip2, { children: [
114641
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react4.CircleAlert, { className: "size-3.5 shrink-0 text-red-600 dark:text-red-400" }) }),
114642
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(TooltipContent2, { side: "top", children: [
114670
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Tooltip2, { children: [
114671
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react4.CircleAlert, { className: "size-3.5 shrink-0 text-red-600 dark:text-red-400" }) }),
114672
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(TooltipContent2, { side: "top", children: [
114643
114673
  "Setup failed",
114644
114674
  setup.error ? `: ${setup.error}` : ""
114645
114675
  ] })
@@ -114649,7 +114679,7 @@ function SetupStatusIndicator({ setup }) {
114649
114679
  }
114650
114680
 
114651
114681
  // src/dashboard/components/WorkspaceCard.tsx
114652
- var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
114682
+ var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
114653
114683
  var RECENT_ACTIVATION_WINDOW_MS = 300;
114654
114684
  var recentlyActivatedWorkspaceId = null;
114655
114685
  var recentlyActivatedTimer = null;
@@ -114693,7 +114723,7 @@ var WorkspaceCard = (0, import_react21.memo)(function WorkspaceCard2({
114693
114723
  const gitPush = useDashboardStore((s6) => s6.gitPush);
114694
114724
  const removeWorkspaceMutation = useRemoveWorkspace();
114695
114725
  const isPinned = worktree.pinned;
114696
- const workspaceId = toWorkspaceId(projectName, worktree.branch);
114726
+ const workspaceId = toWorkspaceId(projectName, worktree.name);
114697
114727
  const isActive = useDashboardStore((s6) => s6.activeWorkspaceId === workspaceId);
114698
114728
  const href = capabilities.getWorkspaceHref?.(workspaceId);
114699
114729
  (0, import_react21.useEffect)(() => {
@@ -114743,70 +114773,70 @@ var WorkspaceCard = (0, import_react21.memo)(function WorkspaceCard2({
114743
114773
  const hasUnpushedCommits = (branchStatus?.git.ahead ?? 0) > 0;
114744
114774
  const handleDelete = () => {
114745
114775
  if (!hasUnmergedPR && !isDirty2 && !hasUnpushedCommits) {
114746
- removeWorkspaceMutation.mutate({ project: projectName, branch: worktree.branch });
114776
+ removeWorkspaceMutation.mutate({ project: projectName, name: worktree.name });
114747
114777
  } else {
114748
114778
  onShowDeleteDialog({
114749
114779
  projectName,
114750
- branch: worktree.branch,
114780
+ name: worktree.name,
114751
114781
  isUnmerged: hasUnmergedPR,
114752
114782
  isDirty: isDirty2,
114753
114783
  hasUnpushedCommits
114754
114784
  });
114755
114785
  }
114756
114786
  };
114757
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(ContextMenu2, { children: [
114758
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ContextMenuTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { ...containerProps, children: [
114759
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Tooltip2, { delayDuration: 800, children: [
114760
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center gap-2 min-w-0 overflow-hidden", children: [
114761
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(AgentStatusIndicator, { agent: status?.agent, isActive }),
114762
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
114787
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(ContextMenu2, { children: [
114788
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ContextMenuTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { ...containerProps, children: [
114789
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Tooltip2, { delayDuration: 800, children: [
114790
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center gap-2 min-w-0 overflow-hidden", children: [
114791
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(AgentStatusIndicator, { agent: status?.agent, isActive }),
114792
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
114763
114793
  "span",
114764
114794
  {
114765
114795
  className: `text-sm truncate ${isActive ? "font-bold text-foreground" : "font-medium text-muted-foreground"}`,
114766
- children: showProjectName ? `${projectName}/${worktree.branch}` : worktree.branch
114796
+ children: showProjectName ? `${projectName}/${worktree.name}` : worktree.name
114767
114797
  }
114768
114798
  )
114769
114799
  ] }) }),
114770
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TooltipContent2, { side: "right", children: `${projectName}/${worktree.branch}` })
114800
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TooltipContent2, { side: "right", children: `${projectName}/${worktree.name}` })
114771
114801
  ] }),
114772
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "hidden @[10rem]:flex group-hover:flex items-center gap-2 shrink-0 ml-auto pl-2", children: [
114773
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SetupStatusIndicator, { setup: setupStatus }),
114774
- !isPlain && branchStatus && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(GitStatusIndicator, { git: branchStatus.git }),
114775
- !isPlain && branchStatus && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(CIStatusIndicator, { ci: branchStatus.ci })
114802
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "hidden @[10rem]:flex group-hover:flex items-center gap-2 shrink-0 ml-auto pl-2", children: [
114803
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SetupStatusIndicator, { setup: setupStatus }),
114804
+ !isPlain && branchStatus && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(GitStatusIndicator, { git: branchStatus.git }),
114805
+ !isPlain && branchStatus && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(CIStatusIndicator, { ci: branchStatus.ci })
114776
114806
  ] })
114777
114807
  ] }) }),
114778
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(ContextMenuContent2, { children: [
114779
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(ContextMenuItem2, { onClick: () => onTogglePinned(projectName, worktree.branch, isPinned), children: [
114780
- isPinned ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react5.PinOff, {}) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react5.Pin, {}),
114808
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(ContextMenuContent2, { children: [
114809
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(ContextMenuItem2, { onClick: () => onTogglePinned(projectName, worktree.name, isPinned), children: [
114810
+ isPinned ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react5.PinOff, {}) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react5.Pin, {}),
114781
114811
  isPinned ? "Unpin workspace" : "Pin workspace"
114782
114812
  ] }),
114783
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ContextMenuSeparator2, {}),
114784
- capabilities.copyPath && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(ContextMenuItem2, { onClick: () => navigator.clipboard.writeText(worktree.path), children: [
114785
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react5.Clipboard, {}),
114813
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ContextMenuSeparator2, {}),
114814
+ capabilities.copyPath && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(ContextMenuItem2, { onClick: () => navigator.clipboard.writeText(worktree.path), children: [
114815
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react5.Clipboard, {}),
114786
114816
  "Copy path"
114787
114817
  ] }),
114788
- capabilities.revealInFinder && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(ContextMenuItem2, { onClick: () => capabilities.revealInFinder(worktree.path), children: [
114789
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react5.FolderOpen, {}),
114818
+ capabilities.revealInFinder && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(ContextMenuItem2, { onClick: () => capabilities.revealInFinder(worktree.path), children: [
114819
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react5.FolderOpen, {}),
114790
114820
  "Open in Finder"
114791
114821
  ] }),
114792
- worktree.hasSetup && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(ContextMenuItem2, { onClick: () => runScript(worktree.path, "setup"), children: [
114793
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react5.Play, {}),
114822
+ worktree.hasSetup && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(ContextMenuItem2, { onClick: () => runScript(worktree.path, "setup"), children: [
114823
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react5.Play, {}),
114794
114824
  "Run setup"
114795
114825
  ] }),
114796
- worktree.hasTeardown && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(ContextMenuItem2, { onClick: () => runScript(worktree.path, "teardown"), children: [
114797
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react5.Square, {}),
114826
+ worktree.hasTeardown && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(ContextMenuItem2, { onClick: () => runScript(worktree.path, "teardown"), children: [
114827
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react5.Square, {}),
114798
114828
  "Run teardown"
114799
114829
  ] }),
114800
- !isPlain && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(ContextMenuItem2, { onClick: () => gitPull(projectName, worktree.branch), children: [
114801
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react5.ArrowDownToLine, {}),
114830
+ !isPlain && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(ContextMenuItem2, { onClick: () => gitPull(projectName, worktree.name), children: [
114831
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react5.ArrowDownToLine, {}),
114802
114832
  "Git pull"
114803
114833
  ] }),
114804
- !isPlain && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(ContextMenuItem2, { onClick: () => gitPush(projectName, worktree.branch), children: [
114805
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react5.ArrowUpFromLine, {}),
114834
+ !isPlain && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(ContextMenuItem2, { onClick: () => gitPush(projectName, worktree.name), children: [
114835
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react5.ArrowUpFromLine, {}),
114806
114836
  "Git push"
114807
114837
  ] }),
114808
- !isPlain && worktree.branch !== defaultBranch && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(ContextMenuItem2, { variant: "destructive", onClick: handleDelete, children: [
114809
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react5.Trash2, {}),
114838
+ !isPlain && worktree.name !== defaultBranch && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(ContextMenuItem2, { variant: "destructive", onClick: handleDelete, children: [
114839
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react5.Trash2, {}),
114810
114840
  "Delete workspace"
114811
114841
  ] })
114812
114842
  ] })
@@ -114814,7 +114844,7 @@ var WorkspaceCard = (0, import_react21.memo)(function WorkspaceCard2({
114814
114844
  });
114815
114845
 
114816
114846
  // src/dashboard/components/ProjectList.tsx
114817
- var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
114847
+ var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
114818
114848
 
114819
114849
  // src/dashboard/components/SettingsPage.tsx
114820
114850
  var import_react24 = __toESM(require_react(), 1);
@@ -114823,16 +114853,16 @@ var import_react24 = __toESM(require_react(), 1);
114823
114853
  var import_react23 = __toESM(require_react(), 1);
114824
114854
 
114825
114855
  // src/dashboard/components/settings/SettingsRow.tsx
114826
- var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
114856
+ var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
114827
114857
 
114828
114858
  // src/dashboard/components/settings/SettingsSection.tsx
114829
- var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
114859
+ var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
114830
114860
 
114831
114861
  // src/dashboard/components/SettingsPage.tsx
114832
- var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
114862
+ var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
114833
114863
 
114834
114864
  // src/dashboard/components/DashboardShell.tsx
114835
- var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
114865
+ var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
114836
114866
  var isElectron = typeof window !== "undefined" && "__BAND_DESKTOP__" in window;
114837
114867
 
114838
114868
  // src/dashboard/components/DiffView.tsx
@@ -115098,18 +115128,18 @@ function joinWorkspacePath(workspaceRoot, relativePath) {
115098
115128
  }
115099
115129
 
115100
115130
  // src/dashboard/components/FileStatusBadge.tsx
115101
- var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
115131
+ var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
115102
115132
 
115103
115133
  // src/dashboard/components/ChangesFileTree.tsx
115104
- var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
115134
+ var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
115105
115135
 
115106
115136
  // src/dashboard/components/RevertFileDialog.tsx
115107
- var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
115137
+ var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
115108
115138
 
115109
115139
  // src/dashboard/components/SearchBar.tsx
115110
115140
  var import_lucide_react6 = __toESM(require_lucide_react(), 1);
115111
115141
  var import_react33 = __toESM(require_react(), 1);
115112
- var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
115142
+ var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
115113
115143
  var DEFAULT_VISIBLE_OPTIONS = ["caseSensitive", "wholeWord", "regex"];
115114
115144
  function ToggleButton({
115115
115145
  active,
@@ -115117,7 +115147,7 @@ function ToggleButton({
115117
115147
  title,
115118
115148
  children
115119
115149
  }) {
115120
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
115150
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
115121
115151
  "button",
115122
115152
  {
115123
115153
  type: "button",
@@ -115158,13 +115188,13 @@ var SearchBar = (0, import_react33.forwardRef)(function SearchBar2({
115158
115188
  const toggleRegex = (0, import_react33.useCallback)(() => {
115159
115189
  onOptionsChange({ ...options2, regex: !options2.regex });
115160
115190
  }, [options2, onOptionsChange]);
115161
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
115191
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
115162
115192
  "div",
115163
115193
  {
115164
115194
  className: `flex shrink-0 items-center gap-1.5 border-b border-border bg-muted/30 px-3 py-1.5 ${className ?? ""}`,
115165
115195
  children: [
115166
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react6.Search, { className: "size-3.5 shrink-0 text-muted-foreground" }),
115167
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
115196
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react6.Search, { className: "size-3.5 shrink-0 text-muted-foreground" }),
115197
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
115168
115198
  "input",
115169
115199
  {
115170
115200
  ref: inputRef,
@@ -115185,11 +115215,11 @@ var SearchBar = (0, import_react33.forwardRef)(function SearchBar2({
115185
115215
  }
115186
115216
  }
115187
115217
  ),
115188
- showCase && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ToggleButton, { active: options2.caseSensitive, onClick: toggleCase, title: "Match Case", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react6.CaseSensitive, { className: "size-4" }) }),
115189
- showWholeWord && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ToggleButton, { active: options2.wholeWord, onClick: toggleWholeWord, title: "Match Whole Word", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react6.WholeWord, { className: "size-4" }) }),
115190
- showRegex && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ToggleButton, { active: options2.regex, onClick: toggleRegex, title: "Use Regular Expression", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react6.Regex, { className: "size-4" }) }),
115191
- matchInfo && query && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "shrink-0 text-xs text-muted-foreground tabular-nums", children: matchInfo.total > 0 ? `${matchInfo.current} of ${matchInfo.total}` : "No results" }),
115192
- onPrevious && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
115218
+ showCase && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(ToggleButton, { active: options2.caseSensitive, onClick: toggleCase, title: "Match Case", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react6.CaseSensitive, { className: "size-4" }) }),
115219
+ showWholeWord && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(ToggleButton, { active: options2.wholeWord, onClick: toggleWholeWord, title: "Match Whole Word", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react6.WholeWord, { className: "size-4" }) }),
115220
+ showRegex && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(ToggleButton, { active: options2.regex, onClick: toggleRegex, title: "Use Regular Expression", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react6.Regex, { className: "size-4" }) }),
115221
+ matchInfo && query && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "shrink-0 text-xs text-muted-foreground tabular-nums", children: matchInfo.total > 0 ? `${matchInfo.current} of ${matchInfo.total}` : "No results" }),
115222
+ onPrevious && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
115193
115223
  "button",
115194
115224
  {
115195
115225
  type: "button",
@@ -115197,10 +115227,10 @@ var SearchBar = (0, import_react33.forwardRef)(function SearchBar2({
115197
115227
  disabled: !matchInfo || matchInfo.total === 0,
115198
115228
  className: "inline-flex size-6 items-center justify-center rounded text-muted-foreground hover:text-foreground disabled:opacity-30",
115199
115229
  title: "Previous match (Shift+Enter)",
115200
- children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react6.ChevronUp, { className: "size-3.5" })
115230
+ children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react6.ChevronUp, { className: "size-3.5" })
115201
115231
  }
115202
115232
  ),
115203
- onNext && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
115233
+ onNext && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
115204
115234
  "button",
115205
115235
  {
115206
115236
  type: "button",
@@ -115208,17 +115238,17 @@ var SearchBar = (0, import_react33.forwardRef)(function SearchBar2({
115208
115238
  disabled: !matchInfo || matchInfo.total === 0,
115209
115239
  className: "inline-flex size-6 items-center justify-center rounded text-muted-foreground hover:text-foreground disabled:opacity-30",
115210
115240
  title: "Next match (Enter)",
115211
- children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react6.ChevronDown, { className: "size-3.5" })
115241
+ children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react6.ChevronDown, { className: "size-3.5" })
115212
115242
  }
115213
115243
  ),
115214
- onClose && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
115244
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
115215
115245
  "button",
115216
115246
  {
115217
115247
  type: "button",
115218
115248
  onClick: onClose,
115219
115249
  className: "inline-flex size-6 items-center justify-center rounded text-muted-foreground hover:text-foreground",
115220
115250
  title: "Close (Escape)",
115221
- children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react6.X, { className: "size-3.5" })
115251
+ children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react6.X, { className: "size-3.5" })
115222
115252
  }
115223
115253
  )
115224
115254
  ]
@@ -115227,7 +115257,7 @@ var SearchBar = (0, import_react33.forwardRef)(function SearchBar2({
115227
115257
  });
115228
115258
 
115229
115259
  // src/dashboard/components/DiffView.tsx
115230
- var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
115260
+ var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
115231
115261
  var diffTheme = EditorView.theme({
115232
115262
  ".cm-insertedLine": { backgroundColor: "rgba(34, 197, 94, 0.1)" },
115233
115263
  ".cm-deletedLine": { backgroundColor: "rgba(239, 68, 68, 0.1)" },
@@ -115279,7 +115309,7 @@ var diffTheme = EditorView.theme({
115279
115309
  // src/dashboard/components/FileBrowser.tsx
115280
115310
  var import_lucide_react7 = __toESM(require_lucide_react(), 1);
115281
115311
  var import_react35 = __toESM(require_react(), 1);
115282
- var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
115312
+ var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
115283
115313
  var expandedStateCache = /* @__PURE__ */ new Map();
115284
115314
  var dirContentsCache = /* @__PURE__ */ new Map();
115285
115315
  function getCachedExpanded(wsId) {
@@ -115360,21 +115390,21 @@ function EntryNameInput({
115360
115390
  }
115361
115391
  };
115362
115392
  const Icon = kind === "directory" ? import_lucide_react7.Folder : import_lucide_react7.File;
115363
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex w-full flex-col", style: { paddingLeft: `${depth * indent + basePad}px` }, children: [
115364
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
115393
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex w-full flex-col", style: { paddingLeft: `${depth * indent + basePad}px` }, children: [
115394
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
115365
115395
  "div",
115366
115396
  {
115367
115397
  className: `flex items-center ${compact ? "h-[28px] gap-1 pr-3 text-[13px]" : "h-[32px] gap-1.5 pr-4 text-[15px]"}`,
115368
115398
  style: { height },
115369
115399
  children: [
115370
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "size-3.5 shrink-0" }),
115371
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
115400
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "size-3.5 shrink-0" }),
115401
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
115372
115402
  Icon,
115373
115403
  {
115374
115404
  className: kind === "directory" ? "size-4 shrink-0 text-blue-600 dark:text-blue-400" : "size-4 shrink-0 text-muted-foreground"
115375
115405
  }
115376
115406
  ),
115377
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
115407
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
115378
115408
  "input",
115379
115409
  {
115380
115410
  ref: inputRef,
@@ -115411,7 +115441,7 @@ function EntryNameInput({
115411
115441
  ]
115412
115442
  }
115413
115443
  ),
115414
- error2 && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
115444
+ error2 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
115415
115445
  "div",
115416
115446
  {
115417
115447
  className: "pointer-events-none text-xs text-destructive",
@@ -115479,7 +115509,7 @@ function TreeNode2({
115479
115509
  onOpenFilePinned(entryPath);
115480
115510
  }
115481
115511
  };
115482
- const button = /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
115512
+ const button = /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
115483
115513
  "button",
115484
115514
  {
115485
115515
  ref: isSelected ? selectedRef : void 0,
@@ -115493,15 +115523,15 @@ function TreeNode2({
115493
115523
  className: `flex w-full items-center text-left select-none hover:bg-accent/50 [-webkit-touch-callout:none] ${compact ? "h-[28px] gap-1 pr-3 text-[13px]" : "h-[32px] gap-1.5 pr-4 text-[15px]"} ${isSelected ? "bg-blue-500/30 text-foreground outline outline-1 -outline-offset-1 outline-blue-400/60 hover:bg-blue-500/30 dark:bg-blue-500/40 dark:outline-blue-400/70 dark:hover:bg-blue-500/40" : ""} ${isCut ? "opacity-50" : ""}`,
115494
115524
  style: { paddingLeft: `${depth * indent + basePad}px` },
115495
115525
  children: [
115496
- isDir ? isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react7.ChevronDown, { className: "size-3.5 shrink-0 text-muted-foreground/70" }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react7.ChevronRight, { className: "size-3.5 shrink-0 text-muted-foreground/70" }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "size-3.5 shrink-0" }),
115526
+ isDir ? isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react7.ChevronDown, { className: "size-3.5 shrink-0 text-muted-foreground/70" }) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react7.ChevronRight, { className: "size-3.5 shrink-0 text-muted-foreground/70" }) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "size-3.5 shrink-0" }),
115497
115527
  isDir ? (() => {
115498
115528
  const FolderIcon = getFolderIcon(entry.name, isExpanded);
115499
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(FolderIcon, { className: "size-4 shrink-0" });
115529
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(FolderIcon, { className: "size-4 shrink-0" });
115500
115530
  })() : (() => {
115501
115531
  const FileIcon = getFileIcon(entry.name);
115502
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(FileIcon, { className: "size-4 shrink-0" });
115532
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(FileIcon, { className: "size-4 shrink-0" });
115503
115533
  })(),
115504
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "min-w-0 flex-1 truncate", children: entry.name })
115534
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "min-w-0 flex-1 truncate", children: entry.name })
115505
115535
  ]
115506
115536
  }
115507
115537
  );
@@ -115523,7 +115553,7 @@ function TreeNode2({
115523
115553
  // a padding div with `depth={0}` would double-apply `basePad`, shifting
115524
115554
  // the input ~4px to the right and giving it visibly less horizontal
115525
115555
  // room than the rest of the tree.
115526
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
115556
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
115527
115557
  EntryNameInput,
115528
115558
  {
115529
115559
  kind: isDir ? "directory" : "file",
@@ -115537,97 +115567,97 @@ function TreeNode2({
115537
115567
  },
115538
115568
  `rename-${entryPath}`
115539
115569
  )
115540
- ) : /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
115570
+ ) : /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
115541
115571
  ContextMenu2,
115542
115572
  {
115543
115573
  onOpenChange: (open3) => {
115544
115574
  if (open3) onSelectRow(entryPath, isDir ? "directory" : "file");
115545
115575
  },
115546
115576
  children: [
115547
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ContextMenuTrigger2, { asChild: true, children: button }),
115548
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(ContextMenuContent2, { onCloseAutoFocus: menu.flush, children: [
115549
- isDir && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
115550
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
115577
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ContextMenuTrigger2, { asChild: true, children: button }),
115578
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(ContextMenuContent2, { onCloseAutoFocus: menu.flush, children: [
115579
+ isDir && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
115580
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
115551
115581
  ContextMenuItem2,
115552
115582
  {
115553
115583
  onSelect: () => menu.queue(() => onRequestNewEntry(entryPath, "file")),
115554
115584
  children: [
115555
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react7.File, { className: "size-4" }),
115585
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react7.File, { className: "size-4" }),
115556
115586
  "New File"
115557
115587
  ]
115558
115588
  }
115559
115589
  ),
115560
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
115590
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
115561
115591
  ContextMenuItem2,
115562
115592
  {
115563
115593
  onSelect: () => menu.queue(() => onRequestNewEntry(entryPath, "directory")),
115564
115594
  children: [
115565
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react7.FolderPlus, { className: "size-4" }),
115595
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react7.FolderPlus, { className: "size-4" }),
115566
115596
  "New Folder"
115567
115597
  ]
115568
115598
  }
115569
115599
  ),
115570
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ContextMenuSeparator2, {})
115600
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ContextMenuSeparator2, {})
115571
115601
  ] }),
115572
- canCut && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
115602
+ canCut && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
115573
115603
  ContextMenuItem2,
115574
115604
  {
115575
115605
  onSelect: () => menu.queue(() => onCut(entryPath, isDir ? "directory" : "file")),
115576
115606
  children: [
115577
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react7.Scissors, { className: "size-4" }),
115607
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react7.Scissors, { className: "size-4" }),
115578
115608
  "Cut"
115579
115609
  ]
115580
115610
  }
115581
115611
  ),
115582
- canCopy && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
115612
+ canCopy && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
115583
115613
  ContextMenuItem2,
115584
115614
  {
115585
115615
  onSelect: () => menu.queue(() => onCopy(entryPath, isDir ? "directory" : "file")),
115586
115616
  children: [
115587
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react7.Copy, { className: "size-4" }),
115617
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react7.Copy, { className: "size-4" }),
115588
115618
  "Copy"
115589
115619
  ]
115590
115620
  }
115591
115621
  ),
115592
- isDir && canPaste && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(ContextMenuItem2, { onSelect: () => menu.queue(() => void onPaste(entryPath)), children: [
115593
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react7.ClipboardPaste, { className: "size-4" }),
115622
+ isDir && canPaste && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(ContextMenuItem2, { onSelect: () => menu.queue(() => void onPaste(entryPath)), children: [
115623
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react7.ClipboardPaste, { className: "size-4" }),
115594
115624
  "Paste"
115595
115625
  ] }),
115596
- (canCut || canCopy || isDir && canPaste) && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ContextMenuSeparator2, {}),
115597
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
115626
+ (canCut || canCopy || isDir && canPaste) && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ContextMenuSeparator2, {}),
115627
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
115598
115628
  ContextMenuItem2,
115599
115629
  {
115600
115630
  "data-testid": "file-tree__copy-relative-path",
115601
115631
  onSelect: () => menu.queue(() => void writeClipboardText(entryPath)),
115602
115632
  children: [
115603
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react7.ClipboardCopy, { className: "size-4" }),
115633
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react7.ClipboardCopy, { className: "size-4" }),
115604
115634
  "Copy relative path"
115605
115635
  ]
115606
115636
  }
115607
115637
  ),
115608
- workspacePath && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
115638
+ workspacePath && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
115609
115639
  ContextMenuItem2,
115610
115640
  {
115611
115641
  "data-testid": "file-tree__copy-absolute-path",
115612
115642
  onSelect: () => menu.queue(() => void writeClipboardText(joinWorkspacePath(workspacePath, entryPath))),
115613
115643
  children: [
115614
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react7.ClipboardCopy, { className: "size-4" }),
115644
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react7.ClipboardCopy, { className: "size-4" }),
115615
115645
  "Copy absolute path"
115616
115646
  ]
115617
115647
  }
115618
115648
  ),
115619
- (canRename || canDelete) && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ContextMenuSeparator2, {}),
115620
- canRename && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(ContextMenuItem2, { onSelect: () => menu.queue(() => onRequestRename(entryPath)), children: [
115621
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react7.Pencil, { className: "size-4" }),
115649
+ (canRename || canDelete) && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ContextMenuSeparator2, {}),
115650
+ canRename && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(ContextMenuItem2, { onSelect: () => menu.queue(() => onRequestRename(entryPath)), children: [
115651
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react7.Pencil, { className: "size-4" }),
115622
115652
  "Rename"
115623
115653
  ] }),
115624
- canDelete && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
115654
+ canDelete && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
115625
115655
  ContextMenuItem2,
115626
115656
  {
115627
115657
  variant: "destructive",
115628
115658
  onSelect: () => menu.queue(() => onRequestDelete(entryPath, isDir ? "directory" : "file")),
115629
115659
  children: [
115630
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react7.Trash2, { className: "size-4" }),
115660
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react7.Trash2, { className: "size-4" }),
115631
115661
  "Delete"
115632
115662
  ]
115633
115663
  }
@@ -115637,13 +115667,13 @@ function TreeNode2({
115637
115667
  }
115638
115668
  );
115639
115669
  const showInlineInput = newEntry?.parentPath === entryPath;
115640
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
115670
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
115641
115671
  row,
115642
115672
  isExpanded && (() => {
115643
115673
  const splitIdx = children?.findIndex((c2) => c2.type === "file") ?? -1;
115644
115674
  const folderChildren = splitIdx === -1 ? children ?? [] : (children ?? []).slice(0, splitIdx);
115645
115675
  const fileChildren = splitIdx === -1 ? [] : (children ?? []).slice(splitIdx);
115646
- const renderChild = (child) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
115676
+ const renderChild = (child) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
115647
115677
  TreeNode2,
115648
115678
  {
115649
115679
  entry: child,
@@ -115681,7 +115711,7 @@ function TreeNode2({
115681
115711
  },
115682
115712
  child.name
115683
115713
  );
115684
- const newEntryInput = showInlineInput ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
115714
+ const newEntryInput = showInlineInput ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
115685
115715
  EntryNameInput,
115686
115716
  {
115687
115717
  kind: newEntry.kind,
@@ -115693,9 +115723,9 @@ function TreeNode2({
115693
115723
  },
115694
115724
  `new-${newEntry.kind}-${entryPath}`
115695
115725
  ) : null;
115696
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
115726
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
115697
115727
  showInlineInput && newEntry.kind === "directory" && newEntryInput,
115698
- isLoading && !children?.length && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
115728
+ isLoading && !children?.length && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
115699
115729
  "div",
115700
115730
  {
115701
115731
  className: `flex items-center text-muted-foreground/70 ${compact ? "text-[13px]" : "text-[15px]"}`,
@@ -115706,7 +115736,7 @@ function TreeNode2({
115706
115736
  children: "Loading\u2026"
115707
115737
  }
115708
115738
  ),
115709
- !isLoading && !showInlineInput && children && children.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
115739
+ !isLoading && !showInlineInput && children && children.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
115710
115740
  "div",
115711
115741
  {
115712
115742
  className: `flex items-center italic text-muted-foreground/50 ${compact ? "text-[13px]" : "text-[15px]"}`,
@@ -116152,7 +116182,7 @@ var FileBrowser = (0, import_react35.forwardRef)(function FileBrowser2({
116152
116182
  );
116153
116183
  const rootMenu = useDeferredMenuAction();
116154
116184
  if (!adapter.listWorkspaceFiles) {
116155
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex h-32 items-center justify-center text-sm text-muted-foreground", children: "File browsing not supported" });
116185
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "flex h-32 items-center justify-center text-sm text-muted-foreground", children: "File browsing not supported" });
116156
116186
  }
116157
116187
  const rootEntries = dirContents.get("") ?? [];
116158
116188
  const rootLoading = loadingPaths.has("");
@@ -116189,20 +116219,20 @@ var FileBrowser = (0, import_react35.forwardRef)(function FileBrowser2({
116189
116219
  void pasteInto(resolveDefaultTarget());
116190
116220
  }
116191
116221
  };
116192
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex h-full flex-col overflow-hidden", onKeyDown: handleKeyDown, children: [
116193
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
116222
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex h-full flex-col overflow-hidden", onKeyDown: handleKeyDown, children: [
116223
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
116194
116224
  ContextMenu2,
116195
116225
  {
116196
116226
  onOpenChange: (open3) => {
116197
116227
  if (open3) clearTreeSelection();
116198
116228
  },
116199
116229
  children: [
116200
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ContextMenuTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "min-h-0 flex-1 overflow-y-auto py-1 pl-px", children: [
116230
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ContextMenuTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "min-h-0 flex-1 overflow-y-auto py-1 pl-px", children: [
116201
116231
  (() => {
116202
116232
  const rootSplitIdx = rootEntries.findIndex((e2) => e2.type === "file");
116203
116233
  const rootFolders = rootSplitIdx === -1 ? rootEntries : rootEntries.slice(0, rootSplitIdx);
116204
116234
  const rootFiles = rootSplitIdx === -1 ? [] : rootEntries.slice(rootSplitIdx);
116205
- const renderRow = (entry) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
116235
+ const renderRow = (entry) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
116206
116236
  TreeNode2,
116207
116237
  {
116208
116238
  entry,
@@ -116240,7 +116270,7 @@ var FileBrowser = (0, import_react35.forwardRef)(function FileBrowser2({
116240
116270
  },
116241
116271
  entry.name
116242
116272
  );
116243
- const rootInput = showRootInput ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
116273
+ const rootInput = showRootInput ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
116244
116274
  EntryNameInput,
116245
116275
  {
116246
116276
  kind: newEntry.kind,
@@ -116252,30 +116282,30 @@ var FileBrowser = (0, import_react35.forwardRef)(function FileBrowser2({
116252
116282
  },
116253
116283
  `new-${newEntry.kind}-root`
116254
116284
  ) : null;
116255
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
116285
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
116256
116286
  showRootInput && newEntry.kind === "directory" && rootInput,
116257
- rootLoading && rootEntries.length === 0 && !showRootInput && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex h-32 items-center justify-center text-sm text-muted-foreground", children: "Loading\u2026" }),
116258
- !rootLoading && rootEntries.length === 0 && !showRootInput && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex h-32 items-center justify-center text-sm text-muted-foreground", children: "Empty directory" }),
116287
+ rootLoading && rootEntries.length === 0 && !showRootInput && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "flex h-32 items-center justify-center text-sm text-muted-foreground", children: "Loading\u2026" }),
116288
+ !rootLoading && rootEntries.length === 0 && !showRootInput && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "flex h-32 items-center justify-center text-sm text-muted-foreground", children: "Empty directory" }),
116259
116289
  rootFolders.map(renderRow),
116260
116290
  showRootInput && newEntry.kind === "file" && rootInput,
116261
116291
  rootFiles.map(renderRow)
116262
116292
  ] });
116263
116293
  })(),
116264
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "min-h-[40px] flex-1" })
116294
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "min-h-[40px] flex-1" })
116265
116295
  ] }) }),
116266
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(ContextMenuContent2, { onCloseAutoFocus: rootMenu.flush, children: [
116267
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(ContextMenuItem2, { onSelect: () => rootMenu.queue(() => requestNewEntry("", "file")), children: [
116268
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react7.File, { className: "size-4" }),
116296
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(ContextMenuContent2, { onCloseAutoFocus: rootMenu.flush, children: [
116297
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(ContextMenuItem2, { onSelect: () => rootMenu.queue(() => requestNewEntry("", "file")), children: [
116298
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react7.File, { className: "size-4" }),
116269
116299
  "New File"
116270
116300
  ] }),
116271
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(ContextMenuItem2, { onSelect: () => rootMenu.queue(() => requestNewEntry("", "directory")), children: [
116272
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react7.FolderPlus, { className: "size-4" }),
116301
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(ContextMenuItem2, { onSelect: () => rootMenu.queue(() => requestNewEntry("", "directory")), children: [
116302
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react7.FolderPlus, { className: "size-4" }),
116273
116303
  "New Folder"
116274
116304
  ] }),
116275
- canPaste && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
116276
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ContextMenuSeparator2, {}),
116277
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(ContextMenuItem2, { onSelect: () => rootMenu.queue(() => void pasteInto("")), children: [
116278
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react7.ClipboardPaste, { className: "size-4" }),
116305
+ canPaste && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
116306
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ContextMenuSeparator2, {}),
116307
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(ContextMenuItem2, { onSelect: () => rootMenu.queue(() => void pasteInto("")), children: [
116308
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react7.ClipboardPaste, { className: "size-4" }),
116279
116309
  "Paste"
116280
116310
  ] })
116281
116311
  ] })
@@ -116283,42 +116313,42 @@ var FileBrowser = (0, import_react35.forwardRef)(function FileBrowser2({
116283
116313
  ]
116284
116314
  }
116285
116315
  ),
116286
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
116316
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
116287
116317
  Dialog2,
116288
116318
  {
116289
116319
  open: pendingDelete !== null,
116290
116320
  onOpenChange: (open3) => {
116291
116321
  if (!open3) cancelDelete();
116292
116322
  },
116293
- children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(DialogContent2, { className: "sm:max-w-[425px]", onClick: (e2) => e2.stopPropagation(), children: [
116294
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(DialogHeader, { children: [
116295
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(DialogTitle2, { children: [
116323
+ children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(DialogContent2, { className: "sm:max-w-[425px]", onClick: (e2) => e2.stopPropagation(), children: [
116324
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(DialogHeader, { children: [
116325
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(DialogTitle2, { children: [
116296
116326
  "Delete ",
116297
116327
  pendingDelete?.kind === "directory" ? "folder" : "file"
116298
116328
  ] }),
116299
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(DialogDescription2, { children: [
116329
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(DialogDescription2, { children: [
116300
116330
  "Are you sure you want to delete ",
116301
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("strong", { children: pendingDelete?.path }),
116331
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("strong", { children: pendingDelete?.path }),
116302
116332
  "?"
116303
116333
  ] })
116304
116334
  ] }),
116305
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex flex-col gap-2 text-sm", children: [
116306
- pendingDelete?.kind === "directory" && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex items-start gap-2 rounded-md border border-yellow-500/30 bg-yellow-500/10 p-3", children: [
116307
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react7.AlertTriangle, { className: "size-4 shrink-0 text-yellow-500 mt-0.5" }),
116308
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: "The folder and all of its contents will be deleted from disk. This cannot be undone." })
116335
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex flex-col gap-2 text-sm", children: [
116336
+ pendingDelete?.kind === "directory" && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-start gap-2 rounded-md border border-yellow-500/30 bg-yellow-500/10 p-3", children: [
116337
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react7.AlertTriangle, { className: "size-4 shrink-0 text-yellow-500 mt-0.5" }),
116338
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children: "The folder and all of its contents will be deleted from disk. This cannot be undone." })
116309
116339
  ] }),
116310
- pendingDelete?.kind === "file" && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex items-start gap-2 rounded-md border border-yellow-500/30 bg-yellow-500/10 p-3", children: [
116311
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react7.AlertTriangle, { className: "size-4 shrink-0 text-yellow-500 mt-0.5" }),
116312
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: "The file will be deleted from disk. This cannot be undone." })
116340
+ pendingDelete?.kind === "file" && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-start gap-2 rounded-md border border-yellow-500/30 bg-yellow-500/10 p-3", children: [
116341
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react7.AlertTriangle, { className: "size-4 shrink-0 text-yellow-500 mt-0.5" }),
116342
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children: "The file will be deleted from disk. This cannot be undone." })
116313
116343
  ] }),
116314
- deleteError && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/10 p-3 text-destructive", children: [
116315
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react7.AlertTriangle, { className: "size-4 shrink-0 mt-0.5" }),
116316
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: deleteError })
116344
+ deleteError && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/10 p-3 text-destructive", children: [
116345
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react7.AlertTriangle, { className: "size-4 shrink-0 mt-0.5" }),
116346
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children: deleteError })
116317
116347
  ] })
116318
116348
  ] }),
116319
- /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(DialogFooter, { children: [
116320
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Button, { variant: "ghost", onClick: cancelDelete, disabled: deleteSubmitting, children: "Cancel" }),
116321
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
116349
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(DialogFooter, { children: [
116350
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Button, { variant: "ghost", onClick: cancelDelete, disabled: deleteSubmitting, children: "Cancel" }),
116351
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
116322
116352
  Button,
116323
116353
  {
116324
116354
  variant: "destructive",
@@ -116339,32 +116369,32 @@ var import_react38 = __toESM(require_react(), 1);
116339
116369
 
116340
116370
  // src/dashboard/components/ImagePreview.tsx
116341
116371
  var import_react36 = __toESM(require_react(), 1);
116342
- var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
116372
+ var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
116343
116373
 
116344
116374
  // src/dashboard/components/LanguagePickerDialog.tsx
116345
116375
  var import_react37 = __toESM(require_react(), 1);
116346
- var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
116376
+ var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
116347
116377
 
116348
116378
  // src/dashboard/components/PdfPreview.tsx
116349
- var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
116379
+ var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1);
116350
116380
 
116351
116381
  // src/dashboard/components/FileViewer.tsx
116352
- var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1);
116382
+ var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
116353
116383
 
116354
116384
  // src/dashboard/components/QuickOpenDialog.tsx
116355
116385
  var import_react39 = __toESM(require_react(), 1);
116356
- var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
116386
+ var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1);
116357
116387
 
116358
116388
  // src/dashboard/components/SearchFilesDialog.tsx
116359
116389
  var import_react40 = __toESM(require_react(), 1);
116360
- var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1);
116390
+ var import_jsx_runtime75 = __toESM(require_jsx_runtime(), 1);
116361
116391
 
116362
116392
  // src/dashboard/components/WorkspacePickerDialog.tsx
116363
116393
  var import_react41 = __toESM(require_react(), 1);
116364
- var import_jsx_runtime75 = __toESM(require_jsx_runtime(), 1);
116394
+ var import_jsx_runtime76 = __toESM(require_jsx_runtime(), 1);
116365
116395
 
116366
116396
  // src/dashboard/components/WorkspaceTabNav.tsx
116367
- var import_jsx_runtime76 = __toESM(require_jsx_runtime(), 1);
116397
+ var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1);
116368
116398
 
116369
116399
  // src/dashboard/hooks/use-editor-history.ts
116370
116400
  var import_react42 = __toESM(require_react(), 1);
@@ -118934,7 +118964,7 @@ function reconcileKindForProject(project) {
118934
118964
  if (detectedKind === project.kind) return false;
118935
118965
  project.kind = detectedKind;
118936
118966
  if (detectedKind === "plain") {
118937
- project.worktrees = [{ branch: "main", path: project.path, pinned: false }];
118967
+ project.worktrees = [{ name: "main", branch: "main", path: project.path, pinned: false }];
118938
118968
  }
118939
118969
  return true;
118940
118970
  }
@@ -118952,6 +118982,10 @@ var ProjectQueries = class {
118952
118982
  for (const row of worktreeRows) {
118953
118983
  const list2 = wtByProject.get(row.projectName) ?? [];
118954
118984
  list2.push({
118985
+ // Defensive `|| branch`: a row written before the `name` column
118986
+ // existed (backfilled by migration) should never be empty, but fall
118987
+ // back to branch so identity stays stable even if it somehow is.
118988
+ name: row.name || row.branch,
118955
118989
  branch: row.branch,
118956
118990
  path: row.path,
118957
118991
  head: row.head ?? void 0,
@@ -119000,6 +119034,7 @@ var ProjectQueries = class {
119000
119034
  for (const wt of project.worktrees) {
119001
119035
  tx.insert(worktrees).values({
119002
119036
  projectName: project.name,
119037
+ name: wt.name,
119003
119038
  branch: wt.branch,
119004
119039
  path: wt.path,
119005
119040
  head: wt.head ?? null,
@@ -119115,14 +119150,19 @@ var WorkspaceQueries = class {
119115
119150
  * Resolve a workspace ID back to its on-disk identity (project, branch,
119116
119151
  * worktree path) by scanning the `worktrees` table.
119117
119152
  *
119118
- * The match expression mirrors `toWorkspaceId(project, branch)`:
119119
- * `${project}-${branch.replaceAll("/", "-")}`
119120
- * SQLite's `REPLACE(str, "/", "-")` is also a replace-all, so this is
119121
- * bit-identical to the JS computation. Pushing the match down into SQL
119122
- * lets us read at most one row instead of fanning out the projects +
119123
- * worktrees tree just to find a single workspace (the previous
119124
- * `loadState()`-based implementation walked every project's worktree
119125
- * list to find the match in JS).
119153
+ * The match expression mirrors `toWorkspaceId(project, name)`:
119154
+ * `${project}-${name.replaceAll("/", "-")}`
119155
+ * where `name` is the immutable workspace identity (see the `worktrees`
119156
+ * schema), NOT the live `branch`. SQLite's `REPLACE(str, "/", "-")` is
119157
+ * also a replace-all, so this is bit-identical to the JS computation.
119158
+ * Pushing the match down into SQL lets us read at most one row instead of
119159
+ * fanning out the projects + worktrees tree just to find a single
119160
+ * workspace (the previous `loadState()`-based implementation walked every
119161
+ * project's worktree list to find the match in JS).
119162
+ *
119163
+ * The returned `branch` is the live git branch, still useful to callers
119164
+ * that want the current checkout — identity is by `name`, git ops by
119165
+ * `branch`.
119126
119166
  *
119127
119167
  * Called from two places today: the workspace-status upsert path in
119128
119168
  * `lib/state.ts::upsertWorkspaceStatus` (via the private
@@ -119132,7 +119172,7 @@ var WorkspaceQueries = class {
119132
119172
  * loading the full project tree.
119133
119173
  *
119134
119174
  * TODO: `toWorkspaceId`'s encoding is not injective — project `foo-bar` +
119135
- * branch `main` and project `foo` + branch `bar/main` both serialize to
119175
+ * name `main` and project `foo` + name `bar/main` both serialize to
119136
119176
  * `foo-bar-main`. `.get()` returns whichever row SQLite finds first, and
119137
119177
  * the sanity check below cannot disambiguate (both candidates satisfy
119138
119178
  * it). Fixing this requires changing the workspace-id encoding, which is
@@ -119142,12 +119182,13 @@ var WorkspaceQueries = class {
119142
119182
  const db2 = getDb();
119143
119183
  const row = db2.select({
119144
119184
  project: worktrees.projectName,
119185
+ name: worktrees.name,
119145
119186
  branch: worktrees.branch,
119146
119187
  worktreePath: worktrees.path
119147
119188
  }).from(worktrees).where(
119148
- sql`${worktrees.projectName} || '-' || REPLACE(${worktrees.branch}, '/', '-') = ${workspaceId}`
119189
+ sql`${worktrees.projectName} || '-' || REPLACE(${worktrees.name}, '/', '-') = ${workspaceId}`
119149
119190
  ).get();
119150
- if (row && toWorkspaceId(row.project, row.branch) === workspaceId) {
119191
+ if (row && toWorkspaceId(row.project, row.name) === workspaceId) {
119151
119192
  return { project: row.project, branch: row.branch, worktreePath: row.worktreePath };
119152
119193
  }
119153
119194
  return null;
@@ -119270,7 +119311,7 @@ function resolveWorkspaceIdByCwd(cwd) {
119270
119311
  for (const proj of state.projects) {
119271
119312
  for (const wt of proj.worktrees) {
119272
119313
  if (cwd === wt.path || cwd.startsWith(`${wt.path}/`)) {
119273
- return toWorkspaceId(proj.name, wt.branch);
119314
+ return toWorkspaceId(proj.name, wt.name);
119274
119315
  }
119275
119316
  }
119276
119317
  }
@@ -119344,13 +119385,17 @@ async function reconcileOneProject(project) {
119344
119385
  let diskWorktrees;
119345
119386
  try {
119346
119387
  const gitWorktrees = await listWorktrees(project.path);
119347
- const pinnedByBranch = new Map(project.worktrees.map((wt) => [wt.branch, wt.pinned]));
119348
- diskWorktrees = gitWorktrees.filter((wt) => !wt.isBare).map((wt) => ({
119349
- branch: wt.branch,
119350
- path: wt.path,
119351
- head: wt.head,
119352
- pinned: pinnedByBranch.get(wt.branch) ?? false
119353
- }));
119388
+ const existingByPath = new Map(project.worktrees.map((wt) => [wt.path, wt]));
119389
+ diskWorktrees = gitWorktrees.filter((wt) => !wt.isBare).map((wt) => {
119390
+ const existing = existingByPath.get(wt.path);
119391
+ return {
119392
+ name: existing?.name ?? wt.branch,
119393
+ branch: wt.branch,
119394
+ path: wt.path,
119395
+ head: wt.head,
119396
+ pinned: existing?.pinned ?? false
119397
+ };
119398
+ });
119354
119399
  } catch {
119355
119400
  if (project.hasOrigin) {
119356
119401
  setProjectHasOrigin(project.name, false);
@@ -119401,6 +119446,7 @@ var pollerState = {
119401
119446
  tickCount: 0,
119402
119447
  activity: "active"
119403
119448
  };
119449
+ var lastCIPollErrorByHost = /* @__PURE__ */ new Map();
119404
119450
  function getWorkspaces() {
119405
119451
  const state = loadState();
119406
119452
  const workspaces = [];
@@ -119408,7 +119454,7 @@ function getWorkspaces() {
119408
119454
  if (project.kind === "plain") continue;
119409
119455
  for (const wt of project.worktrees) {
119410
119456
  workspaces.push({
119411
- workspaceId: toWorkspaceId(project.name, wt.branch),
119457
+ workspaceId: toWorkspaceId(project.name, wt.name),
119412
119458
  project: project.name,
119413
119459
  branch: wt.branch,
119414
119460
  defaultBranch: project.defaultBranch,
@@ -119489,6 +119535,7 @@ async function getBatchedCIStatuses(workspaces) {
119489
119535
  }
119490
119536
  }
119491
119537
  if (resolved.length === 0) {
119538
+ lastCIPollErrorByHost.clear();
119492
119539
  const results = /* @__PURE__ */ new Map();
119493
119540
  for (const ws of workspaces) {
119494
119541
  results.set(ws.workspaceId, { state: "none" });
@@ -119535,13 +119582,21 @@ async function getBatchedCIStatuses(workspaces) {
119535
119582
  allResults.set(g15.ws.workspaceId, status);
119536
119583
  }
119537
119584
  }
119585
+ lastCIPollErrorByHost.delete(host);
119538
119586
  } catch (err) {
119539
- console.error(
119540
- `CI poll: GraphQL query failed for host (${group.length} workspaces):`,
119541
- err instanceof Error ? err.message : err
119542
- );
119587
+ const message = err instanceof Error ? err.message : String(err);
119588
+ if (lastCIPollErrorByHost.get(host) !== message) {
119589
+ lastCIPollErrorByHost.set(host, message);
119590
+ console.error(
119591
+ `CI poll: GraphQL query failed for host (${group.length} workspaces):`,
119592
+ message
119593
+ );
119594
+ }
119543
119595
  }
119544
119596
  }
119597
+ for (const host of [...lastCIPollErrorByHost.keys()]) {
119598
+ if (!byHost.has(host)) lastCIPollErrorByHost.delete(host);
119599
+ }
119545
119600
  for (const ws of workspaces) {
119546
119601
  if (!allResults.has(ws.workspaceId)) {
119547
119602
  allResults.set(ws.workspaceId, { state: "none" });
@@ -123225,16 +123280,20 @@ var workspaceCreateInput = external_exports.object({
123225
123280
  });
123226
123281
  var workspaceRemoveInput = external_exports.object({
123227
123282
  project: external_exports.string(),
123228
- branch: external_exports.string()
123283
+ // Workspace identity (the immutable `name`), NOT the live git branch. The
123284
+ // live branch to delete is resolved from the worktree row.
123285
+ name: external_exports.string()
123229
123286
  });
123230
123287
  var workspaceSetPinnedInput = external_exports.object({
123231
123288
  project: external_exports.string(),
123232
- branch: external_exports.string(),
123289
+ // Workspace identity (immutable `name`), not the live git branch.
123290
+ name: external_exports.string(),
123233
123291
  pinned: external_exports.boolean()
123234
123292
  });
123235
123293
  var workspaceGitInput = external_exports.object({
123236
123294
  project: external_exports.string(),
123237
- branch: external_exports.string()
123295
+ // Workspace identity (immutable `name`), not the live git branch.
123296
+ name: external_exports.string()
123238
123297
  });
123239
123298
  var workspaceRunScriptInput = external_exports.object({
123240
123299
  path: external_exports.string(),
@@ -123288,7 +123347,7 @@ var WorkspaceService = class {
123288
123347
  const state = loadState();
123289
123348
  for (const project of state.projects) {
123290
123349
  for (const worktree of project.worktrees) {
123291
- if (toWorkspaceId(project.name, worktree.branch) === workspaceId) {
123350
+ if (toWorkspaceId(project.name, worktree.name) === workspaceId) {
123292
123351
  return { project, worktree };
123293
123352
  }
123294
123353
  }
@@ -123364,7 +123423,9 @@ var WorkspaceService = class {
123364
123423
  `Project "${input.project}" is a plain (non-git) folder and cannot have additional workspaces. Promote it to git (right-click the project \u2192 "Promote to git") to enable branches.`
123365
123424
  );
123366
123425
  }
123367
- const existing = project.worktrees.find((wt) => wt.branch === input.branch);
123426
+ const existing = project.worktrees.find(
123427
+ (wt) => wt.name === input.branch || wt.branch === input.branch
123428
+ );
123368
123429
  if (existing) {
123369
123430
  return { ok: true, path: existing.path };
123370
123431
  }
@@ -123383,7 +123444,12 @@ var WorkspaceService = class {
123383
123444
  } catch (e2) {
123384
123445
  throw new Error(e2 instanceof Error ? e2.message : String(e2));
123385
123446
  }
123386
- project.worktrees.push({ branch: input.branch, path: worktreePath, pinned: false });
123447
+ project.worktrees.push({
123448
+ name: input.branch,
123449
+ branch: input.branch,
123450
+ path: worktreePath,
123451
+ pinned: false
123452
+ });
123387
123453
  saveState(state);
123388
123454
  const workspaceId = toWorkspaceId(input.project, input.branch);
123389
123455
  try {
@@ -123542,11 +123608,16 @@ var WorkspaceService = class {
123542
123608
  `Project "${input.project}" is a plain (non-git) project. Remove the project instead of the workspace.`
123543
123609
  );
123544
123610
  }
123611
+ const wtRow = project.worktrees.find((wt) => wt.name === input.name);
123612
+ if (!wtRow) {
123613
+ throw new WorkspaceNotFoundError(input.name);
123614
+ }
123615
+ const currentBranch = wtRow.branch;
123545
123616
  const { command, env: gitEnv } = gitCmd();
123546
123617
  const worktrees2 = await listWorktrees(project.path);
123547
- const match = worktrees2.find((wt) => wt.branch === input.branch);
123618
+ const match = worktrees2.find((wt) => wt.branch === currentBranch);
123548
123619
  if (!match) {
123549
- throw new WorkspaceNotFoundError(input.branch);
123620
+ throw new WorkspaceNotFoundError(input.name);
123550
123621
  }
123551
123622
  const worktreePath = match.path;
123552
123623
  let teardownCmd;
@@ -123557,9 +123628,9 @@ var WorkspaceService = class {
123557
123628
  }
123558
123629
  } catch {
123559
123630
  }
123560
- project.worktrees = project.worktrees.filter((wt) => wt.branch !== input.branch);
123631
+ project.worktrees = project.worktrees.filter((wt) => wt.name !== input.name);
123561
123632
  saveState(state);
123562
- const workspaceId = toWorkspaceId(input.project, input.branch);
123633
+ const workspaceId = toWorkspaceId(input.project, input.name);
123563
123634
  try {
123564
123635
  unlinkSync3(join20(bandHome(), "workspace-prompts", `${workspaceId}.json`));
123565
123636
  } catch {
@@ -123599,7 +123670,7 @@ var WorkspaceService = class {
123599
123670
  }
123600
123671
  emit({ kind: "remove", workspaceId });
123601
123672
  const projPath = project.path;
123602
- const branchToDelete = match.branch.startsWith(DETACHED_BRANCH_PREFIX) ? null : input.branch;
123673
+ const branchToDelete = match.branch.startsWith(DETACHED_BRANCH_PREFIX) ? null : currentBranch;
123603
123674
  setImmediate(() => {
123604
123675
  (async () => {
123605
123676
  if (teardownCmd) {
@@ -123674,9 +123745,9 @@ var WorkspaceService = class {
123674
123745
  `Project "${input.project}" is a plain (non-git) project. Pinning is not available.`
123675
123746
  );
123676
123747
  }
123677
- const worktree = project.worktrees.find((w2) => w2.branch === input.branch);
123748
+ const worktree = project.worktrees.find((w2) => w2.name === input.name);
123678
123749
  if (!worktree) {
123679
- throw new WorkspaceNotFoundError(input.branch);
123750
+ throw new WorkspaceNotFoundError(input.name);
123680
123751
  }
123681
123752
  worktree.pinned = input.pinned;
123682
123753
  saveState(state);
@@ -123691,10 +123762,10 @@ var WorkspaceService = class {
123691
123762
  * case and a thrown error would surface as a red toast.
123692
123763
  */
123693
123764
  async gitPull(input) {
123694
- const workspaceId = toWorkspaceId(input.project, input.branch);
123765
+ const workspaceId = toWorkspaceId(input.project, input.name);
123695
123766
  const workspace = this.resolve(workspaceId);
123696
123767
  if (!workspace) {
123697
- throw new WorkspaceNotFoundError(input.branch);
123768
+ throw new WorkspaceNotFoundError(input.name);
123698
123769
  }
123699
123770
  if (workspace.project.kind === "plain") {
123700
123771
  throw new PlainProjectError(
@@ -123721,10 +123792,10 @@ var WorkspaceService = class {
123721
123792
  * a second failing push.
123722
123793
  */
123723
123794
  async gitPush(input) {
123724
- const workspaceId = toWorkspaceId(input.project, input.branch);
123795
+ const workspaceId = toWorkspaceId(input.project, input.name);
123725
123796
  const workspace = this.resolve(workspaceId);
123726
123797
  if (!workspace) {
123727
- throw new WorkspaceNotFoundError(input.branch);
123798
+ throw new WorkspaceNotFoundError(input.name);
123728
123799
  }
123729
123800
  if (workspace.project.kind === "plain") {
123730
123801
  throw new PlainProjectError(
@@ -123739,7 +123810,7 @@ var WorkspaceService = class {
123739
123810
  if (!/has no upstream branch/i.test(msg)) {
123740
123811
  throw err;
123741
123812
  }
123742
- await execGit(["push", "--set-upstream", "origin", input.branch], cwd);
123813
+ await execGit(["push", "--set-upstream", "origin", workspace.worktree.branch], cwd);
123743
123814
  }
123744
123815
  return { ok: true };
123745
123816
  }
@@ -124074,7 +124145,7 @@ function broadcast(chatId, chunk) {
124074
124145
  }
124075
124146
  const subs = listeners2.get(chatId);
124076
124147
  if (!subs || subs.size === 0) {
124077
- log25.warn({ chatId, chunkType: chunk.type }, "broadcast: no listeners");
124148
+ log25.debug({ chatId, chunkType: chunk.type }, "broadcast: no listeners");
124078
124149
  return;
124079
124150
  }
124080
124151
  for (const listener of subs) {
@@ -138730,16 +138801,22 @@ var ProjectService = class {
138730
138801
  projects2.map(async (project) => {
138731
138802
  let worktrees2 = project.worktrees;
138732
138803
  if (project.kind === "git") {
138733
- const trackedBranches = new Set(project.worktrees.map((wt) => wt.branch));
138734
- const trackedByBranch = new Map(project.worktrees.map((wt) => [wt.branch, wt]));
138804
+ const trackedByPath = new Map(project.worktrees.map((wt) => [wt.path, wt]));
138735
138805
  try {
138736
138806
  const gitWorktrees = await this.git.listWorktrees(project.path);
138737
- worktrees2 = gitWorktrees.filter((wt) => !wt.isBare && trackedBranches.has(wt.branch)).map((wt) => ({
138738
- branch: wt.branch,
138739
- path: wt.path,
138740
- head: wt.head,
138741
- pinned: trackedByBranch.get(wt.branch)?.pinned ?? false
138742
- }));
138807
+ worktrees2 = gitWorktrees.filter((wt) => !wt.isBare && trackedByPath.has(wt.path)).map((wt) => {
138808
+ const tracked2 = trackedByPath.get(wt.path);
138809
+ return {
138810
+ // Carry the stable identity from the tracked row; fall back
138811
+ // to the branch for worktrees git knows about but state
138812
+ // doesn't.
138813
+ name: tracked2?.name ?? wt.branch,
138814
+ branch: wt.branch,
138815
+ path: wt.path,
138816
+ head: wt.head,
138817
+ pinned: tracked2?.pinned ?? false
138818
+ };
138819
+ });
138743
138820
  } catch {
138744
138821
  }
138745
138822
  }
@@ -138750,7 +138827,7 @@ var ProjectService = class {
138750
138827
  label: project.label,
138751
138828
  kind: project.kind,
138752
138829
  worktrees: worktrees2.map((wt) => {
138753
- const workspaceId = toWorkspaceId(project.name, wt.branch);
138830
+ const workspaceId = toWorkspaceId(project.name, wt.name);
138754
138831
  const status = statusMap.get(workspaceId);
138755
138832
  return {
138756
138833
  ...wt,
@@ -138814,11 +138891,17 @@ var ProjectService = class {
138814
138891
  if (branch) defaultBranch = branch;
138815
138892
  try {
138816
138893
  const gitWorktrees = await this.git.listWorktrees(resolvedPath);
138817
- worktrees2 = gitWorktrees.filter((wt) => !wt.isBare).map((wt) => ({ branch: wt.branch, path: wt.path, head: wt.head, pinned: false }));
138894
+ worktrees2 = gitWorktrees.filter((wt) => !wt.isBare).map((wt) => ({
138895
+ name: wt.branch,
138896
+ branch: wt.branch,
138897
+ path: wt.path,
138898
+ head: wt.head,
138899
+ pinned: false
138900
+ }));
138818
138901
  } catch {
138819
138902
  }
138820
138903
  } else {
138821
- worktrees2 = [{ branch: "main", path: resolvedPath, pinned: false }];
138904
+ worktrees2 = [{ name: "main", branch: "main", path: resolvedPath, pinned: false }];
138822
138905
  }
138823
138906
  const project = {
138824
138907
  name: name3,
@@ -139437,7 +139520,7 @@ function defaultListWorkspaces() {
139437
139520
  for (const project of projects2) {
139438
139521
  for (const worktree of project.worktrees) {
139439
139522
  out.push({
139440
- workspaceId: toWorkspaceId(project.name, worktree.branch),
139523
+ workspaceId: toWorkspaceId(project.name, worktree.name),
139441
139524
  project: project.name,
139442
139525
  worktreePath: worktree.path
139443
139526
  });
@@ -140094,7 +140177,7 @@ var tasksRouter = t2.router({
140094
140177
  const workspaceIds = /* @__PURE__ */ new Set();
140095
140178
  for (const p6 of state.projects) {
140096
140179
  for (const wt of p6.worktrees) {
140097
- workspaceIds.add(toWorkspaceId(p6.name, wt.branch));
140180
+ workspaceIds.add(toWorkspaceId(p6.name, wt.name));
140098
140181
  }
140099
140182
  }
140100
140183
  return {