@kabmo-labs/kabmo 0.46.0 → 0.47.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 (301) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +439 -435
  3. package/dist/client/static/js/{CsvGrid-br4j001k.js → CsvGrid-vfgttmym.js} +2 -2
  4. package/dist/client/static/js/{DocxView-kmtkbmmw.js → DocxView-dc41t6rp.js} +2 -2
  5. package/dist/client/static/js/{DrawioView-3df0g3jr.js → DrawioView-wpwr38d9.js} +2 -2
  6. package/dist/client/static/js/HtmlPreview-23n7t5cs.js +1 -0
  7. package/dist/client/static/js/ImageView-mvjb3qh1.js +1 -0
  8. package/dist/client/static/js/LayoutWrapper-eenx0hp2.js +2 -0
  9. package/dist/client/static/js/{Modal-tmxhxd6q.js → Modal-dsqhas10.js} +13 -13
  10. package/dist/client/static/js/{PdfView-p5z7c7eg.js → PdfView-cpvsbfk0.js} +1 -1
  11. package/dist/client/static/js/{SessionsView-t06h6zfx.js → SessionsView-s0crtcm8.js} +1 -1
  12. package/dist/client/static/js/{SheetView-agw459v2.js → SheetView-n6mst0hq.js} +13 -13
  13. package/dist/client/static/js/{SvgPreview-b9rfy1h6.js → SvgPreview-g2aqq812.js} +1 -1
  14. package/dist/client/static/js/{abnfDiagram-O67JEVCF-wbnhzcnj.js → abnfDiagram-O67JEVCF-3vac8sq4.js} +1 -1
  15. package/dist/client/static/js/architecture-7GRP2DOG-b5w9mnn5.js +1 -0
  16. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-t2sgevea.js → architectureDiagram-NJMV4G6O-1nh4htz2.js} +3 -3
  17. package/dist/client/static/js/{astro-hyj5wege.js → astro-63zcysj7.js} +1 -1
  18. package/dist/client/static/js/bash-hv3167gh.js +1 -0
  19. package/dist/client/static/js/{blockDiagram-BEXU5L5S-v2nzp54a.js → blockDiagram-BEXU5L5S-62z6kaar.js} +2 -2
  20. package/dist/client/static/js/{c4Diagram-YGBWAQC7-7h03146b.js → c4Diagram-YGBWAQC7-rts5zgx4.js} +3 -3
  21. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-m57e9kp1.js → classDiagram-v2-NBCMYWYE-tnpww186.js} +1 -1
  22. package/dist/client/static/js/{cose-bilkent-JH36ORCC-c4tnh4mg.js → cose-bilkent-JH36ORCC-8vsjbzwa.js} +1 -1
  23. package/dist/client/static/js/cpp-v2mqp8j7.js +1 -0
  24. package/dist/client/static/js/css-x7gyc3ta.js +1 -0
  25. package/dist/client/static/js/cynefin-OW5HDTMX-kdj8rjc1.js +1 -0
  26. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-mjf6njey.js → cynefinDiagram-VND7K2PF-005gc8km.js} +1 -1
  27. package/dist/client/static/js/{dagre-6A5THRUB-6yma9ch3.js → dagre-6A5THRUB-41zsteyd.js} +2 -2
  28. package/dist/client/static/js/{diagram-22UHCM2B-1q4ce2gb.js → diagram-22UHCM2B-prsm18a1.js} +3 -3
  29. package/dist/client/static/js/{diagram-3UASUU5V-0ttps29p.js → diagram-3UASUU5V-5nx9wf04.js} +1 -1
  30. package/dist/client/static/js/{diagram-ATOU4E4O-1mzexgv1.js → diagram-ATOU4E4O-k3d4z3aq.js} +3 -3
  31. package/dist/client/static/js/{diagram-CDSNMT55-4ae89t23.js → diagram-CDSNMT55-x2c5x5j2.js} +2 -2
  32. package/dist/client/static/js/{diagram-MLGK6HIB-057jaqvh.js → diagram-MLGK6HIB-nvr76jqh.js} +1 -1
  33. package/dist/client/static/js/{diagram-MPIPVDR6-p6yyq5sx.js → diagram-MPIPVDR6-v1jpzp9p.js} +1 -1
  34. package/dist/client/static/js/{dockerfile-00hqsk9c.js → dockerfile-vz6va73h.js} +1 -1
  35. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-bsk7dvm4.js → ebnfDiagram-ZINNZB2B-0v4tqr9v.js} +1 -1
  36. package/dist/client/static/js/{elk-276RUBZZ-dsq91er5.js → elk-276RUBZZ-qfn4r7xj.js} +1 -1
  37. package/dist/client/static/js/{erDiagram-OPXOYQCR-p7p13mbh.js → erDiagram-OPXOYQCR-cd667n9f.js} +4 -4
  38. package/dist/client/static/js/{erlang-814e8qy5.js → erlang-vk66vt7q.js} +1 -1
  39. package/dist/client/static/js/eventmodeling-NTZA5JFV-m57b7ytw.js +1 -0
  40. package/dist/client/static/js/flowDiagram-KWPJA3E3-fasj2gxy.js +1 -0
  41. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-bwgnttyk.js → ganttDiagram-FUAMR5RP-ps0h3drm.js} +1 -1
  42. package/dist/client/static/js/gitGraph-4MIJSDKK-wvzsc4ph.js +1 -0
  43. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-ca0gj5am.js → gitGraphDiagram-X574FWY7-fts23jer.js} +2 -2
  44. package/dist/client/static/js/graphql-a4gbqpj9.js +1 -0
  45. package/dist/client/static/js/{index-y2z8nsvw.js → index-0dkc6z8e.js} +2 -2
  46. package/dist/client/static/js/{index-eqhjs1yv.js → index-1d8bxjsz.js} +4 -4
  47. package/dist/client/static/js/{index-kty4ncsr.js → index-1whzs9kb.js} +2 -2
  48. package/dist/client/static/js/{index-qfxn7yh5.js → index-396r53n0.js} +2 -2
  49. package/dist/client/static/js/{index-qn200x1b.js → index-39d8zbkx.js} +6 -6
  50. package/dist/client/static/js/{index-dn7hg4em.js → index-3nsrnyqr.js} +2 -2
  51. package/dist/client/static/js/{index-jkay7aw7.js → index-4jzsr1ky.js} +2 -2
  52. package/dist/client/static/js/{index-064vdkrs.js → index-4wnzs76g.js} +1 -1
  53. package/dist/client/static/js/{index-16sd19f0.js → index-4x9p7hf9.js} +2 -2
  54. package/dist/client/static/js/{index-zq0qxb17.js → index-52nd4hgm.js} +1 -1
  55. package/dist/client/static/js/{index-8pksqzwq.js → index-54mkp2r2.js} +1 -1
  56. package/dist/client/static/js/{index-abs635a1.js → index-56rtb871.js} +25 -25
  57. package/dist/client/static/js/{index-dxvtjn6a.js → index-5f4b44ay.js} +2 -2
  58. package/dist/client/static/js/{index-95kese1h.js → index-6009v8jf.js} +1 -1
  59. package/dist/client/static/js/{index-29npynva.js → index-62jgcgfd.js} +5 -5
  60. package/dist/client/static/js/{index-nw5mvcaj.js → index-64p1dncg.js} +2 -2
  61. package/dist/client/static/js/{index-fj5rsp5v.js → index-6d6hxwb5.js} +2 -2
  62. package/dist/client/static/js/{index-19x11s5w.js → index-70g527sb.js} +2 -2
  63. package/dist/client/static/js/{index-9d3n04vb.js → index-7zeah164.js} +2 -2
  64. package/dist/client/static/js/{index-5h8y54t6.js → index-7zedprz3.js} +1 -1
  65. package/dist/client/static/js/{index-g7s0wsag.js → index-9ab6xaxd.js} +2 -2
  66. package/dist/client/static/js/index-9vqkyj58.js +3 -0
  67. package/dist/client/static/js/{index-x1fqhhpp.js → index-9xsf8162.js} +35 -35
  68. package/dist/client/static/js/{index-j718pxb3.js → index-a4h5np9r.js} +2 -2
  69. package/dist/client/static/js/{index-bjv5ga2e.js → index-an2wv33f.js} +2 -2
  70. package/dist/client/static/js/{index-64sqfr4a.js → index-c5hjht5e.js} +2 -2
  71. package/dist/client/static/js/{index-aagt3382.js → index-c63qyysm.js} +1 -1
  72. package/dist/client/static/js/{index-red856x6.js → index-ccgzzydx.js} +1 -1
  73. package/dist/client/static/js/{index-ex5dtdx2.js → index-cra9mgkq.js} +4 -4
  74. package/dist/client/static/js/index-cvyqp8nz.css +1 -0
  75. package/dist/client/static/js/index-d2xtbabt.js +2 -0
  76. package/dist/client/static/js/{index-7055hdx1.js → index-dxkefysk.js} +1 -1
  77. package/dist/client/static/js/index-dxp2yvy7.js +2 -0
  78. package/dist/client/static/js/{index-vjmg7kn5.js → index-dyc886cc.js} +1 -1
  79. package/dist/client/static/js/{index-5wz0y88c.js → index-dzeyd153.js} +2 -2
  80. package/dist/client/static/js/{index-qf3y3ahx.js → index-e5j5gc4h.js} +2 -2
  81. package/dist/client/static/js/{index-2ks0m8ss.js → index-evmcc5qh.js} +2 -2
  82. package/dist/client/static/js/{index-f7te27n5.js → index-f2ahkev0.js} +5 -5
  83. package/dist/client/static/js/{index-5gf52a6d.js → index-fjex1y0t.js} +2 -2
  84. package/dist/client/static/js/{index-bafe7hmd.js → index-fxd8dfj4.js} +2 -2
  85. package/dist/client/static/js/{index-trvqvb1v.js → index-g4kkapka.js} +2 -2
  86. package/dist/client/static/js/{index-561gkvve.js → index-gzkzwgzv.js} +2 -2
  87. package/dist/client/static/js/{index-twsbv1yn.js → index-n1yr4khe.js} +1 -1
  88. package/dist/client/static/js/{index-d23eacf2.js → index-nkahe229.js} +2 -2
  89. package/dist/client/static/js/{index-3bf7r7z4.js → index-p6s3fz6b.js} +11 -11
  90. package/dist/client/static/js/{index-hnb66d3s.js → index-q4ke39rh.js} +2 -2
  91. package/dist/client/static/js/index-qtd0e38d.js +1 -0
  92. package/dist/client/static/js/{index-ncpwteyt.js → index-tqgj7rd9.js} +2 -2
  93. package/dist/client/static/js/{index-wbws16ag.js → index-x0xspam4.js} +2 -2
  94. package/dist/client/static/js/{index-amys498v.js → index-x2v1zmth.js} +186 -186
  95. package/dist/client/static/js/{index-pwe6chtp.js → index-x9hfvbz6.js} +1 -1
  96. package/dist/client/static/js/{index-dr5hca5b.js → index-xk1cqjkn.js} +3 -3
  97. package/dist/client/static/js/{index-k5zfzgez.js → index-y6ke70e6.js} +2 -2
  98. package/dist/client/static/js/{index-zedt16w7.js → index-zhjjpvcc.js} +1 -1
  99. package/dist/client/static/js/info-A6RAGUB7-ym2xevn8.js +1 -0
  100. package/dist/client/static/js/{infoDiagram-VRGFBTTK-7q58qdf1.js → infoDiagram-VRGFBTTK-88qbtpq5.js} +1 -1
  101. package/dist/client/static/js/ini-80p6sp79.js +1 -0
  102. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-9jmeszag.js → ishikawaDiagram-OU5B5YK6-s8bagk00.js} +1 -1
  103. package/dist/client/static/js/java-mm2b3s9b.js +1 -0
  104. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-0d7xe845.js → journeyDiagram-ZHPQQLJL-hz8z0b9x.js} +2 -2
  105. package/dist/client/static/js/json-fzy76fkw.js +1 -0
  106. package/dist/client/static/js/jsx-c7v2f8s7.js +1 -0
  107. package/dist/client/static/js/{julia-yv2j8qd0.js → julia-dm0j9apa.js} +1 -1
  108. package/dist/client/static/js/{kanban-definition-PNTS6WVX-7p83rwdn.js → kanban-definition-PNTS6WVX-sjjnjb51.js} +1 -1
  109. package/dist/client/static/js/lua-ppfdxrmv.js +1 -0
  110. package/dist/client/static/js/markdown-xed7y3ds.js +1 -0
  111. package/dist/client/static/js/{mermaid.core-hwhzw0wv.js → mermaid.core-zvwygxbh.js} +7 -7
  112. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-hy0rtr7t.js → mindmap-definition-NLK3R4M7-kgj8enan.js} +2 -2
  113. package/dist/client/static/js/one-dark-pro-mq6sn6a2.js +1 -0
  114. package/dist/client/static/js/one-light-pt6t6vax.js +1 -0
  115. package/dist/client/static/js/packet-AYTQ26CC-01vcsy6x.js +1 -0
  116. package/dist/client/static/js/{pegDiagram-GJSIUBJH-kd8t53tx.js → pegDiagram-GJSIUBJH-gxzw1qwa.js} +1 -1
  117. package/dist/client/static/js/{perl-917pjq5a.js → perl-4jcm2jxv.js} +1 -1
  118. package/dist/client/static/js/{php-hwz75qzt.js → php-q32mec74.js} +1 -1
  119. package/dist/client/static/js/pie-WAS4IAKB-053gzkmh.js +1 -0
  120. package/dist/client/static/js/{pieDiagram-5QR66LMP-h3x03f80.js → pieDiagram-5QR66LMP-pdqwyqcm.js} +1 -1
  121. package/dist/client/static/js/properties-8ysbq2n2.js +1 -0
  122. package/dist/client/static/js/python-4ysexc8s.js +1 -0
  123. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-y2b1ncbg.js → quadrantDiagram-O4NWA36T-yx2t364p.js} +1 -1
  124. package/dist/client/static/js/r-hrsw5arc.js +1 -0
  125. package/dist/client/static/js/radar-RG4KPBEZ-bkpby8am.js +1 -0
  126. package/dist/client/static/js/railroad-74A4TZTK-67bxrjgw.js +1 -0
  127. package/dist/client/static/js/railroad-abnf-HS5TGJTU-xj9ymacg.js +1 -0
  128. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-2xxpbnf6.js +1 -0
  129. package/dist/client/static/js/railroad-peg-WCYAUIDC-78w88znz.js +1 -0
  130. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-x188rcxf.js → railroadDiagram-XR7U4H2S-800fdzkr.js} +1 -1
  131. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-g5e9fk17.js → requirementDiagram-PLB6GJNP-vc5rpgtm.js} +1 -1
  132. package/dist/client/static/js/{ruby-er7ayhte.js → ruby-npmpb290.js} +1 -1
  133. package/dist/client/static/js/{rust-1v8xbxn9.js → rust-waks43wh.js} +1 -1
  134. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-y9ht91gf.js → sankeyDiagram-IPEJSGJF-ccjk8zgn.js} +2 -2
  135. package/dist/client/static/js/{sass-n47tt136.js → sass-502a4r7y.js} +1 -1
  136. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-pp8s63rt.js → sequenceDiagram-PO4LG4MO-c0tk7gfn.js} +6 -6
  137. package/dist/client/static/js/{sizeCapture-INFHLROL-k6dhfxex.js → sizeCapture-INFHLROL-fma9p1vy.js} +1 -1
  138. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-y3akpsm4.js → stateDiagram-v2-GCMORJYK-d8f24b7j.js} +2 -2
  139. package/dist/client/static/js/{svelte-2pmz35vx.js → svelte-c15d0421.js} +1 -1
  140. package/dist/client/static/js/{swimlanes-2SLR337P-89081dr3.js → swimlanes-2SLR337P-sdt7qy36.js} +1 -1
  141. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-rz309qrx.js +8 -0
  142. package/dist/client/static/js/{timeline-definition-EJHVYXUP-tz6r8g3q.js → timeline-definition-EJHVYXUP-rv8qyr8b.js} +2 -2
  143. package/dist/client/static/js/treeView-Q6P3EWNA-g2bkjr4z.js +1 -0
  144. package/dist/client/static/js/treemap-WGGIJYW6-pj7yw9rw.js +1 -0
  145. package/dist/client/static/js/tsx-xjp2ds8g.js +1 -0
  146. package/dist/client/static/js/typescript-yg97da8h.js +1 -0
  147. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-yq2y1b09.js → usecaseDiagram-POWQR4AR-w6ew1red.js} +2 -2
  148. package/dist/client/static/js/{vennDiagram-UO4OBE2U-qdmjf6x3.js → vennDiagram-UO4OBE2U-p9axw7ch.js} +1 -1
  149. package/dist/client/static/js/{vue-d5gpjfgn.js → vue-xpemy62d.js} +1 -1
  150. package/dist/client/static/js/wardley-WFR3VGLG-c7ekf8r2.js +1 -0
  151. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-3n2sm7rj.js → wardleyDiagram-VNRHLVJA-5ewc8s4p.js} +1 -1
  152. package/dist/client/static/js/xml-nrb23phz.js +1 -0
  153. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-d7n2av2t.js → xychartDiagram-PMCCYNJV-7n4gn7k6.js} +2 -2
  154. package/dist/client/static/js/yaml-sqs6pjpx.js +1 -0
  155. package/marketplace/marketplace.json +34 -7
  156. package/marketplace/plugins/kanban/README.md +143 -0
  157. package/marketplace/plugins/kanban/icon.svg +5 -0
  158. package/marketplace/plugins/kanban/package.json +30 -0
  159. package/marketplace/plugins/kanban/src/app.tsx +34 -0
  160. package/marketplace/plugins/kanban/src/mcp-tools.ts +296 -0
  161. package/marketplace/plugins/kanban/src/mcp.test.ts +199 -0
  162. package/marketplace/plugins/kanban/src/mcp.ts +148 -0
  163. package/marketplace/plugins/kanban/src/panel/CardSheet.tsx +319 -0
  164. package/marketplace/plugins/kanban/src/panel/CardTile.tsx +97 -0
  165. package/marketplace/plugins/kanban/src/panel/StageColumn.tsx +116 -0
  166. package/marketplace/plugins/kanban/src/panel/StageSheet.tsx +249 -0
  167. package/marketplace/plugins/kanban/src/panel/catalogs.ts +114 -0
  168. package/marketplace/plugins/kanban/src/panel/index.tsx +327 -0
  169. package/marketplace/plugins/kanban/src/panel/panel.test.ts +219 -0
  170. package/marketplace/plugins/kanban/src/panel/start-work.ts +132 -0
  171. package/marketplace/plugins/kanban/src/panel/use-board.ts +148 -0
  172. package/marketplace/plugins/kanban/src/panel/use-card-detail.ts +70 -0
  173. package/marketplace/plugins/kanban/src/panel/use-writes.ts +123 -0
  174. package/marketplace/plugins/kanban/src/protocol.ts +180 -0
  175. package/marketplace/plugins/kanban/src/server.test.ts +113 -0
  176. package/marketplace/plugins/kanban/src/server.ts +227 -0
  177. package/marketplace/plugins/kanban/src/store/board.test.ts +311 -0
  178. package/marketplace/plugins/kanban/src/store/board.ts +147 -0
  179. package/marketplace/plugins/kanban/src/store/cards.ts +228 -0
  180. package/marketplace/plugins/kanban/src/store/fs.ts +159 -0
  181. package/marketplace/plugins/kanban/src/store/ops.ts +245 -0
  182. package/marketplace/plugins/kanban/src/store/resolve.test.ts +82 -0
  183. package/marketplace/plugins/kanban/src/store/resolve.ts +135 -0
  184. package/marketplace/plugins/kanban/tsconfig.json +26 -0
  185. package/package.json +2 -2
  186. package/src/client/components/common/file-icon/index.tsx +1 -1
  187. package/src/client/components/layout/desktop-layout/LeftColumn.tsx +14 -4
  188. package/src/client/components/layout/desktop-layout/RightColumn.test.tsx +204 -0
  189. package/src/client/components/layout/desktop-layout/RightColumn.tsx +37 -16
  190. package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +34 -7
  191. package/src/client/components/layout/desktop-layout/index.tsx +17 -22
  192. package/src/client/components/mobile/RightSidebar.tsx +10 -8
  193. package/src/client/components/mobile/mobile-right-sidebar/EditorSurface.tsx +2 -0
  194. package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +11 -3
  195. package/src/client/components/mobile/mobile-session-sidebar/use-drawer-tabs.ts +2 -1
  196. package/src/client/components/settings/categories/appearance-settings/EditorThemeSection.test.tsx +21 -0
  197. package/src/client/components/settings/categories/appearance-settings/EditorThemeSection.tsx +8 -4
  198. package/src/client/components/settings/categories/appearance-settings/ThemeCard.tsx +8 -2
  199. package/src/client/components/settings/categories/appearance-settings/ThemeGrid.tsx +15 -4
  200. package/src/client/components/workspace/chat-timeline/MessageList.test.ts +11 -0
  201. package/src/client/components/workspace/chat-timeline/MessageList.tsx +29 -21
  202. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +21 -0
  203. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +7 -1
  204. package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +3 -1
  205. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.tsx +1 -1
  206. package/src/client/components/workspace/editor/FilePane.tsx +4 -2
  207. package/src/client/components/workspace/editor/Tabs.tsx +7 -1
  208. package/src/client/components/workspace/editor/Toolbar.tsx +7 -1
  209. package/src/client/components/workspace/editor/chrome-rows.test.tsx +126 -0
  210. package/src/client/components/workspace/editor/viewers/HtmlPreview.test.tsx +94 -0
  211. package/src/client/components/workspace/editor/viewers/HtmlPreview.tsx +71 -0
  212. package/src/client/components/workspace/editor/viewers/bytes.ts +1 -1
  213. package/src/client/components/workspace/editor/viewers/dispatch.tsx +18 -2
  214. package/src/client/components/workspace/editor/viewers/viewers.test.ts +14 -1
  215. package/src/client/components/workspace/panel-header/index.test.tsx +2 -1
  216. package/src/client/components/workspace/panel-header/index.tsx +6 -4
  217. package/src/client/hooks/chat/timeline/row-measure.ts +75 -0
  218. package/src/client/hooks/chat/timeline/row-window.test.ts +41 -21
  219. package/src/client/hooks/chat/timeline/row-window.ts +6 -24
  220. package/src/client/hooks/editor/resolve-viewer.ts +1 -1
  221. package/src/client/hooks/editor/use-editor-drop.ts +14 -0
  222. package/src/client/hooks/editor/use-editor-tab-state.ts +5 -4
  223. package/src/client/hooks/ui/media-query.ts +27 -0
  224. package/src/client/hooks/workspace/file-tabs.ts +10 -0
  225. package/src/client/hooks/workspace/panel-tabs-reveal.test.tsx +20 -17
  226. package/src/client/hooks/workspace/panel-tabs-reveal.ts +29 -17
  227. package/src/client/hooks/workspace/panel-tabs.ts +3 -2
  228. package/src/client/hooks/workspace/right-panel-presence.test.ts +152 -0
  229. package/src/client/hooks/workspace/right-panel-presence.ts +119 -0
  230. package/src/client/hooks/workspace/session-state/index.test.tsx +145 -0
  231. package/src/client/hooks/workspace/session-state/index.ts +28 -16
  232. package/src/client/lib/router/search-params.test.ts +83 -0
  233. package/src/client/lib/router/search-params.ts +14 -3
  234. package/src/server/lib/mcp/session-mcp.test.ts +64 -1
  235. package/src/server/lib/mcp/session-overlay.server.ts +7 -4
  236. package/src/server/lib/omp/rpc/constants.test.ts +31 -0
  237. package/src/server/lib/omp/rpc/constants.ts +19 -0
  238. package/src/server/lib/omp/rpc/session-new.ts +78 -0
  239. package/src/server/lib/omp/rpc/session-registry.ts +22 -49
  240. package/src/server/lib/omp/rpc/spawn-mcp.ts +8 -1
  241. package/src/server/lib/omp/session/blobs.server.ts +2 -1
  242. package/src/server/lib/plugins/e2e.test.ts +71 -2
  243. package/src/server/lib/plugins/loader.server.ts +20 -1
  244. package/src/server/lib/plugins/module-import.server.ts +45 -0
  245. package/src/server/routes/agent/new-prompt.test.ts +81 -0
  246. package/src/server/routes/agent/new.ts +78 -4
  247. package/src/server/routes/fs/raw.test.ts +12 -0
  248. package/src/server/routes/fs/raw.ts +2 -6
  249. package/src/server/routes/wiki/asset.ts +1 -1
  250. package/src/shared/lib/fs/document-kind.test.ts +39 -2
  251. package/src/shared/lib/fs/document-kind.ts +49 -1
  252. package/src/shared/lib/fs/file-kind.test.ts +30 -3
  253. package/src/shared/lib/fs/file-kind.ts +7 -104
  254. package/src/shared/lib/fs/mime.ts +159 -0
  255. package/src/shared/lib/workspace/sidebar-width.test.ts +34 -0
  256. package/src/shared/lib/workspace/sidebar-width.ts +33 -0
  257. package/src/shared/lib/workspace/workspace-panel-widths.test.ts +124 -0
  258. package/src/shared/lib/workspace/workspace-panel-widths.ts +115 -18
  259. package/dist/client/static/js/ImageView-2r8p5z3y.js +0 -1
  260. package/dist/client/static/js/LayoutWrapper-rq3d2a4e.js +0 -2
  261. package/dist/client/static/js/architecture-7GRP2DOG-pvb4d65d.js +0 -1
  262. package/dist/client/static/js/bash-8d8z8zrg.js +0 -1
  263. package/dist/client/static/js/cpp-620mvjkk.js +0 -1
  264. package/dist/client/static/js/css-bt76kxbq.js +0 -1
  265. package/dist/client/static/js/cynefin-OW5HDTMX-gmx4vean.js +0 -1
  266. package/dist/client/static/js/eventmodeling-NTZA5JFV-vrnheyh7.js +0 -1
  267. package/dist/client/static/js/flowDiagram-KWPJA3E3-7b4w6phx.js +0 -1
  268. package/dist/client/static/js/gitGraph-4MIJSDKK-n6wnc8st.js +0 -1
  269. package/dist/client/static/js/graphql-j1a6zp7m.js +0 -1
  270. package/dist/client/static/js/index-3qnjdjg2.js +0 -1
  271. package/dist/client/static/js/index-4bqssvt6.js +0 -2
  272. package/dist/client/static/js/index-dpy3ewrn.css +0 -1
  273. package/dist/client/static/js/index-gq5w5w8x.js +0 -2
  274. package/dist/client/static/js/index-ta6gpcpw.js +0 -3
  275. package/dist/client/static/js/info-A6RAGUB7-1xtdxjz2.js +0 -1
  276. package/dist/client/static/js/ini-5f4zqtqr.js +0 -1
  277. package/dist/client/static/js/java-jj41mty3.js +0 -1
  278. package/dist/client/static/js/json-rnh2h17x.js +0 -1
  279. package/dist/client/static/js/jsx-4gecrt29.js +0 -1
  280. package/dist/client/static/js/lua-zszaw2f7.js +0 -1
  281. package/dist/client/static/js/markdown-nm6gw4v4.js +0 -1
  282. package/dist/client/static/js/one-dark-pro-4b8er03c.js +0 -1
  283. package/dist/client/static/js/one-light-e6r3vsz4.js +0 -1
  284. package/dist/client/static/js/packet-AYTQ26CC-zm1r82x5.js +0 -1
  285. package/dist/client/static/js/pie-WAS4IAKB-sqa7321j.js +0 -1
  286. package/dist/client/static/js/properties-rkptax7r.js +0 -1
  287. package/dist/client/static/js/python-qf1se1mj.js +0 -1
  288. package/dist/client/static/js/r-ms0cygq2.js +0 -1
  289. package/dist/client/static/js/radar-RG4KPBEZ-z3z82syp.js +0 -1
  290. package/dist/client/static/js/railroad-74A4TZTK-z6swcqq2.js +0 -1
  291. package/dist/client/static/js/railroad-abnf-HS5TGJTU-33km6py4.js +0 -1
  292. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-1zbf1xmq.js +0 -1
  293. package/dist/client/static/js/railroad-peg-WCYAUIDC-wte1xzzy.js +0 -1
  294. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-3q2a15wc.js +0 -8
  295. package/dist/client/static/js/treeView-Q6P3EWNA-pvgx6n22.js +0 -1
  296. package/dist/client/static/js/treemap-WGGIJYW6-3n9zm628.js +0 -1
  297. package/dist/client/static/js/tsx-gx7td06z.js +0 -1
  298. package/dist/client/static/js/typescript-1a808spn.js +0 -1
  299. package/dist/client/static/js/wardley-WFR3VGLG-7m07ewc4.js +0 -1
  300. package/dist/client/static/js/xml-3117mxd9.js +0 -1
  301. package/dist/client/static/js/yaml-dmvh8vyt.js +0 -1
