@band-app/server 0.22.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 (165) hide show
  1. package/dist/client/assets/DockviewBrowserContainer-Bh7ygcym.js +5 -0
  2. package/dist/client/assets/DockviewTerminalContainer-BA10dl2w.js +2 -0
  3. package/dist/client/assets/{TerminalPanel-C4ZPrnFP.js → TerminalPanel-C40mohhY.js} +3 -3
  4. package/dist/client/assets/{_basePickBy-iyhrrxG-.js → _basePickBy-BoN5C7c3.js} +1 -1
  5. package/dist/client/assets/{_baseUniq-B1WwbMDv.js → _baseUniq-hs8Z8eGG.js} +1 -1
  6. package/dist/client/assets/{arc-DjqQ6qnK.js → arc-DStHWz7g.js} +1 -1
  7. package/dist/client/assets/{architectureDiagram-VXUJARFQ-C03XQiLa.js → architectureDiagram-VXUJARFQ-BmuwLrzR.js} +1 -1
  8. package/dist/client/assets/{blockDiagram-VD42YOAC-Zzrf5xcb.js → blockDiagram-VD42YOAC-CpfEplz4.js} +1 -1
  9. package/dist/client/assets/{c4Diagram-YG6GDRKO-BYA4DXcg.js → c4Diagram-YG6GDRKO-DFNXKd12.js} +1 -1
  10. package/dist/client/assets/channel-cGiKwLh2.js +1 -0
  11. package/dist/client/assets/{chunk-4BX2VUAB-CPD6ENUL.js → chunk-4BX2VUAB-BhKLwyZj.js} +1 -1
  12. package/dist/client/assets/{chunk-55IACEB6-CrLS-6CW.js → chunk-55IACEB6--1nGJwoJ.js} +1 -1
  13. package/dist/client/assets/{chunk-B4BG7PRW-CgpQP0mz.js → chunk-B4BG7PRW-DfW_4HED.js} +1 -1
  14. package/dist/client/assets/{chunk-DI55MBZ5-IOlh3km5.js → chunk-DI55MBZ5-BBLPj3y_.js} +1 -1
  15. package/dist/client/assets/{chunk-FMBD7UC4-DFsVS8Jr.js → chunk-FMBD7UC4-22_QzB6-.js} +1 -1
  16. package/dist/client/assets/{chunk-QN33PNHL-CmVDL9Gh.js → chunk-QN33PNHL-BsNBNA8p.js} +1 -1
  17. package/dist/client/assets/{chunk-QZHKN3VN-B_Cnx6JN.js → chunk-QZHKN3VN-t5QozrKy.js} +1 -1
  18. package/dist/client/assets/{chunk-TZMSLE5B-DQbyM2Dh.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-CTHDgB6u.js → cose-bilkent-S5V4N54A-HZO5t4GF.js} +1 -1
  23. package/dist/client/assets/{dagre-6UL2VRFP-UZkfCyUE.js → dagre-6UL2VRFP-DnOsaGGD.js} +1 -1
  24. package/dist/client/assets/{diagram-PSM6KHXK-DAlkSZ2c.js → diagram-PSM6KHXK-tirWXx7b.js} +1 -1
  25. package/dist/client/assets/{diagram-QEK2KX5R-CazlpGGg.js → diagram-QEK2KX5R-Cjtr8l3E.js} +1 -1
  26. package/dist/client/assets/{diagram-S2PKOQOG-COwMJUec.js → diagram-S2PKOQOG-CuNpvzLc.js} +1 -1
  27. package/dist/client/assets/{erDiagram-Q2GNP2WA-CXZvqia8.js → erDiagram-Q2GNP2WA-D2Rb5UvQ.js} +1 -1
  28. package/dist/client/assets/{flowDiagram-NV44I4VS-DA3lEpzG.js → flowDiagram-NV44I4VS-BSQxdSDJ.js} +1 -1
  29. package/dist/client/assets/{ganttDiagram-JELNMOA3-BWRgS4MP.js → ganttDiagram-JELNMOA3-Cj0PWn4F.js} +3 -3
  30. package/dist/client/assets/{gitGraphDiagram-V2S2FVAM-7FizCSrq.js → gitGraphDiagram-V2S2FVAM-DMoH-grQ.js} +1 -1
  31. package/dist/client/assets/{graph-4L_GoTFH.js → graph-B7ABrrXm.js} +1 -1
  32. package/dist/client/assets/{highlighted-body-B3W2YXNL-ydRS8Ic9.js → highlighted-body-B3W2YXNL-DCQslkUR.js} +1 -1
  33. package/dist/client/assets/{index-BgKMJy37.js → index-8PaDaRYT.js} +1 -1
  34. package/dist/client/assets/{index-Bq6PEMRy.js → index-9FCRbBun.js} +1 -1
  35. package/dist/client/assets/{index-DJqbRWRD.js → index-B22f7bFn.js} +1 -1
  36. package/dist/client/assets/{index-Bs4eGT35.js → index-BCA8lija.js} +1 -1
  37. package/dist/client/assets/{index-BaTM0g6E.js → index-BG3Ltnuv.js} +1 -1
  38. package/dist/client/assets/index-BQhRobL8.js +1 -0
  39. package/dist/client/assets/{index-Cp1FqGEW.js → index-BaT5I2xy.js} +1 -1
  40. package/dist/client/assets/{index-Csd34_1g.js → index-BsEwdsSv.js} +1 -1
  41. package/dist/client/assets/{index-B8VQmYG-.js → index-C99EKoUY.js} +1 -1
  42. package/dist/client/assets/{index-D2ogHyak.js → index-CBLjtUwT.js} +1 -1
  43. package/dist/client/assets/{index-C6FACjGj.js → index-COql1I_y.js} +1 -1
  44. package/dist/client/assets/{index-Cl0dKOpc.js → index-D9SknX6B.js} +1 -1
  45. package/dist/client/assets/{index-CPC-pCRk.js → index-DWj9bxNA.js} +1 -1
  46. package/dist/client/assets/{index--PCwWsYS.js → index-DWqvtyLc.js} +1 -1
  47. package/dist/client/assets/{index-DScY4DVi.js → index-DaWbWCgj.js} +1 -1
  48. package/dist/client/assets/{index-qf4lR_zM.js → index-Diyv48F3.js} +1 -1
  49. package/dist/client/assets/{index-SJ6t3qme.js → index-DjFlwM8l.js} +1 -1
  50. package/dist/client/assets/{index-DTonRA2E.js → index-Myu-_U8q.js} +1 -1
  51. package/dist/client/assets/{infoDiagram-HS3SLOUP-CB9FyKi7.js → infoDiagram-HS3SLOUP-C_wVpnnp.js} +1 -1
  52. package/dist/client/assets/{journeyDiagram-XKPGCS4Q-C_bPulxt.js → journeyDiagram-XKPGCS4Q-DcF--XQH.js} +1 -1
  53. package/dist/client/assets/{kanban-definition-3W4ZIXB7-CGLwqWR-.js → kanban-definition-3W4ZIXB7-BA1w8rep.js} +1 -1
  54. package/dist/client/assets/{layout-XjqfGmSW.js → layout-DVMDYrln.js} +1 -1
  55. package/dist/client/assets/{main-FwGkrDro.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-DRNRxvpy.js → mindmap-definition-VGOIOE7T-C1vA0wr2.js} +1 -1
  58. package/dist/client/assets/{pieDiagram-ADFJNKIX-Co4AML3R.js → pieDiagram-ADFJNKIX-Q71p26az.js} +2 -2
  59. package/dist/client/assets/{quadrantDiagram-AYHSOK5B-DjuSOXov.js → quadrantDiagram-AYHSOK5B-Bxcd0mzk.js} +1 -1
  60. package/dist/client/assets/{requirementDiagram-UZGBJVZJ-Cl5py0JI.js → requirementDiagram-UZGBJVZJ-DWqCIKiG.js} +1 -1
  61. package/dist/client/assets/{sankeyDiagram-TZEHDZUN-BNJImcEG.js → sankeyDiagram-TZEHDZUN-D9rSnLVX.js} +1 -1
  62. package/dist/client/assets/{sequenceDiagram-WL72ISMW-Bd3PTcpW.js → sequenceDiagram-WL72ISMW-Co2Jz6Fl.js} +1 -1
  63. package/dist/client/assets/{square-terminal-CiX1sbUO.js → square-terminal-C3zI_mkt.js} +1 -1
  64. package/dist/client/assets/{stateDiagram-FKZM4ZOC-DXdFd6-L.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-8CA5Ftj2.js → timeline-definition-IT6M3QCI-BXxZZYsm.js} +1 -1
  67. package/dist/client/assets/{treemap-GDKQZRPO-GQ5N0K_o.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-D0sPlrId.js → workspace._workspaceId-C_KGLGyB.js} +1 -1
  70. package/dist/client/assets/{xychartDiagram-PRI3JC2R-DzcmFrfB.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 +184 -16
  74. package/dist/server/assets/{DockviewBrowserContainer-DvltiWxV.js → DockviewBrowserContainer-C6QVux14.js} +16 -3
  75. package/dist/server/assets/{DockviewTerminalContainer-YGo8Zbx1.js → DockviewTerminalContainer-OevWE65L.js} +29 -6
  76. package/dist/server/assets/{TerminalPanel-Bd0_i38P.js → TerminalPanel-BhOjwcFW.js} +3 -2
  77. package/dist/server/assets/{_basePickBy-BBas4T8q.js → _basePickBy-DVK5KtlH.js} +2 -2
  78. package/dist/server/assets/{_baseUniq-Bb-AXRqu.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-CNbGanI8.js → arc-BpwEbxUR.js} +1 -1
  81. package/dist/server/assets/{architecture-7HQA4BMR-BBpvCcgY.js → architecture-7HQA4BMR-CNyHLOO7.js} +6 -6
  82. package/dist/server/assets/{architectureDiagram-VXUJARFQ-CSgRy1oF.js → architectureDiagram-VXUJARFQ-DVUpIskI.js} +6 -6
  83. package/dist/server/assets/{blockDiagram-VD42YOAC-BZ551zIx.js → blockDiagram-VD42YOAC-CRv2pc0L.js} +6 -6
  84. package/dist/server/assets/{c4Diagram-YG6GDRKO-BpFPiRxu.js → c4Diagram-YG6GDRKO-CBv74bWb.js} +2 -2
  85. package/dist/server/assets/{channel-BakvXn0q.js → channel-C_c7u4ky.js} +1 -1
  86. package/dist/server/assets/{chunk-4BX2VUAB-iq_ixzMT.js → chunk-4BX2VUAB-85OXnz_P.js} +1 -1
  87. package/dist/server/assets/{chunk-55IACEB6-BTsLLiUt.js → chunk-55IACEB6-Cl8taExZ.js} +1 -1
  88. package/dist/server/assets/{chunk-B4BG7PRW-rFWSSos9.js → chunk-B4BG7PRW-C7W_R9n6.js} +4 -4
  89. package/dist/server/assets/{chunk-DI55MBZ5-C6HYpEOk.js → chunk-DI55MBZ5-CTi30KuT.js} +3 -3
  90. package/dist/server/assets/{chunk-FMBD7UC4-CWm7G-kI.js → chunk-FMBD7UC4-CsuoPD3I.js} +1 -1
  91. package/dist/server/assets/{chunk-QN33PNHL-C-sH07qa.js → chunk-QN33PNHL-BHHMj_a1.js} +1 -1
  92. package/dist/server/assets/{chunk-QZHKN3VN-DBYpRTmd.js → chunk-QZHKN3VN-DwwXlOCl.js} +1 -1
  93. package/dist/server/assets/{chunk-TZMSLE5B-D374mW8S.js → chunk-TZMSLE5B-ECyN9wrL.js} +1 -1
  94. package/dist/server/assets/{classDiagram-v2-WZHVMYZB-DV-SD-4W.js → classDiagram-2ON5EDUG-qbF8ds74.js} +5 -5
  95. package/dist/server/assets/{classDiagram-2ON5EDUG-DV-SD-4W.js → classDiagram-v2-WZHVMYZB-qbF8ds74.js} +5 -5
  96. package/dist/server/assets/{clone-DVtsQqal.js → clone-BCajbdd5.js} +1 -1
  97. package/dist/server/assets/{cose-bilkent-S5V4N54A-XbCluv3z.js → cose-bilkent-S5V4N54A-D5-w_t4l.js} +1 -1
  98. package/dist/server/assets/{dagre-6UL2VRFP-CuR4BisU.js → dagre-6UL2VRFP-CCIdAwdB.js} +6 -6
  99. package/dist/server/assets/{diagram-PSM6KHXK-CV_nySOq.js → diagram-PSM6KHXK-CWGITxy9.js} +7 -7
  100. package/dist/server/assets/{diagram-QEK2KX5R-Noar7MQT.js → diagram-QEK2KX5R-B07zrGgY.js} +6 -6
  101. package/dist/server/assets/{diagram-S2PKOQOG-B2BacNFz.js → diagram-S2PKOQOG-XGIpbjo1.js} +6 -6
  102. package/dist/server/assets/{erDiagram-Q2GNP2WA-B5Os4Fa-.js → erDiagram-Q2GNP2WA-DYHtO3j9.js} +4 -4
  103. package/dist/server/assets/{flowDiagram-NV44I4VS-DjQR68un.js → flowDiagram-NV44I4VS-Cs7hS9X4.js} +5 -5
  104. package/dist/server/assets/{ganttDiagram-JELNMOA3-B5uPZ6pu.js → ganttDiagram-JELNMOA3-BhLp8xvm.js} +1 -1
  105. package/dist/server/assets/{gitGraph-G5XIXVHT-6ZMiJWQT.js → gitGraph-G5XIXVHT-B46gW1OX.js} +6 -6
  106. package/dist/server/assets/{gitGraphDiagram-V2S2FVAM-DDF08l5z.js → gitGraphDiagram-V2S2FVAM-CZHNGOm0.js} +7 -7
  107. package/dist/server/assets/{graph-bRh_VJvO.js → graph-4bVECaJM.js} +2 -2
  108. package/dist/server/assets/{highlighted-body-B3W2YXNL-BI_Gmrii.js → highlighted-body-B3W2YXNL-DSf8s2aV.js} +1 -1
  109. package/dist/server/assets/{index-Bdft7sx8.js → index-14dCbIAi.js} +5 -5
  110. package/dist/server/assets/{index-Dyd5DTki.js → index-1OK7lyTa.js} +2 -2
  111. package/dist/server/assets/{index-y2Y1JSaD.js → index-8EiXP0Bf.js} +2 -2
  112. package/dist/server/assets/{index-BlZ00-BN.js → index-B72BPMJQ.js} +3 -3
  113. package/dist/server/assets/{index-K_Bo1J5h.js → index-BLv-1MtR.js} +5 -5
  114. package/dist/server/assets/{index-auM21h5r.js → index-BRzkEVRG.js} +1 -1
  115. package/dist/server/assets/{index-BKTDd3Bk.js → index-C7lRWZi8.js} +4 -4
  116. package/dist/server/assets/{index-VS9oMvxO.js → index-CDG7KvBY.js} +2 -2
  117. package/dist/server/assets/{index-C-y9iHQ0.js → index-CHvqm6Lz.js} +5 -5
  118. package/dist/server/assets/{index-CWdeYFNF.js → index-CKPuU6Za.js} +2 -2
  119. package/dist/server/assets/{index-RnzJqolD.js → index-CWr-Kh5M.js} +2 -2
  120. package/dist/server/assets/{index-D2pPyR7I.js → index-D2uLA4oe.js} +2 -2
  121. package/dist/server/assets/{index-DDZbXJFy.js → index-DAq8fRkd.js} +2 -2
  122. package/dist/server/assets/{index-5xKUZpsF.js → index-Dz2mzfvS.js} +2 -2
  123. package/dist/server/assets/{index-6TVwGkMb.js → index-Tq3ajWxh.js} +2 -2
  124. package/dist/server/assets/{index-DpTDX5JD.js → index-U3tOcUUV.js} +2 -2
  125. package/dist/server/assets/{index-CTIw5jsP.js → index-pFRKwTv2.js} +2 -2
  126. package/dist/server/assets/{index-CUQ92e7X.js → index-rT9xGtRW.js} +3 -3
  127. package/dist/server/assets/{info-VBDWY6EO-JLouBLo5.js → info-VBDWY6EO-DrELfFR0.js} +6 -6
  128. package/dist/server/assets/{infoDiagram-HS3SLOUP-zmvy_WJR.js → infoDiagram-HS3SLOUP-D40Crb-p.js} +5 -5
  129. package/dist/server/assets/{journeyDiagram-XKPGCS4Q-DyzviNdt.js → journeyDiagram-XKPGCS4Q-dtlVBwV2.js} +4 -4
  130. package/dist/server/assets/{kanban-definition-3W4ZIXB7-DOBL7QMj.js → kanban-definition-3W4ZIXB7-72vgA7Jl.js} +2 -2
  131. package/dist/server/assets/{layout-B_Ylwhz8.js → layout-DJ0Eul-X.js} +4 -4
  132. package/dist/server/assets/{mermaid-3ZIDBTTL-D1krx3WU.js → mermaid-3ZIDBTTL-DGEHf_at.js} +1 -1
  133. package/dist/server/assets/{mermaid-parser.core-B3d8rAVm.js → mermaid-parser.core-C1UfVEF8.js} +11 -11
  134. package/dist/server/assets/{mindmap-definition-VGOIOE7T-Kacyqp9Z.js → mindmap-definition-VGOIOE7T-DYfEp2uH.js} +3 -3
  135. package/dist/server/assets/{packet-DYOGHKS2-Bl6AuzeP.js → packet-DYOGHKS2-IHYchS32.js} +6 -6
  136. package/dist/server/assets/{pie-VRWISCQL-DTulKqSB.js → pie-VRWISCQL-R6SvOU4g.js} +6 -6
  137. package/dist/server/assets/{pieDiagram-ADFJNKIX-EBslGQgI.js → pieDiagram-ADFJNKIX-EgffZsud.js} +7 -7
  138. package/dist/server/assets/{quadrantDiagram-AYHSOK5B-BKSWYe6P.js → quadrantDiagram-AYHSOK5B-n2oJWllV.js} +1 -1
  139. package/dist/server/assets/{radar-ZZBFDIW7-C5ulLYDn.js → radar-ZZBFDIW7-BX2ya_Na.js} +6 -6
  140. package/dist/server/assets/{requirementDiagram-UZGBJVZJ-B7nRcnKx.js → requirementDiagram-UZGBJVZJ-CzCXruFj.js} +3 -3
  141. package/dist/server/assets/{router-hdCv0b-L.js → router-BC8bCsa3.js} +1100 -725
  142. package/dist/server/assets/{sankeyDiagram-TZEHDZUN-Dq6Q_X6w.js → sankeyDiagram-TZEHDZUN-C0GqwqSS.js} +1 -1
  143. package/dist/server/assets/{sequenceDiagram-WL72ISMW-CDfofz-s.js → sequenceDiagram-WL72ISMW-BfX0R0LP.js} +3 -3
  144. package/dist/server/assets/{square-terminal-D7R89vxW.js → square-terminal-BWcJU95Z.js} +1 -1
  145. package/dist/server/assets/{stateDiagram-FKZM4ZOC-BQdH_sw5.js → stateDiagram-FKZM4ZOC-QowlLVwh.js} +8 -8
  146. package/dist/server/assets/{stateDiagram-v2-4FDKWEC3-BTwyLH9n.js → stateDiagram-v2-4FDKWEC3-DVHzQlOF.js} +4 -4
  147. package/dist/server/assets/{timeline-definition-IT6M3QCI-BLfNWXx-.js → timeline-definition-IT6M3QCI-DUoaC7rz.js} +2 -2
  148. package/dist/server/assets/{treemap-GDKQZRPO-DYGhrk03.js → treemap-GDKQZRPO-B5KIzomx.js} +6 -6
  149. package/dist/server/assets/{workspace._workspaceId-C9ijioXa.js → workspace._workspaceId-DRK2dblR.js} +101 -11
  150. package/dist/server/assets/{workspace._workspaceId-BrMajMrS.js → workspace._workspaceId-hnIpuUNX.js} +1 -1
  151. package/dist/server/assets/{xychartDiagram-PRI3JC2R-CTiLODEl.js → xychartDiagram-PRI3JC2R-aNxYxejD.js} +1 -1
  152. package/dist/server/server.js +2 -2
  153. package/dist/start-server.mjs +736 -512
  154. package/package.json +4 -4
  155. package/dist/client/assets/DockviewBrowserContainer-AeGrBvbe.js +0 -5
  156. package/dist/client/assets/DockviewTerminalContainer-CEcmk81d.js +0 -2
  157. package/dist/client/assets/channel-ByfqtAS4.js +0 -1
  158. package/dist/client/assets/classDiagram-2ON5EDUG-CmzSv5tz.js +0 -1
  159. package/dist/client/assets/classDiagram-v2-WZHVMYZB-CmzSv5tz.js +0 -1
  160. package/dist/client/assets/clone-D6Np9jJP.js +0 -1
  161. package/dist/client/assets/index-p4yr3DW9.js +0 -1
  162. package/dist/client/assets/main-CBlP-xQr.css +0 -1
  163. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-kbB9WbNB.js +0 -1
  164. package/dist/client/assets/workspace._workspaceId-C_iuy4p6.js +0 -2
  165. package/dist/server/assets/_tanstack-start-manifest_v-DJ7xH6AI.js +0 -4
@@ -1226,7 +1226,7 @@ const createLucideIcon = (iconName, iconNode) => {
1226
1226
  Component.displayName = toPascalCase(iconName);
1227
1227
  return Component;
1228
1228
  };
1229
- const __iconNode$1r = [
1229
+ const __iconNode$1s = [
1230
1230
  [
1231
1231
  "path",
1232
1232
  {
@@ -1235,45 +1235,45 @@ const __iconNode$1r = [
1235
1235
  }
1236
1236
  ]
1237
1237
  ];
1238
- const Activity = createLucideIcon("activity", __iconNode$1r);
1239
- const __iconNode$1q = [
1238
+ const Activity = createLucideIcon("activity", __iconNode$1s);
1239
+ const __iconNode$1r = [
1240
1240
  ["path", { d: "M12 17V3", key: "1cwfxf" }],
1241
1241
  ["path", { d: "m6 11 6 6 6-6", key: "12ii2o" }],
1242
1242
  ["path", { d: "M19 21H5", key: "150jfl" }]
1243
1243
  ];
1244
- const ArrowDownToLine = createLucideIcon("arrow-down-to-line", __iconNode$1q);
1245
- const __iconNode$1p = [
1244
+ const ArrowDownToLine = createLucideIcon("arrow-down-to-line", __iconNode$1r);
1245
+ const __iconNode$1q = [
1246
1246
  ["path", { d: "M12 5v14", key: "s699le" }],
1247
1247
  ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
1248
1248
  ];
1249
- const ArrowDown = createLucideIcon("arrow-down", __iconNode$1p);
1250
- const __iconNode$1o = [
1249
+ const ArrowDown = createLucideIcon("arrow-down", __iconNode$1q);
1250
+ const __iconNode$1p = [
1251
1251
  ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
1252
1252
  ["path", { d: "M19 12H5", key: "x3x0zl" }]
1253
1253
  ];
1254
- const ArrowLeft = createLucideIcon("arrow-left", __iconNode$1o);
1255
- const __iconNode$1n = [
1254
+ const ArrowLeft = createLucideIcon("arrow-left", __iconNode$1p);
1255
+ const __iconNode$1o = [
1256
1256
  ["path", { d: "M5 12h14", key: "1ays0h" }],
1257
1257
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
1258
1258
  ];
1259
- const ArrowRight = createLucideIcon("arrow-right", __iconNode$1n);
1260
- const __iconNode$1m = [
1259
+ const ArrowRight = createLucideIcon("arrow-right", __iconNode$1o);
1260
+ const __iconNode$1n = [
1261
1261
  ["path", { d: "m18 9-6-6-6 6", key: "kcunyi" }],
1262
1262
  ["path", { d: "M12 3v14", key: "7cf3v8" }],
1263
1263
  ["path", { d: "M5 21h14", key: "11awu3" }]
1264
1264
  ];
1265
- const ArrowUpFromLine = createLucideIcon("arrow-up-from-line", __iconNode$1m);
1266
- const __iconNode$1l = [
1265
+ const ArrowUpFromLine = createLucideIcon("arrow-up-from-line", __iconNode$1n);
1266
+ const __iconNode$1m = [
1267
1267
  ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
1268
1268
  ["path", { d: "M12 19V5", key: "x0mq9r" }]
1269
1269
  ];
1270
- const ArrowUp = createLucideIcon("arrow-up", __iconNode$1l);
1271
- const __iconNode$1k = [
1270
+ const ArrowUp = createLucideIcon("arrow-up", __iconNode$1m);
1271
+ const __iconNode$1l = [
1272
1272
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1273
1273
  ["path", { d: "M4.929 4.929 19.07 19.071", key: "196cmz" }]
1274
1274
  ];
1275
- const Ban = createLucideIcon("ban", __iconNode$1k);
1276
- const __iconNode$1j = [
1275
+ const Ban = createLucideIcon("ban", __iconNode$1l);
1276
+ const __iconNode$1k = [
1277
1277
  ["path", { d: "M12 8V4H8", key: "hb8ula" }],
1278
1278
  ["rect", { width: "16", height: "12", x: "4", y: "8", rx: "2", key: "enze0r" }],
1279
1279
  ["path", { d: "M2 14h2", key: "vft8re" }],
@@ -1281,77 +1281,77 @@ const __iconNode$1j = [
1281
1281
  ["path", { d: "M15 13v2", key: "1xurst" }],
1282
1282
  ["path", { d: "M9 13v2", key: "rq6x2g" }]
1283
1283
  ];
1284
- const Bot = createLucideIcon("bot", __iconNode$1j);
1285
- const __iconNode$1i = [
1284
+ const Bot = createLucideIcon("bot", __iconNode$1k);
1285
+ const __iconNode$1j = [
1286
1286
  ["path", { d: "m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16", key: "d5nyq2" }],
1287
1287
  ["path", { d: "M22 9v7", key: "pvm9v3" }],
1288
1288
  ["path", { d: "M3.304 13h6.392", key: "1q3zxz" }],
1289
1289
  ["circle", { cx: "18.5", cy: "12.5", r: "3.5", key: "z97x68" }]
1290
1290
  ];
1291
- const CaseSensitive = createLucideIcon("case-sensitive", __iconNode$1i);
1292
- const __iconNode$1h = [
1291
+ const CaseSensitive = createLucideIcon("case-sensitive", __iconNode$1j);
1292
+ const __iconNode$1i = [
1293
1293
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
1294
1294
  ["path", { d: "M18 17V9", key: "2bz60n" }],
1295
1295
  ["path", { d: "M13 17V5", key: "1frdt8" }],
1296
1296
  ["path", { d: "M8 17v-3", key: "17ska0" }]
1297
1297
  ];
1298
- const ChartColumn = createLucideIcon("chart-column", __iconNode$1h);
1299
- const __iconNode$1g = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
1300
- const Check = createLucideIcon("check", __iconNode$1g);
1301
- const __iconNode$1f = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
1302
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$1f);
1303
- const __iconNode$1e = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
1304
- const ChevronLeft = createLucideIcon("chevron-left", __iconNode$1e);
1305
- const __iconNode$1d = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
1306
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$1d);
1307
- const __iconNode$1c = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
1308
- const ChevronUp = createLucideIcon("chevron-up", __iconNode$1c);
1309
- const __iconNode$1b = [
1298
+ const ChartColumn = createLucideIcon("chart-column", __iconNode$1i);
1299
+ const __iconNode$1h = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
1300
+ const Check = createLucideIcon("check", __iconNode$1h);
1301
+ const __iconNode$1g = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
1302
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$1g);
1303
+ const __iconNode$1f = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
1304
+ const ChevronLeft = createLucideIcon("chevron-left", __iconNode$1f);
1305
+ const __iconNode$1e = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
1306
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$1e);
1307
+ const __iconNode$1d = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
1308
+ const ChevronUp = createLucideIcon("chevron-up", __iconNode$1d);
1309
+ const __iconNode$1c = [
1310
1310
  ["path", { d: "m7 20 5-5 5 5", key: "13a0gw" }],
1311
1311
  ["path", { d: "m7 4 5 5 5-5", key: "1kwcof" }]
1312
1312
  ];
1313
- const ChevronsDownUp = createLucideIcon("chevrons-down-up", __iconNode$1b);
1314
- const __iconNode$1a = [
1313
+ const ChevronsDownUp = createLucideIcon("chevrons-down-up", __iconNode$1c);
1314
+ const __iconNode$1b = [
1315
1315
  ["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }],
1316
1316
  ["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
1317
1317
  ];
1318
- const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$1a);
1319
- const __iconNode$19 = [
1318
+ const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$1b);
1319
+ const __iconNode$1a = [
1320
1320
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1321
1321
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
1322
1322
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
1323
1323
  ];
1324
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$19);
1325
- const __iconNode$18 = [
1324
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$1a);
1325
+ const __iconNode$19 = [
1326
1326
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1327
1327
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
1328
1328
  ];
1329
- const CircleCheck = createLucideIcon("circle-check", __iconNode$18);
1330
- const __iconNode$17 = [
1329
+ const CircleCheck = createLucideIcon("circle-check", __iconNode$19);
1330
+ const __iconNode$18 = [
1331
1331
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1332
1332
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
1333
1333
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
1334
1334
  ];
1335
- const CircleX = createLucideIcon("circle-x", __iconNode$17);
1336
- const __iconNode$16 = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
1337
- const Circle = createLucideIcon("circle", __iconNode$16);
1338
- const __iconNode$15 = [
1335
+ const CircleX = createLucideIcon("circle-x", __iconNode$18);
1336
+ const __iconNode$17 = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
1337
+ const Circle = createLucideIcon("circle", __iconNode$17);
1338
+ const __iconNode$16 = [
1339
1339
  ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
1340
1340
  ["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2", key: "4jdomd" }],
1341
1341
  ["path", { d: "M16 4h2a2 2 0 0 1 2 2v4", key: "3hqy98" }],
1342
1342
  ["path", { d: "M21 14H11", key: "1bme5i" }],
1343
1343
  ["path", { d: "m15 10-4 4 4 4", key: "5dvupr" }]
1344
1344
  ];
1345
- const ClipboardCopy = createLucideIcon("clipboard-copy", __iconNode$15);
1346
- const __iconNode$14 = [
1345
+ const ClipboardCopy = createLucideIcon("clipboard-copy", __iconNode$16);
1346
+ const __iconNode$15 = [
1347
1347
  ["path", { d: "M11 14h10", key: "1w8e9d" }],
1348
1348
  ["path", { d: "M16 4h2a2 2 0 0 1 2 2v1.344", key: "1e62lh" }],
1349
1349
  ["path", { d: "m17 18 4-4-4-4", key: "z2g111" }],
1350
1350
  ["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113", key: "bjbb7m" }],
1351
1351
  ["rect", { x: "8", y: "2", width: "8", height: "4", rx: "1", key: "ublpy" }]
1352
1352
  ];
1353
- const ClipboardPaste = createLucideIcon("clipboard-paste", __iconNode$14);
1354
- const __iconNode$13 = [
1353
+ const ClipboardPaste = createLucideIcon("clipboard-paste", __iconNode$15);
1354
+ const __iconNode$14 = [
1355
1355
  ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
1356
1356
  [
1357
1357
  "path",
@@ -1361,52 +1361,58 @@ const __iconNode$13 = [
1361
1361
  }
1362
1362
  ]
1363
1363
  ];
1364
- const Clipboard = createLucideIcon("clipboard", __iconNode$13);
1365
- const __iconNode$12 = [
1364
+ const Clipboard = createLucideIcon("clipboard", __iconNode$14);
1365
+ const __iconNode$13 = [
1366
1366
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1367
1367
  ["path", { d: "M12 6v6l4 2", key: "mmk7yg" }]
1368
1368
  ];
1369
- const Clock = createLucideIcon("clock", __iconNode$12);
1370
- const __iconNode$11 = [
1369
+ const Clock = createLucideIcon("clock", __iconNode$13);
1370
+ const __iconNode$12 = [
1371
1371
  ["path", { d: "m18 16 4-4-4-4", key: "1inbqp" }],
1372
1372
  ["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }],
1373
1373
  ["path", { d: "m14.5 4-5 16", key: "e7oirm" }]
1374
1374
  ];
1375
- const CodeXml = createLucideIcon("code-xml", __iconNode$11);
1376
- const __iconNode$10 = [
1375
+ const CodeXml = createLucideIcon("code-xml", __iconNode$12);
1376
+ const __iconNode$11 = [
1377
1377
  ["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
1378
1378
  ["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
1379
1379
  ];
1380
- const Code = createLucideIcon("code", __iconNode$10);
1381
- const __iconNode$$ = [
1380
+ const Code = createLucideIcon("code", __iconNode$11);
1381
+ const __iconNode$10 = [
1382
1382
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
1383
1383
  ["path", { d: "M12 3v18", key: "108xh3" }]
1384
1384
  ];
1385
- const Columns2 = createLucideIcon("columns-2", __iconNode$$);
1386
- const __iconNode$_ = [
1385
+ const Columns2 = createLucideIcon("columns-2", __iconNode$10);
1386
+ const __iconNode$$ = [
1387
1387
  [
1388
1388
  "path",
1389
1389
  { d: "M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3", key: "11bfej" }
1390
1390
  ]
1391
1391
  ];
1392
- const Command$1 = createLucideIcon("command", __iconNode$_);
1393
- const __iconNode$Z = [
1392
+ const Command$1 = createLucideIcon("command", __iconNode$$);
1393
+ const __iconNode$_ = [
1394
1394
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
1395
1395
  ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
1396
1396
  ];
1397
- const Copy = createLucideIcon("copy", __iconNode$Z);
1398
- const __iconNode$Y = [
1397
+ const Copy = createLucideIcon("copy", __iconNode$_);
1398
+ const __iconNode$Z = [
1399
1399
  ["path", { d: "M12 15V3", key: "m9g1x1" }],
1400
1400
  ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
1401
1401
  ["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
1402
1402
  ];
1403
- const Download = createLucideIcon("download", __iconNode$Y);
1404
- const __iconNode$X = [
1403
+ const Download = createLucideIcon("download", __iconNode$Z);
1404
+ const __iconNode$Y = [
1405
1405
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
1406
1406
  ["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
1407
1407
  ["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
1408
1408
  ];
1409
- const EllipsisVertical = createLucideIcon("ellipsis-vertical", __iconNode$X);
1409
+ const EllipsisVertical = createLucideIcon("ellipsis-vertical", __iconNode$Y);
1410
+ const __iconNode$X = [
1411
+ ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
1412
+ ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
1413
+ ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
1414
+ ];
1415
+ const Ellipsis = createLucideIcon("ellipsis", __iconNode$X);
1410
1416
  const __iconNode$W = [
1411
1417
  ["path", { d: "m15 15 6 6", key: "1s409w" }],
1412
1418
  ["path", { d: "m15 9 6-6", key: "ko1vev" }],
@@ -14762,11 +14768,27 @@ function DialogOverlay({
14762
14768
  }
14763
14769
  );
14764
14770
  }
14771
+ const DIALOG_CONTENT_VARIANTS = {
14772
+ 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",
14773
+ "bottom-sheet": [
14774
+ // Shared
14775
+ "fixed z-50 flex flex-col bg-background shadow-lg duration-200 outline-none",
14776
+ "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
14777
+ // Mobile (< lg): bottom drawer
14778
+ "inset-x-0 bottom-0 w-full max-w-none rounded-t-2xl border border-b-0 p-6",
14779
+ "max-h-[calc(100dvh-env(safe-area-inset-top)-1.5rem)]",
14780
+ "max-lg:data-[state=open]:slide-in-from-bottom max-lg:data-[state=closed]:slide-out-to-bottom",
14781
+ // Desktop (lg+): revert to the centred modal
14782
+ "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",
14783
+ "lg:data-[state=open]:zoom-in-95 lg:data-[state=closed]:zoom-out-95"
14784
+ ].join(" ")
14785
+ };
14765
14786
  function DialogContent({
14766
14787
  className,
14767
14788
  overlayClassName,
14768
14789
  children: children2,
14769
14790
  showCloseButton = true,
14791
+ variant = "default",
14770
14792
  ...props
14771
14793
  }) {
14772
14794
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
@@ -14775,10 +14797,8 @@ function DialogContent({
14775
14797
  Content$1,
14776
14798
  {
14777
14799
  "data-slot": "dialog-content",
14778
- className: cn$2(
14779
- "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",
14780
- className
14781
- ),
14800
+ "data-variant": variant,
14801
+ className: cn$2(DIALOG_CONTENT_VARIANTS[variant], className),
14782
14802
  ...props,
14783
14803
  children: [
14784
14804
  children2,
@@ -20261,16 +20281,16 @@ function createDashboardStore(adapter2) {
20261
20281
  set2({ error: String(e3) });
20262
20282
  }
20263
20283
  },
20264
- gitPull: async (project, branch) => {
20284
+ gitPull: async (project, name2) => {
20265
20285
  try {
20266
- await adapter2.gitPull(project, branch);
20286
+ await adapter2.gitPull(project, name2);
20267
20287
  } catch (e3) {
20268
20288
  set2({ error: String(e3) });
20269
20289
  }
20270
20290
  },
20271
- gitPush: async (project, branch) => {
20291
+ gitPush: async (project, name2) => {
20272
20292
  try {
20273
- await adapter2.gitPush(project, branch);
20293
+ await adapter2.gitPush(project, name2);
20274
20294
  } catch (e3) {
20275
20295
  set2({ error: String(e3) });
20276
20296
  }
@@ -20487,15 +20507,18 @@ function useRemoveWorkspace() {
20487
20507
  const openWorkspace = useDashboardStore((s2) => s2.openWorkspace);
20488
20508
  const store = useRawDashboardStore();
20489
20509
  return useMutation({
20490
- mutationFn: ({ project, branch }) => adapter2.removeWorkspace(project, branch),
20491
- onSuccess: (_data, { project, branch }) => {
20510
+ mutationFn: ({ project, name: name2 }) => adapter2.removeWorkspace(project, name2),
20511
+ onSuccess: (_data, { project, name: name2 }) => {
20492
20512
  queryClient2.invalidateQueries({ queryKey: queryKeys.projects });
20493
- const deletedWorkspaceId = toWorkspaceId(project, branch);
20513
+ const deletedWorkspaceId = toWorkspaceId(project, name2);
20494
20514
  if (store.getState().activeWorkspaceId === deletedWorkspaceId) {
20495
20515
  const projects = queryClient2.getQueryData(queryKeys.projects);
20496
20516
  const projectInfo = projects?.find((p2) => p2.name === project);
20497
20517
  if (projectInfo) {
20498
- openWorkspace(toWorkspaceId(project, projectInfo.defaultBranch));
20518
+ const mainWt = projectInfo.worktrees.find(
20519
+ (wt2) => wt2.name === projectInfo.defaultBranch || wt2.branch === projectInfo.defaultBranch
20520
+ );
20521
+ openWorkspace(toWorkspaceId(project, mainWt?.name ?? projectInfo.defaultBranch));
20499
20522
  }
20500
20523
  }
20501
20524
  },
@@ -20568,7 +20591,7 @@ function AddProjectDialog({ open: open2, onOpenChange, defaultLabel }) {
20568
20591
  }
20569
20592
  };
20570
20593
  const isBusy = addProjectMutation.isPending;
20571
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Dialog, { open: open2, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DialogContent, { className: "sm:max-w-[425px]", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("form", { onSubmit: handleSubmit, children: [
20594
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Dialog, { open: open2, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DialogContent, { variant: "bottom-sheet", className: "lg:max-w-[425px]", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("form", { onSubmit: handleSubmit, children: [
20572
20595
  /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogHeader, { children: [
20573
20596
  /* @__PURE__ */ jsxRuntimeExports.jsx(DialogTitle, { children: "Register Project" }),
20574
20597
  /* @__PURE__ */ jsxRuntimeExports.jsx(DialogDescription, { children: "Add a folder to manage its workspaces. Git repositories enable branches and PRs; plain folders work too, with a single implicit workspace." })
@@ -42697,53 +42720,53 @@ async function loadLanguage(lang) {
42697
42720
  try {
42698
42721
  switch (lang) {
42699
42722
  case "javascript":
42700
- return import("./index-y2Y1JSaD.js").then((m2) => m2.javascript());
42723
+ return import("./index-8EiXP0Bf.js").then((m2) => m2.javascript());
42701
42724
  case "jsx":
42702
- return import("./index-y2Y1JSaD.js").then((m2) => m2.javascript({ jsx: true }));
42725
+ return import("./index-8EiXP0Bf.js").then((m2) => m2.javascript({ jsx: true }));
42703
42726
  case "typescript":
42704
- return import("./index-y2Y1JSaD.js").then(
42727
+ return import("./index-8EiXP0Bf.js").then(
42705
42728
  (m2) => m2.javascript({ typescript: true })
42706
42729
  );
42707
42730
  case "tsx":
42708
- return import("./index-y2Y1JSaD.js").then(
42731
+ return import("./index-8EiXP0Bf.js").then(
42709
42732
  (m2) => m2.javascript({ jsx: true, typescript: true })
42710
42733
  );
42711
42734
  case "python":
42712
- return import("./index-5xKUZpsF.js").then((m2) => m2.python());
42735
+ return import("./index-Dz2mzfvS.js").then((m2) => m2.python());
42713
42736
  case "html":
42714
- return import("./index-BKTDd3Bk.js").then((m2) => m2.html());
42737
+ return import("./index-C7lRWZi8.js").then((m2) => m2.html());
42715
42738
  case "css":
42716
- return import("./index-Dyd5DTki.js").then((m2) => m2.css());
42739
+ return import("./index-1OK7lyTa.js").then((m2) => m2.css());
42717
42740
  case "scss":
42718
42741
  case "sass":
42719
- return import("./index-BlZ00-BN.js").then((m2) => m2.sass());
42742
+ return import("./index-B72BPMJQ.js").then((m2) => m2.sass());
42720
42743
  case "less":
42721
- return import("./index-CUQ92e7X.js").then((m2) => m2.less());
42744
+ return import("./index-rT9xGtRW.js").then((m2) => m2.less());
42722
42745
  case "json":
42723
42746
  case "jsonc":
42724
- return import("./index-VS9oMvxO.js").then((m2) => m2.json());
42747
+ return import("./index-CDG7KvBY.js").then((m2) => m2.json());
42725
42748
  case "markdown":
42726
42749
  case "mdx":
42727
- return import("./index-K_Bo1J5h.js").then((m2) => m2.markdown());
42750
+ return import("./index-BLv-1MtR.js").then((m2) => m2.markdown());
42728
42751
  case "xml":
42729
- return import("./index-DDZbXJFy.js").then((m2) => m2.xml());
42752
+ return import("./index-DAq8fRkd.js").then((m2) => m2.xml());
42730
42753
  case "yaml":
42731
- return import("./index-CTIw5jsP.js").then((m2) => m2.yaml());
42754
+ return import("./index-pFRKwTv2.js").then((m2) => m2.yaml());
42732
42755
  case "sql":
42733
- return import("./index-D2pPyR7I.js").then((m2) => m2.sql());
42756
+ return import("./index-D2uLA4oe.js").then((m2) => m2.sql());
42734
42757
  case "rust":
42735
- return import("./index-CWdeYFNF.js").then((m2) => m2.rust());
42758
+ return import("./index-CKPuU6Za.js").then((m2) => m2.rust());
42736
42759
  case "go":
42737
- return import("./index-6TVwGkMb.js").then((m2) => m2.go());
42760
+ return import("./index-Tq3ajWxh.js").then((m2) => m2.go());
42738
42761
  case "java":
42739
- return import("./index-DpTDX5JD.js").then((m2) => m2.java());
42762
+ return import("./index-U3tOcUUV.js").then((m2) => m2.java());
42740
42763
  case "kotlin":
42741
- return import("./index-DpTDX5JD.js").then((m2) => m2.java());
42764
+ return import("./index-U3tOcUUV.js").then((m2) => m2.java());
42742
42765
  case "c":
42743
42766
  case "cpp":
42744
- return import("./index-RnzJqolD.js").then((m2) => m2.cpp());
42767
+ return import("./index-CWr-Kh5M.js").then((m2) => m2.cpp());
42745
42768
  case "php":
42746
- return import("./index-Bdft7sx8.js").then((m2) => m2.php());
42769
+ return import("./index-14dCbIAi.js").then((m2) => m2.php());
42747
42770
  // Legacy modes via StreamLanguage
42748
42771
  case "bash":
42749
42772
  case "fish":
@@ -48707,7 +48730,7 @@ function usePinnedWorkspaces() {
48707
48730
  list2.push({
48708
48731
  project,
48709
48732
  worktree: wt2,
48710
- workspaceId: toWorkspaceId(project.name, wt2.branch)
48733
+ workspaceId: toWorkspaceId(project.name, wt2.name)
48711
48734
  });
48712
48735
  }
48713
48736
  }
@@ -48719,10 +48742,10 @@ function usePinnedWorkspaces() {
48719
48742
  const mutation = useMutation({
48720
48743
  mutationFn: ({
48721
48744
  project,
48722
- branch,
48745
+ name: name2,
48723
48746
  pinned: nextPinned
48724
- }) => adapter2.setWorkspacePinned(project, branch, nextPinned),
48725
- onMutate: async ({ project, branch, pinned: nextPinned }) => {
48747
+ }) => adapter2.setWorkspacePinned(project, name2, nextPinned),
48748
+ onMutate: async ({ project, name: name2, pinned: nextPinned }) => {
48726
48749
  await queryClient2.cancelQueries({ queryKey: queryKeys.projects });
48727
48750
  const previous2 = queryClient2.getQueryData(queryKeys.projects);
48728
48751
  if (previous2) {
@@ -48730,7 +48753,7 @@ function usePinnedWorkspaces() {
48730
48753
  (p2) => p2.name === project ? {
48731
48754
  ...p2,
48732
48755
  worktrees: p2.worktrees.map(
48733
- (w3) => w3.branch === branch ? { ...w3, pinned: nextPinned } : w3
48756
+ (w3) => w3.name === name2 ? { ...w3, pinned: nextPinned } : w3
48734
48757
  )
48735
48758
  } : p2
48736
48759
  );
@@ -48749,7 +48772,7 @@ function usePinnedWorkspaces() {
48749
48772
  }
48750
48773
  });
48751
48774
  const toggle = reactExports.useCallback(
48752
- (project, branch, currentlyPinned) => mutation.mutate({ project, branch, pinned: !currentlyPinned }),
48775
+ (project, name2, currentlyPinned) => mutation.mutate({ project, name: name2, pinned: !currentlyPinned }),
48753
48776
  [mutation.mutate]
48754
48777
  );
48755
48778
  return { pinned, isPinned, toggle };
@@ -49013,7 +49036,7 @@ const WorkspaceCard = reactExports.memo(function WorkspaceCard2({
49013
49036
  const gitPush = useDashboardStore((s2) => s2.gitPush);
49014
49037
  const removeWorkspaceMutation = useRemoveWorkspace();
49015
49038
  const isPinned = worktree.pinned;
49016
- const workspaceId = toWorkspaceId(projectName, worktree.branch);
49039
+ const workspaceId = toWorkspaceId(projectName, worktree.name);
49017
49040
  const isActive = useDashboardStore((s2) => s2.activeWorkspaceId === workspaceId);
49018
49041
  const href = capabilities2.getWorkspaceHref?.(workspaceId);
49019
49042
  reactExports.useEffect(() => {
@@ -49030,7 +49053,7 @@ const WorkspaceCard = reactExports.memo(function WorkspaceCard2({
49030
49053
  openWorkspace(workspaceId);
49031
49054
  }
49032
49055
  };
49033
- const className = `@container group flex flex-row items-center justify-between pl-3 pr-2 py-1 min-h-9 min-w-0 overflow-hidden cursor-pointer select-none touch-manipulation transition-colors hover:bg-accent/50 [@media(pointer:coarse)]:min-h-11 [@media(pointer:coarse)]:py-2 ${isActive ? "border-l-2 border-l-primary" : ""} ${isFocused ? "ring-2 ring-inset ring-ring" : ""} ${href ? "no-underline text-inherit" : ""}`;
49056
+ const className = `@container group flex flex-row items-center justify-between rounded-md pl-3 pr-2 py-1 min-h-9 min-w-0 overflow-hidden cursor-pointer select-none touch-manipulation transition-colors hover:bg-accent/50 [@media(pointer:coarse)]:min-h-11 [@media(pointer:coarse)]:py-2 ${isActive ? "bg-primary/15 hover:bg-primary/15" : isFocused ? "bg-accent" : ""} ${href ? "no-underline text-inherit" : ""}`;
49034
49057
  const containerProps = {
49035
49058
  ref: cardRef,
49036
49059
  className,
@@ -49063,11 +49086,11 @@ const WorkspaceCard = reactExports.memo(function WorkspaceCard2({
49063
49086
  const hasUnpushedCommits = (branchStatus?.git.ahead ?? 0) > 0;
49064
49087
  const handleDelete2 = () => {
49065
49088
  if (!hasUnmergedPR && !isDirty && !hasUnpushedCommits) {
49066
- removeWorkspaceMutation.mutate({ project: projectName, branch: worktree.branch });
49089
+ removeWorkspaceMutation.mutate({ project: projectName, name: worktree.name });
49067
49090
  } else {
49068
49091
  onShowDeleteDialog({
49069
49092
  projectName,
49070
- branch: worktree.branch,
49093
+ name: worktree.name,
49071
49094
  isUnmerged: hasUnmergedPR,
49072
49095
  isDirty,
49073
49096
  hasUnpushedCommits
@@ -49083,11 +49106,11 @@ const WorkspaceCard = reactExports.memo(function WorkspaceCard2({
49083
49106
  "span",
49084
49107
  {
49085
49108
  className: `text-sm truncate ${isActive ? "font-bold text-foreground" : "font-medium text-muted-foreground"}`,
49086
- children: showProjectName ? `${projectName}/${worktree.branch}` : worktree.branch
49109
+ children: showProjectName ? `${projectName}/${worktree.name}` : worktree.name
49087
49110
  }
49088
49111
  )
49089
49112
  ] }) }),
49090
- /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { side: "right", children: `${projectName}/${worktree.branch}` })
49113
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { side: "right", children: `${projectName}/${worktree.name}` })
49091
49114
  ] }),
49092
49115
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "hidden @[10rem]:flex group-hover:flex items-center gap-2 shrink-0 ml-auto pl-2", children: [
49093
49116
  /* @__PURE__ */ jsxRuntimeExports.jsx(SetupStatusIndicator, { setup: setupStatus }),
@@ -49096,7 +49119,7 @@ const WorkspaceCard = reactExports.memo(function WorkspaceCard2({
49096
49119
  ] })
49097
49120
  ] }) }),
49098
49121
  /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuContent, { children: [
49099
- /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => onTogglePinned(projectName, worktree.branch, isPinned), children: [
49122
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => onTogglePinned(projectName, worktree.name, isPinned), children: [
49100
49123
  isPinned ? /* @__PURE__ */ jsxRuntimeExports.jsx(PinOff, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(Pin, {}),
49101
49124
  isPinned ? "Unpin workspace" : "Pin workspace"
49102
49125
  ] }),
@@ -49117,15 +49140,15 @@ const WorkspaceCard = reactExports.memo(function WorkspaceCard2({
49117
49140
  /* @__PURE__ */ jsxRuntimeExports.jsx(Square, {}),
49118
49141
  "Run teardown"
49119
49142
  ] }),
49120
- !isPlain && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => gitPull(projectName, worktree.branch), children: [
49143
+ !isPlain && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => gitPull(projectName, worktree.name), children: [
49121
49144
  /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowDownToLine, {}),
49122
49145
  "Git pull"
49123
49146
  ] }),
49124
- !isPlain && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => gitPush(projectName, worktree.branch), children: [
49147
+ !isPlain && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { onClick: () => gitPush(projectName, worktree.name), children: [
49125
49148
  /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowUpFromLine, {}),
49126
49149
  "Git push"
49127
49150
  ] }),
49128
- !isPlain && worktree.branch !== defaultBranch && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { variant: "destructive", onClick: handleDelete2, children: [
49151
+ !isPlain && worktree.name !== defaultBranch && /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenuItem, { variant: "destructive", onClick: handleDelete2, children: [
49129
49152
  /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, {}),
49130
49153
  "Delete workspace"
49131
49154
  ] })
@@ -49165,8 +49188,8 @@ function SortableProject({
49165
49188
  };
49166
49189
  const openWorkspace = useDashboardStore((s2) => s2.openWorkspace);
49167
49190
  const clearNeedsAttention = useDashboardStore((s2) => s2.clearNeedsAttention);
49168
- const plainBranch = isPlain ? project.worktrees[0].branch : "";
49169
- const plainWorkspaceId = isPlain ? toWorkspaceId(project.name, plainBranch) : "";
49191
+ const plainName = isPlain ? project.worktrees[0].name : "";
49192
+ const plainWorkspaceId = isPlain ? toWorkspaceId(project.name, plainName) : "";
49170
49193
  const plainIsActive = useDashboardStore(
49171
49194
  (s2) => isPlain && s2.activeWorkspaceId === plainWorkspaceId
49172
49195
  );
@@ -49175,7 +49198,7 @@ function SortableProject({
49175
49198
  const plainIsFocused = isPlain && workspaceIndexStart === focusedIndex;
49176
49199
  const activeWorkspaceId = useDashboardStore((s2) => s2.activeWorkspaceId);
49177
49200
  const gitHeaderIsActive = reactExports.useMemo(
49178
- () => !isPlain && project.worktrees.some((wt2) => toWorkspaceId(project.name, wt2.branch) === activeWorkspaceId),
49201
+ () => !isPlain && project.worktrees.some((wt2) => toWorkspaceId(project.name, wt2.name) === activeWorkspaceId),
49179
49202
  [isPlain, project.worktrees, project.name, activeWorkspaceId]
49180
49203
  );
49181
49204
  const handlePlainOpen = () => {
@@ -49187,7 +49210,7 @@ function SortableProject({
49187
49210
  }
49188
49211
  };
49189
49212
  let workspaceIndex = workspaceIndexStart;
49190
- const headerClassName = isPlain ? `group flex items-center justify-between mb-0.5 pl-1 pr-1 py-1.5 min-w-0 overflow-hidden cursor-pointer select-none touch-pan-y transition-colors hover:bg-accent/50 [@media(pointer:coarse)]:min-h-11 [@media(pointer:coarse)]:py-2.5 ${plainIsActive ? "bg-primary/15 hover:bg-primary/15 border-l-2 border-l-primary" : ""} ${plainIsFocused ? "ring-2 ring-inset ring-ring" : ""}` : `group flex items-center justify-between mb-0.5 pl-1 pr-0 rounded select-none touch-pan-y transition-colors hover:bg-accent/50 [@media(pointer:coarse)]:min-h-11 ${gitHeaderIsActive ? "bg-primary/15 hover:bg-primary/15 border-l-2 border-l-primary" : ""}`;
49213
+ const headerClassName = isPlain ? `group flex items-center justify-between mb-0.5 rounded-md pl-1 pr-1 py-1.5 min-w-0 overflow-hidden cursor-pointer select-none touch-pan-y transition-colors hover:bg-accent/50 [@media(pointer:coarse)]:min-h-11 [@media(pointer:coarse)]:py-2.5 ${plainIsActive ? "bg-primary/15 hover:bg-primary/15" : plainIsFocused ? "bg-accent" : ""}` : `group flex items-center justify-between mb-0.5 pl-1 pr-0 rounded select-none touch-pan-y transition-colors hover:bg-accent/50 [@media(pointer:coarse)]:min-h-11`;
49191
49214
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: setNodeRef, style: style2, className: "min-w-0 px-2", children: [
49192
49215
  /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { children: [
49193
49216
  /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -49316,12 +49339,11 @@ function SortableProject({
49316
49339
  ] })
49317
49340
  ] })
49318
49341
  ] }),
49319
- !isPlain && !collapsed && // `ml-3 border-l` draws a thin tree rail down the left of the branch
49320
- // list so the workspaces read as children of the project header above,
49321
- // not as sibling rows. The header sits at `pl-1`; the rail lands just
49322
- // under its folder icon so the hierarchy is obvious at a glance.
49323
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-0.5 overflow-hidden ml-3 border-l border-border/50", children: project.worktrees.length === 0 ? hasPinnedSiblings ? null : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground px-4 py-2", children: "No workspaces yet" }) : project.worktrees.map((wt2) => {
49324
- const wsId = toWorkspaceId(project.name, wt2.branch);
49342
+ !isPlain && !collapsed && // `ml-3` indents the branch list so the workspaces read as children of
49343
+ // the project header above, not as sibling rows. The indentation alone
49344
+ // (no divider rail) conveys the hierarchy, keeping the list uncluttered.
49345
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-0.5 overflow-hidden ml-3", children: project.worktrees.length === 0 ? hasPinnedSiblings ? null : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground px-4 py-2", children: "No workspaces yet" }) : project.worktrees.map((wt2) => {
49346
+ const wsId = toWorkspaceId(project.name, wt2.name);
49325
49347
  const currentIndex = workspaceIndex++;
49326
49348
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
49327
49349
  WorkspaceCard,
@@ -49337,7 +49359,7 @@ function SortableProject({
49337
49359
  onShowDeleteDialog,
49338
49360
  onTogglePinned
49339
49361
  },
49340
- wt2.branch
49362
+ wt2.name
49341
49363
  );
49342
49364
  }) })
49343
49365
  ] });
@@ -49351,7 +49373,7 @@ function DroppableLabelHeader({ labelId, label, collapsed, onToggle }) {
49351
49373
  ref: setNodeRef,
49352
49374
  onClick: onToggle,
49353
49375
  "aria-expanded": !collapsed,
49354
- className: `flex h-9 w-full items-center gap-2 pl-3 pr-4 mb-0.5 text-left transition-colors hover:bg-primary/10 ${isOver ? "bg-primary/20" : "bg-accent"}`,
49376
+ className: `flex h-9 w-full items-center gap-2 pl-3 pr-4 mb-0.5 text-left transition-colors hover:bg-primary/10 ${isOver ? "bg-primary/20" : ""}`,
49355
49377
  children: [
49356
49378
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "size-2.5 rounded-full shrink-0", style: { backgroundColor: label.color } }),
49357
49379
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-semibold text-foreground/80", children: label.name }),
@@ -49374,7 +49396,7 @@ function DroppableUnlabeledHeader({ collapsed, onToggle }) {
49374
49396
  ref: setNodeRef,
49375
49397
  onClick: onToggle,
49376
49398
  "aria-expanded": !collapsed,
49377
- className: `flex h-9 w-full items-center gap-2 pl-3 pr-4 mb-0.5 text-left transition-colors hover:bg-primary/10 ${isOver ? "bg-primary/20" : "bg-accent"}`,
49399
+ className: `flex h-9 w-full items-center gap-2 pl-3 pr-4 mb-0.5 text-left transition-colors hover:bg-primary/10 ${isOver ? "bg-primary/20" : ""}`,
49378
49400
  children: [
49379
49401
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-semibold text-foreground/80", children: "Unlabeled" }),
49380
49402
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -49473,7 +49495,7 @@ function ProjectList({ labelFilter }) {
49473
49495
  if (headerVisible && labelCollapse.isCollapsed(groupKey)) return [];
49474
49496
  return g2.projects.flatMap((p2) => {
49475
49497
  if (projectCollapse.isCollapsed(p2.name)) return [];
49476
- return p2.worktrees.map((wt2) => toWorkspaceId(p2.name, wt2.branch));
49498
+ return p2.worktrees.map((wt2) => toWorkspaceId(p2.name, wt2.name));
49477
49499
  });
49478
49500
  });
49479
49501
  return [...pinnedPart, ...rest];
@@ -49533,7 +49555,7 @@ function ProjectList({ labelFilter }) {
49533
49555
  for (const group of groups) {
49534
49556
  for (const project of group.projects) {
49535
49557
  const containsActive = project.worktrees.some(
49536
- (wt2) => toWorkspaceId(project.name, wt2.branch) === activeWorkspaceId
49558
+ (wt2) => toWorkspaceId(project.name, wt2.name) === activeWorkspaceId
49537
49559
  );
49538
49560
  if (!containsActive) continue;
49539
49561
  if (labelFilter && group.labelId !== labelFilter) return;
@@ -49651,7 +49673,7 @@ function ProjectList({ labelFilter }) {
49651
49673
  type: "button",
49652
49674
  onClick: () => pinnedCollapse.toggle(PINNED_SECTION_ID),
49653
49675
  "aria-expanded": !pinnedSectionCollapsed,
49654
- className: "flex h-9 w-full items-center gap-2 pl-3 pr-4 mb-0.5 text-left transition-colors hover:bg-primary/10 bg-accent",
49676
+ className: "flex h-9 w-full items-center gap-2 pl-3 pr-4 mb-0.5 text-left transition-colors hover:bg-primary/10",
49655
49677
  children: [
49656
49678
  /* @__PURE__ */ jsxRuntimeExports.jsx(Pin, { className: "size-3.5 -rotate-45 text-muted-foreground" }),
49657
49679
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-semibold text-foreground/80", children: "Pinned" }),
@@ -49711,38 +49733,30 @@ function ProjectList({ labelFilter }) {
49711
49733
  }
49712
49734
  )),
49713
49735
  !groupCollapsed && group.projects.map((project) => (
49714
- // Thin divider between consecutive projects in a label
49715
- // group (skipped on the first row, which sits flush under
49716
- // the label header) so project blocks are visually
49717
- // separated without a heavy border.
49718
- /* @__PURE__ */ jsxRuntimeExports.jsx(
49719
- "div",
49736
+ // Consecutive projects in a label group are separated by
49737
+ // spacing alone (no divider line); the first row sits
49738
+ // flush under the label header.
49739
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "pt-1 first:pt-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
49740
+ SortableProject,
49720
49741
  {
49721
- className: "border-border/40 pt-1 first:pt-0 not-first:border-t",
49722
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
49723
- SortableProject,
49724
- {
49725
- project,
49726
- statuses,
49727
- branchStatuses,
49728
- setupStatuses,
49729
- removeProject: (name2) => removeProjectMutation.mutate(name2),
49730
- updateProjectLabel: (name2, label) => updateProjectLabelMutation.mutate({ name: name2, label }),
49731
- onPromoteToGit: setPromoteDialog,
49732
- labels,
49733
- setWorkspaceDialog,
49734
- onShowDeleteDialog: setDeleteDialog,
49735
- focusedIndex,
49736
- workspaceIndexStart: workspaceIndexMap.get(project.name) ?? 0,
49737
- collapsed: projectCollapse.isCollapsed(project.name),
49738
- onToggleCollapse: projectCollapse.toggle,
49739
- hasPinnedSiblings: projectsWithPinned.has(project.name),
49740
- onTogglePinned: togglePinned
49741
- }
49742
- )
49743
- },
49744
- project.name
49745
- )
49742
+ project,
49743
+ statuses,
49744
+ branchStatuses,
49745
+ setupStatuses,
49746
+ removeProject: (name2) => removeProjectMutation.mutate(name2),
49747
+ updateProjectLabel: (name2, label) => updateProjectLabelMutation.mutate({ name: name2, label }),
49748
+ onPromoteToGit: setPromoteDialog,
49749
+ labels,
49750
+ setWorkspaceDialog,
49751
+ onShowDeleteDialog: setDeleteDialog,
49752
+ focusedIndex,
49753
+ workspaceIndexStart: workspaceIndexMap.get(project.name) ?? 0,
49754
+ collapsed: projectCollapse.isCollapsed(project.name),
49755
+ onToggleCollapse: projectCollapse.toggle,
49756
+ hasPinnedSiblings: projectsWithPinned.has(project.name),
49757
+ onTogglePinned: togglePinned
49758
+ }
49759
+ ) }, project.name)
49746
49760
  ))
49747
49761
  ] }, groupKey);
49748
49762
  }) }),
@@ -49775,12 +49789,12 @@ function ProjectList({ labelFilter }) {
49775
49789
  if (deleteDialog) {
49776
49790
  removeWorkspaceMutation.mutate({
49777
49791
  project: deleteDialog.projectName,
49778
- branch: deleteDialog.branch
49792
+ name: deleteDialog.name
49779
49793
  });
49780
49794
  setDeleteDialog(null);
49781
49795
  }
49782
49796
  },
49783
- branchName: deleteDialog?.branch ?? "",
49797
+ branchName: deleteDialog?.name ?? "",
49784
49798
  isUnmerged: deleteDialog?.isUnmerged ?? false,
49785
49799
  isDirty: deleteDialog?.isDirty ?? false,
49786
49800
  hasUnpushedCommits: deleteDialog?.hasUnpushedCommits ?? false
@@ -50231,16 +50245,8 @@ function SettingsPage({ open: open2, onOpenChange }) {
50231
50245
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Dialog, { open: open2, onOpenChange, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
50232
50246
  DialogContent,
50233
50247
  {
50234
- className: (
50235
- // Mobile: take the full viewport — no margin, no rounded corners,
50236
- // top-anchored so the address-bar doesn't clip the footer.
50237
- // Desktop (sm+): float as a centered, capped-width card.
50238
- [
50239
- "inset-0 left-0 top-0 h-dvh w-full max-w-none translate-x-0 translate-y-0 rounded-none",
50240
- "sm:inset-auto sm:top-[50%] sm:left-[50%] sm:h-[80vh] sm:w-full sm:max-w-2xl sm:translate-x-[-50%] sm:translate-y-[-50%] sm:rounded-lg",
50241
- "overflow-hidden p-0 flex flex-col gap-0"
50242
- ].join(" ")
50243
- ),
50248
+ variant: "bottom-sheet",
50249
+ className: "flex flex-col gap-0 overflow-hidden p-0 lg:h-[80vh] lg:max-w-2xl",
50244
50250
  children: [
50245
50251
  /* @__PURE__ */ jsxRuntimeExports.jsx(DialogHeader, { className: "px-6 pt-6 pb-4 shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(DialogTitle, { children: "Settings" }) }),
50246
50252
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-6 px-6 pb-6", children: [
@@ -50880,7 +50886,7 @@ async function desktopInvoke$1(cmd2, args) {
50880
50886
  if (bridge) return await bridge.invoke(cmd2, args);
50881
50887
  throw new Error(`desktopInvoke('${cmd2}') called outside the desktop shell`);
50882
50888
  }
50883
- function DashboardShell({ toolbarMenuItems, hideTitleBar, hideMenu }) {
50889
+ function DashboardShell({ bottomActions, hideTitleBar }) {
50884
50890
  const { projects, isLoading: loading } = useProjects();
50885
50891
  const { settings } = useSettingsQuery();
50886
50892
  const labels = settings.labels ?? [];
@@ -50920,7 +50926,7 @@ function DashboardShell({ toolbarMenuItems, hideTitleBar, hideMenu }) {
50920
50926
  );
50921
50927
  const findProjectForWorkspace = reactExports.useCallback(
50922
50928
  (workspaceId) => projects.find(
50923
- (p2) => p2.worktrees.some((wt2) => toWorkspaceId(p2.name, wt2.branch) === workspaceId)
50929
+ (p2) => p2.worktrees.some((wt2) => toWorkspaceId(p2.name, wt2.name) === workspaceId)
50924
50930
  ),
50925
50931
  [projects]
50926
50932
  );
@@ -51042,93 +51048,68 @@ function DashboardShell({ toolbarMenuItems, hideTitleBar, hideMenu }) {
51042
51048
  }
51043
51049
  ),
51044
51050
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-9 shrink-0 items-center justify-between border-b border-border", children: [
51045
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex min-w-0 items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1 pl-2", children: [
51046
- !hideMenu && /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenu, { children: [
51047
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip$1, { children: [
51048
- /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
51049
- Button,
51050
- {
51051
- size: "icon-sm",
51052
- variant: "ghost",
51053
- className: "text-muted-foreground",
51054
- "aria-label": "Menu",
51055
- "data-testid": "dashboard__menu-trigger",
51056
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Menu$1, { className: "size-5" })
51057
- }
51058
- ) }) }),
51059
- /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { side: "bottom", children: "More" })
51060
- ] }),
51061
- /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenuContent, { align: "start", children: [
51062
- toolbarMenuItems,
51063
- /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenuItem, { onClick: handleSettingsClick, children: [
51064
- /* @__PURE__ */ jsxRuntimeExports.jsx(Settings$1, { className: "size-4" }),
51065
- "Settings"
51051
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex min-w-0 items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-1 pl-2", children: labels.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenu, { children: [
51052
+ /* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
51053
+ Button,
51054
+ {
51055
+ size: "sm",
51056
+ variant: "ghost",
51057
+ "data-testid": "dashboard__label-filter-trigger",
51058
+ className: `min-w-0 text-sm h-7 px-2 gap-1.5 ${labelFilter ? "bg-accent text-accent-foreground" : "text-muted-foreground"}`,
51059
+ children: activeLabel ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
51060
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
51061
+ "span",
51062
+ {
51063
+ className: "size-2.5 rounded-full shrink-0",
51064
+ style: { backgroundColor: activeLabel.color }
51065
+ }
51066
+ ),
51067
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: activeLabel.name })
51068
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
51069
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tag$1, { className: "size-3.5 shrink-0" }),
51070
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: "All" })
51066
51071
  ] })
51067
- ] })
51068
- ] }),
51069
- labels.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenu, { children: [
51070
- /* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
51071
- Button,
51072
+ }
51073
+ ) }),
51074
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenuContent, { align: "start", children: [
51075
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
51076
+ DropdownMenuItem,
51072
51077
  {
51073
- size: "sm",
51074
- variant: "ghost",
51075
- "data-testid": "dashboard__label-filter-trigger",
51076
- className: `min-w-0 text-sm h-7 px-2 gap-1.5 ${labelFilter ? "bg-accent text-accent-foreground" : "text-muted-foreground"}`,
51077
- children: activeLabel ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
51078
+ "data-testid": "dashboard__label-filter-item--all",
51079
+ onClick: () => setLabelFilter(null),
51080
+ children: [
51081
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tag$1, { className: "size-3.5 shrink-0 mr-2 text-muted-foreground" }),
51082
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: "All" }),
51083
+ !labelFilter && /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3 ml-2 shrink-0" }),
51084
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-auto pl-3 text-xs text-muted-foreground tracking-widest", children: "⌘0" })
51085
+ ]
51086
+ }
51087
+ ),
51088
+ labels.map((lbl, idx) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
51089
+ DropdownMenuItem,
51090
+ {
51091
+ "data-testid": `dashboard__label-filter-item--${lbl.id}`,
51092
+ onClick: () => setLabelFilter(lbl.id),
51093
+ children: [
51078
51094
  /* @__PURE__ */ jsxRuntimeExports.jsx(
51079
51095
  "span",
51080
51096
  {
51081
- className: "size-2.5 rounded-full shrink-0",
51082
- style: { backgroundColor: activeLabel.color }
51097
+ className: "size-2.5 rounded-full shrink-0 mr-2",
51098
+ style: { backgroundColor: lbl.color }
51083
51099
  }
51084
51100
  ),
51085
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: activeLabel.name })
51086
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
51087
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tag$1, { className: "size-3.5 shrink-0" }),
51088
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: "All" })
51089
- ] })
51090
- }
51091
- ) }),
51092
- /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenuContent, { align: "start", children: [
51093
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
51094
- DropdownMenuItem,
51095
- {
51096
- "data-testid": "dashboard__label-filter-item--all",
51097
- onClick: () => setLabelFilter(null),
51098
- children: [
51099
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tag$1, { className: "size-3.5 shrink-0 mr-2 text-muted-foreground" }),
51100
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: "All" }),
51101
- !labelFilter && /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3 ml-2 shrink-0" }),
51102
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-auto pl-3 text-xs text-muted-foreground tracking-widest", children: "⌘0" })
51103
- ]
51104
- }
51105
- ),
51106
- labels.map((lbl, idx) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
51107
- DropdownMenuItem,
51108
- {
51109
- "data-testid": `dashboard__label-filter-item--${lbl.id}`,
51110
- onClick: () => setLabelFilter(lbl.id),
51111
- children: [
51112
- /* @__PURE__ */ jsxRuntimeExports.jsx(
51113
- "span",
51114
- {
51115
- className: "size-2.5 rounded-full shrink-0 mr-2",
51116
- style: { backgroundColor: lbl.color }
51117
- }
51118
- ),
51119
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: lbl.name }),
51120
- labelFilter === lbl.id && /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3 ml-2 shrink-0" }),
51121
- idx < 9 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "ml-auto pl-3 text-xs text-muted-foreground tracking-widest", children: [
51122
- "⌘",
51123
- idx + 1
51124
- ] })
51125
- ]
51126
- },
51127
- lbl.id
51128
- ))
51129
- ] })
51101
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: lbl.name }),
51102
+ labelFilter === lbl.id && /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3 ml-2 shrink-0" }),
51103
+ idx < 9 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "ml-auto pl-3 text-xs text-muted-foreground tracking-widest", children: [
51104
+ "⌘",
51105
+ idx + 1
51106
+ ] })
51107
+ ]
51108
+ },
51109
+ lbl.id
51110
+ ))
51130
51111
  ] })
51131
- ] }) }),
51112
+ ] }) }) }),
51132
51113
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1 pr-2", children: [
51133
51114
  projects.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip$1, { children: [
51134
51115
  /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -51225,6 +51206,30 @@ function DashboardShell({ toolbarMenuItems, hideTitleBar, hideMenu }) {
51225
51206
  }
51226
51207
  )
51227
51208
  ] }),
51209
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
51210
+ "div",
51211
+ {
51212
+ className: "shrink-0 flex h-9 items-center justify-between gap-1 border-t border-border px-2",
51213
+ "data-testid": "project-list__action-bar",
51214
+ children: [
51215
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
51216
+ Button,
51217
+ {
51218
+ size: "sm",
51219
+ variant: "ghost",
51220
+ className: "text-muted-foreground",
51221
+ "data-testid": "project-list__settings-button",
51222
+ onClick: handleSettingsClick,
51223
+ children: [
51224
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Settings$1, { className: "size-4" }),
51225
+ "Settings"
51226
+ ]
51227
+ }
51228
+ ),
51229
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-0.5", children: bottomActions })
51230
+ ]
51231
+ }
51232
+ ),
51228
51233
  /* @__PURE__ */ jsxRuntimeExports.jsx(Dialog, { open: showErrorDialog, onOpenChange: setShowErrorDialog, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogContent, { children: [
51229
51234
  /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogHeader, { children: [
51230
51235
  /* @__PURE__ */ jsxRuntimeExports.jsx(DialogTitle, { className: "text-destructive", children: "Error" }),
@@ -52890,7 +52895,7 @@ function useProjectKindMap() {
52890
52895
  const map2 = /* @__PURE__ */ new Map();
52891
52896
  for (const p2 of projects) {
52892
52897
  for (const wt2 of p2.worktrees) {
52893
- map2.set(toWorkspaceId(p2.name, wt2.branch), p2.kind);
52898
+ map2.set(toWorkspaceId(p2.name, wt2.name), p2.kind);
52894
52899
  }
52895
52900
  }
52896
52901
  return map2;
@@ -53022,7 +53027,7 @@ function useWorkspacePath(workspaceId) {
53022
53027
  return reactExports.useMemo(() => {
53023
53028
  for (const proj of projects) {
53024
53029
  for (const wt2 of proj.worktrees) {
53025
- if (toWorkspaceId(proj.name, wt2.branch) === workspaceId) {
53030
+ if (toWorkspaceId(proj.name, wt2.name) === workspaceId) {
53026
53031
  return wt2.path;
53027
53032
  }
53028
53033
  }
@@ -57085,81 +57090,91 @@ function LazyFileRow({
57085
57090
  fileStatus: status
57086
57091
  }
57087
57092
  ),
57088
- isOpen && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "border-t border-border/20 bg-muted/30", children: [
57089
- diffError && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-4 py-4 text-sm text-destructive", children: diffError }),
57090
- diff2 !== null && (shouldRender ? (
57091
- // Wrapper is observed by the ResizeObserver in the effect
57092
- // above. Its rendered height — "Show full file" bar plus the
57093
- // CodeMirror editor — is reported back as
57094
- // `measuredHeight`, then reused verbatim as the placeholder
57095
- // height on the next unmount cycle (a never-visited row or
57096
- // an LRU-evicted one).
57097
- //
57098
- // The `minHeight` hold prevents a layout shift during the
57099
- // window between (a) `shouldRender` flipping to true and
57100
- // (b) the editor's async `setup` finishing (loadLanguage
57101
- // await + new MergeView() + first paint). Without it the
57102
- // wrapper is empty-auto-height for that window, collapsing
57103
- // the row to the "Show full file" bar (~30px) and pushing
57104
- // every row below it upward; when the editor paints they
57105
- // snap back down. We pin the wrapper to the
57106
- // cached/estimated height (the same value the placeholder
57107
- // uses) until `editorRendered` flips, then let the
57108
- // editor's natural height take over. The ResizeObserver
57109
- // only attaches once `editorRendered` is true (see deps
57110
- // above), so the held value never bleeds into the
57111
- // measuredHeight cache.
57112
- //
57113
- // Mount-once: once `shouldRender` flips true, it stays
57114
- // true across scroll-aways. The editor's natural height
57115
- // remains in the layout — the row stays the same size
57116
- // whether the user is currently looking at it or
57117
- // scrolled past — so there's no scroll-shift trade-off
57118
- // to manage. The browser handles culling offscreen tiles
57119
- // cheaply; the only thing that brings `shouldRender`
57120
- // back to false is collapse / LRU eviction / target
57121
- // change, all of which deliberately tear the editor
57122
- // down.
57123
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
57124
- "div",
57125
- {
57126
- ref: diffBodyRef,
57127
- style: editorRendered ? void 0 : { minHeight: placeholderHeight },
57128
- children: [
57129
- canLoadMore && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center border-b border-border/20 px-4 py-1.5", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
57130
- "button",
57131
- {
57132
- type: "button",
57133
- onClick: () => onShowFullFile(filename),
57134
- className: "text-xs text-muted-foreground transition-colors hover:text-foreground",
57135
- children: "Show full file"
57136
- }
57137
- ) }),
57138
- /* @__PURE__ */ jsxRuntimeExports.jsx(
57139
- DiffFileContent,
57140
- {
57141
- hunks: diff2,
57142
- filename,
57143
- viewMode,
57144
- onEditorViews: handleEditorViews,
57145
- onLoadMoreContext: canLoadMore ? () => onLoadMoreContext(filename) : void 0
57146
- }
57147
- )
57148
- ]
57149
- }
57150
- )
57151
- ) : (
57152
- // Placeholder occupying the SAME pixel height the CodeMirror
57153
- // editor would render at, so the row's overall size doesn't
57154
- // change when LRU eviction tears the editor down (or while
57155
- // a never-visited row waits for its first IO intersect).
57156
- // Without this, switching the body between editor and
57157
- // placeholder would push everything below upward —
57158
- // visually identical to a layout shift, even though no
57159
- // content actually moved.
57160
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { "aria-hidden": true, style: { height: placeholderHeight } })
57161
- ))
57162
- ] })
57093
+ isOpen && /* @__PURE__ */ jsxRuntimeExports.jsxs(
57094
+ "div",
57095
+ {
57096
+ className: "border-t border-border/20 bg-muted/30",
57097
+ style: placeholderHeight > 0 ? {
57098
+ contentVisibility: "auto",
57099
+ containIntrinsicBlockSize: `${placeholderHeight}px`
57100
+ } : void 0,
57101
+ children: [
57102
+ diffError && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-4 py-4 text-sm text-destructive", children: diffError }),
57103
+ diff2 !== null && (shouldRender ? (
57104
+ // Wrapper is observed by the ResizeObserver in the effect
57105
+ // above. Its rendered height — "Show full file" bar plus the
57106
+ // CodeMirror editor — is reported back as
57107
+ // `measuredHeight`, then reused verbatim as the placeholder
57108
+ // height on the next unmount cycle (a never-visited row or
57109
+ // an LRU-evicted one).
57110
+ //
57111
+ // The `minHeight` hold prevents a layout shift during the
57112
+ // window between (a) `shouldRender` flipping to true and
57113
+ // (b) the editor's async `setup` finishing (loadLanguage
57114
+ // await + new MergeView() + first paint). Without it the
57115
+ // wrapper is empty-auto-height for that window, collapsing
57116
+ // the row to the "Show full file" bar (~30px) and pushing
57117
+ // every row below it upward; when the editor paints they
57118
+ // snap back down. We pin the wrapper to the
57119
+ // cached/estimated height (the same value the placeholder
57120
+ // uses) until `editorRendered` flips, then let the
57121
+ // editor's natural height take over. The ResizeObserver
57122
+ // only attaches once `editorRendered` is true (see deps
57123
+ // above), so the held value never bleeds into the
57124
+ // measuredHeight cache.
57125
+ //
57126
+ // Mount-once: once `shouldRender` flips true, it stays
57127
+ // true across scroll-aways. The editor's natural height
57128
+ // remains in the layout — the row stays the same size
57129
+ // whether the user is currently looking at it or
57130
+ // scrolled past — so there's no scroll-shift trade-off
57131
+ // to manage. The browser handles culling offscreen tiles
57132
+ // cheaply; the only thing that brings `shouldRender`
57133
+ // back to false is collapse / LRU eviction / target
57134
+ // change, all of which deliberately tear the editor
57135
+ // down.
57136
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
57137
+ "div",
57138
+ {
57139
+ ref: diffBodyRef,
57140
+ style: editorRendered ? void 0 : { minHeight: placeholderHeight },
57141
+ children: [
57142
+ canLoadMore && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center border-b border-border/20 px-4 py-1.5", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
57143
+ "button",
57144
+ {
57145
+ type: "button",
57146
+ onClick: () => onShowFullFile(filename),
57147
+ className: "text-xs text-muted-foreground transition-colors hover:text-foreground",
57148
+ children: "Show full file"
57149
+ }
57150
+ ) }),
57151
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
57152
+ DiffFileContent,
57153
+ {
57154
+ hunks: diff2,
57155
+ filename,
57156
+ viewMode,
57157
+ onEditorViews: handleEditorViews,
57158
+ onLoadMoreContext: canLoadMore ? () => onLoadMoreContext(filename) : void 0
57159
+ }
57160
+ )
57161
+ ]
57162
+ }
57163
+ )
57164
+ ) : (
57165
+ // Placeholder occupying the SAME pixel height the CodeMirror
57166
+ // editor would render at, so the row's overall size doesn't
57167
+ // change when LRU eviction tears the editor down (or while
57168
+ // a never-visited row waits for its first IO intersect).
57169
+ // Without this, switching the body between editor and
57170
+ // placeholder would push everything below upward —
57171
+ // visually identical to a layout shift, even though no
57172
+ // content actually moved.
57173
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { "aria-hidden": true, style: { height: placeholderHeight } })
57174
+ ))
57175
+ ]
57176
+ }
57177
+ )
57163
57178
  ]