@@ -0,0 +1,319 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The card sheet: the task composer, the resolved agent, and the session.
8
+ *
9
+ * It is a side sheet on a wide panel and a full-height one on a phone; the
10
+ * difference is one class, so both layouts draw the same fields.
11
+ *
12
+ * Two rules are the whole point of this file:
13
+ *
14
+ * - **An inherited value says so.** Every picker renders the value that WON and
15
+ * the level it came from ("stage: in_progress"), because a board whose
16
+ * fallback chain is invisible makes an override impossible to reason about.
17
+ * - **The stage prompt's delivery is stated.** omp appends it to its own system
18
+ * prompt at spawn; an ACP harness has no such field, so the text rides the
19
+ * first turn instead. A reader who is about to write "do not edit code" needs
20
+ * to know which of those they are getting.
21
+ */
22
+
23
+ import { useEffect, useMemo, useState } from 'preact/hooks';
24
+ import { experimental_useSidebarThreadActions } from '@kabmo-labs/kabmo-ui';
25
+
26
+ import { MAX_IMAGES, type AgentOrigin, type Card, type ResolvedAgent, type Stage } from '../protocol';
27
+ import { resolveAgent } from '../store/resolve';
28
+ import type { WriteOutcome } from './use-writes';
29
+ import type { Catalogs } from './catalogs';
30
+
31
+ export interface CardSheetProps {
32
+ card: Card;
33
+ stages: Stage[];
34
+ /** The board's defaults, for the resolution the sheet reports. */
35
+ board: { defaults: Record<string, unknown>; stages: Stage[] };
36
+ catalogs: Catalogs;
37
+ /** The active chat, for "Link this chat". */
38
+ activeSessionId: string | null;
39
+ sessionState: 'running' | 'needs-you' | 'idle' | 'none';
40
+ onClose: () => void;
41
+ onSave: (patch: Record<string, unknown>, baseUpdatedAt: string) => Promise<WriteOutcome<unknown>>;
42
+ onMove: (status: string, baseUpdatedAt: string) => Promise<WriteOutcome<unknown>>;
43
+ onDelete: () => Promise<WriteOutcome<unknown>>;
44
+ onStartWork: (card: Card, resolved: ResolvedAgent) => Promise<WriteOutcome<unknown>>;
45
+ onLinkSession: (sessionId: string | null) => Promise<WriteOutcome<unknown>>;
46
+ }
47
+
48
+ /** How a picker names where its value came from. */
49
+ export function originLabel(origin: AgentOrigin, stage: Stage | undefined): string {
50
+ if (origin === 'card') return 'this card';
51
+ if (origin === 'stage') return stage ? `stage: ${stage.label}` : 'stage';
52
+ if (origin === 'defaults') return 'board default';
53
+ return 'host default';
54
+ }
55
+
56
+ /** The inherited-vs-overridden marker a picker shows. */
57
+ export function isOverridden(origin: AgentOrigin): boolean {
58
+ return origin === 'card';
59
+ }
60
+
61
+ /** A stage's label by id, for the header. */
62
+ function stageLabel(stages: readonly Stage[], id: string): string {
63
+ return stages.find((stage) => stage.id === id)?.label ?? id;
64
+ }
65
+
66
+ /** The card sheet. */
67
+ export function CardSheet(props: CardSheetProps) {
68
+ const { card, stages, board, catalogs, activeSessionId, sessionState } = props;
69
+ const [title, setTitle] = useState(card.title);
70
+ const [prompt, setPrompt] = useState(card.task.prompt);
71
+ const [priority, setPriority] = useState(card.priority);
72
+ const [workspace, setWorkspace] = useState(card.workspace ?? '');
73
+ const [harness, setHarness] = useState(card.task.agent?.harness ?? '');
74
+ const [thinking, setThinking] = useState(card.task.agent?.thinking ?? '');
75
+ const actions = experimental_useSidebarThreadActions();
76
+ const [busy, setBusy] = useState<string | null>(null);
77
+ const [notice, setNotice] = useState<string | null>(null);
78
+ const [error, setError] = useState<string | null>(null);
79
+
80
+ // The sheet follows the card: a write answered a fresh snapshot, and the
81
+ // fields must not keep the previous card's text after a move.
82
+ useEffect(() => {
83
+ setTitle(card.title);
84
+ setPrompt(card.task.prompt);
85
+ setPriority(card.priority);
86
+ setWorkspace(card.workspace ?? '');
87
+ setHarness(card.task.agent?.harness ?? '');
88
+ setThinking(card.task.agent?.thinking ?? '');
89
+ }, [card]);
90
+
91
+ const stage = stages.find((entry) => entry.id === card.status);
92
+ const resolved = useMemo(() => resolveAgent(card, stage, board as never), [card, stage, board]);
93
+ const models = catalogs.modelsFor(resolved.harness);
94
+ const thinkingLevels = catalogs.thinkingFor(resolved.harness);
95
+ const blocked = catalogs.blockedFor(resolved.harness);
96
+
97
+ const run = async (label: string, work: () => Promise<WriteOutcome<unknown>>) => {
98
+ setBusy(label);
99
+ setError(null);
100
+ setNotice(null);
101
+ const outcome = await work();
102
+ setBusy(null);
103
+ if (outcome.ok) setNotice(`${label} saved.`);
104
+ else setError(outcome.error);
105
+ };
106
+
107
+ const patch = () => {
108
+ // Spread the card's EXISTING agent first: saving a title must not wipe a
109
+ // model, an access mode or a skill filter the sheet has no input for.
110
+ const agent: Record<string, unknown> = { ...(card.task.agent ?? {}) };
111
+ if (harness) agent.harness = harness;
112
+ else delete agent.harness;
113
+ if (thinking) agent.thinking = thinking;
114
+ else delete agent.thinking;
115
+ return {
116
+ title,
117
+ priority,
118
+ workspace: workspace.trim() || null,
119
+ task: { prompt, ...(Object.keys(agent).length ? { agent } : {}) },
120
+ };
121
+ };
122
+
123
+ const startDisabled = busy !== null || !card.workspace || !prompt.trim();
124
+
125
+ return (
126
+ <aside class="flex flex-col h-full min-h-0 w-full md:w-[420px] md:flex-none border-l border-ink/10 bg-paper">
127
+ <header class="flex items-center gap-2 px-3 h-10 flex-none border-b border-ink/10">
128
+ <span class="text-[10px] font-mono text-ink/45">{card.id}</span>
129
+ <span class="text-xs text-ink/70 truncate">{stageLabel(stages, card.status)}</span>
130
+ <span class="ml-auto text-[10px] font-mono text-ink/60">P{priority}</span>
131
+ <button type="button" class="text-ink/50 hover:text-ink px-1" aria-label="Close" onClick={props.onClose}>
132
+ ×
133
+ </button>
134
+ </header>
135
+
136
+ <div class="flex-1 min-h-0 overflow-y-auto px-3 py-3 flex flex-col gap-3">
137
+ <label class="flex flex-col gap-1">
138
+ <span class="text-[10px] uppercase font-mono text-ink/40">Title</span>
139
+ <input
140
+ class="w-full rounded-md border border-ink/15 bg-paper px-2 py-1 text-xs text-ink"
141
+ value={title}
142
+ onInput={(event) => setTitle(event.currentTarget.value)}
143
+ />
144
+ </label>
145
+
146
+ <div class="flex gap-2">
147
+ <label class="flex-1 flex flex-col gap-1">
148
+ <span class="text-[10px] uppercase font-mono text-ink/40">Stage</span>
149
+ <select
150
+ class="rounded-md border border-ink/15 bg-paper px-2 py-1 text-xs text-ink"
151
+ value={card.status}
152
+ onChange={(event) => void run('Stage', () => props.onMove(event.currentTarget.value, card.updatedAt))}
153
+ >
154
+ {stages.map((entry) => (
155
+ <option key={entry.id} value={entry.id}>
156
+ {entry.label}
157
+ </option>
158
+ ))}
159
+ </select>
160
+ </label>
161
+ <label class="flex-1 flex flex-col gap-1">
162
+ <span class="text-[10px] uppercase font-mono text-ink/40">Priority</span>
163
+ <select
164
+ class="rounded-md border border-ink/15 bg-paper px-2 py-1 text-xs text-ink"
165
+ value={String(priority)}
166
+ onChange={(event) => setPriority(Number(event.currentTarget.value))}
167
+ >
168
+ {['P0 urgent', 'P1 high', 'P2 medium', 'P3 low', 'P4 backlog'].map((label, index) => (
169
+ <option key={label} value={String(index)}>
170
+ {label}
171
+ </option>
172
+ ))}
173
+ </select>
174
+ </label>
175
+ </div>
176
+
177
+ <label class="flex flex-col gap-1">
178
+ <span class="text-[10px] uppercase font-mono text-ink/40">Workspace</span>
179
+ <input
180
+ class="w-full rounded-md border border-ink/15 bg-paper px-2 py-1 text-[11px] font-mono text-ink"
181
+ placeholder="absolute path, or empty for the global bucket"
182
+ value={workspace}
183
+ onInput={(event) => setWorkspace(event.currentTarget.value)}
184
+ />
185
+ </label>
186
+
187
+ <label class="flex flex-col gap-1">
188
+ <span class="text-[10px] uppercase font-mono text-ink/40">Prompt — the task, like a queue message</span>
189
+ <textarea
190
+ class="w-full min-h-[96px] rounded-md border border-ink/15 bg-paper px-2 py-1 text-xs text-ink resize-y"
191
+ value={prompt}
192
+ placeholder="What should the agent do?"
193
+ onInput={(event) => setPrompt(event.currentTarget.value)}
194
+ />
195
+ </label>
196
+ <span class="text-[10px] text-ink/40">
197
+ {card.task.images.length} of {MAX_IMAGES} images · images are attached when work starts
198
+ </span>
199
+
200
+ <fieldset class="flex flex-col gap-2 border-t border-ink/10 pt-3">
201
+ <legend class="text-[10px] uppercase font-mono text-ink/40">Agent</legend>
202
+ <div class="flex gap-2">
203
+ <label class="flex-1 flex flex-col gap-1">
204
+ <span class="text-[10px] text-ink/45">Harness · {originLabel(resolved.origin.harness, stage)}</span>
205
+ <select
206
+ class="rounded-md border border-ink/15 bg-paper px-2 py-1 text-xs text-ink"
207
+ value={harness}
208
+ onChange={(event) => setHarness(event.currentTarget.value)}
209
+ >
210
+ <option value="">inherit ({resolved.harness})</option>
211
+ {catalogs.harnesses.map((entry) => (
212
+ <option key={entry.id} value={entry.id}>
213
+ {entry.label}
214
+ </option>
215
+ ))}
216
+ </select>
217
+ </label>
218
+ <label class="flex-1 flex flex-col gap-1">
219
+ <span class="text-[10px] text-ink/45">Thinking · {originLabel(resolved.origin.thinking, stage)}</span>
220
+ <select
221
+ class="rounded-md border border-ink/15 bg-paper px-2 py-1 text-xs text-ink"
222
+ value={thinking}
223
+ onChange={(event) => setThinking(event.currentTarget.value)}
224
+ >
225
+ <option value="">inherit ({resolved.thinking ?? 'harness default'})</option>
226
+ {thinkingLevels.map((level) => (
227
+ <option key={level} value={level}>
228
+ {level}
229
+ </option>
230
+ ))}
231
+ </select>
232
+ </label>
233
+ </div>
234
+ <p class="text-[10px] text-ink/40">
235
+ Model: {resolved.model ? `${resolved.model.provider}/${resolved.model.modelId}` : 'host default'} ·{' '}
236
+ {originLabel(resolved.origin.model, stage)} · {models.length} available
237
+ {blocked ? ` · ${blocked}` : ''}
238
+ </p>
239
+ <p class="text-[10px] text-ink/40">
240
+ Stage prompt: {resolved.prompt ? `${resolved.prompt.length} chars` : 'none'} ·{' '}
241
+ {resolved.promptDelivery === 'appended' ? 'appended to omp’s system prompt' : 'prepended to the first turn'}
242
+ </p>
243
+ </fieldset>
244
+
245
+ <fieldset class="flex flex-col gap-2 border-t border-ink/10 pt-3">
246
+ <legend class="text-[10px] uppercase font-mono text-ink/40">Session</legend>
247
+ {card.sessionId ? (
248
+ <>
249
+ <p class="text-[11px] font-mono text-ink/70">
250
+ {card.sessionId.slice(0, 8)}… · {sessionState}
251
+ </p>
252
+ <div class="flex gap-2">
253
+ <button
254
+ type="button"
255
+ class="rounded-md border border-ink/15 px-2 py-1 text-[11px] text-ink"
256
+ onClick={() => {
257
+ if (card.sessionId) actions.open(card.sessionId);
258
+ }}
259
+ >
260
+ Open chat
261
+ </button>
262
+ <button
263
+ type="button"
264
+ class="rounded-md border border-ink/15 px-2 py-1 text-[11px] text-ink"
265
+ disabled={busy !== null}
266
+ onClick={() => void run('Unlink', () => props.onLinkSession(null))}
267
+ >
268
+ Unlink
269
+ </button>
270
+ </div>
271
+ </>
272
+ ) : (
273
+ <div class="flex gap-2">
274
+ <button
275
+ type="button"
276
+ class="rounded-md border border-ink/20 bg-ink/5 px-2 py-1 text-[11px] text-ink disabled:opacity-40"
277
+ disabled={startDisabled}
278
+ title={card.workspace ? undefined : 'Pick a workspace first'}
279
+ onClick={() => void run('Start work', () => props.onStartWork(card, resolved))}
280
+ >
281
+ {busy === 'Start work' ? 'Starting…' : 'Start work'}
282
+ </button>
283
+ <button
284
+ type="button"
285
+ class="rounded-md border border-ink/15 px-2 py-1 text-[11px] text-ink disabled:opacity-40"
286
+ disabled={!activeSessionId || busy !== null}
287
+ onClick={() => void run('Link', () => props.onLinkSession(activeSessionId))}
288
+ >
289
+ Link this chat
290
+ </button>
291
+ </div>
292
+ )}
293
+ </fieldset>
294
+
295
+ {error ? <p class="text-[11px] text-[var(--theme-error)]">{error}</p> : null}
296
+ {notice ? <p class="text-[11px] text-ink/50">{notice}</p> : null}
297
+ </div>
298
+
299
+ <footer class="flex items-center gap-2 px-3 h-11 flex-none border-t border-ink/10">
300
+ <button
301
+ type="button"
302
+ class="rounded-md border border-ink/20 bg-ink/5 px-2 py-1 text-[11px] text-ink disabled:opacity-40"
303
+ disabled={busy !== null}
304
+ onClick={() => void run('Card', () => props.onSave(patch(), card.updatedAt))}
305
+ >
306
+ {busy === 'Card' ? 'Saving…' : 'Save'}
307
+ </button>
308
+ <button
309
+ type="button"
310
+ class="ml-auto rounded-md border border-ink/15 px-2 py-1 text-[11px] text-[var(--theme-error)]"
311
+ disabled={busy !== null}
312
+ onClick={() => void run('Delete', () => props.onDelete())}
313
+ >
314
+ Delete
315
+ </button>
316
+ </footer>
317
+ </aside>
318
+ );
319
+ }
@@ -0,0 +1,97 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * One card, drawn as the control record it is.
8
+ *
9
+ * There is no description line because there is no description: decision 2 keeps
10
+ * the board a control surface, so a card shows what decides work — priority, the
11
+ * workspace it belongs to, whether it has a prompt, and the session working it.
12
+ * The prompt itself is one truncated line, because a card is an index and the
13
+ * sheet is the detail.
14
+ */
15
+
16
+ import type { CardSummary } from '../protocol';
17
+
18
+ /** Priority as the tag a reader scans for: P0 is the loudest. */
19
+ export function priorityLabel(priority: number): string {
20
+ return `P${Math.min(4, Math.max(0, priority))}`;
21
+ }
22
+
23
+ /** The one-line preview a card shows instead of the prompt. */
24
+ export function promptPreview(card: CardSummary): string {
25
+ if (!card.hasPrompt) return 'no prompt';
26
+ return card.imageCount > 0 ? `prompt · ${card.imageCount} image${card.imageCount === 1 ? '' : 's'}` : 'prompt';
27
+ }
28
+
29
+ /** The workspace's last path segment: `/Users/x/projects/kabmo` → `kabmo`. */
30
+ export function workspaceLabel(workspace: string | null): string {
31
+ if (!workspace) return 'unfiled';
32
+ const parts = workspace.split(/[\\/]/).filter(Boolean);
33
+ return parts[parts.length - 1] ?? workspace;
34
+ }
35
+
36
+ export interface CardTileProps {
37
+ card: CardSummary;
38
+ /** True when the board is showing every workspace, so the badge earns its space. */
39
+ showWorkspace: boolean;
40
+ /** The session's live state, from the host's own sidebar list. */
41
+ sessionState: 'running' | 'needs-you' | 'idle' | 'none';
42
+ onOpen: (id: string) => void;
43
+ onDragStart: (id: string) => void;
44
+ onDragEnd: () => void;
45
+ /** True while this card is the one being dragged. */
46
+ dragging: boolean;
47
+ }
48
+
49
+ /** One card. Pointer drag is the caller's job; this only reports intent. */
50
+ export function CardTile({
51
+ card,
52
+ showWorkspace,
53
+ sessionState,
54
+ onOpen,
55
+ onDragStart,
56
+ onDragEnd,
57
+ dragging,
58
+ }: CardTileProps) {
59
+ const session = sessionState === 'none' ? null : sessionState;
60
+ return (
61
+ <button
62
+ type="button"
63
+ draggable
64
+ onDragStart={() => onDragStart(card.id)}
65
+ onDragEnd={onDragEnd}
66
+ onClick={() => onOpen(card.id)}
67
+ class={[
68
+ 'w-full text-left rounded-lg border px-2.5 py-2 flex flex-col gap-1',
69
+ 'bg-paper border-ink/10 hover:border-ink/25 transition-colors',
70
+ dragging ? 'opacity-40' : '',
71
+ ].join(' ')}
72
+ aria-label={`${card.title} — ${priorityLabel(card.priority)}`}
73
+ >
74
+ <span class="flex items-center gap-2 min-w-0">
75
+ <span class="text-[10px] font-mono text-ink/40 flex-none">{card.id}</span>
76
+ <span class="text-[10px] font-mono text-ink/60 flex-none">{priorityLabel(card.priority)}</span>
77
+ {session ? (
78
+ <span class="ml-auto flex items-center gap-1 text-[10px] text-ink/60 flex-none">
79
+ <span
80
+ class={[
81
+ 'inline-block w-1.5 h-1.5 rounded-full',
82
+ session === 'running' ? 'bg-[var(--theme-success)]' : session === 'needs-you' ? 'bg-[var(--theme-warning)]' : 'bg-ink/30',
83
+ ].join(' ')}
84
+ aria-hidden="true"
85
+ />
86
+ {session === 'needs-you' ? 'needs you' : session}
87
+ </span>
88
+ ) : null}
89
+ </span>
90
+ <span class="text-xs text-ink leading-snug line-clamp-2">{card.title}</span>
91
+ <span class="flex items-center gap-2 text-[10px] text-ink/45 min-w-0">
92
+ {showWorkspace ? <span class="truncate">{workspaceLabel(card.workspace)}</span> : null}
93
+ <span class="truncate">{promptPreview(card)}</span>
94
+ </span>
95
+ </button>
96
+ );
97
+ }
@@ -0,0 +1,116 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * One stage column: its header, its count, and the drop target.
8
+ *
9
+ * A hidden stage that still holds cards KEEPS SHOWING — hiding is a way to quiet
10
+ * a lane, not a way to lose a card. The panel decides that; this component just
11
+ * renders what it is given, plus the "no cards" placeholder and the cap notice.
12
+ */
13
+
14
+ import type { CardSummary, Stage } from '../protocol';
15
+ import { CardTile } from './CardTile';
16
+
17
+ /** A lane draws at most this many cards; the rest are summarised. */
18
+ export const MAX_VISIBLE_CARDS = 120;
19
+
20
+ export interface StageColumnProps {
21
+ stage: Stage;
22
+ cards: CardSummary[];
23
+ showWorkspace: boolean;
24
+ sessionStateOf: (card: CardSummary) => 'running' | 'needs-you' | 'idle' | 'none';
25
+ draggingId: string | null;
26
+ dropTarget: string | null;
27
+ onOpenCard: (id: string) => void;
28
+ onAddCard: (stageId: string) => void;
29
+ onDragStart: (id: string) => void;
30
+ onDragEnd: () => void;
31
+ onDropOn: (stageId: string) => void;
32
+ onDragOver: (stageId: string | null) => void;
33
+ }
34
+
35
+ /** One lane. */
36
+ export function StageColumn({
37
+ stage,
38
+ cards,
39
+ showWorkspace,
40
+ sessionStateOf,
41
+ draggingId,
42
+ dropTarget,
43
+ onOpenCard,
44
+ onAddCard,
45
+ onDragStart,
46
+ onDragEnd,
47
+ onDropOn,
48
+ onDragOver,
49
+ }: StageColumnProps) {
50
+ const visible = cards.slice(0, MAX_VISIBLE_CARDS);
51
+ const overflow = cards.length - visible.length;
52
+ const active = dropTarget === stage.id;
53
+
54
+ return (
55
+ <section
56
+ class={[
57
+ 'flex flex-col h-full min-h-0 rounded-xl border transition-colors',
58
+ 'w-[200px] flex-none bg-[var(--theme-canvas)]',
59
+ active ? 'border-ink/40' : 'border-ink/10',
60
+ ].join(' ')}
61
+ aria-label={`${stage.label}, ${cards.length} card${cards.length === 1 ? '' : 's'}`}
62
+ onDragOver={(event) => {
63
+ event.preventDefault();
64
+ onDragOver(stage.id);
65
+ }}
66
+ onDragLeave={() => onDragOver(null)}
67
+ onDrop={(event) => {
68
+ event.preventDefault();
69
+ onDropOn(stage.id);
70
+ }}
71
+ >
72
+ <header class="flex items-center gap-1.5 px-2.5 h-9 flex-none">
73
+ <span class="text-xs font-medium text-ink truncate">{stage.label}</span>
74
+ <span class="text-[11px] text-ink/45">{cards.length}</span>
75
+ {stage.session ? (
76
+ <span class="text-[9px] uppercase font-mono text-ink/35" title="Cards here run a chat session">
77
+ session
78
+ </span>
79
+ ) : null}
80
+ <button
81
+ type="button"
82
+ class="ml-auto text-ink/50 hover:text-ink px-1"
83
+ title={`New card in ${stage.label}`}
84
+ aria-label={`New card in ${stage.label}`}
85
+ onClick={() => onAddCard(stage.id)}
86
+ >
87
+ +
88
+ </button>
89
+ </header>
90
+ <div class="flex-1 min-h-0 overflow-y-auto px-2 pb-2 flex flex-col gap-2">
91
+ {cards.length === 0 ? (
92
+ <p class="text-[11px] text-ink/35 text-center py-6 border border-dashed border-ink/10 rounded-lg">
93
+ No cards
94
+ </p>
95
+ ) : null}
96
+ {visible.map((card) => (
97
+ <CardTile
98
+ key={card.id}
99
+ card={card}
100
+ showWorkspace={showWorkspace}
101
+ sessionState={sessionStateOf(card)}
102
+ onOpen={onOpenCard}
103
+ onDragStart={onDragStart}
104
+ onDragEnd={onDragEnd}
105
+ dragging={draggingId === card.id}
106
+ />
107
+ ))}
108
+ {overflow > 0 ? (
109
+ <p class="text-[11px] text-ink/45 px-1">
110
+ {overflow} more — narrow the filter
111
+ </p>
112
+ ) : null}
113
+ </div>
114
+ </section>
115
+ );
116
+ }