57164
57179
  }
57165
57180
  );
@@ -60174,7 +60189,8 @@ function QuickOpenDialog({
60174
60189
  DialogContent,
60175
60190
  {
60176
60191
  "data-testid": "quick-open__root",
60177
- className: "overflow-hidden p-0 sm:max-w-[520px]",
60192
+ variant: "bottom-sheet",
60193
+ className: "overflow-hidden p-0 lg:max-w-[520px]",
60178
60194
  showCloseButton: false,
60179
60195
  children: [
60180
60196
  /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogHeader, { className: "sr-only", children: [
@@ -60321,62 +60337,71 @@ function SearchFilesDialog({
60321
60337
  [onOpenFile, onOpenChange]
60322
60338
  );
60323
60339
  const totalMatches = results.length;
60324
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Dialog, { open: open2, onOpenChange, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogContent, { className: "overflow-hidden p-0 sm:max-w-[640px]", showCloseButton: false, children: [
60325
- /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogHeader, { className: "sr-only", children: [
60326
- /* @__PURE__ */ jsxRuntimeExports.jsx(DialogTitle, { children: "Search in Files" }),
60327
- /* @__PURE__ */ jsxRuntimeExports.jsx(DialogDescription, { children: "Text search across workspace files" })
60328
- ] }),
60329
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Command, { shouldFilter: false, value: selectedValue, onValueChange: setSelectedValue, children: [
60330
- /* @__PURE__ */ jsxRuntimeExports.jsx(
60331
- SearchBar,
60332
- {
60333
- ref: searchBarRef,
60334
- query,
60335
- onQueryChange: setQuery,
60336
- options: searchOptions,
60337
- onOptionsChange: setSearchOptions,
60338
- placeholder: "Search in files..."
60339
- }
60340
- ),
60341
- /* @__PURE__ */ jsxRuntimeExports.jsxs(CommandList, { className: "max-h-[400px]", children: [
60342
- /* @__PURE__ */ jsxRuntimeExports.jsx(CommandEmpty, { children: loading ? "Searching..." : query.length < 2 ? "Type at least 2 characters to search." : "No results found." }),
60343
- grouped.map(([file2, matches2]) => {
60344
- const FileIcon = getFileIcon(file2);
60345
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
60346
- CommandGroup,
60340
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Dialog, { open: open2, onOpenChange, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
60341
+ DialogContent,
60342
+ {
60343
+ "data-testid": "search-files__root",
60344
+ variant: "bottom-sheet",
60345
+ className: "overflow-hidden p-0 lg:max-w-[640px]",
60346
+ showCloseButton: false,
60347
+ children: [
60348
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogHeader, { className: "sr-only", children: [
60349
+ /* @__PURE__ */ jsxRuntimeExports.jsx(DialogTitle, { children: "Search in Files" }),
60350
+ /* @__PURE__ */ jsxRuntimeExports.jsx(DialogDescription, { children: "Text search across workspace files" })
60351
+ ] }),
60352
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Command, { shouldFilter: false, value: selectedValue, onValueChange: setSelectedValue, children: [
60353
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
60354
+ SearchBar,
60347
60355
  {
60348
- heading: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "inline-flex items-center gap-1.5", children: [
60349
- /* @__PURE__ */ jsxRuntimeExports.jsx(FileIcon, { className: "size-3" }),
60350
- file2
60351
- ] }),
60352
- children: matches2.map((match) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
60353
- CommandItem,
60356
+ ref: searchBarRef,
60357
+ query,
60358
+ onQueryChange: setQuery,
60359
+ options: searchOptions,
60360
+ onOptionsChange: setSearchOptions,
60361
+ placeholder: "Search in files..."
60362
+ }
60363
+ ),
60364
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(CommandList, { className: "max-h-[400px]", children: [
60365
+ /* @__PURE__ */ jsxRuntimeExports.jsx(CommandEmpty, { children: loading ? "Searching..." : query.length < 2 ? "Type at least 2 characters to search." : "No results found." }),
60366
+ grouped.map(([file2, matches2]) => {
60367
+ const FileIcon = getFileIcon(file2);
60368
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
60369
+ CommandGroup,
60354
60370
  {
60355
- value: `${file2}:${match.line}:${match.content}`,
60356
- onSelect: () => handleSelect(file2, match.line),
60357
- children: [
60358
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-8 shrink-0 text-right font-mono text-xs text-muted-foreground", children: match.line }),
60359
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "min-w-0 truncate font-mono text-xs", children: match.content })
60360
- ]
60371
+ heading: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "inline-flex items-center gap-1.5", children: [
60372
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FileIcon, { className: "size-3" }),
60373
+ file2
60374
+ ] }),
60375
+ children: matches2.map((match) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
60376
+ CommandItem,
60377
+ {
60378
+ value: `${file2}:${match.line}:${match.content}`,
60379
+ onSelect: () => handleSelect(file2, match.line),
60380
+ children: [
60381
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-8 shrink-0 text-right font-mono text-xs text-muted-foreground", children: match.line }),
60382
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "min-w-0 truncate font-mono text-xs", children: match.content })
60383
+ ]
60384
+ },
60385
+ `${file2}:${match.line}:${match.content}`
60386
+ ))
60361
60387
  },
60362
- `${file2}:${match.line}:${match.content}`
60363
- ))
60364
- },
60365
- file2
60366
- );
60367
- })
60368
- ] }),
60369
- totalMatches > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "border-t px-3 py-1.5 text-xs text-muted-foreground", children: [
60370
- totalMatches,
60371
- " result",
60372
- totalMatches !== 1 ? "s" : "",
60373
- " in ",
60374
- grouped.length,
60375
- " file",
60376
- grouped.length !== 1 ? "s" : ""
60377
- ] })
60378
- ] })
60379
- ] }) });
60388
+ file2
60389
+ );
60390
+ })
60391
+ ] }),
60392
+ totalMatches > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "border-t px-3 py-1.5 text-xs text-muted-foreground", children: [
60393
+ totalMatches,
60394
+ " result",
60395
+ totalMatches !== 1 ? "s" : "",
60396
+ " in ",
60397
+ grouped.length,
60398
+ " file",
60399
+ grouped.length !== 1 ? "s" : ""
60400
+ ] })
60401
+ ] })
60402
+ ]
60403
+ }
60404
+ ) });
60380
60405
  }
60381
60406
  const STORAGE_KEY = "band-recent-workspaces";
60382
60407
  const MAX_ENTRIES = 50;
@@ -60422,10 +60447,11 @@ function WorkspacePickerDialog({ open: open2, onOpenChange }) {
60422
60447
  const entries2 = [];
60423
60448
  for (const project of projects) {
60424
60449
  for (const worktree of project.worktrees) {
60425
- const workspaceId = toWorkspaceId(project.name, worktree.branch);
60450
+ const workspaceId = toWorkspaceId(project.name, worktree.name);
60426
60451
  entries2.push({
60427
60452
  workspaceId,
60428
60453
  projectName: project.name,
60454
+ name: worktree.name,
60429
60455
  branch: worktree.branch,
60430
60456
  agent: statuses.get(workspaceId)?.agent
60431
60457
  });
@@ -60463,7 +60489,8 @@ function WorkspacePickerDialog({ open: open2, onOpenChange }) {
60463
60489
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Dialog, { open: open2, onOpenChange, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
60464
60490
  DialogContent,
60465
60491
  {
60466
- className: "overflow-hidden border-0 bg-popover p-0 shadow-2xl sm:max-w-[520px]",
60492
+ variant: "bottom-sheet",
60493
+ className: "overflow-hidden border-0 bg-popover p-0 shadow-2xl lg:max-w-[520px] lg:border-0",
60467
60494
  overlayClassName: "backdrop-blur-sm",
60468
60495
  showCloseButton: false,
60469
60496
  "data-testid": "workspace-picker",
@@ -60485,7 +60512,7 @@ function WorkspacePickerDialog({ open: open2, onOpenChange }) {
60485
60512
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
60486
60513
  CommandItem,
60487
60514
  {
60488
- value: `${entry.projectName} ${entry.branch}`,
60515
+ value: `${entry.projectName} ${entry.name} ${entry.branch}`,
60489
60516
  onSelect: () => handleSelect(entry.workspaceId),
60490
60517
  "data-testid": `workspace-picker__item--${entry.workspaceId}`,
60491
60518
  className: "group touch-manipulation [@media(pointer:coarse)]:min-h-11 [@media(pointer:coarse)]:gap-3",
@@ -60494,7 +60521,7 @@ function WorkspacePickerDialog({ open: open2, onOpenChange }) {
60494
60521
  /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-sm font-medium", children: [
60495
60522
  entry.projectName,
60496
60523
  "/",
60497
- entry.branch
60524
+ entry.name
60498
60525
  ] }),
60499
60526
  pinnedNow && /* @__PURE__ */ jsxRuntimeExports.jsx(Pin, { className: "size-3 -rotate-45 text-muted-foreground shrink-0" }),
60500
60527
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ml-auto flex items-center gap-2", children: [
@@ -60511,7 +60538,7 @@ function WorkspacePickerDialog({ open: open2, onOpenChange }) {
60511
60538
  onClick: (e3) => {
60512
60539
  e3.preventDefault();
60513
60540
  e3.stopPropagation();
60514
- togglePinned(entry.projectName, entry.branch, pinnedNow);
60541
+ togglePinned(entry.projectName, entry.name, pinnedNow);
60515
60542
  },
60516
60543
  children: pinnedNow ? /* @__PURE__ */ jsxRuntimeExports.jsx(PinOff, { className: "size-3.5" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Pin, { className: "size-3.5" })
60517
60544
  }
@@ -67015,11 +67042,11 @@ class WebDashboardAdapter {
67015
67042
  async createWorkspace(project, branch, base2, prompt) {
67016
67043
  await this.trpc.workspaces.create.mutate({ project, branch, base: base2, prompt });
67017
67044
  }
67018
- async removeWorkspace(project, branch) {
67019
- await this.trpc.workspaces.remove.mutate({ project, branch });
67045
+ async removeWorkspace(project, name2) {
67046
+ await this.trpc.workspaces.remove.mutate({ project, name: name2 });
67020
67047
  }
67021
- async setWorkspacePinned(project, branch, pinned) {
67022
- await this.trpc.workspaces.setPinned.mutate({ project, branch, pinned });
67048
+ async setWorkspacePinned(project, name2, pinned) {
67049
+ await this.trpc.workspaces.setPinned.mutate({ project, name: name2, pinned });
67023
67050
  }
67024
67051
  async clearNeedsAttention(workspaceId) {
67025
67052
  await this.trpc.statuses.clearNeedsAttention.mutate({ workspaceId });
@@ -67027,11 +67054,11 @@ class WebDashboardAdapter {
67027
67054
  async runScript(path2, scriptType) {
67028
67055
  await this.trpc.workspaces.runScript.mutate({ path: path2, scriptType });
67029
67056
  }
67030
- async gitPull(project, branch) {
67031
- await this.trpc.workspaces.gitPull.mutate({ project, branch });
67057
+ async gitPull(project, name2) {
67058
+ await this.trpc.workspaces.gitPull.mutate({ project, name: name2 });
67032
67059
  }
67033
- async gitPush(project, branch) {
67034
- await this.trpc.workspaces.gitPush.mutate({ project, branch });
67060
+ async gitPush(project, name2) {
67061
+ await this.trpc.workspaces.gitPush.mutate({ project, name: name2 });
67035
67062
  }
67036
67063
  async getSettings() {
67037
67064
  return await this.trpc.settings.get.query();
@@ -109261,7 +109288,7 @@ var tn = f$5("block", "before:content-[counter(line)]", "before:inline-block", "
109261
109288
  var et$1 = ({ className: e3, language: t2, style: o3, isIncomplete: n2, ...s2 }) => jsxRuntimeExports.jsx("div", { className: f$5("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2", e3), "data-incomplete": n2 || void 0, "data-language": t2, "data-streamdown": "code-block", style: { contentVisibility: "auto", containIntrinsicSize: "auto 200px", ...o3 }, ...s2 });
109262
109289
  var Se$1 = reactExports.createContext({ code: "" }), de$2 = () => reactExports.useContext(Se$1);
109263
109290
  var ot$1 = ({ language: e3 }) => jsxRuntimeExports.jsx("div", { className: "flex h-8 items-center text-muted-foreground text-xs", "data-language": e3, "data-streamdown": "code-block-header", children: jsxRuntimeExports.jsx("span", { className: "ml-1 font-mono lowercase", children: e3 }) });
109264
- var cn = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-BI_Gmrii.js").then((e3) => ({ default: e3.HighlightedCodeBlockBody }))), rt = ({ code: e3, language: t2, className: o3, children: n2, isIncomplete: s2 = false, ...r2 }) => {
109291
+ var cn = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-DSf8s2aV.js").then((e3) => ({ default: e3.HighlightedCodeBlockBody }))), rt = ({ code: e3, language: t2, className: o3, children: n2, isIncomplete: s2 = false, ...r2 }) => {
109265
109292
  let i2 = reactExports.useMemo(() => e3.replace(cn, ""), [e3]), c2 = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i2.split(`
109266
109293
  `).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i2]);
109267
109294
  return jsxRuntimeExports.jsx(Se$1.Provider, { value: { code: e3 }, children: jsxRuntimeExports.jsxs(et$1, { isIncomplete: s2, language: t2, children: [jsxRuntimeExports.jsx(ot$1, { language: t2 }), n2 ? jsxRuntimeExports.jsx("div", { className: "pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end", children: jsxRuntimeExports.jsx("div", { className: "pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur", "data-streamdown": "code-block-actions", children: n2 }) }) : null, jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: jsxRuntimeExports.jsx(Qe$1, { className: o3, language: t2, result: c2, ...r2 }), children: jsxRuntimeExports.jsx(dn, { className: o3, code: i2, language: t2, raw: c2, ...r2 }) })] }) });
@@ -109583,7 +109610,7 @@ var Dt = ({ children: e3, className: t2, onDownload: o3, onError: n2 }) => {
109583
109610
  }, []), jsxRuntimeExports.jsxs("div", { className: "relative", ref: i2, children: [jsxRuntimeExports.jsx("button", { className: f$5("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50", t2), disabled: c2, onClick: () => r2(!s2), title: "Download table", type: "button", children: e3 != null ? e3 : jsxRuntimeExports.jsx(Z$2, { size: 14 }) }), s2 ? jsxRuntimeExports.jsxs("div", { className: "absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg", children: [jsxRuntimeExports.jsx("button", { className: "w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40", onClick: () => a2("csv"), title: "Download table as CSV", type: "button", children: "CSV" }), jsxRuntimeExports.jsx("button", { className: "w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40", onClick: () => a2("markdown"), title: "Download table as Markdown", type: "button", children: "Markdown" })] }) : null] });
109584
109611
  };
109585
109612
  var Vt = ({ children: e3, className: t2, showControls: o3, ...n2 }) => jsxRuntimeExports.jsxs("div", { className: "my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2", "data-streamdown": "table-wrapper", children: [o3 ? jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-end gap-1", children: [jsxRuntimeExports.jsx(Ht, {}), jsxRuntimeExports.jsx(Dt, {})] }) : null, jsxRuntimeExports.jsx("div", { className: "border-collapse overflow-x-auto overscroll-y-auto rounded-md border border-border bg-background", children: jsxRuntimeExports.jsx("table", { className: f$5("w-full divide-y divide-border", t2), "data-streamdown": "table", ...n2, children: e3 }) })] });
109586
- var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-D1krx3WU.js").then((e3) => ({ default: e3.Mermaid }))), Kn = /language-([^\s]+)/;
109613
+ var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-DGEHf_at.js").then((e3) => ({ default: e3.Mermaid }))), Kn = /language-([^\s]+)/;
109587
109614
  function ke$1(e3, t2) {
109588
109615
  if (!(e3 != null && e3.position || t2 != null && t2.position)) return true;
109589
109616
  if (!(e3 != null && e3.position && (t2 != null && t2.position))) return false;
@@ -161754,12 +161781,12 @@ var registerDefaultLayoutLoaders = /* @__PURE__ */ __name(() => {
161754
161781
  registerLayoutLoaders([
161755
161782
  {
161756
161783
  name: "dagre",
161757
- loader: /* @__PURE__ */ __name(async () => await import("./dagre-6UL2VRFP-CuR4BisU.js"), "loader")
161784
+ loader: /* @__PURE__ */ __name(async () => await import("./dagre-6UL2VRFP-CCIdAwdB.js"), "loader")
161758
161785
  },
161759
161786
  ...[
161760
161787
  {
161761
161788
  name: "cose-bilkent",
161762
- loader: /* @__PURE__ */ __name(async () => await import("./cose-bilkent-S5V4N54A-XbCluv3z.js"), "loader")
161789
+ loader: /* @__PURE__ */ __name(async () => await import("./cose-bilkent-S5V4N54A-D5-w_t4l.js"), "loader")
161763
161790
  }
161764
161791
  ]
161765
161792
  ]);
@@ -162198,7 +162225,7 @@ var detector = /* @__PURE__ */ __name((txt) => {
162198
162225
  return /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(txt);
162199
162226
  }, "detector");
162200
162227
  var loader = /* @__PURE__ */ __name(async () => {
162201
- const { diagram: diagram2 } = await import("./c4Diagram-YG6GDRKO-BpFPiRxu.js");
162228
+ const { diagram: diagram2 } = await import("./c4Diagram-YG6GDRKO-CBv74bWb.js");
162202
162229
  return { id, diagram: diagram2 };
162203
162230
  }, "loader");
162204
162231
  var plugin = {
@@ -162215,7 +162242,7 @@ var detector2 = /* @__PURE__ */ __name((txt, config2) => {
162215
162242
  return /^\s*graph/.test(txt);
162216
162243
  }, "detector");
162217
162244
  var loader2 = /* @__PURE__ */ __name(async () => {
162218
- const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-DjQR68un.js");
162245
+ const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-Cs7hS9X4.js");
162219
162246
  return { id: id2, diagram: diagram2 };
162220
162247
  }, "loader");
162221
162248
  var plugin2 = {
@@ -162238,7 +162265,7 @@ var detector3 = /* @__PURE__ */ __name((txt, config2) => {
162238
162265
  return /^\s*flowchart/.test(txt);
162239
162266
  }, "detector");
162240
162267
  var loader3 = /* @__PURE__ */ __name(async () => {
162241
- const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-DjQR68un.js");
162268
+ const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-Cs7hS9X4.js");
162242
162269
  return { id: id3, diagram: diagram2 };
162243
162270
  }, "loader");
162244
162271
  var plugin3 = {
@@ -162252,7 +162279,7 @@ var detector4 = /* @__PURE__ */ __name((txt) => {
162252
162279
  return /^\s*erDiagram/.test(txt);
162253
162280
  }, "detector");
162254
162281
  var loader4 = /* @__PURE__ */ __name(async () => {
162255
- const { diagram: diagram2 } = await import("./erDiagram-Q2GNP2WA-B5Os4Fa-.js");
162282
+ const { diagram: diagram2 } = await import("./erDiagram-Q2GNP2WA-DYHtO3j9.js");
162256
162283
  return { id: id4, diagram: diagram2 };
162257
162284
  }, "loader");
162258
162285
  var plugin4 = {
@@ -162266,7 +162293,7 @@ var detector5 = /* @__PURE__ */ __name((txt) => {
162266
162293
  return /^\s*gitGraph/.test(txt);
162267
162294
  }, "detector");
162268
162295
  var loader5 = /* @__PURE__ */ __name(async () => {
162269
- const { diagram: diagram2 } = await import("./gitGraphDiagram-V2S2FVAM-DDF08l5z.js");
162296
+ const { diagram: diagram2 } = await import("./gitGraphDiagram-V2S2FVAM-CZHNGOm0.js");
162270
162297
  return { id: id5, diagram: diagram2 };
162271
162298
  }, "loader");
162272
162299
  var plugin5 = {
@@ -162280,7 +162307,7 @@ var detector6 = /* @__PURE__ */ __name((txt) => {
162280
162307
  return /^\s*gantt/.test(txt);
162281
162308
  }, "detector");
162282
162309
  var loader6 = /* @__PURE__ */ __name(async () => {
162283
- const { diagram: diagram2 } = await import("./ganttDiagram-JELNMOA3-B5uPZ6pu.js");
162310
+ const { diagram: diagram2 } = await import("./ganttDiagram-JELNMOA3-BhLp8xvm.js");
162284
162311
  return { id: id6, diagram: diagram2 };
162285
162312
  }, "loader");
162286
162313
  var plugin6 = {
@@ -162294,7 +162321,7 @@ var detector7 = /* @__PURE__ */ __name((txt) => {
162294
162321
  return /^\s*info/.test(txt);
162295
162322
  }, "detector");
162296
162323
  var loader7 = /* @__PURE__ */ __name(async () => {
162297
- const { diagram: diagram2 } = await import("./infoDiagram-HS3SLOUP-zmvy_WJR.js");
162324
+ const { diagram: diagram2 } = await import("./infoDiagram-HS3SLOUP-D40Crb-p.js");
162298
162325
  return { id: id7, diagram: diagram2 };
162299
162326
  }, "loader");
162300
162327
  var info = {
@@ -162307,7 +162334,7 @@ var detector8 = /* @__PURE__ */ __name((txt) => {
162307
162334
  return /^\s*pie/.test(txt);
162308
162335
  }, "detector");
162309
162336
  var loader8 = /* @__PURE__ */ __name(async () => {
162310
- const { diagram: diagram2 } = await import("./pieDiagram-ADFJNKIX-EBslGQgI.js");
162337
+ const { diagram: diagram2 } = await import("./pieDiagram-ADFJNKIX-EgffZsud.js");
162311
162338
  return { id: id8, diagram: diagram2 };
162312
162339
  }, "loader");
162313
162340
  var pie = {
@@ -162320,7 +162347,7 @@ var detector9 = /* @__PURE__ */ __name((txt) => {
162320
162347
  return /^\s*quadrantChart/.test(txt);
162321
162348
  }, "detector");
162322
162349
  var loader9 = /* @__PURE__ */ __name(async () => {
162323
- const { diagram: diagram2 } = await import("./quadrantDiagram-AYHSOK5B-BKSWYe6P.js");
162350
+ const { diagram: diagram2 } = await import("./quadrantDiagram-AYHSOK5B-n2oJWllV.js");
162324
162351
  return { id: id9, diagram: diagram2 };
162325
162352
  }, "loader");
162326
162353
  var plugin7 = {
@@ -162334,7 +162361,7 @@ var detector10 = /* @__PURE__ */ __name((txt) => {
162334
162361
  return /^\s*xychart(-beta)?/.test(txt);
162335
162362
  }, "detector");
162336
162363
  var loader10 = /* @__PURE__ */ __name(async () => {
162337
- const { diagram: diagram2 } = await import("./xychartDiagram-PRI3JC2R-CTiLODEl.js");
162364
+ const { diagram: diagram2 } = await import("./xychartDiagram-PRI3JC2R-aNxYxejD.js");
162338
162365
  return { id: id10, diagram: diagram2 };
162339
162366
  }, "loader");
162340
162367
  var plugin8 = {
@@ -162348,7 +162375,7 @@ var detector11 = /* @__PURE__ */ __name((txt) => {
162348
162375
  return /^\s*requirement(Diagram)?/.test(txt);
162349
162376
  }, "detector");
162350
162377
  var loader11 = /* @__PURE__ */ __name(async () => {
162351
- const { diagram: diagram2 } = await import("./requirementDiagram-UZGBJVZJ-B7nRcnKx.js");
162378
+ const { diagram: diagram2 } = await import("./requirementDiagram-UZGBJVZJ-CzCXruFj.js");
162352
162379
  return { id: id11, diagram: diagram2 };
162353
162380
  }, "loader");
162354
162381
  var plugin9 = {
@@ -162362,7 +162389,7 @@ var detector12 = /* @__PURE__ */ __name((txt) => {
162362
162389
  return /^\s*sequenceDiagram/.test(txt);
162363
162390
  }, "detector");
162364
162391
  var loader12 = /* @__PURE__ */ __name(async () => {
162365
- const { diagram: diagram2 } = await import("./sequenceDiagram-WL72ISMW-CDfofz-s.js");
162392
+ const { diagram: diagram2 } = await import("./sequenceDiagram-WL72ISMW-BfX0R0LP.js");
162366
162393
  return { id: id12, diagram: diagram2 };
162367
162394
  }, "loader");
162368
162395
  var plugin10 = {
@@ -162379,7 +162406,7 @@ var detector13 = /* @__PURE__ */ __name((txt, config2) => {
162379
162406
  return /^\s*classDiagram/.test(txt);
162380
162407
  }, "detector");
162381
162408
  var loader13 = /* @__PURE__ */ __name(async () => {
162382
- const { diagram: diagram2 } = await import("./classDiagram-2ON5EDUG-DV-SD-4W.js");
162409
+ const { diagram: diagram2 } = await import("./classDiagram-2ON5EDUG-qbF8ds74.js");
162383
162410
  return { id: id13, diagram: diagram2 };
162384
162411
  }, "loader");
162385
162412
  var plugin11 = {
@@ -162396,7 +162423,7 @@ var detector14 = /* @__PURE__ */ __name((txt, config2) => {
162396
162423
  return /^\s*classDiagram-v2/.test(txt);
162397
162424
  }, "detector");
162398
162425
  var loader14 = /* @__PURE__ */ __name(async () => {
162399
- const { diagram: diagram2 } = await import("./classDiagram-v2-WZHVMYZB-DV-SD-4W.js");
162426
+ const { diagram: diagram2 } = await import("./classDiagram-v2-WZHVMYZB-qbF8ds74.js");
162400
162427
  return { id: id14, diagram: diagram2 };
162401
162428
  }, "loader");
162402
162429
  var plugin12 = {
@@ -162413,7 +162440,7 @@ var detector15 = /* @__PURE__ */ __name((txt, config2) => {
162413
162440
  return /^\s*stateDiagram/.test(txt);
162414
162441
  }, "detector");
162415
162442
  var loader15 = /* @__PURE__ */ __name(async () => {
162416
- const { diagram: diagram2 } = await import("./stateDiagram-FKZM4ZOC-BQdH_sw5.js");
162443
+ const { diagram: diagram2 } = await import("./stateDiagram-FKZM4ZOC-QowlLVwh.js");
162417
162444
  return { id: id15, diagram: diagram2 };
162418
162445
  }, "loader");
162419
162446
  var plugin13 = {
@@ -162433,7 +162460,7 @@ var detector16 = /* @__PURE__ */ __name((txt, config2) => {
162433
162460
  return false;
162434
162461
  }, "detector");
162435
162462
  var loader16 = /* @__PURE__ */ __name(async () => {
162436
- const { diagram: diagram2 } = await import("./stateDiagram-v2-4FDKWEC3-BTwyLH9n.js");
162463
+ const { diagram: diagram2 } = await import("./stateDiagram-v2-4FDKWEC3-DVHzQlOF.js");
162437
162464
  return { id: id16, diagram: diagram2 };
162438
162465
  }, "loader");
162439
162466
  var plugin14 = {
@@ -162447,7 +162474,7 @@ var detector17 = /* @__PURE__ */ __name((txt) => {
162447
162474
  return /^\s*journey/.test(txt);
162448
162475
  }, "detector");
162449
162476
  var loader17 = /* @__PURE__ */ __name(async () => {
162450
- const { diagram: diagram2 } = await import("./journeyDiagram-XKPGCS4Q-DyzviNdt.js");
162477
+ const { diagram: diagram2 } = await import("./journeyDiagram-XKPGCS4Q-dtlVBwV2.js");
162451
162478
  return { id: id17, diagram: diagram2 };
162452
162479
  }, "loader");
162453
162480
  var plugin15 = {
@@ -162514,7 +162541,7 @@ var detector18 = /* @__PURE__ */ __name((txt, config2 = {}) => {
162514
162541
  return false;
162515
162542
  }, "detector");
162516
162543
  var loader18 = /* @__PURE__ */ __name(async () => {
162517
- const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-DjQR68un.js");
162544
+ const { diagram: diagram2 } = await import("./flowDiagram-NV44I4VS-Cs7hS9X4.js");
162518
162545
  return { id: id18, diagram: diagram2 };
162519
162546
  }, "loader");
162520
162547
  var plugin16 = {
@@ -162528,7 +162555,7 @@ var detector19 = /* @__PURE__ */ __name((txt) => {
162528
162555
  return /^\s*timeline/.test(txt);
162529
162556
  }, "detector");
162530
162557
  var loader19 = /* @__PURE__ */ __name(async () => {
162531
- const { diagram: diagram2 } = await import("./timeline-definition-IT6M3QCI-BLfNWXx-.js");
162558
+ const { diagram: diagram2 } = await import("./timeline-definition-IT6M3QCI-DUoaC7rz.js");
162532
162559
  return { id: id19, diagram: diagram2 };
162533
162560
  }, "loader");
162534
162561
  var plugin17 = {
@@ -162542,7 +162569,7 @@ var detector20 = /* @__PURE__ */ __name((txt) => {
162542
162569
  return /^\s*mindmap/.test(txt);
162543
162570
  }, "detector");
162544
162571
  var loader20 = /* @__PURE__ */ __name(async () => {
162545
- const { diagram: diagram2 } = await import("./mindmap-definition-VGOIOE7T-Kacyqp9Z.js");
162572
+ const { diagram: diagram2 } = await import("./mindmap-definition-VGOIOE7T-DYfEp2uH.js");
162546
162573
  return { id: id20, diagram: diagram2 };
162547
162574
  }, "loader");
162548
162575
  var plugin18 = {
@@ -162556,7 +162583,7 @@ var detector21 = /* @__PURE__ */ __name((txt) => {
162556
162583
  return /^\s*kanban/.test(txt);
162557
162584
  }, "detector");
162558
162585
  var loader21 = /* @__PURE__ */ __name(async () => {
162559
- const { diagram: diagram2 } = await import("./kanban-definition-3W4ZIXB7-DOBL7QMj.js");
162586
+ const { diagram: diagram2 } = await import("./kanban-definition-3W4ZIXB7-72vgA7Jl.js");
162560
162587
  return { id: id21, diagram: diagram2 };
162561
162588
  }, "loader");
162562
162589
  var plugin19 = {
@@ -162570,7 +162597,7 @@ var detector22 = /* @__PURE__ */ __name((txt) => {
162570
162597
  return /^\s*sankey(-beta)?/.test(txt);
162571
162598
  }, "detector");
162572
162599
  var loader22 = /* @__PURE__ */ __name(async () => {
162573
- const { diagram: diagram2 } = await import("./sankeyDiagram-TZEHDZUN-Dq6Q_X6w.js");
162600
+ const { diagram: diagram2 } = await import("./sankeyDiagram-TZEHDZUN-C0GqwqSS.js");
162574
162601
  return { id: id22, diagram: diagram2 };
162575
162602
  }, "loader");
162576
162603
  var plugin20 = {
@@ -162584,7 +162611,7 @@ var detector23 = /* @__PURE__ */ __name((txt) => {
162584
162611
  return /^\s*packet(-beta)?/.test(txt);
162585
162612
  }, "detector");
162586
162613
  var loader23 = /* @__PURE__ */ __name(async () => {
162587
- const { diagram: diagram2 } = await import("./diagram-S2PKOQOG-B2BacNFz.js");
162614
+ const { diagram: diagram2 } = await import("./diagram-S2PKOQOG-XGIpbjo1.js");
162588
162615
  return { id: id23, diagram: diagram2 };
162589
162616
  }, "loader");
162590
162617
  var packet = {
@@ -162597,7 +162624,7 @@ var detector24 = /* @__PURE__ */ __name((txt) => {
162597
162624
  return /^\s*radar-beta/.test(txt);
162598
162625
  }, "detector");
162599
162626
  var loader24 = /* @__PURE__ */ __name(async () => {
162600
- const { diagram: diagram2 } = await import("./diagram-QEK2KX5R-Noar7MQT.js");
162627
+ const { diagram: diagram2 } = await import("./diagram-QEK2KX5R-B07zrGgY.js");
162601
162628
  return { id: id24, diagram: diagram2 };
162602
162629
  }, "loader");
162603
162630
  var radar = {
@@ -162610,7 +162637,7 @@ var detector25 = /* @__PURE__ */ __name((txt) => {
162610
162637
  return /^\s*block(-beta)?/.test(txt);
162611
162638
  }, "detector");
162612
162639
  var loader25 = /* @__PURE__ */ __name(async () => {
162613
- const { diagram: diagram2 } = await import("./blockDiagram-VD42YOAC-BZ551zIx.js");
162640
+ const { diagram: diagram2 } = await import("./blockDiagram-VD42YOAC-CRv2pc0L.js");
162614
162641
  return { id: id25, diagram: diagram2 };
162615
162642
  }, "loader");
162616
162643
  var plugin21 = {
@@ -162624,7 +162651,7 @@ var detector26 = /* @__PURE__ */ __name((txt) => {
162624
162651
  return /^\s*architecture/.test(txt);
162625
162652
  }, "detector");
162626
162653
  var loader26 = /* @__PURE__ */ __name(async () => {
162627
- const { diagram: diagram2 } = await import("./architectureDiagram-VXUJARFQ-CSgRy1oF.js");
162654
+ const { diagram: diagram2 } = await import("./architectureDiagram-VXUJARFQ-DVUpIskI.js");
162628
162655
  return { id: id26, diagram: diagram2 };
162629
162656
  }, "loader");
162630
162657
  var architecture = {
@@ -162638,7 +162665,7 @@ var detector27 = /* @__PURE__ */ __name((txt) => {
162638
162665
  return /^\s*treemap/.test(txt);
162639
162666
  }, "detector");
162640
162667
  var loader27 = /* @__PURE__ */ __name(async () => {
162641
- const { diagram: diagram2 } = await import("./diagram-PSM6KHXK-CV_nySOq.js");
162668
+ const { diagram: diagram2 } = await import("./diagram-PSM6KHXK-CWGITxy9.js");
162642
162669
  return { id: id27, diagram: diagram2 };
162643
162670
  }, "loader");
162644
162671
  var treemap = {
@@ -172417,6 +172444,8 @@ const PromptInput = ({
172417
172444
  draftKey,
172418
172445
  visible,
172419
172446
  wsActive,
172447
+ workspaceId,
172448
+ chatId,
172420
172449
  children: children2,
172421
172450
  ...props
172422
172451
  }) => {
@@ -172458,6 +172487,10 @@ const PromptInput = ({
172458
172487
  visibleRef.current = visible;
172459
172488
  const wsActiveRef = reactExports.useRef(wsActive ?? visible);
172460
172489
  wsActiveRef.current = wsActive ?? visible;
172490
+ const workspaceIdRef = reactExports.useRef(workspaceId);
172491
+ workspaceIdRef.current = workspaceId;
172492
+ const chatIdRef = reactExports.useRef(chatId);
172493
+ chatIdRef.current = chatId;
172461
172494
  const addFiles = reactExports.useCallback((newFiles) => {
172462
172495
  const valid2 = Array.from(newFiles).filter((f2) => f2.size <= MAX_FILE_SIZE);
172463
172496
  const entries2 = valid2.map((file2) => ({ id: `file-${++fileIdCounter}`, file: file2 }));
@@ -172538,9 +172571,15 @@ const PromptInput = ({
172538
172571
  }, []);
172539
172572
  reactExports.useEffect(() => {
172540
172573
  const handler = (e3) => {
172541
- if (wsActiveRef.current === false) return;
172542
- const { filePath, startLine, endLine } = e3.detail;
172543
- const reference = `\`${buildLineReference(filePath, startLine, endLine)}\` `;
172574
+ const detail = e3.detail;
172575
+ if (!detail) return;
172576
+ if (workspaceIdRef.current && detail.workspaceId !== workspaceIdRef.current) return;
172577
+ if (detail.chatId) {
172578
+ if (detail.chatId !== chatIdRef.current) return;
172579
+ } else if (wsActiveRef.current === false || visibleRef.current === false) {
172580
+ return;
172581
+ }
172582
+ const reference = `\`${buildLineReference(detail.filePath, detail.startLine, detail.endLine)}\` `;
172544
172583
  const textarea = textareaRef.current;
172545
172584
  const current2 = textarea?.value ?? "";
172546
172585
  const combined = current2 + reference;
@@ -172557,8 +172596,8 @@ const PromptInput = ({
172557
172596
  });
172558
172597
  }
172559
172598
  };
172560
- window.addEventListener("band:add-to-chat", handler);
172561
- return () => window.removeEventListener("band:add-to-chat", handler);
172599
+ window.addEventListener("band:chat-insert", handler);
172600
+ return () => window.removeEventListener("band:chat-insert", handler);
172562
172601
  }, []);
172563
172602
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
172564
172603
  "form",
@@ -176486,6 +176525,8 @@ function ChatView({
176486
176525
  draftKey: workspaceId,
176487
176526
  visible,
176488
176527
  wsActive,
176528
+ workspaceId,
176529
+ chatId,
176489
176530
  children: [
176490
176531
  /* @__PURE__ */ jsxRuntimeExports.jsx(SlashCommandSuggestions, { skills }),
176491
176532
  /* @__PURE__ */ jsxRuntimeExports.jsx(FileMentionSuggestions, { workspaceId }),
@@ -177590,6 +177631,8 @@ function DockviewChatContainer({
177590
177631
  const apiRef = reactExports.useRef(null);
177591
177632
  const isRestoringRef = reactExports.useRef(false);
177592
177633
  const containerRef = reactExports.useRef(null);
177634
+ const wsActiveRef = reactExports.useRef(wsActive);
177635
+ wsActiveRef.current = wsActive;
177593
177636
  const edgeDragDisposerRef = reactExports.useRef(null);
177594
177637
  const innerRegisterDisposerRef = reactExports.useRef(null);
177595
177638
  const { data: initialData } = useQuery({
@@ -177615,6 +177658,14 @@ function DockviewChatContainer({
177615
177658
  if (!api) return;
177616
177659
  persistToServer(workspaceId, api.toJSON(), { queryClient: queryClientRef.current });
177617
177660
  }, [workspaceId]);
177661
+ const reportChatFocus = reactExports.useCallback(() => {
177662
+ if (isRestoringRef.current) return;
177663
+ if (wsActiveRef.current === false) return;
177664
+ const panelId = apiRef.current?.activePanel?.id;
177665
+ if (!panelId) return;
177666
+ trpc.panelFocus.set.mutate({ workspaceId, panelType: "chat", panelId }).catch(() => {
177667
+ });
177668
+ }, [workspaceId]);
177618
177669
  const handleAddTab = reactExports.useCallback(
177619
177670
  async (agentId, groupId) => {
177620
177671
  const api = apiRef.current;
@@ -177773,9 +177824,19 @@ function DockviewChatContainer({
177773
177824
  const group = apiRef.current?.activeGroup;
177774
177825
  if (!group) return;
177775
177826
  group.model.focusContent();
177827
+ reportChatFocus();
177776
177828
  });
177777
177829
  return () => cancelAnimationFrame(id28);
177778
- }, [visible]);
177830
+ }, [visible, reportChatFocus]);
177831
+ reactExports.useEffect(() => {
177832
+ const handler = (e3) => {
177833
+ const detail = e3.detail;
177834
+ if (!detail?.chatId || detail.workspaceId !== workspaceId) return;
177835
+ apiRef.current?.getPanel(detail.chatId)?.api.setActive();
177836
+ };
177837
+ window.addEventListener("band:chat-insert", handler);
177838
+ return () => window.removeEventListener("band:chat-insert", handler);
177839
+ }, [workspaceId]);
177779
177840
  reactExports.useEffect(() => {
177780
177841
  return adapter2.subscribeStatusEvents((event) => {
177781
177842
  if (event.workspaceId !== workspaceId) return;
@@ -177876,11 +177937,14 @@ function DockviewChatContainer({
177876
177937
  event.api.onDidLayoutChange(persist);
177877
177938
  event.api.onDidAddPanel(persist);
177878
177939
  event.api.onDidRemovePanel(persist);
177879
- event.api.onDidActivePanelChange(persist);
177940
+ event.api.onDidActivePanelChange(() => {
177941
+ persist();
177942
+ reportChatFocus();
177943
+ });
177880
177944
  event.api.onDidAddGroup(persist);
177881
177945
  event.api.onDidRemoveGroup(persist);
177882
177946
  },
177883
- [workspaceId, schedulePersist]
177947
+ [workspaceId, schedulePersist, reportChatFocus]
177884
177948
  );
177885
177949
  const visibilityValue = reactExports.useMemo(
177886
177950
  () => ({ visible: visible && wsActive !== false, wsActive: wsActive !== false }),
@@ -178009,7 +178073,7 @@ function MultiWorkspacePanelHost({ emptyState, children: children2 }) {
178009
178073
  const validIds = /* @__PURE__ */ new Set();
178010
178074
  for (const project of projects) {
178011
178075
  for (const worktree of project.worktrees) {
178012
- validIds.add(toWorkspaceId(project.name, worktree.branch));
178076
+ validIds.add(toWorkspaceId(project.name, worktree.name));
178013
178077
  }
178014
178078
  }
178015
178079
  setCache((prev2) => {
@@ -199317,6 +199381,11 @@ function ResourcesPage() {
199317
199381
  queryKey: ["resources", "server"],
199318
199382
  queryFn: () => trpc.services.resourcesServer.query()
199319
199383
  });
199384
+ const appMetricsQuery = useQuery({
199385
+ queryKey: ["resources", "app-metrics"],
199386
+ queryFn: () => invoke("get_app_metrics"),
199387
+ enabled: isDesktop
199388
+ });
199320
199389
  const projectsQuery = useQuery({
199321
199390
  queryKey: ["resources", "projects"],
199322
199391
  queryFn: () => trpc.services.resourcesProjects.query(),
@@ -199380,43 +199449,55 @@ function ResourcesPage() {
199380
199449
  return next2;
199381
199450
  });
199382
199451
  };
199383
- const sortedProjects = [...projects].sort((a2, b2) => {
199384
- const sa = sizes.get(a2.project);
199385
- const sb = sizes.get(b2.project);
199386
- if (sa && sb) return sb.sizeBytes - sa.sizeBytes;
199387
- if (sa && !sb) return -1;
199388
- if (!sa && sb) return 1;
199389
- return 0;
199390
- });
199391
- const knownTotalBytes = Array.from(sizes.values()).reduce((sum, s2) => sum + s2.sizeBytes, 0);
199452
+ const sortedProjects = reactExports.useMemo(
199453
+ () => [...projects].sort((a2, b2) => {
199454
+ const sa = sizes.get(a2.project);
199455
+ const sb = sizes.get(b2.project);
199456
+ if (sa && sb) return sb.sizeBytes - sa.sizeBytes;
199457
+ if (sa && !sb) return -1;
199458
+ if (!sa && sb) return 1;
199459
+ return 0;
199460
+ }),
199461
+ [projects, sizes]
199462
+ );
199463
+ const knownTotalBytes = reactExports.useMemo(
199464
+ () => Array.from(sizes.values()).reduce((sum, s2) => sum + s2.sizeBytes, 0),
199465
+ [sizes]
199466
+ );
199467
+ const totalWorktreeCount = reactExports.useMemo(
199468
+ () => projects.reduce((sum, p2) => sum + p2.worktrees.length, 0),
199469
+ [projects]
199470
+ );
199392
199471
  const allLoaded = sizes.size === projects.length;
199393
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "h-full w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mx-auto flex max-w-5xl flex-col gap-8 px-6 py-4", children: [
199394
- /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { "data-testid": "resources-server-card", className: "space-y-3", children: [
199395
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-row items-start justify-between gap-2", children: [
199396
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
199397
- /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-base font-semibold leading-none", children: "Server" }),
199398
- /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-sm text-muted-foreground", children: [
199399
- "The Node process serving the Band dashboard (",
199400
- server ? `pid ${server.pid}` : "…",
199401
- ")."
199402
- ] })
199403
- ] }),
199404
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
199405
- Button,
199406
- {
199407
- variant: "outline",
199408
- size: "sm",
199409
- "data-testid": "resources-refresh-server",
199410
- onClick: () => serverQuery.refetch(),
199411
- disabled: serverQuery.isFetching,
199412
- children: [
199413
- serverQuery.isFetching ? /* @__PURE__ */ jsxRuntimeExports.jsx(Spinner, { className: "size-3.5" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCw, { className: "size-3.5" }),
199414
- "Refresh"
199415
- ]
199416
- }
199417
- )
199418
- ] }),
199419
- serverQuery.isError ? /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-sm text-destructive", children: [
199472
+ const [serverOpen, setServerOpen] = reactExports.useState(false);
199473
+ const [worktreesOpen, setWorktreesOpen] = reactExports.useState(false);
199474
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "h-full w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mx-auto max-w-5xl px-6 py-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "overflow-hidden rounded-xl border border-border [&>*+*]:border-t [&>*+*]:border-border", children: [
199475
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Collapsible, { open: serverOpen, onOpenChange: setServerOpen, asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { "data-testid": "resources-server-card", children: [
199476
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
199477
+ PanelHeader,
199478
+ {
199479
+ title: "Server",
199480
+ toggleTestId: "resources-server-toggle",
199481
+ open: serverOpen,
199482
+ totalTestId: "resources-server-total",
199483
+ total: server ? formatMB(server.memory.rssBytes) : "…",
199484
+ description: `The Node process serving the Band dashboard (${server ? `pid ${server.pid}` : "…"}).`,
199485
+ refresh: /* @__PURE__ */ jsxRuntimeExports.jsx(
199486
+ Button,
199487
+ {
199488
+ variant: "outline",
199489
+ size: "icon-sm",
199490
+ "aria-label": "Refresh",
199491
+ title: "Refresh",
199492
+ "data-testid": "resources-refresh-server",
199493
+ onClick: () => serverQuery.refetch(),
199494
+ disabled: serverQuery.isFetching,
199495
+ children: serverQuery.isFetching ? /* @__PURE__ */ jsxRuntimeExports.jsx(Spinner, { className: "size-3.5" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCw, { className: "size-3.5" })
199496
+ }
199497
+ )
199498
+ }
199499
+ ),
199500
+ /* @__PURE__ */ jsxRuntimeExports.jsx(CollapsibleContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-t border-border p-4", children: serverQuery.isError ? /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-sm text-destructive", children: [
199420
199501
  "Failed to load server snapshot: ",
199421
199502
  String(serverQuery.error)
199422
199503
  ] }) : !server ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
@@ -199439,37 +199520,42 @@ function ResourcesPage() {
199439
199520
  /* @__PURE__ */ jsxRuntimeExports.jsx(ServerField, { label: "Array buffers", children: formatMB(server.memory.arrayBuffersBytes) }),
199440
199521
  /* @__PURE__ */ jsxRuntimeExports.jsx(ServerField, { label: "Total CPU time (user)", children: formatCpuMs(server.cpu.userMicros) }),
199441
199522
  /* @__PURE__ */ jsxRuntimeExports.jsx(ServerField, { label: "Total CPU time (system)", children: formatCpuMs(server.cpu.systemMicros) })
199442
- ] })
199443
- ] }),
199444
- /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { "data-testid": "resources-worktrees-card", className: "space-y-3", children: [
199445
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-row items-start justify-between gap-2", children: [
199446
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
199447
- /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-base font-semibold leading-none", children: "Worktrees" }),
199448
- /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-sm text-muted-foreground", children: [
199523
+ ] }) }) })
199524
+ ] }) }),
199525
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ElectronCard, { query: appMetricsQuery }),
199526
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Collapsible, { open: worktreesOpen, onOpenChange: setWorktreesOpen, asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { "data-testid": "resources-worktrees-card", children: [
199527
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
199528
+ PanelHeader,
199529
+ {
199530
+ title: "Worktrees",
199531
+ toggleTestId: "resources-worktrees-toggle",
199532
+ open: worktreesOpen,
199533
+ totalTestId: "resources-worktrees-total",
199534
+ total: `${formatBytes(knownTotalBytes)}${allLoaded ? "" : " (partial)"}`,
199535
+ description: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
199449
199536
  "Disk usage per tracked git project (allocated blocks, as reported by",
199450
199537
  " ",
199451
199538
  /* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: "rounded bg-muted px-1 py-0.5 text-xs", children: "du" }),
199452
199539
  "). Sizes load per project in batches of ",
199453
199540
  PROJECT_FETCH_CONCURRENCY,
199454
199541
  ". Click a project to see its per-worktree breakdown."
199455
- ] })
199456
- ] }),
199457
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
199458
- Button,
199459
- {
199460
- variant: "outline",
199461
- size: "sm",
199462
- "data-testid": "resources-refresh-worktrees",
199463
- onClick: handleRefreshSizes,
199464
- disabled: projectsQuery.isFetching || !allLoaded,
199465
- children: [
199466
- projectsQuery.isFetching || !allLoaded ? /* @__PURE__ */ jsxRuntimeExports.jsx(Spinner, { className: "size-3.5" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCw, { className: "size-3.5" }),
199467
- "Refresh"
199468
- ]
199469
- }
199470
- )
199471
- ] }),
199472
- projectsQuery.isError ? /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-sm text-destructive", children: [
199542
+ ] }),
199543
+ refresh: /* @__PURE__ */ jsxRuntimeExports.jsx(
199544
+ Button,
199545
+ {
199546
+ variant: "outline",
199547
+ size: "icon-sm",
199548
+ "aria-label": "Refresh",
199549
+ title: "Refresh",
199550
+ "data-testid": "resources-refresh-worktrees",
199551
+ onClick: handleRefreshSizes,
199552
+ disabled: projectsQuery.isFetching || !allLoaded,
199553
+ children: projectsQuery.isFetching || !allLoaded ? /* @__PURE__ */ jsxRuntimeExports.jsx(Spinner, { className: "size-3.5" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCw, { className: "size-3.5" })
199554
+ }
199555
+ )
199556
+ }
199557
+ ),
199558
+ /* @__PURE__ */ jsxRuntimeExports.jsx(CollapsibleContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-t border-border p-4", children: projectsQuery.isError ? /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-sm text-destructive", children: [
199473
199559
  "Failed to load projects: ",
199474
199560
  String(projectsQuery.error)
199475
199561
  ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative overflow-x-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -199483,7 +199569,14 @@ function ResourcesPage() {
199483
199569
  /* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "py-2 pr-3 text-right", children: "Worktrees" }),
199484
199570
  /* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "py-2 pr-3 text-right", children: "Total size" })
199485
199571
  ] }) }),
199486
- /* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { children: sortedProjects.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("tr", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 3, className: "py-6 text-center text-sm text-muted-foreground", children: projectsQuery.isFetching ? "Loading…" : "No git projects found" }) }) : sortedProjects.map((project) => {
199572
+ /* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { children: sortedProjects.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("tr", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
199573
+ "td",
199574
+ {
199575
+ colSpan: 3,
199576
+ className: "py-6 text-center text-sm text-muted-foreground",
199577
+ children: projectsQuery.isFetching ? "Loading…" : "No git projects found"
199578
+ }
199579
+ ) }) : sortedProjects.map((project) => {
199487
199580
  const size2 = sizes.get(project.project);
199488
199581
  const isExpanded = expandedProjects.has(project.project);
199489
199582
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [
@@ -199565,7 +199658,7 @@ function ResourcesPage() {
199565
199658
  "Total",
199566
199659
  allLoaded ? "" : " (partial)"
199567
199660
  ] }),
199568
- /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "py-2 pr-3 text-right tabular-nums", children: projects.reduce((sum, p2) => sum + p2.worktrees.length, 0) }),
199661
+ /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "py-2 pr-3 text-right tabular-nums", children: totalWorktreeCount }),
199569
199662
  /* @__PURE__ */ jsxRuntimeExports.jsx(
199570
199663
  "td",
199571
199664
  {
@@ -199577,10 +199670,144 @@ function ResourcesPage() {
199577
199670
  ] }) })
199578
199671
  ]
199579
199672
  }
199580
- ) })
199581
- ] })
199673
+ ) }) }) })
199674
+ ] }) })
199675
+ ] }) }) });
199676
+ }
199677
+ function ElectronCard({ query }) {
199678
+ const [open2, setOpen] = reactExports.useState(false);
199679
+ if (!isDesktop) return null;
199680
+ const metrics = query.data;
199681
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Collapsible, { open: open2, onOpenChange: setOpen, asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { "data-testid": "resources-electron-card", children: [
199682
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
199683
+ PanelHeader,
199684
+ {
199685
+ title: "Desktop app (Electron)",
199686
+ toggleTestId: "resources-electron-toggle",
199687
+ open: open2,
199688
+ totalTestId: "resources-electron-total",
199689
+ total: metrics ? formatBytes(metrics.totalMemoryKB * 1024) : "…",
199690
+ description: "Per-process CPU and memory for the Electron main process, GPU process, Chromium renderers (the dashboard and each browser tab), and utility helpers.",
199691
+ refresh: /* @__PURE__ */ jsxRuntimeExports.jsx(
199692
+ Button,
199693
+ {
199694
+ variant: "outline",
199695
+ size: "icon-sm",
199696
+ "aria-label": "Refresh",
199697
+ title: "Refresh",
199698
+ "data-testid": "resources-refresh-electron",
199699
+ onClick: () => query.refetch(),
199700
+ disabled: query.isFetching,
199701
+ children: query.isFetching ? /* @__PURE__ */ jsxRuntimeExports.jsx(Spinner, { className: "size-3.5" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCw, { className: "size-3.5" })
199702
+ }
199703
+ )
199704
+ }
199705
+ ),
199706
+ /* @__PURE__ */ jsxRuntimeExports.jsx(CollapsibleContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-t border-border p-4", children: query.isError ? /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-sm text-destructive", children: [
199707
+ "Failed to load Electron metrics: ",
199708
+ String(query.error)
199709
+ ] }) : !metrics ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
199710
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Spinner, { className: "size-4" }),
199711
+ "Loading…"
199712
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative overflow-x-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
199713
+ "table",
199714
+ {
199715
+ "data-testid": "resources-electron-table",
199716
+ className: "w-full border-collapse text-sm",
199717
+ children: [
199718
+ /* @__PURE__ */ jsxRuntimeExports.jsx("thead", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { className: "border-b border-border text-left text-xs font-medium uppercase tracking-wide text-muted-foreground", children: [
199719
+ /* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "py-2 pr-3", children: "Process" }),
199720
+ /* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "py-2 pr-3", children: "Type" }),
199721
+ /* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "py-2 pr-3 text-right", children: "PID" }),
199722
+ /* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "py-2 pr-3 text-right", children: "CPU" }),
199723
+ /* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "py-2 pr-3 text-right", children: "Memory" })
199724
+ ] }) }),
199725
+ /* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { children: metrics.processes.map((p2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
199726
+ "tr",
199727
+ {
199728
+ "data-testid": `resources-electron-row-${p2.pid}`,
199729
+ className: "border-b border-border/60 last:border-0 hover:bg-muted/40",
199730
+ children: [
199731
+ /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "py-1.5 pr-3", children: p2.label }),
199732
+ /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "py-1.5 pr-3 text-muted-foreground", children: p2.type }),
199733
+ /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "py-1.5 pr-3 text-right tabular-nums", children: p2.pid }),
199734
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("td", { className: "py-1.5 pr-3 text-right tabular-nums", children: [
199735
+ p2.cpuPercent.toFixed(1),
199736
+ "%"
199737
+ ] }),
199738
+ /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "py-1.5 pr-3 text-right tabular-nums", children: formatBytes(p2.memoryKB * 1024) })
199739
+ ]
199740
+ },
199741
+ p2.pid
199742
+ )) }),
199743
+ /* @__PURE__ */ jsxRuntimeExports.jsx("tfoot", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { className: "border-t-2 border-border font-medium", children: [
199744
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("td", { className: "py-2 pr-3", "data-testid": "resources-electron-total-count", children: [
199745
+ "Total (",
199746
+ metrics.processCount,
199747
+ ")"
199748
+ ] }),
199749
+ /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "py-2 pr-3" }),
199750
+ /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "py-2 pr-3" }),
199751
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
199752
+ "td",
199753
+ {
199754
+ className: "py-2 pr-3 text-right tabular-nums",
199755
+ "data-testid": "resources-electron-total-cpu",
199756
+ children: [
199757
+ metrics.totalCpuPercent.toFixed(1),
199758
+ "%"
199759
+ ]
199760
+ }
199761
+ ),
199762
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
199763
+ "td",
199764
+ {
199765
+ className: "py-2 pr-3 text-right tabular-nums",
199766
+ "data-testid": "resources-electron-total-memory",
199767
+ children: formatBytes(metrics.totalMemoryKB * 1024)
199768
+ }
199769
+ )
199770
+ ] }) })
199771
+ ]
199772
+ }
199773
+ ) }) }) })
199582
199774
  ] }) });
199583
199775
  }
199776
+ function PanelHeader({
199777
+ title,
199778
+ toggleTestId,
199779
+ open: open2,
199780
+ total,
199781
+ totalTestId,
199782
+ description,
199783
+ refresh
199784
+ }) {
199785
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-row items-start justify-between gap-2 p-4", children: [
199786
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1 space-y-1", children: [
199787
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-base font-semibold leading-none", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
199788
+ CollapsibleTrigger,
199789
+ {
199790
+ "data-testid": toggleTestId,
199791
+ className: "group flex w-full items-center gap-2 text-left",
199792
+ children: [
199793
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: "size-4 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-90" }),
199794
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: title }),
199795
+ !open2 && /* @__PURE__ */ jsxRuntimeExports.jsx(
199796
+ "span",
199797
+ {
199798
+ "data-testid": totalTestId,
199799
+ className: "ml-auto pl-2 font-mono text-sm font-normal text-muted-foreground",
199800
+ children: total
199801
+ }
199802
+ )
199803
+ ]
199804
+ }
199805
+ ) }),
199806
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "pl-6 text-sm text-muted-foreground", children: description })
199807
+ ] }),
199808
+ refresh
199809
+ ] });
199810
+ }
199584
199811
  function ServerField({ label, children: children2 }) {
199585
199812
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-0.5", children: [
199586
199813
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: label }),
@@ -199670,14 +199897,14 @@ function TasksPageContent() {
199670
199897
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col overflow-hidden", children: [
199671
199898
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex shrink-0 items-center gap-2 border-b border-border/50 px-4 py-2", children: [
199672
199899
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { value: projectFilter, onValueChange: setProjectFilter, children: [
199673
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-8 w-40 text-xs", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: "All Projects" }) }),
199900
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-8 w-40 text-xs", "data-testid": "tasks__project-filter", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: "All Projects" }) }),
199674
199901
  /* @__PURE__ */ jsxRuntimeExports.jsxs(SelectContent, { children: [
199675
199902
  /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: "all", children: "All Projects" }),
199676
199903
  projectNames.map((name2) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: name2, children: name2 }, name2))
199677
199904
  ] })
199678
199905
  ] }),
199679
199906
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { value: statusFilter, onValueChange: (v2) => setStatusFilter(v2), children: [
199680
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-8 w-40 text-xs", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: "All Statuses" }) }),
199907
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-8 w-40 text-xs", "data-testid": "tasks__status-filter", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: "All Statuses" }) }),
199681
199908
  /* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: ["all", "running", "completed", "failed"].map((status) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: status, className: "capitalize", children: status === "all" ? "All Statuses" : status }, status)) })
199682
199909
  ] }),
199683
199910
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ml-auto flex items-center gap-1", children: [
@@ -199696,6 +199923,7 @@ function TasksPageContent() {
199696
199923
  variant: "outline",
199697
199924
  size: "xs",
199698
199925
  className: "hidden sm:inline-flex",
199926
+ "data-testid": "tasks__new-task-button",
199699
199927
  onClick: () => setShowNewTask(true),
199700
199928
  children: [
199701
199929
  /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-3" }),
@@ -199724,13 +199952,20 @@ function TasksPageContent() {
199724
199952
  "Retry"
199725
199953
  ] })
199726
199954
  ] }),
199727
- !loading && !error && filteredTasks.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center gap-3 py-16 text-center", children: [
199728
- /* @__PURE__ */ jsxRuntimeExports.jsx(ListTodo, { className: "size-10 text-muted-foreground" }),
199729
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
199730
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "font-medium", children: "No tasks found" }),
199731
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: tasks.length > 0 ? "Try adjusting your filters" : "Dispatch a new task to get started" })
199732
- ] })
199733
- ] }),
199955
+ !loading && !error && filteredTasks.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(
199956
+ "div",
199957
+ {
199958
+ className: "flex flex-col items-center justify-center gap-3 py-16 text-center",
199959
+ "data-testid": "tasks__empty-state",
199960
+ children: [
199961
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ListTodo, { className: "size-10 text-muted-foreground" }),
199962
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
199963
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "font-medium", children: "No tasks found" }),
199964
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: tasks.length > 0 ? "Try adjusting your filters" : "Dispatch a new task to get started" })
199965
+ ] })
199966
+ ]
199967
+ }
199968
+ ),
199734
199969
  filteredTasks.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-2 p-4", children: filteredTasks.map((task2) => /* @__PURE__ */ jsxRuntimeExports.jsx(TaskCard, { task: task2, onAction: fetchData, agentMap }, task2.id)) })
199735
199970
  ] }),
199736
199971
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -199746,17 +199981,25 @@ function TasksPageContent() {
199746
199981
  function StatusBadge({ status }) {
199747
199982
  switch (status) {
199748
199983
  case "running":
199749
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(Badge, { variant: "secondary", className: "gap-1.5", children: [
199984
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(Badge, { variant: "secondary", className: "gap-1.5", "data-testid": "tasks__status-badge--running", children: [
199750
199985
  /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-3 animate-spin" }),
199751
199986
  "Running"
199752
199987
  ] });
199753
199988
  case "completed":
199754
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(Badge, { variant: "secondary", className: "gap-1.5 text-green-600 dark:text-green-400", children: [
199755
- /* @__PURE__ */ jsxRuntimeExports.jsx(CircleCheck, { className: "size-3" }),
199756
- "Completed"
199757
- ] });
199989
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
199990
+ Badge,
199991
+ {
199992
+ variant: "secondary",
199993
+ className: "gap-1.5 text-green-600 dark:text-green-400",
199994
+ "data-testid": "tasks__status-badge--completed",
199995
+ children: [
199996
+ /* @__PURE__ */ jsxRuntimeExports.jsx(CircleCheck, { className: "size-3" }),
199997
+ "Completed"
199998
+ ]
199999
+ }
200000
+ );
199758
200001
  case "failed":
199759
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(Badge, { variant: "destructive", className: "gap-1.5", children: [
200002
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(Badge, { variant: "destructive", className: "gap-1.5", "data-testid": "tasks__status-badge--failed", children: [
199760
200003
  /* @__PURE__ */ jsxRuntimeExports.jsx(CircleAlert, { className: "size-3" }),
199761
200004
  "Failed"
199762
200005
  ] });
@@ -199791,78 +200034,86 @@ function TaskCard({
199791
200034
  setActing(false);
199792
200035
  }
199793
200036
  }, [task2.id, onAction]);
199794
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2 rounded-lg border-2 border-border/50 p-4 transition-colors hover:border-border", children: [
199795
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
199796
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "line-clamp-2 min-w-0 flex-1 text-sm font-medium text-foreground", children: task2.prompt }),
199797
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
199798
- task2.status === "running" && /* @__PURE__ */ jsxRuntimeExports.jsx(
199799
- Button,
199800
- {
199801
- variant: "ghost",
199802
- size: "icon",
199803
- className: "size-7",
199804
- onClick: handleCancel,
199805
- disabled: acting,
199806
- title: "Cancel task",
199807
- children: acting ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(CircleX, { className: "size-3.5" })
199808
- }
199809
- ),
199810
- (task2.status === "completed" || task2.status === "failed") && /* @__PURE__ */ jsxRuntimeExports.jsx(
199811
- Button,
199812
- {
199813
- variant: "ghost",
199814
- size: "icon",
199815
- className: "size-7",
199816
- onClick: handleRerun,
199817
- disabled: acting,
199818
- title: "Re-run task",
199819
- children: acting ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(RotateCcw, { className: "size-3.5" })
199820
- }
199821
- ),
199822
- /* @__PURE__ */ jsxRuntimeExports.jsx(StatusBadge, { status: task2.status })
199823
- ] })
199824
- ] }),
199825
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground", children: [
199826
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-medium text-foreground/70", children: [
199827
- task2.project,
199828
- "/",
199829
- task2.branch
199830
- ] }),
199831
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-border", children: "·" }),
199832
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "inline-flex items-center gap-1", children: [
199833
- /* @__PURE__ */ jsxRuntimeExports.jsx(Clock, { className: "size-3" }),
199834
- relativeTime(task2.startedAt)
199835
- ] }),
199836
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-border", children: "·" }),
199837
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: formatDuration(task2.startedAt, task2.completedAt) }),
199838
- task2.codingAgentId && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
199839
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-border", children: "·" }),
199840
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: agentMap.get(task2.codingAgentId)?.label ?? task2.codingAgentId })
199841
- ] }),
199842
- task2.model && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
199843
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-border", children: "·" }),
199844
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: task2.model })
199845
- ] }),
199846
- task2.mode && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
199847
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-border", children: "·" }),
199848
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "capitalize", children: task2.mode })
199849
- ] }),
199850
- sessionHref && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
199851
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-border", children: "·" }),
199852
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
199853
- Link,
199854
- {
199855
- to: sessionHref,
199856
- className: "inline-flex items-center gap-1 text-primary hover:underline",
199857
- children: [
199858
- /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink$1, { className: "size-3" }),
199859
- "Session"
199860
- ]
199861
- }
199862
- )
199863
- ] })
199864
- ] })
199865
- ] });
200037
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
200038
+ "div",
200039
+ {
200040
+ className: "flex flex-col gap-2 rounded-lg border-2 border-border/50 p-4 transition-colors hover:border-border",
200041
+ "data-testid": `tasks__card--${task2.id}`,
200042
+ children: [
200043
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
200044
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "line-clamp-2 min-w-0 flex-1 text-sm font-medium text-foreground", children: task2.prompt }),
200045
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
200046
+ task2.status === "running" && /* @__PURE__ */ jsxRuntimeExports.jsx(
200047
+ Button,
200048
+ {
200049
+ variant: "ghost",
200050
+ size: "icon",
200051
+ className: "size-7",
200052
+ onClick: handleCancel,
200053
+ disabled: acting,
200054
+ title: "Cancel task",
200055
+ children: acting ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(CircleX, { className: "size-3.5" })
200056
+ }
200057
+ ),
200058
+ (task2.status === "completed" || task2.status === "failed") && /* @__PURE__ */ jsxRuntimeExports.jsx(
200059
+ Button,
200060
+ {
200061
+ variant: "ghost",
200062
+ size: "icon",
200063
+ className: "size-7",
200064
+ onClick: handleRerun,
200065
+ disabled: acting,
200066
+ title: "Re-run task",
200067
+ children: acting ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(RotateCcw, { className: "size-3.5" })
200068
+ }
200069
+ ),
200070
+ /* @__PURE__ */ jsxRuntimeExports.jsx(StatusBadge, { status: task2.status })
200071
+ ] })
200072
+ ] }),
200073
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground", children: [
200074
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-medium text-foreground/70", children: [
200075
+ task2.project,
200076
+ "/",
200077
+ task2.branch
200078
+ ] }),
200079
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-border", children: "·" }),
200080
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "inline-flex items-center gap-1", children: [
200081
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Clock, { className: "size-3" }),
200082
+ relativeTime(task2.startedAt)
200083
+ ] }),
200084
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-border", children: "·" }),
200085
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: formatDuration(task2.startedAt, task2.completedAt) }),
200086
+ task2.codingAgentId && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
200087
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-border", children: "·" }),
200088
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: agentMap.get(task2.codingAgentId)?.label ?? task2.codingAgentId })
200089
+ ] }),
200090
+ task2.model && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
200091
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-border", children: "·" }),
200092
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: task2.model })
200093
+ ] }),
200094
+ task2.mode && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
200095
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-border", children: "·" }),
200096
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "capitalize", children: task2.mode })
200097
+ ] }),
200098
+ sessionHref && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
200099
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-border", children: "·" }),
200100
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
200101
+ Link,
200102
+ {
200103
+ to: sessionHref,
200104
+ className: "inline-flex items-center gap-1 text-primary hover:underline",
200105
+ "data-testid": "tasks__session-link",
200106
+ children: [
200107
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink$1, { className: "size-3" }),
200108
+ "Session"
200109
+ ]
200110
+ }
200111
+ )
200112
+ ] })
200113
+ ] })
200114
+ ]
200115
+ }
200116
+ );
199866
200117
  }
199867
200118
  function NewTaskDialog({
199868
200119
  open: open2,
@@ -199960,7 +200211,7 @@ function NewTaskDialog({
199960
200211
  setSubmitting(false);
199961
200212
  }
199962
200213
  }, [workspaceId, prompt, selectedMode, selectedModel, selectedAgent, onSubmit]);
199963
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Dialog, { open: open2, onOpenChange, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogContent, { children: [
200214
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Dialog, { open: open2, onOpenChange, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogContent, { "data-testid": "tasks__new-task-dialog", children: [
199964
200215
  /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogHeader, { children: [
199965
200216
  /* @__PURE__ */ jsxRuntimeExports.jsx(DialogTitle, { children: "New Task" }),
199966
200217
  /* @__PURE__ */ jsxRuntimeExports.jsx(DialogDescription, { children: "Dispatch a new task to a coding agent" })
@@ -199969,7 +200220,7 @@ function NewTaskDialog({
199969
200220
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
199970
200221
  /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "text-sm font-medium", htmlFor: "project-select", children: "Project" }),
199971
200222
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { value: selectedProject, onValueChange: handleProjectChange, children: [
199972
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { id: "project-select", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: "Select a project" }) }),
200223
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { id: "project-select", "data-testid": "tasks__new-task-project", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: "Select a project" }) }),
199973
200224
  /* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: projects.map((p2) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: p2.name, children: p2.name }, p2.name)) })
199974
200225
  ] })
199975
200226
  ] }),
@@ -199982,7 +200233,7 @@ function NewTaskDialog({
199982
200233
  onValueChange: setSelectedBranch,
199983
200234
  disabled: !selectedProject,
199984
200235
  children: [
199985
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { id: "branch-select", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
200236
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { id: "branch-select", "data-testid": "tasks__new-task-workspace", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
199986
200237
  SelectValue,
199987
200238
  {
199988
200239
  placeholder: selectedProject ? "Select a workspace" : "Select a project first"
@@ -199999,6 +200250,7 @@ function NewTaskDialog({
199999
200250
  Textarea,
200000
200251
  {
200001
200252
  id: "task-prompt",
200253
+ "data-testid": "tasks__new-task-prompt",
200002
200254
  placeholder: "Describe what the agent should do...",
200003
200255
  value: prompt,
200004
200256
  onChange: (e3) => setPrompt(e3.target.value),
@@ -201374,6 +201626,79 @@ function ToolbarOverflowMenuItems() {
201374
201626
  ] })
201375
201627
  ] });
201376
201628
  }
201629
+ function ToolbarActionBar() {
201630
+ const ctx = reactExports.useContext(ToolbarOverflowContext);
201631
+ if (!ctx) {
201632
+ throw new Error("ToolbarActionBar must be used inside ToolbarOverflowProvider");
201633
+ }
201634
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
201635
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip$1, { children: [
201636
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
201637
+ Button,
201638
+ {
201639
+ size: "icon-sm",
201640
+ variant: "ghost",
201641
+ className: "text-muted-foreground",
201642
+ "aria-label": "Resources",
201643
+ "data-testid": "project-list__resources-button",
201644
+ onClick: ctx.openResources,
201645
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Activity, { className: "size-4" })
201646
+ }
201647
+ ) }),
201648
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { side: "top", children: "Resources" })
201649
+ ] }),
201650
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip$1, { children: [
201651
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
201652
+ Button,
201653
+ {
201654
+ size: "icon-sm",
201655
+ variant: "ghost",
201656
+ className: "text-muted-foreground",
201657
+ "aria-label": "Usage",
201658
+ "data-testid": "project-list__usage-button",
201659
+ onClick: ctx.openReports,
201660
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChartColumn, { className: "size-4" })
201661
+ }
201662
+ ) }),
201663
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { side: "top", children: "Usage" })
201664
+ ] }),
201665
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenu, { children: [
201666
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip$1, { children: [
201667
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
201668
+ Button,
201669
+ {
201670
+ size: "icon-sm",
201671
+ variant: "ghost",
201672
+ className: "text-muted-foreground",
201673
+ "aria-label": "More actions",
201674
+ "data-testid": "project-list__overflow-trigger",
201675
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Ellipsis, { className: "size-4" })
201676
+ }
201677
+ ) }) }),
201678
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { side: "top", children: "More" })
201679
+ ] }),
201680
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenuContent, { align: "end", children: [
201681
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenuItem, { onClick: ctx.openTasks, children: [
201682
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ListTodo, { className: "size-4" }),
201683
+ "Tasks"
201684
+ ] }),
201685
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenuItem, { onClick: ctx.openCronjobs, children: [
201686
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Timer$1, { className: "size-4" }),
201687
+ "Cronjobs"
201688
+ ] }),
201689
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenuItem, { onClick: ctx.openTunnel, children: [
201690
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
201691
+ Globe,
201692
+ {
201693
+ className: ctx.tunnelStatus === "error" ? "size-4 text-red-500" : ctx.tunnelStatus === "running" ? "size-4 text-green-500" : "size-4"
201694
+ }
201695
+ ),
201696
+ ctx.tunnelStatus === "running" ? "Mobile access" : "Start tunnel"
201697
+ ] })
201698
+ ] })
201699
+ ] })
201700
+ ] });
201701
+ }
201377
201702
  const bandTheme = {
201378
201703
  name: "band",
201379
201704
  className: "dockview-theme-band"
@@ -201393,12 +201718,12 @@ const PANEL_SHORTCUTS = {
201393
201718
  browser: "⇧⌘B"
201394
201719
  };
201395
201720
  const DockviewTerminalContainer = reactExports.lazy(
201396
- () => import("./DockviewTerminalContainer-YGo8Zbx1.js").then((m2) => ({
201721
+ () => import("./DockviewTerminalContainer-OevWE65L.js").then((m2) => ({
201397
201722
  default: m2.DockviewTerminalContainer
201398
201723
  }))
201399
201724
  );
201400
201725
  const DockviewBrowserContainer = reactExports.lazy(
201401
- () => import("./DockviewBrowserContainer-DvltiWxV.js").then((m2) => ({
201726
+ () => import("./DockviewBrowserContainer-C6QVux14.js").then((m2) => ({
201402
201727
  default: m2.DockviewBrowserContainer
201403
201728
  }))
201404
201729
  );
@@ -202092,15 +202417,50 @@ function SharedDockviewLayout() {
202092
202417
  if (!reference || !workspaceId) return;
202093
202418
  if (hiddenPanelsRef.current.includes("terminal")) return;
202094
202419
  apiRef.current?.getPanel("terminal")?.api.setActive();
202095
- queueMicrotask(() => {
202420
+ void (async () => {
202421
+ let terminalId;
202422
+ try {
202423
+ const focus2 = await trpc.panelFocus.get.query({ workspaceId });
202424
+ terminalId = focus2.terminal;
202425
+ } catch {
202426
+ }
202096
202427
  window.dispatchEvent(
202097
- new CustomEvent("band:terminal-insert", { detail: { reference, workspaceId } })
202428
+ new CustomEvent("band:terminal-insert", {
202429
+ detail: { reference, workspaceId, terminalId }
202430
+ })
202098
202431
  );
202099
- });
202432
+ })();
202100
202433
  };
202101
202434
  window.addEventListener("band:add-to-terminal", handler);
202102
202435
  return () => window.removeEventListener("band:add-to-terminal", handler);
202103
202436
  }, []);
202437
+ reactExports.useEffect(() => {
202438
+ const handler = (e3) => {
202439
+ const detail = e3.detail;
202440
+ const workspaceId = activeWorkspaceIdRef.current;
202441
+ if (!detail || !workspaceId) return;
202442
+ if (hiddenPanelsRef.current.includes("chat")) return;
202443
+ apiRef.current?.getPanel("chat")?.api.setActive();
202444
+ void (async () => {
202445
+ let chatId;
202446
+ try {
202447
+ const focus2 = await trpc.panelFocus.get.query({ workspaceId });
202448
+ chatId = focus2.chat;
202449
+ } catch {
202450
+ }
202451
+ const insert2 = {
202452
+ filePath: detail.filePath,
202453
+ startLine: detail.startLine,
202454
+ endLine: detail.endLine,
202455
+ workspaceId,
202456
+ chatId
202457
+ };
202458
+ window.dispatchEvent(new CustomEvent("band:chat-insert", { detail: insert2 }));
202459
+ })();
202460
+ };
202461
+ window.addEventListener("band:add-to-chat", handler);
202462
+ return () => window.removeEventListener("band:add-to-chat", handler);
202463
+ }, []);
202104
202464
  const addMissingPanel = reactExports.useCallback((api, panelId) => {
202105
202465
  if (!(panelId in components)) return;
202106
202466
  const anyExisting = api.getPanel("changes") ?? api.getPanel("files") ?? api.getPanel("terminal") ?? api.getPanel("chat");
@@ -203062,8 +203422,15 @@ function AppShell() {
203062
203422
  className: "h-full flex flex-col overflow-hidden border-r border-border bg-sidebar",
203063
203423
  "data-testid": "app-shell__sidebar",
203064
203424
  children: [
203065
- /* @__PURE__ */ jsxRuntimeExports.jsx(SidebarTitleBar, { ...navControlProps, offsetClass: titleBarOffset }),
203066
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(DashboardShell, { hideMenu: true, hideTitleBar: true }) })
203425
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
203426
+ SidebarTitleBar,
203427
+ {
203428
+ ...navControlProps,
203429
+ menuItems: void 0,
203430
+ offsetClass: titleBarOffset
203431
+ }
203432
+ ),
203433
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(DashboardShell, { hideTitleBar: true, bottomActions: /* @__PURE__ */ jsxRuntimeExports.jsx(ToolbarActionBar, {}) }) })
203067
203434
  ]
203068
203435
  }
203069
203436
  )
@@ -203113,12 +203480,12 @@ function RootLayout() {
203113
203480
  ] })
203114
203481
  ] });
203115
203482
  }
203116
- const $$splitComponentImporter$1 = () => import("./index-C-y9iHQ0.js");
203483
+ const $$splitComponentImporter$1 = () => import("./index-CHvqm6Lz.js");
203117
203484
  const Route$1 = createFileRoute("/")({
203118
203485
  component: lazyRouteComponent($$splitComponentImporter$1, "component")
203119
203486
  });
203120
- const $$splitNotFoundComponentImporter = () => import("./workspace._workspaceId-BrMajMrS.js");
203121
- const $$splitComponentImporter = () => import("./workspace._workspaceId-C9ijioXa.js");
203487
+ const $$splitNotFoundComponentImporter = () => import("./workspace._workspaceId-hnIpuUNX.js");
203488
+ const $$splitComponentImporter = () => import("./workspace._workspaceId-DRK2dblR.js");
203122
203489
  const Route2 = createFileRoute("/workspace/$workspaceId")({
203123
203490
  component: lazyRouteComponent($$splitComponentImporter, "component"),
203124
203491
  // Bookmarks / shared links from before route unification (`/workspace/$id/changes`,
@@ -203254,7 +203621,7 @@ export {
203254
203621
  sin as ay,
203255
203622
  min as az,
203256
203623
  LRLanguage as b,
203257
- ArrowLeft as b$,
203624
+ cn$2 as b$,
203258
203625
  insertNode as b0,
203259
203626
  positionNode as b1,
203260
203627
  getLineFunctionsWithOffset as b2,
@@ -203285,13 +203652,13 @@ export {
203285
203652
  MessageSquare as bR,
203286
203653
  useIsDesktop as bS,
203287
203654
  ToolbarOverflowProvider as bT,
203288
- ToolbarOverflowMenuItems as bU,
203655
+ ToolbarActionBar as bU,
203289
203656
  isDesktop as bV,
203290
- GitCompare as bW,
203291
- FolderOpen as bX,
203292
- useDashboardStore as bY,
203293
- useNavigate as bZ,
203294
- DesktopDragRegion as b_,
203657
+ array$2 as bW,
203658
+ ordinal as bX,
203659
+ Root$5 as bY,
203660
+ Content$1 as bZ,
203661
+ Close as b_,
203295
203662
  NodeWeakMap as ba,
203296
203663
  snippetCompletion as bb,
203297
203664
  Tag as bc,
@@ -203319,121 +203686,129 @@ export {
203319
203686
  isFunction$1 as by,
203320
203687
  isEmpty as bz,
203321
203688
  continuedIndent as c,
203322
- timeTuesday as c$,
203323
- ChevronsUpDown as c0,
203324
- DiffView as c1,
203325
- CodeBrowserView as c2,
203326
- QuickOpenDialog as c3,
203327
- SearchFilesDialog as c4,
203328
- WorkspacePickerDialog as c5,
203329
- useDiffTarget as c6,
203330
- useSettingsQuery as c7,
203331
- agentTypeSupportsSessionListing as c8,
203332
- ChatView as c9,
203333
- Search as cA,
203334
- Trash2 as cB,
203335
- DropdownMenu as cC,
203336
- DropdownMenuTrigger as cD,
203337
- ChevronDown as cE,
203338
- DropdownMenuContent as cF,
203339
- DropdownMenuItem as cG,
203340
- TriangleAlert as cH,
203341
- RotateCw as cI,
203342
- Rgb as cJ,
203343
- rgbConvert as cK,
203344
- define as cL,
203345
- extend$2 as cM,
203346
- Color as cN,
203347
- nogamma as cO,
203348
- hue as cP,
203349
- time$2 as cQ,
203350
- min$1 as cR,
203351
- max$1 as cS,
203352
- dayjs2 as cT,
203353
- timeFormat as cU,
203354
- timeMonth as cV,
203355
- timeSunday as cW,
203356
- timeSaturday as cX,
203357
- timeFriday as cY,
203358
- timeThursday as cZ,
203359
- timeWednesday as c_,
203360
- array$2 as ca,
203361
- ordinal as cb,
203362
- getUserDefinedConfig as cc,
203363
- getIconSVG as cd,
203364
- registerIconPacks as ce,
203365
- unknownIcon as cf,
203366
- isFilePath as cg,
203367
- writeClipboardText as ch,
203368
- readClipboardText as ci,
203369
- ArrowUp as cj,
203370
- ArrowDown as ck,
203371
- ArrowRight as cl,
203372
- ClipboardCopy as cm,
203373
- ClipboardPaste as cn,
203374
- getCurrentZoomLevel as co,
203375
- openExternalUrl as cp,
203376
- subscribeToZoomChanges as cq,
203377
- SearchBar as cr,
203378
- ZOOM_CSS_VAR as cs,
203379
- invoke as ct,
203380
- listen as cu,
203381
- reactDomExports as cv,
203382
- Globe as cw,
203383
- Popover as cx,
203384
- PopoverTrigger as cy,
203385
- PopoverContent as cz,
203689
+ dayjs2 as c$,
203690
+ Title as c0,
203691
+ Description as c1,
203692
+ Portal$4 as c2,
203693
+ Overlay$1 as c3,
203694
+ GitCompare as c4,
203695
+ FolderOpen as c5,
203696
+ useDashboardStore as c6,
203697
+ DesktopDragRegion as c7,
203698
+ Menu$1 as c8,
203699
+ ChevronsUpDown as c9,
203700
+ ZOOM_CSS_VAR as cA,
203701
+ invoke as cB,
203702
+ listen as cC,
203703
+ reactDomExports as cD,
203704
+ Globe as cE,
203705
+ Popover as cF,
203706
+ PopoverTrigger as cG,
203707
+ PopoverContent as cH,
203708
+ Search as cI,
203709
+ Trash2 as cJ,
203710
+ DropdownMenu as cK,
203711
+ DropdownMenuTrigger as cL,
203712
+ ChevronDown as cM,
203713
+ DropdownMenuContent as cN,
203714
+ DropdownMenuItem as cO,
203715
+ TriangleAlert as cP,
203716
+ RotateCw as cQ,
203717
+ Rgb as cR,
203718
+ rgbConvert as cS,
203719
+ define as cT,
203720
+ extend$2 as cU,
203721
+ Color as cV,
203722
+ nogamma as cW,
203723
+ hue as cX,
203724
+ time$2 as cY,
203725
+ min$1 as cZ,
203726
+ max$1 as c_,
203727
+ DiffView as ca,
203728
+ CodeBrowserView as cb,
203729
+ QuickOpenDialog as cc,
203730
+ SearchFilesDialog as cd,
203731
+ WorkspacePickerDialog as ce,
203732
+ useDiffTarget as cf,
203733
+ useSettingsQuery as cg,
203734
+ agentTypeSupportsSessionListing as ch,
203735
+ ChatView as ci,
203736
+ getUserDefinedConfig as cj,
203737
+ getIconSVG as ck,
203738
+ registerIconPacks as cl,
203739
+ unknownIcon as cm,
203740
+ isFilePath as cn,
203741
+ writeClipboardText as co,
203742
+ readClipboardText as cp,
203743
+ ArrowLeft as cq,
203744
+ ArrowUp as cr,
203745
+ ArrowDown as cs,
203746
+ ArrowRight as ct,
203747
+ ClipboardCopy as cu,
203748
+ ClipboardPaste as cv,
203749
+ getCurrentZoomLevel as cw,
203750
+ openExternalUrl as cx,
203751
+ subscribeToZoomChanges as cy,
203752
+ SearchBar as cz,
203386
203753
  foldInside as d,
203387
- timeMonday as d0,
203388
- timeDay as d1,
203389
- timeHour as d2,
203390
- timeMinute as d3,
203391
- second as d4,
203392
- millisecond as d5,
203393
- isObject$2 as d6,
203394
- isIterateeCall$1 as d7,
203395
- keysIn as d8,
203396
- eq as d9,
203397
- getTag$1 as dA,
203398
- nodeUtil as dB,
203399
- copyArray as dC,
203400
- isBuffer$1 as dD,
203401
- cloneBuffer as dE,
203402
- initCloneObject as dF,
203403
- Stack as dG,
203404
- MapCache as dH,
203405
- Uint8Array$1 as dI,
203406
- isTypedArray$1 as dJ,
203407
- isLength$1 as dK,
203408
- Set$1 as dL,
203409
- createAssigner as dM,
203410
- isPrototype as dN,
203411
- router as dO,
203412
- isArrayLike$1 as da,
203413
- isArray$1 as db,
203414
- identity$1 as dc,
203415
- isIndex$1 as dd,
203416
- assignValue as de,
203417
- format as df,
203418
- styles2String as dg,
203419
- isLabelStyle as dh,
203420
- setToString as di,
203421
- overRest as dj,
203422
- baseFor as dk,
203423
- baseAssignValue as dl,
203424
- baseUnary as dm,
203425
- merge$1 as dn,
203426
- isObjectLike$1 as dp,
203427
- baseGetTag as dq,
203428
- Symbol$1 as dr,
203429
- arrayLikeKeys as ds,
203430
- baseKeys as dt,
203431
- memoize as du,
203432
- isArguments$1 as dv,
203433
- copyObject as dw,
203434
- getPrototype as dx,
203435
- cloneArrayBuffer as dy,
203436
- cloneTypedArray as dz,
203754
+ timeFormat as d0,
203755
+ timeMonth as d1,
203756
+ timeSunday as d2,
203757
+ timeSaturday as d3,
203758
+ timeFriday as d4,
203759
+ timeThursday as d5,
203760
+ timeWednesday as d6,
203761
+ timeTuesday as d7,
203762
+ timeMonday as d8,
203763
+ timeDay as d9,
203764
+ arrayLikeKeys as dA,
203765
+ baseKeys as dB,
203766
+ memoize as dC,
203767
+ isArguments$1 as dD,
203768
+ copyObject as dE,
203769
+ getPrototype as dF,
203770
+ cloneArrayBuffer as dG,
203771
+ cloneTypedArray as dH,
203772
+ getTag$1 as dI,
203773
+ nodeUtil as dJ,
203774
+ copyArray as dK,
203775
+ isBuffer$1 as dL,
203776
+ cloneBuffer as dM,
203777
+ initCloneObject as dN,
203778
+ Stack as dO,
203779
+ MapCache as dP,
203780
+ Uint8Array$1 as dQ,
203781
+ isTypedArray$1 as dR,
203782
+ isLength$1 as dS,
203783
+ Set$1 as dT,
203784
+ createAssigner as dU,
203785
+ isPrototype as dV,
203786
+ router as dW,
203787
+ timeHour as da,
203788
+ timeMinute as db,
203789
+ second as dc,
203790
+ millisecond as dd,
203791
+ isObject$2 as de,
203792
+ isIterateeCall$1 as df,
203793
+ keysIn as dg,
203794
+ eq as dh,
203795
+ isArrayLike$1 as di,
203796
+ isArray$1 as dj,
203797
+ identity$1 as dk,
203798
+ isIndex$1 as dl,
203799
+ assignValue as dm,
203800
+ format as dn,
203801
+ styles2String as dp,
203802
+ isLabelStyle as dq,
203803
+ setToString as dr,
203804
+ overRest as ds,
203805
+ baseFor as dt,
203806
+ baseAssignValue as du,
203807
+ baseUnary as dv,
203808
+ merge$1 as dw,
203809
+ isObjectLike$1 as dx,
203810
+ baseGetTag as dy,
203811
+ Symbol$1 as dz,
203437
203812
  ifNotIn as e,
203438
203813
  foldNodeProp as f,
203439
203814
  completeFromList as g,