@kabmo-labs/kabmo 0.46.1 → 0.48.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 (339) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +506 -502
  3. package/dist/client/static/js/Body-3tspyjtk.js +3 -0
  4. package/dist/client/static/js/{CsvGrid-qdkmv8bj.js → CsvGrid-3pwsfmxp.js} +2 -2
  5. package/dist/client/static/js/{DocxView-k84ns803.js → DocxView-xcg9jktb.js} +3 -3
  6. package/dist/client/static/js/{DrawioView-r1n717f7.js → DrawioView-2q19tgkx.js} +2 -2
  7. package/dist/client/static/js/HtmlPreview-92cadvbr.js +1 -0
  8. package/dist/client/static/js/ImageView-pr4h38hb.js +1 -0
  9. package/dist/client/static/js/LayoutWrapper-n4tzhjes.js +2 -0
  10. package/dist/client/static/js/MergeDiffView-0t15nh9f.js +1 -0
  11. package/dist/client/static/js/{Modal-xe6h99jn.js → Modal-77hgx4dw.js} +20 -20
  12. package/dist/client/static/js/{PdfView-ffg4mccg.js → PdfView-gzxhvxe8.js} +1 -1
  13. package/dist/client/static/js/{SessionsView-cdcbsee9.js → SessionsView-2tdqrvk0.js} +1 -1
  14. package/dist/client/static/js/{SheetView-89sscpz6.js → SheetView-w5w2m2de.js} +22 -22
  15. package/dist/client/static/js/{SvgPreview-68c0ccbv.js → SvgPreview-mtk6de6h.js} +1 -1
  16. package/dist/client/static/js/{abnfDiagram-O67JEVCF-h3a5s259.js → abnfDiagram-O67JEVCF-tha4j2fn.js} +1 -1
  17. package/dist/client/static/js/architecture-7GRP2DOG-zs15nydj.js +1 -0
  18. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-983p0jgn.js → architectureDiagram-NJMV4G6O-heep78p6.js} +6 -6
  19. package/dist/client/static/js/{astro-hyj5wege.js → astro-r4dp34pw.js} +1 -1
  20. package/dist/client/static/js/bash-8d3wrx5c.js +1 -0
  21. package/dist/client/static/js/{blockDiagram-BEXU5L5S-16pse5mh.js → blockDiagram-BEXU5L5S-6mzgfqh8.js} +5 -5
  22. package/dist/client/static/js/c-rn3z0csz.js +1 -0
  23. package/dist/client/static/js/{c4Diagram-YGBWAQC7-mvnb00zt.js → c4Diagram-YGBWAQC7-sfkcw7g9.js} +4 -4
  24. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-kmpd91xb.js → classDiagram-v2-NBCMYWYE-v530ny5e.js} +6 -6
  25. package/dist/client/static/js/{cose-bilkent-JH36ORCC-3ek5r5se.js → cose-bilkent-JH36ORCC-ybv1ttbx.js} +1 -1
  26. package/dist/client/static/js/cpp-99ws9nak.js +1 -0
  27. package/dist/client/static/js/css-narcr42w.js +1 -0
  28. package/dist/client/static/js/cynefin-OW5HDTMX-p3y1b4ap.js +1 -0
  29. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-jkbh84zn.js → cynefinDiagram-VND7K2PF-k8f3z0mm.js} +2 -2
  30. package/dist/client/static/js/{dagre-6A5THRUB-4fdc0sgn.js → dagre-6A5THRUB-gk0gp124.js} +2 -2
  31. package/dist/client/static/js/{diagram-22UHCM2B-hbk61nq9.js → diagram-22UHCM2B-2zh2957c.js} +15 -15
  32. package/dist/client/static/js/{diagram-3UASUU5V-hfpbr9qh.js → diagram-3UASUU5V-bzstt5e2.js} +2 -2
  33. package/dist/client/static/js/{diagram-ATOU4E4O-fn0nt71a.js → diagram-ATOU4E4O-16adx4g0.js} +3 -3
  34. package/dist/client/static/js/{diagram-CDSNMT55-ssswxjeb.js → diagram-CDSNMT55-1ja98ens.js} +5 -5
  35. package/dist/client/static/js/{diagram-MLGK6HIB-whnzxv6f.js → diagram-MLGK6HIB-f9nnyjbq.js} +2 -2
  36. package/dist/client/static/js/{diagram-MPIPVDR6-hk1chzxk.js → diagram-MPIPVDR6-3qgadfjz.js} +2 -2
  37. package/dist/client/static/js/{dockerfile-zmsj8r4g.js → dockerfile-04tc68pq.js} +1 -1
  38. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-q1vkg5mr.js → ebnfDiagram-ZINNZB2B-022cz603.js} +1 -1
  39. package/dist/client/static/js/{elixir-80wq7gak.js → elixir-61gbjv6c.js} +1 -1
  40. package/dist/client/static/js/{elk-276RUBZZ-kt98vg8j.js → elk-276RUBZZ-2anf1c36.js} +1 -1
  41. package/dist/client/static/js/{erDiagram-OPXOYQCR-ey3avsn9.js → erDiagram-OPXOYQCR-ndd27fz1.js} +7 -7
  42. package/dist/client/static/js/{erlang-814e8qy5.js → erlang-bh5cbm8m.js} +1 -1
  43. package/dist/client/static/js/eventmodeling-NTZA5JFV-sx2cwkz3.js +1 -0
  44. package/dist/client/static/js/flowDiagram-KWPJA3E3-dsc17mty.js +1 -0
  45. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-a9k1at43.js → ganttDiagram-FUAMR5RP-9gm6hkgn.js} +4 -4
  46. package/dist/client/static/js/gitGraph-4MIJSDKK-yqhbscsd.js +1 -0
  47. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-gnekjfym.js → gitGraphDiagram-X574FWY7-78bxa67c.js} +8 -8
  48. package/dist/client/static/js/graphql-tr0jcndy.js +1 -0
  49. package/dist/client/static/js/html-n8fdvrdk.js +1 -0
  50. package/dist/client/static/js/index-0e51wknc.js +10 -0
  51. package/dist/client/static/js/{index-z25ss7xj.js → index-13g17wa3.js} +1 -1
  52. package/dist/client/static/js/index-1hb8fvw9.js +1 -0
  53. package/dist/client/static/js/{index-1c2jvnyh.js → index-2bsnywea.js} +2 -2
  54. package/dist/client/static/js/{index-g7s0wsag.js → index-2n1fgpjv.js} +2 -2
  55. package/dist/client/static/js/{index-3x7h2eqj.js → index-30a8py59.js} +2 -2
  56. package/dist/client/static/js/{index-qf3y3ahx.js → index-34aq5bz5.js} +2 -2
  57. package/dist/client/static/js/index-3en15m75.js +2 -0
  58. package/dist/client/static/js/{index-nw5mvcaj.js → index-417fbrqk.js} +2 -2
  59. package/dist/client/static/js/{index-z4530r3c.js → index-45p59fxq.js} +2 -2
  60. package/dist/client/static/js/index-4n7t26ap.js +2 -0
  61. package/dist/client/static/js/{index-kty4ncsr.js → index-55pqvh82.js} +2 -2
  62. package/dist/client/static/js/index-5mpv57fn.js +12 -0
  63. package/dist/client/static/js/{index-x9r7zfp4.js → index-7pz6n3pg.js} +2 -2
  64. package/dist/client/static/js/{index-1ax52p0q.js → index-7whstwc7.js} +2 -2
  65. package/dist/client/static/js/index-869vdnz8.js +2 -0
  66. package/dist/client/static/js/{index-fzngzhww.js → index-8tvrzce0.js} +2 -2
  67. package/dist/client/static/js/index-9a78xmkk.js +462 -0
  68. package/dist/client/static/js/{index-33qxg79j.js → index-a58rkn3f.js} +5 -5
  69. package/dist/client/static/js/{index-60v30k5h.js → index-aa3hmn6j.js} +64 -64
  70. package/dist/client/static/js/{index-wrcdc9vz.js → index-aabp7nt6.js} +1 -1
  71. package/dist/client/static/js/{index-64sqfr4a.js → index-abrrqhne.js} +2 -2
  72. package/dist/client/static/js/{index-9vv7wr1n.js → index-ac2q5903.js} +2 -2
  73. package/dist/client/static/js/index-axtm1aq8.js +2 -0
  74. package/dist/client/static/js/index-b2cs4c51.js +4 -0
  75. package/dist/client/static/js/{index-8g7q8mz4.js → index-c250nzm1.js} +3 -3
  76. package/dist/client/static/js/{index-abs635a1.js → index-dxnkwf39.js} +48 -48
  77. package/dist/client/static/js/{index-kbhrvep8.js → index-e6ny4gd9.js} +6 -6
  78. package/dist/client/static/js/index-ebf50mrs.js +9 -0
  79. package/dist/client/static/js/{index-trvqvb1v.js → index-ep6bqcmg.js} +2 -2
  80. package/dist/client/static/js/{index-qfxn7yh5.js → index-fb2s080r.js} +2 -2
  81. package/dist/client/static/js/index-fryp0kgf.js +2 -0
  82. package/dist/client/static/js/{index-2ks0m8ss.js → index-g3rg6vsd.js} +2 -2
  83. package/dist/client/static/js/{index-sa1675y0.js → index-g8rpydkr.js} +2 -2
  84. package/dist/client/static/js/{index-bsr7wmj2.js → index-gkmn4y1v.js} +1 -1
  85. package/dist/client/static/js/{index-xq5f3nxa.js → index-gpmcth0x.js} +2 -2
  86. package/dist/client/static/js/{index-e9cxje00.js → index-hcmhdpp4.js} +10 -10
  87. package/dist/client/static/js/{index-kb14dhrx.js → index-he4k2j91.js} +2 -2
  88. package/dist/client/static/js/{index-wbws16ag.js → index-hq28918s.js} +2 -2
  89. package/dist/client/static/js/{index-84fyq5a6.js → index-hwzxdwwg.js} +1 -1
  90. package/dist/client/static/js/{index-2a6qp9y6.js → index-jnkc9p53.js} +1 -1
  91. package/dist/client/static/js/{index-pavvxrsz.js → index-k39be93q.js} +1 -1
  92. package/dist/client/static/js/{index-c9e417cs.js → index-kaxvwh07.js} +2 -2
  93. package/dist/client/static/js/{index-ykm7a3cp.js → index-kjr68pcj.js} +2 -2
  94. package/dist/client/static/js/{index-b5dfvget.js → index-m0fatq7c.js} +4 -4
  95. package/dist/client/static/js/{index-atq9q1s7.js → index-m39gbcxn.js} +1 -1
  96. package/dist/client/static/js/{index-hnb66d3s.js → index-mqzgf7rw.js} +2 -2
  97. package/dist/client/static/js/{index-5wz0y88c.js → index-pzsp1src.js} +2 -2
  98. package/dist/client/static/js/{index-yf93db65.js → index-qe0vfv6s.js} +1 -1
  99. package/dist/client/static/js/{index-q9ytjey8.js → index-qek9mt5w.js} +1 -1
  100. package/dist/client/static/js/{index-d23eacf2.js → index-qxzj780x.js} +2 -2
  101. package/dist/client/static/js/index-rgxg0azs.css +1 -0
  102. package/dist/client/static/js/{index-m4k054wz.js → index-rq4dk4tp.js} +4 -4
  103. package/dist/client/static/js/{index-fj5rsp5v.js → index-seekt5k3.js} +2 -2
  104. package/dist/client/static/js/{index-561gkvve.js → index-sng4prpr.js} +2 -2
  105. package/dist/client/static/js/{index-vjmg7kn5.js → index-t4s10406.js} +2 -2
  106. package/dist/client/static/js/{index-b2e5pwx7.js → index-tzz5gp8a.js} +5 -5
  107. package/dist/client/static/js/index-vnv9z0a1.js +1 -0
  108. package/dist/client/static/js/{index-19x11s5w.js → index-x7rajphe.js} +2 -2
  109. package/dist/client/static/js/{index-dxvtjn6a.js → index-xny7vsfz.js} +2 -2
  110. package/dist/client/static/js/index-xr4hjv01.js +2 -0
  111. package/dist/client/static/js/{index-65afr75v.js → index-ya9yqj5w.js} +2 -2
  112. package/dist/client/static/js/{index-z0fkfphe.js → index-zcgqacvx.js} +2 -2
  113. package/dist/client/static/js/info-A6RAGUB7-0sd3zzgg.js +1 -0
  114. package/dist/client/static/js/{infoDiagram-VRGFBTTK-r1p25738.js → infoDiagram-VRGFBTTK-bxk0g0pe.js} +2 -2
  115. package/dist/client/static/js/ini-tnaw7zjy.js +1 -0
  116. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-afgrqdrt.js → ishikawaDiagram-OU5B5YK6-d1kdkhth.js} +3 -3
  117. package/dist/client/static/js/java-m4dpc2vw.js +1 -0
  118. package/dist/client/static/js/javascript-8y26t991.js +1 -0
  119. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-hepa4wk7.js → journeyDiagram-ZHPQQLJL-cahg3zjq.js} +4 -4
  120. package/dist/client/static/js/json-azm7bdqd.js +1 -0
  121. package/dist/client/static/js/jsx-p9j1k773.js +1 -0
  122. package/dist/client/static/js/{julia-yv2j8qd0.js → julia-2n5k898q.js} +1 -1
  123. package/dist/client/static/js/{kanban-definition-PNTS6WVX-jysft8ya.js → kanban-definition-PNTS6WVX-nq7t83en.js} +6 -6
  124. package/dist/client/static/js/lua-hbm9rhz9.js +1 -0
  125. package/dist/client/static/js/markdown-tk3cd3vs.js +1 -0
  126. package/dist/client/static/js/{mermaid.core-0m90b0s8.js → mermaid.core-6nw0853j.js} +8 -8
  127. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-x2rrzpvr.js → mindmap-definition-NLK3R4M7-cm7ykxf2.js} +3 -3
  128. package/dist/client/static/js/one-dark-pro-2cdc2nk7.js +1 -0
  129. package/dist/client/static/js/one-light-bt6z4jf0.js +1 -0
  130. package/dist/client/static/js/packet-AYTQ26CC-13w2v5bb.js +1 -0
  131. package/dist/client/static/js/{pegDiagram-GJSIUBJH-z7vb7f1z.js → pegDiagram-GJSIUBJH-xwxz8nsq.js} +1 -1
  132. package/dist/client/static/js/{perl-917pjq5a.js → perl-66vb5pz7.js} +1 -1
  133. package/dist/client/static/js/{php-hwz75qzt.js → php-4e9we8am.js} +1 -1
  134. package/dist/client/static/js/pie-WAS4IAKB-swtnysgn.js +1 -0
  135. package/dist/client/static/js/{pieDiagram-5QR66LMP-jqv6v4e6.js → pieDiagram-5QR66LMP-n910k9th.js} +3 -3
  136. package/dist/client/static/js/properties-6911ckw7.js +1 -0
  137. package/dist/client/static/js/python-44cvj250.js +1 -0
  138. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-w2h8yxrv.js → quadrantDiagram-O4NWA36T-dxkwxbqb.js} +6 -6
  139. package/dist/client/static/js/r-t3sepzm4.js +1 -0
  140. package/dist/client/static/js/radar-RG4KPBEZ-vtvxkx55.js +1 -0
  141. package/dist/client/static/js/railroad-74A4TZTK-5sp2d63r.js +1 -0
  142. package/dist/client/static/js/railroad-abnf-HS5TGJTU-kg706fan.js +1 -0
  143. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-4ra1gzx5.js +1 -0
  144. package/dist/client/static/js/railroad-peg-WCYAUIDC-hms3zpjm.js +1 -0
  145. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-nd09yac3.js → railroadDiagram-XR7U4H2S-xb1smt7r.js} +1 -1
  146. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-t61zxh5v.js → requirementDiagram-PLB6GJNP-6kb21b9f.js} +6 -6
  147. package/dist/client/static/js/{ruby-er7ayhte.js → ruby-v7nmcvyr.js} +1 -1
  148. package/dist/client/static/js/{rust-avnkhh0p.js → rust-5ersd7be.js} +1 -1
  149. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-2f7h2cmw.js → sankeyDiagram-IPEJSGJF-74z0fskw.js} +4 -4
  150. package/dist/client/static/js/{sass-n47tt136.js → sass-h3nvy4c8.js} +1 -1
  151. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-kfb5d7zd.js → sequenceDiagram-PO4LG4MO-apn6kezn.js} +17 -17
  152. package/dist/client/static/js/{sizeCapture-INFHLROL-amfg19se.js → sizeCapture-INFHLROL-2drzcjb8.js} +1 -1
  153. package/dist/client/static/js/sql-zdkawqx3.js +1 -0
  154. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-k5hx7btx.js → stateDiagram-v2-GCMORJYK-ma09vhby.js} +3 -3
  155. package/dist/client/static/js/{svelte-2pmz35vx.js → svelte-dhspkgss.js} +1 -1
  156. package/dist/client/static/js/{swimlanes-2SLR337P-wv3rp8kk.js → swimlanes-2SLR337P-f6y9xqnx.js} +1 -1
  157. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-3dwas56m.js +8 -0
  158. package/dist/client/static/js/{timeline-definition-EJHVYXUP-0re95wtn.js → timeline-definition-EJHVYXUP-zmcmvq00.js} +5 -5
  159. package/dist/client/static/js/treeView-Q6P3EWNA-7t5k6rs2.js +1 -0
  160. package/dist/client/static/js/treemap-WGGIJYW6-w56ry3bg.js +1 -0
  161. package/dist/client/static/js/tsx-b7eabr17.js +1 -0
  162. package/dist/client/static/js/typescript-nnkvhwfy.js +1 -0
  163. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-yrje14qp.js → usecaseDiagram-POWQR4AR-wfaa019a.js} +24 -24
  164. package/dist/client/static/js/{vennDiagram-UO4OBE2U-jxkmrfy5.js → vennDiagram-UO4OBE2U-46wf2pgd.js} +8 -8
  165. package/dist/client/static/js/{vue-d5gpjfgn.js → vue-ffngx2b3.js} +1 -1
  166. package/dist/client/static/js/wardley-WFR3VGLG-rtjb9kgv.js +1 -0
  167. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-d3v2m9b1.js → wardleyDiagram-VNRHLVJA-10ph3bzq.js} +4 -4
  168. package/dist/client/static/js/xml-xy1tw6b2.js +1 -0
  169. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-9a1s1rjt.js → xychartDiagram-PMCCYNJV-2ba825z9.js} +5 -5
  170. package/dist/client/static/js/yaml-0fexqg2d.js +1 -0
  171. package/marketplace/marketplace.json +34 -7
  172. package/marketplace/plugins/kanban/README.md +143 -0
  173. package/marketplace/plugins/kanban/icon.svg +5 -0
  174. package/marketplace/plugins/kanban/package.json +30 -0
  175. package/marketplace/plugins/kanban/src/app.tsx +34 -0
  176. package/marketplace/plugins/kanban/src/mcp-tools.ts +296 -0
  177. package/marketplace/plugins/kanban/src/mcp.test.ts +199 -0
  178. package/marketplace/plugins/kanban/src/mcp.ts +148 -0
  179. package/marketplace/plugins/kanban/src/panel/CardSheet.tsx +319 -0
  180. package/marketplace/plugins/kanban/src/panel/CardTile.tsx +97 -0
  181. package/marketplace/plugins/kanban/src/panel/StageColumn.tsx +116 -0
  182. package/marketplace/plugins/kanban/src/panel/StageSheet.tsx +249 -0
  183. package/marketplace/plugins/kanban/src/panel/catalogs.ts +114 -0
  184. package/marketplace/plugins/kanban/src/panel/index.tsx +327 -0
  185. package/marketplace/plugins/kanban/src/panel/panel.test.ts +219 -0
  186. package/marketplace/plugins/kanban/src/panel/start-work.ts +132 -0
  187. package/marketplace/plugins/kanban/src/panel/use-board.ts +148 -0
  188. package/marketplace/plugins/kanban/src/panel/use-card-detail.ts +70 -0
  189. package/marketplace/plugins/kanban/src/panel/use-writes.ts +123 -0
  190. package/marketplace/plugins/kanban/src/protocol.ts +180 -0
  191. package/marketplace/plugins/kanban/src/server.test.ts +113 -0
  192. package/marketplace/plugins/kanban/src/server.ts +227 -0
  193. package/marketplace/plugins/kanban/src/store/board.test.ts +311 -0
  194. package/marketplace/plugins/kanban/src/store/board.ts +147 -0
  195. package/marketplace/plugins/kanban/src/store/cards.ts +228 -0
  196. package/marketplace/plugins/kanban/src/store/fs.ts +159 -0
  197. package/marketplace/plugins/kanban/src/store/ops.ts +245 -0
  198. package/marketplace/plugins/kanban/src/store/resolve.test.ts +82 -0
  199. package/marketplace/plugins/kanban/src/store/resolve.ts +135 -0
  200. package/marketplace/plugins/kanban/tsconfig.json +26 -0
  201. package/package.json +2 -2
  202. package/src/client/components/common/file-icon/index.tsx +1 -1
  203. package/src/client/components/layout/desktop-layout/LeftColumn.tsx +12 -3
  204. package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +34 -7
  205. package/src/client/components/layout/desktop-layout/index.tsx +17 -22
  206. package/src/client/components/mobile/mobile-right-sidebar/EditorSurface.tsx +2 -0
  207. package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +11 -3
  208. package/src/client/components/settings/categories/appearance-settings/EditorThemeSection.test.tsx +21 -0
  209. package/src/client/components/settings/categories/appearance-settings/EditorThemeSection.tsx +8 -4
  210. package/src/client/components/settings/categories/appearance-settings/ThemeCard.tsx +8 -2
  211. package/src/client/components/settings/categories/appearance-settings/ThemeGrid.tsx +15 -4
  212. package/src/client/components/settings/categories/usage-settings/LimitsSection.tsx +10 -3
  213. package/src/client/components/settings/categories/usage-settings/ProviderDetail.tsx +27 -4
  214. package/src/client/components/settings/categories/usage-settings/TokenHarborCard.tsx +160 -0
  215. package/src/client/components/settings/categories/usage-settings/TokenPortalCard.tsx +104 -0
  216. package/src/client/components/settings/categories/usage-settings/format.ts +35 -0
  217. package/src/client/components/settings/categories/usage-settings/limits-section.test.tsx +16 -0
  218. package/src/client/components/settings/categories/usage-settings/providers.ts +26 -4
  219. package/src/client/components/settings/categories/usage-settings/token-harbor-card.test.tsx +114 -0
  220. package/src/client/components/settings/categories/usage-settings/token-harbor-hint.test.ts +68 -0
  221. package/src/client/components/settings/categories/usage-settings/token-portal-card.test.tsx +81 -0
  222. package/src/client/components/settings/categories/usage-settings/usage-and-picker.test.ts +66 -0
  223. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +21 -0
  224. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +7 -1
  225. package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +3 -1
  226. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.tsx +1 -1
  227. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/DiffView.test.ts +13 -0
  228. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/DiffView.tsx +41 -18
  229. package/src/client/components/workspace/editor/BodyLazy.tsx +40 -0
  230. package/src/client/components/workspace/editor/FilePane.tsx +4 -2
  231. package/src/client/components/workspace/editor/Tabs.tsx +7 -1
  232. package/src/client/components/workspace/editor/Toolbar.tsx +7 -1
  233. package/src/client/components/workspace/editor/chrome-rows.test.tsx +126 -0
  234. package/src/client/components/workspace/editor/index.tsx +2 -2
  235. package/src/client/components/workspace/editor/viewers/HtmlPreview.test.tsx +94 -0
  236. package/src/client/components/workspace/editor/viewers/HtmlPreview.tsx +71 -0
  237. package/src/client/components/workspace/editor/viewers/bytes.ts +1 -1
  238. package/src/client/components/workspace/editor/viewers/dispatch.tsx +18 -2
  239. package/src/client/components/workspace/editor/viewers/viewers.test.ts +14 -1
  240. package/src/client/components/workspace/panel-header/index.test.tsx +2 -1
  241. package/src/client/components/workspace/panel-header/index.tsx +6 -4
  242. package/src/client/data/settings/omp-schema.json +33 -10
  243. package/src/client/hooks/editor/resolve-viewer.ts +1 -1
  244. package/src/client/hooks/editor/use-editor-drop.ts +14 -0
  245. package/src/client/hooks/editor/use-editor-tab-state.ts +5 -4
  246. package/src/client/hooks/ui/media-query.ts +27 -0
  247. package/src/client/hooks/workspace/file-tabs.ts +10 -0
  248. package/src/client/hooks/workspace/right-panel-presence.test.ts +152 -0
  249. package/src/client/hooks/workspace/right-panel-presence.ts +119 -0
  250. package/src/client/lib/router/search-params.test.ts +83 -0
  251. package/src/client/lib/router/search-params.ts +14 -3
  252. package/src/server/lib/mcp/session-mcp.test.ts +64 -1
  253. package/src/server/lib/mcp/session-overlay.server.ts +7 -4
  254. package/src/server/lib/omp/rpc/constants.test.ts +31 -0
  255. package/src/server/lib/omp/rpc/constants.ts +19 -0
  256. package/src/server/lib/omp/rpc/session-new.ts +78 -0
  257. package/src/server/lib/omp/rpc/session-registry.ts +22 -49
  258. package/src/server/lib/omp/rpc/spawn-mcp.ts +8 -1
  259. package/src/server/lib/omp/session/blobs.server.ts +2 -1
  260. package/src/server/lib/plugins/e2e.test.ts +71 -2
  261. package/src/server/lib/plugins/loader.server.ts +20 -1
  262. package/src/server/lib/plugins/module-import.server.ts +45 -0
  263. package/src/server/lib/usage/provider-key.ts +18 -0
  264. package/src/server/lib/usage/providers.server.ts +27 -3
  265. package/src/server/lib/usage/report.server.ts +24 -0
  266. package/src/server/lib/usage/token-harbor.test.ts +191 -0
  267. package/src/server/lib/usage/token-harbor.ts +207 -0
  268. package/src/server/lib/usage/token-portal.test.ts +140 -0
  269. package/src/server/lib/usage/token-portal.ts +179 -0
  270. package/src/server/lib/usage/vendor-http.test.ts +52 -0
  271. package/src/server/lib/usage/vendor-http.ts +9 -2
  272. package/src/server/routes/agent/new-prompt.test.ts +81 -0
  273. package/src/server/routes/agent/new.ts +78 -4
  274. package/src/server/routes/fs/raw.test.ts +12 -0
  275. package/src/server/routes/fs/raw.ts +2 -6
  276. package/src/server/routes/wiki/asset.ts +1 -1
  277. package/src/shared/lib/fs/document-kind.test.ts +39 -2
  278. package/src/shared/lib/fs/document-kind.ts +49 -1
  279. package/src/shared/lib/fs/file-kind.test.ts +30 -3
  280. package/src/shared/lib/fs/file-kind.ts +7 -104
  281. package/src/shared/lib/fs/mime.ts +159 -0
  282. package/src/shared/lib/omp/config/schema-releases.test.ts +22 -0
  283. package/src/shared/lib/workspace/sidebar-width.test.ts +34 -0
  284. package/src/shared/lib/workspace/sidebar-width.ts +33 -0
  285. package/src/shared/lib/workspace/workspace-panel-widths.test.ts +124 -0
  286. package/src/shared/lib/workspace/workspace-panel-widths.ts +115 -18
  287. package/src/shared/types/settings/usage.ts +89 -2
  288. package/dist/client/static/js/ImageView-jkrdrq8v.js +0 -1
  289. package/dist/client/static/js/LayoutWrapper-sh634350.js +0 -2
  290. package/dist/client/static/js/architecture-7GRP2DOG-pvb4d65d.js +0 -1
  291. package/dist/client/static/js/bash-8d8z8zrg.js +0 -1
  292. package/dist/client/static/js/c-acmn1zc9.js +0 -1
  293. package/dist/client/static/js/cpp-620mvjkk.js +0 -1
  294. package/dist/client/static/js/css-bt76kxbq.js +0 -1
  295. package/dist/client/static/js/cynefin-OW5HDTMX-gmx4vean.js +0 -1
  296. package/dist/client/static/js/eventmodeling-NTZA5JFV-vrnheyh7.js +0 -1
  297. package/dist/client/static/js/flowDiagram-KWPJA3E3-7gvtpn3d.js +0 -1
  298. package/dist/client/static/js/gitGraph-4MIJSDKK-n6wnc8st.js +0 -1
  299. package/dist/client/static/js/graphql-j1a6zp7m.js +0 -1
  300. package/dist/client/static/js/html-m0megrvb.js +0 -1
  301. package/dist/client/static/js/index-4cag7w6k.js +0 -479
  302. package/dist/client/static/js/index-5ka2tyf9.js +0 -3
  303. package/dist/client/static/js/index-83rkg916.js +0 -2
  304. package/dist/client/static/js/index-amsa0tfs.js +0 -2
  305. package/dist/client/static/js/index-dn7hg4em.js +0 -2
  306. package/dist/client/static/js/index-dpy3ewrn.css +0 -1
  307. package/dist/client/static/js/index-dt6q3rws.js +0 -12
  308. package/dist/client/static/js/index-hgzntg2j.js +0 -2
  309. package/dist/client/static/js/index-vkqb4dnt.js +0 -1
  310. package/dist/client/static/js/index-xwjbq003.js +0 -2
  311. package/dist/client/static/js/info-A6RAGUB7-1xtdxjz2.js +0 -1
  312. package/dist/client/static/js/ini-5f4zqtqr.js +0 -1
  313. package/dist/client/static/js/java-jj41mty3.js +0 -1
  314. package/dist/client/static/js/javascript-n9w9p97f.js +0 -1
  315. package/dist/client/static/js/json-rnh2h17x.js +0 -1
  316. package/dist/client/static/js/jsx-4gecrt29.js +0 -1
  317. package/dist/client/static/js/lua-zszaw2f7.js +0 -1
  318. package/dist/client/static/js/markdown-nm6gw4v4.js +0 -1
  319. package/dist/client/static/js/one-dark-pro-09d8p5vy.js +0 -1
  320. package/dist/client/static/js/one-light-g3ednt6p.js +0 -1
  321. package/dist/client/static/js/packet-AYTQ26CC-zm1r82x5.js +0 -1
  322. package/dist/client/static/js/pie-WAS4IAKB-sqa7321j.js +0 -1
  323. package/dist/client/static/js/properties-rkptax7r.js +0 -1
  324. package/dist/client/static/js/python-qf1se1mj.js +0 -1
  325. package/dist/client/static/js/r-ms0cygq2.js +0 -1
  326. package/dist/client/static/js/radar-RG4KPBEZ-z3z82syp.js +0 -1
  327. package/dist/client/static/js/railroad-74A4TZTK-z6swcqq2.js +0 -1
  328. package/dist/client/static/js/railroad-abnf-HS5TGJTU-33km6py4.js +0 -1
  329. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-1zbf1xmq.js +0 -1
  330. package/dist/client/static/js/railroad-peg-WCYAUIDC-wte1xzzy.js +0 -1
  331. package/dist/client/static/js/sql-hd42h8wx.js +0 -1
  332. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-6y8zdbm4.js +0 -8
  333. package/dist/client/static/js/treeView-Q6P3EWNA-pvgx6n22.js +0 -1
  334. package/dist/client/static/js/treemap-WGGIJYW6-3n9zm628.js +0 -1
  335. package/dist/client/static/js/tsx-gx7td06z.js +0 -1
  336. package/dist/client/static/js/typescript-1a808spn.js +0 -1
  337. package/dist/client/static/js/wardley-WFR3VGLG-7m07ewc4.js +0 -1
  338. package/dist/client/static/js/xml-3117mxd9.js +0 -1
  339. package/dist/client/static/js/yaml-dmvh8vyt.js +0 -1
@@ -0,0 +1,82 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The fallback chain, one assertion per level and per field.
8
+ *
9
+ * These are the cases that are wrong in a way nobody notices: a card that only
10
+ * sets a thinking level must keep its stage's harness, a stage that sets a
11
+ * harness must not freeze a model, and a card whose stage was deleted must still
12
+ * be startable. `origin` is asserted with every value because the sheet renders
13
+ * it — a resolved value the panel cannot explain is an override nobody can make.
14
+ */
15
+
16
+ import { describe, expect, test } from 'bun:test';
17
+
18
+ import type { Card } from '../protocol';
19
+ import { defaultBoard } from './board';
20
+ import { dispatchText, resolveAgent } from './resolve';
21
+
22
+ describe('agent resolution', () => {
23
+ const board = defaultBoard('2026-01-01T00:00:00.000Z');
24
+
25
+ function card(agent?: Card['task']['agent']): Card {
26
+ return {
27
+ schema: 2, id: 'k-abcdef', title: 't', status: 'in_progress', priority: 2, workspace: null,
28
+ task: { prompt: 'p', images: [], ...(agent ? { agent } : {}) },
29
+ sessionId: null, createdAt: '', updatedAt: '', movedAt: null,
30
+ };
31
+ }
32
+
33
+ test('with nothing set anywhere, the host defaults win', () => {
34
+ const resolved = resolveAgent(card(), board.stages[2], board);
35
+ expect(resolved.harness).toBe('omp-rpc');
36
+ expect(resolved.access).toBe('always-ask');
37
+ expect(resolved.origin.harness).toBe('host');
38
+ expect(resolved.promptDelivery).toBe('appended');
39
+ });
40
+
41
+ test('a stage overrides the harness and the prompt', () => {
42
+ const stages = board.stages.map((stage) =>
43
+ stage.id === 'in_progress'
44
+ ? { ...stage, agent: { harness: 'claude', prompt: 'Work it.', thinking: 'high' } }
45
+ : stage,
46
+ );
47
+ const resolved = resolveAgent(card(), stages[2], { ...board, stages });
48
+ expect(resolved.harness).toBe('claude');
49
+ expect(resolved.origin.harness).toBe('stage');
50
+ expect(resolved.prompt).toBe('Work it.');
51
+ // ACP has no system-prompt field, so the text rides the first turn.
52
+ expect(resolved.promptDelivery).toBe('prepended');
53
+ });
54
+
55
+ test('a card overrides ONE field and inherits the rest from its stage', () => {
56
+ const stages = board.stages.map((stage) =>
57
+ stage.id === 'in_progress' ? { ...stage, agent: { harness: 'claude', model: { provider: 'anthropic', modelId: 'opus' } } } : stage,
58
+ );
59
+ const resolved = resolveAgent(card({ thinking: 'low' }), stages[2], { ...board, stages });
60
+ expect(resolved.harness).toBe('claude');
61
+ expect(resolved.origin.harness).toBe('stage');
62
+ expect(resolved.thinking).toBe('low');
63
+ expect(resolved.origin.thinking).toBe('card');
64
+ expect(resolved.model).toEqual({ provider: 'anthropic', modelId: 'opus' });
65
+ });
66
+
67
+ test('a card whose stage is gone still resolves from its own settings', () => {
68
+ const resolved = resolveAgent(card({ harness: 'codex' }), undefined, board);
69
+ expect(resolved.harness).toBe('codex');
70
+ expect(resolved.access).toBe('always-ask');
71
+ });
72
+
73
+ test('dispatchText splits the prompt by transport', () => {
74
+ const omp = resolveAgent(card(), board.stages[2], board);
75
+ expect(dispatchText({ ...omp, prompt: 'Rules.' }, 'Task.')).toEqual({ systemPrompt: 'Rules.', message: 'Task.' });
76
+ const acp = dispatchText({ ...omp, prompt: 'Rules.', promptDelivery: 'prepended' }, 'Task.');
77
+ expect(acp.systemPrompt).toBeUndefined();
78
+ expect(acp.message).toContain('<stage_instructions>');
79
+ expect(acp.message.endsWith('Task.')).toBe(true);
80
+ expect(dispatchText(omp, 'Task.')).toEqual({ systemPrompt: undefined, message: 'Task.' });
81
+ });
82
+ });
@@ -0,0 +1,135 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * Which agent a card runs on, and why.
8
+ *
9
+ * The chain is per FIELD, first non-null wins:
10
+ *
11
+ * card.task.agent → stage.agent → board.defaults → host default
12
+ *
13
+ * Per field, not per level: a card that only wants a higher thinking level must
14
+ * not have to restate the stage's harness, and a stage that changes the harness
15
+ * must not silently keep the previous stage's model. `origin` is returned with
16
+ * every value because the sheet renders "stage: in_progress" beside an inherited
17
+ * pick — an override has to be visible before it is made.
18
+ *
19
+ * The host defaults are not invented here: `omp-rpc` is the catalog's default
20
+ * harness, the model is what `/api/agent/new` resolves when the request names
21
+ * none (project default, then the composer's persisted pick), and the access mode
22
+ * is the persisted approval mode. This function therefore returns `null` for
23
+ * those fields and lets the route decide, rather than freezing a copy of a rule
24
+ * the host owns.
25
+ */
26
+
27
+ import type { AgentOrigin, AgentSpec, Board, Card, ResolvedAgent, Stage } from '../protocol';
28
+
29
+ /** The host's defaults, named once so the panel and the request agree. */
30
+ export const HOST_DEFAULTS = {
31
+ harness: 'omp-rpc',
32
+ access: 'always-ask',
33
+ } as const;
34
+
35
+ function pick<T>(
36
+ levels: readonly { origin: AgentOrigin; value: T | null | undefined }[],
37
+ ): { value: T | null; origin: AgentOrigin } {
38
+ for (const level of levels) {
39
+ if (level.value !== undefined && level.value !== null) return { value: level.value, origin: level.origin };
40
+ }
41
+ const last = levels[levels.length - 1];
42
+ return { value: null, origin: last?.origin ?? 'host' };
43
+ }
44
+
45
+ /**
46
+ * Resolve one card's agent.
47
+ *
48
+ * `stage` may be undefined for a card whose status matches no stage (an
49
+ * "Unplaced" card): its own task settings still apply, and the board defaults
50
+ * fill the rest, so an orphaned card is still startable rather than stuck.
51
+ */
52
+ export function resolveAgent(card: Card, stage: Stage | undefined, board: Board): ResolvedAgent {
53
+ const cardSpec: AgentSpec = card.task.agent ?? {};
54
+ const stageSpec: AgentSpec = stage?.agent ?? {};
55
+ const defaults: AgentSpec = board.defaults ?? {};
56
+
57
+ const harness = pick<string>([
58
+ { origin: 'card', value: cardSpec.harness },
59
+ { origin: 'stage', value: stageSpec.harness },
60
+ { origin: 'defaults', value: defaults.harness },
61
+ { origin: 'host', value: HOST_DEFAULTS.harness },
62
+ ]);
63
+ const model = pick<{ provider: string; modelId: string }>([
64
+ { origin: 'card', value: cardSpec.model },
65
+ { origin: 'stage', value: stageSpec.model },
66
+ { origin: 'defaults', value: defaults.model },
67
+ { origin: 'host', value: null },
68
+ ]);
69
+ const thinking = pick<string>([
70
+ { origin: 'card', value: cardSpec.thinking },
71
+ { origin: 'stage', value: stageSpec.thinking },
72
+ { origin: 'defaults', value: defaults.thinking },
73
+ { origin: 'host', value: null },
74
+ ]);
75
+ const access = pick<string>([
76
+ { origin: 'card', value: cardSpec.access },
77
+ { origin: 'stage', value: stageSpec.access },
78
+ { origin: 'defaults', value: defaults.access },
79
+ { origin: 'host', value: HOST_DEFAULTS.access },
80
+ ]);
81
+ const prompt = pick<string>([
82
+ { origin: 'card', value: cardSpec.prompt },
83
+ { origin: 'stage', value: stageSpec.prompt },
84
+ { origin: 'defaults', value: defaults.prompt },
85
+ { origin: 'host', value: '' },
86
+ ]);
87
+ const skills = pick<string[]>([
88
+ { origin: 'card', value: cardSpec.skills },
89
+ { origin: 'stage', value: stageSpec.skills },
90
+ { origin: 'defaults', value: defaults.skills },
91
+ { origin: 'host', value: [] },
92
+ ]);
93
+
94
+ const resolvedHarness = harness.value ?? HOST_DEFAULTS.harness;
95
+ return {
96
+ harness: resolvedHarness,
97
+ model: model.value,
98
+ thinking: thinking.value,
99
+ access: access.value ?? HOST_DEFAULTS.access,
100
+ prompt: prompt.value ?? '',
101
+ skills: skills.value ?? [],
102
+ origin: {
103
+ harness: harness.origin,
104
+ model: model.origin,
105
+ thinking: thinking.origin,
106
+ access: access.origin,
107
+ prompt: prompt.origin,
108
+ skills: skills.origin,
109
+ },
110
+ // omp takes a real system prompt at spawn; ACP's `session/new` has no such
111
+ // field, so the same text rides the first turn instead. The sheet says which.
112
+ promptDelivery: resolvedHarness === 'omp-rpc' ? 'appended' : 'prepended',
113
+ };
114
+ }
115
+
116
+ /**
117
+ * The two texts a start sends.
118
+ *
119
+ * On omp-rpc the stage prompt is a spawn flag and the message is the task alone;
120
+ * on ACP the message carries both, fenced so an agent can tell instructions from
121
+ * the task it was given.
122
+ */
123
+ export function dispatchText(resolved: ResolvedAgent, taskPrompt: string): {
124
+ systemPrompt: string | undefined;
125
+ message: string;
126
+ } {
127
+ if (!resolved.prompt) return { systemPrompt: undefined, message: taskPrompt };
128
+ if (resolved.promptDelivery === 'appended') {
129
+ return { systemPrompt: resolved.prompt, message: taskPrompt };
130
+ }
131
+ return {
132
+ systemPrompt: undefined,
133
+ message: `<stage_instructions>\n${resolved.prompt}\n</stage_instructions>\n\n${taskPrompt}`,
134
+ };
135
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "lib": ["ESNext", "DOM", "DOM.Iterable"],
7
+ "jsx": "react-jsx",
8
+ "jsxImportSource": "preact",
9
+ "strict": true,
10
+ "noEmit": true,
11
+ "skipLibCheck": true,
12
+ "types": [],
13
+ "allowArbitraryExtensions": true,
14
+ "baseUrl": ".",
15
+ "paths": {
16
+ "@/*": ["./src/*"],
17
+ "@kabmo-labs/kabmo-sdk": ["../../../packages/kabmo-sdk/src/index.ts"],
18
+ "@kabmo-labs/kabmo-sdk/app": ["../../../packages/kabmo-sdk/src/app.ts"],
19
+ "@kabmo-labs/kabmo-sdk/testing": ["../../../packages/kabmo-sdk/src/testing/index.ts"],
20
+ "@kabmo-labs/kabmo-sdk/testing/app": ["../../../packages/kabmo-sdk/src/testing/app.tsx"],
21
+ "@kabmo-labs/kabmo-ui": ["../../../packages/kabmo-ui/src/index.tsx"],
22
+ "@kabmo-labs/kabmo-ui/components": ["../../../packages/kabmo-ui/src/components.tsx"]
23
+ }
24
+ },
25
+ "include": ["src"]
26
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kabmo-labs/kabmo",
3
- "version": "0.46.1",
3
+ "version": "0.48.0",
4
4
  "description": "Web console and diagnostic workbench for AI coding agents: Elysia + Preact on Bun.",
5
5
  "license": "MIT",
6
6
  "author": "Wijanarko Putra Rajeb <wijanarko.rajeb@gmail.com>",
@@ -80,7 +80,7 @@
80
80
  "@codemirror/view": "6.43.15",
81
81
  "@dskripchenko/drawio": "^0.1.0",
82
82
  "@fontsource/fira-code": "^5.3.0",
83
- "@kabmo-labs/kabmo-sdk": "0.4.0",
83
+ "@kabmo-labs/kabmo-sdk": "0.5.0",
84
84
  "@kabmo-labs/kabmo-ui": "0.0.3",
85
85
  "@shikijs/langs": "^4.4.3",
86
86
  "@shikijs/themes": "^4.4.3",
@@ -12,7 +12,7 @@ import {
12
12
  } from 'lucide-preact';
13
13
  import type { ReactNode } from 'preact/compat';
14
14
  import { BRAND_ICONS, BRAND_VIEWBOX, type BrandIconName } from '@/shared/lib/icons/file-brand-paths';
15
- import { getImageMimeType } from '@/shared/lib/fs/file-kind';
15
+ import { getImageMimeType } from '@/shared/lib/fs/mime';
16
16
 
17
17
  interface FileIconProps {
18
18
  name: string;
@@ -61,7 +61,8 @@ import { useUpdates } from '@/client/hooks/ui/updates';
61
61
  import { UPDATE_REQUEST_EVENT } from '@/shared/lib/updates/popup-state';
62
62
  import { useUpdateCheckRequest } from '@/client/hooks/ui/updates/check-request';
63
63
  import { openKeyBindingHelp } from '@/client/lib/commands/overlays';
64
- import { MAX_LEFT_PANEL_WIDTH } from '@/shared/lib/workspace/sidebar-width';
64
+ import { MAX_LEFT_PANEL_WIDTH, sidebarWidthForViewport } from '@/shared/lib/workspace/sidebar-width';
65
+ import { useViewportWidth } from '@/client/hooks/ui/media-query';
65
66
  import { updateOutcomeTone } from '@/shared/lib/ui/toast-duration';
66
67
  import type { AgentStreamStatus } from '@/shared/lib/chat/omp/status';
67
68
 
@@ -213,14 +214,22 @@ export function LeftColumn({
213
214
  // not.
214
215
  useUpdateCheckRequest(updates, pushToast);
215
216
 
217
+ // The stored width is a CHOICE, the rendered one is a choice that fits THIS
218
+ // window: a 414px column on a 768px window leaves the chat 148px (measured),
219
+ // so the column gives way as a share of the viewport and the chosen width
220
+ // comes back on a wider window (`sidebarWidthForViewport`). The separator's
221
+ // ceiling follows, or a drag would push straight back past the cap.
222
+ const viewportWidth = useViewportWidth();
223
+ const renderedWidth = sidebarWidthForViewport(width, viewportWidth);
224
+
216
225
  return (
217
226
  <>
218
227
  <Panel
219
228
  panelRef={panelRef}
220
229
  id="left-panel"
221
- defaultSize={width}
230
+ defaultSize={renderedWidth}
222
231
  minSize={minWidth}
223
- maxSize={MAX_LEFT_PANEL_WIDTH}
232
+ maxSize={Math.max(minWidth, sidebarWidthForViewport(MAX_LEFT_PANEL_WIDTH, viewportWidth))}
224
233
  collapsed={!open}
225
234
  >
226
235
  {/* The column is three ROWS, and the order is what makes it read as one
@@ -1,4 +1,4 @@
1
- import { useRef } from 'preact/hooks';
1
+ import { useEffect, useRef } from 'preact/hooks';
2
2
  import { lazy } from 'preact/compat';
3
3
  import type { RefObject } from 'preact/compat';
4
4
  import { Group, Panel, type PanelImperativeHandle } from '@/client/components/layout/desktop-layout/resizer';
@@ -20,7 +20,7 @@ import {
20
20
  type EditorWidthMode,
21
21
  type PanelWidths,
22
22
  } from '@/shared/lib/workspace/panel-widths';
23
- import { resolveWorkspacePanelWidths } from '@/shared/lib/workspace/workspace-panel-widths';
23
+ import { railShown, resolveWorkspacePanelWidths } from '@/shared/lib/workspace/workspace-panel-widths';
24
24
 
25
25
  const Editor = lazy(() => import('@/client/components/workspace/editor/index').then((m) => ({ default: m.Editor })));
26
26
 
@@ -85,6 +85,14 @@ interface WorkspacePanelsProps {
85
85
  onHideEditor: () => void;
86
86
  onSessionTitle: (title: string | null) => void;
87
87
  onPanelWidths: (patch: PanelWidths) => void;
88
+ /**
89
+ * The right panel is asked for but the group has no room for it.
90
+ *
91
+ * Reported upward because the CONTROL that asked lives in the navbar: a
92
+ * toggle that flips a flag this layout ignores reads as a dead button, so the
93
+ * owner of the flag is the one that has to explain the refusal.
94
+ */
95
+ onRightPanelSuppressed?: (suppressed: boolean | null) => void;
88
96
  }
89
97
 
90
98
  export function WorkspacePanels(props: WorkspacePanelsProps) {
@@ -123,6 +131,7 @@ export function WorkspacePanels(props: WorkspacePanelsProps) {
123
131
  onHideEditor,
124
132
  onSessionTitle,
125
133
  onPanelWidths,
134
+ onRightPanelSuppressed,
126
135
  } = props;
127
136
 
128
137
  /**
@@ -174,6 +183,8 @@ export function WorkspacePanels(props: WorkspacePanelsProps) {
174
183
  const {
175
184
  editor: editorWidth,
176
185
  right: rightWidth,
186
+ rightShown: rightPanelShown,
187
+ rightSuppressed,
177
188
  editorMax: editorMaxSize,
178
189
  rightMax: rightMaxSize,
179
190
  rightMin: rightPanelMin,
@@ -189,6 +200,16 @@ export function WorkspacePanels(props: WorkspacePanelsProps) {
189
200
  chatHidden,
190
201
  });
191
202
 
203
+ // The owner of the flag is the navbar's toggle, so the refusal travels up:
204
+ // a click that changes nothing visible is the defect this exists to prevent.
205
+ // `null` before the group is measured, so the first suppression of a load can
206
+ // be told apart from a panel being taken away.
207
+ useEffect(() => {
208
+ // `0` is the pre-measurement area as much as `null` is: the observer reports
209
+ // it on the first frame, and the resolver answers "fits" for both.
210
+ onRightPanelSuppressed?.(available == null || available <= 0 ? null : rightSuppressed);
211
+ }, [available, rightSuppressed, onRightPanelSuppressed]);
212
+
192
213
  /**
193
214
  * Widths of the fixed panels as they are right now, keyed by slot: the
194
215
  * editor (source or diff, whichever is showing) and the right panel under
@@ -243,7 +264,7 @@ export function WorkspacePanels(props: WorkspacePanelsProps) {
243
264
  available,
244
265
  reservedPx:
245
266
  (showEditor ? editorWidth : 0) +
246
- (showRightPanel ? rightWidth : 0) +
267
+ (rightPanelShown ? rightWidth : 0) +
247
268
  handleCount * HANDLE_WIDTH,
248
269
  })}
249
270
  >
@@ -289,10 +310,10 @@ export function WorkspacePanels(props: WorkspacePanelsProps) {
289
310
  </div>
290
311
  </Panel>
291
312
 
292
- {showRightPanel && <ResizeHandle />}
313
+ {rightPanelShown && <ResizeHandle />}
293
314
  <RightColumn
294
315
  panelRef={rightPanelRef}
295
- open={showRightPanel}
316
+ open={rightPanelShown}
296
317
  width={rightWidth}
297
318
  minWidth={rightPanelMin}
298
319
  maxWidth={rightMaxSize}
@@ -312,8 +333,14 @@ export function WorkspacePanels(props: WorkspacePanelsProps) {
312
333
  />
313
334
  </Group>
314
335
 
315
- {showRightSide && rightNav === 'rail' && (
316
- <ActivityBar side="right" activePanel={shownRightPanel} onChangePanel={onChangeRightPanel} isPanelOpen={showRightPanel} hasActiveContext={hasActiveContext} activeProjectPath={activeProjectPath} />
336
+ {/* The rail is how a view is CHOSEN, so it goes only where choosing one
337
+ can still put something on screen: a rail beside a SUPPRESSED panel is
338
+ a column of marks that switches nothing (and 44px the chat cannot
339
+ spare). A panel closed by its own control is not suppressed — the rail
340
+ is then the way back, and hiding it with the column left the column
341
+ unreachable except through the navbar's chord. */}
342
+ {railShown({ sideShown: showRightSide, nav: rightNav, rightSuppressed }) && (
343
+ <ActivityBar side="right" activePanel={shownRightPanel} onChangePanel={onChangeRightPanel} isPanelOpen={rightPanelShown} hasActiveContext={hasActiveContext} activeProjectPath={activeProjectPath} />
317
344
  )}
318
345
  </div>
319
346
  );
@@ -1,4 +1,4 @@
1
- import { useCallback, useMemo, useRef, useState } from 'preact/hooks';
1
+ import { useCallback, useRef, useState } from 'preact/hooks';
2
2
  import { Group, Panel, type PanelImperativeHandle } from '@/client/components/layout/desktop-layout/resizer';
3
3
  import { LeftColumn } from '@/client/components/layout/desktop-layout/LeftColumn';
4
4
  import { DesktopOverlays } from '@/client/components/layout/desktop-layout/DesktopOverlays';
@@ -21,16 +21,16 @@ import { useRightOpenRequest } from '@/client/hooks/workspace/right-open-request
21
21
  import { useLeftDock, useLeftDockWidth } from '@/client/hooks/workspace/left-dock';
22
22
  import { useEditorViewLayout } from '@/client/hooks/workspace/editor-view';
23
23
  import { useLeftDockView } from '@/client/components/workspace/plugin-panel/catalog';
24
- import type { EditorWidthMode } from '@/shared/lib/workspace/panel-widths';
25
24
  import { useSettingsModal } from '@/client/hooks/ui/settings-modal';
26
25
  import { useWorkspaceCommands } from '@/client/hooks/workspace/commands';
27
26
  import { PluginBootstrap } from '@/client/lib/plugins/bootstrap';
28
27
  import { useToasts } from '@/client/hooks/ui/toasts';
29
- import type { EditorDropResult } from '@/client/hooks/editor/use-editor-drop';
28
+ import { useDropOutcomeToast } from '@/client/hooks/editor/use-editor-drop';
30
29
  import { useNavbarSessionActions } from '@/client/hooks/workspace/navbar-session-actions';
31
30
  import { useCopyTabPath } from '@/client/hooks/workspace/copy-tab-path';
32
31
  import { useRightSideLayout, type RightSideLayout } from '@/client/hooks/workspace/right-side';
33
32
  import { useActiveWorkspaceProject } from '@/client/hooks/workspace/active-project';
33
+ import { useRightPanelPresence } from '@/client/hooks/workspace/right-panel-presence';
34
34
 
35
35
  interface DesktopLayoutProps {
36
36
  sessionId: string | null;
@@ -90,6 +90,7 @@ export function DesktopLayout({ sessionId, onMobileToggle, appSettings = {} }: D
90
90
  const {
91
91
  openedFiles,
92
92
  activeFileId,
93
+ widthMode: editorWidthMode,
93
94
  setActiveFileId,
94
95
  handleOpenFile,
95
96
  handleCloseFile,
@@ -130,13 +131,6 @@ export function DesktopLayout({ sessionId, onMobileToggle, appSettings = {} }: D
130
131
  // while the rail draws another.
131
132
  const rightSideShown = !rightSide.hidden;
132
133
 
133
- // A diff wants room a source file does not, so the editor panel keeps a
134
- // separate remembered width per tab kind.
135
- const editorWidthMode: EditorWidthMode = useMemo(
136
- () => (openedFiles.find(f => String(f.id) === String(activeFileId))?.isDiff ? 'diff' : 'editor'),
137
- [openedFiles, activeFileId],
138
- );
139
-
140
134
  /**
141
135
  * The editor's WIDTH mode (`compact` / `full`), entered from either toolbar.
142
136
  *
@@ -163,17 +157,17 @@ export function DesktopLayout({ sessionId, onMobileToggle, appSettings = {} }: D
163
157
 
164
158
  const { pushToast } = useToasts();
165
159
 
166
- /**
167
- * A refused drop names its reason ("outside every workspace", "not text") —
168
- * a silent no-op reads as a broken target. The TARGET is `WorkspacePanels`':
169
- * a layout-wide one would accept a drop over the sidebar and right panel too.
170
- */
171
- const handleDropResult = useCallback(
172
- (result: EditorDropResult) => pushToast(result.message, result.ok ? 'success' : 'error'),
173
- [pushToast],
174
- );
160
+ const handleDropResult = useDropOutcomeToast(pushToast);
175
161
  const { menu: sessionActions, sessionDelete } = useNavbarSessionActions(folders, sessionId, pushToast);
176
162
 
163
+ // The side's presence and its refusal, one owner: `useRightPanelPresence`.
164
+ const rightPanel = useRightPanelPresence({
165
+ pushToast,
166
+ showEditor,
167
+ sideShown: rightSideShown,
168
+ toggleSide: rightSide.toggleRightSide,
169
+ });
170
+
177
171
  /**
178
172
  * Ask for the sidebar (or put it away).
179
173
  *
@@ -199,7 +193,7 @@ export function DesktopLayout({ sessionId, onMobileToggle, appSettings = {} }: D
199
193
  toggleEditor: rightSide.toggleEditor,
200
194
  // The side's own switch, so the other chord and the navbar's button cannot
201
195
  // disagree about what "the right side" means.
202
- toggleRightPanel: rightSide.toggleRightSide,
196
+ toggleRightPanel: rightPanel.toggle,
203
197
  openSettings: () => (settings.isOpen ? settings.close() : settings.open()),
204
198
  });
205
199
 
@@ -292,9 +286,9 @@ export function DesktopLayout({ sessionId, onMobileToggle, appSettings = {} }: D
292
286
  sessionTitle={sessionTitle}
293
287
  sessionId={sessionId}
294
288
  showLeftPanel={sidebarOpen}
295
- showRightSide={rightSideShown}
289
+ showRightSide={rightSideShown && rightPanel.sideVisible}
296
290
  streamStatus={streamStatus}
297
- onToggleRightSide={rightSide.toggleRightSide}
291
+ onToggleRightSide={rightPanel.toggle}
298
292
  onToggleLeftPanel={() => handleToggleLeftPanel(!sidebarOpen)}
299
293
  sessionActions={sessionActions}
300
294
  />
@@ -338,6 +332,7 @@ export function DesktopLayout({ sessionId, onMobileToggle, appSettings = {} }: D
338
332
  onHideEditor={rightSide.hideEditor}
339
333
  onSessionTitle={setSessionTitle}
340
334
  onPanelWidths={commitWidths}
335
+ onRightPanelSuppressed={rightPanel.report}
341
336
  />
342
337
  </main>
343
338
  </Panel>
@@ -123,6 +123,8 @@ export function MobileEditorSurface({
123
123
  name={file.name}
124
124
  source={editor.byteSource}
125
125
  content={editor.content}
126
+ root={file.root}
127
+ repo={file.repo}
126
128
  revision={editor.revision}
127
129
  onContentChange={editor.onChange}
128
130
  onSaveBytes={editor.deviceBacked ? undefined : saveBytes}
@@ -29,7 +29,13 @@ import { indentUnitFor, useEditorIndent } from '@/client/hooks/editor/indent-set
29
29
  import { useEditorTyping } from '@/client/hooks/editor/typing-settings';
30
30
  import { useFileReviewMode } from '@/client/hooks/editor/use-file-review-mode';
31
31
  import { MOBILE_SCROLL_POSITIONS_KEY } from '@/shared/lib/workspace/scroll-positions';
32
- import { BINARY_VIEWERS, RENDERED_VIEWERS, VIEWER_LABELS, viewerKindFor } from '@/shared/lib/fs/document-kind';
32
+ import {
33
+ BINARY_VIEWERS,
34
+ RENDERED_VIEWERS,
35
+ VIEWER_LABELS,
36
+ opensInPreview,
37
+ viewerKindFor,
38
+ } from '@/shared/lib/fs/document-kind';
33
39
  import type { MobileFullEditorProps } from '@/client/components/mobile/mobile-right-sidebar/editor-props';
34
40
 
35
41
  export function MobileFullEditor({ file, missing = false, onClose, onFileSaved, onDropResult }: MobileFullEditorProps) {
@@ -57,8 +63,10 @@ export function MobileFullEditor({ file, missing = false, onClose, onFileSaved,
57
63
  const hasPreview = RENDERED_VIEWERS[viewerKind] === true;
58
64
  const fileKey = file.path ?? file.name;
59
65
  // The picture/grid/prose is what the file was opened to read, so a rendered
60
- // kind defaults to its preview and only a user's own toggle moves it.
61
- const isPreview = previewOverrides[fileKey] ?? hasPreview;
66
+ // kind defaults to its preview and only a user's own toggle moves it. An HTML
67
+ // page is the exception: it opens its SOURCE, which is why the default is its
68
+ // own table rather than "has a preview at all".
69
+ const isPreview = previewOverrides[fileKey] ?? opensInPreview(viewerKind);
62
70
  // Review mode is the same per-tab toggle the desktop pane uses (one key, one
63
71
  // rule), and it exists only where a rendered markdown document is on screen —
64
72
  // a CSV grid and an SVG picture have no markdown blocks to judge.
@@ -164,4 +164,25 @@ describe('editor theme picker', () => {
164
164
  // Auto is a choice, not a light/dark theme, so a variant filter keeps it.
165
165
  expect(labels.some((label) => label.startsWith('Auto'))).toBe(true);
166
166
  });
167
+
168
+ /**
169
+ * The grid's density is a fact about the PANE, not the window.
170
+ *
171
+ * `sm:grid-cols-2 lg:grid-cols-3` read the VIEWPORT: at a 768px window the
172
+ * settings modal is 720 wide and this pane gets 174px, where two 83px cards
173
+ * were drawn and the selected card's check measured 6px outside the dialog
174
+ * (which is `overflow-hidden`, so it was clipped). A DOM test cannot measure
175
+ * Tailwind, so this pins the contract the markup must keep: the section is
176
+ * the container and the grid's breakpoints are container queries.
177
+ */
178
+ test('the card grid asks its PANE, never the viewport', async () => {
179
+ const root = await mount(EDITOR_AUTO_THEME_ID);
180
+ const grid = root.querySelector('.grid');
181
+ expect(grid).not.toBeNull();
182
+ const classes = grid?.className ?? '';
183
+ expect(classes).toContain('grid-cols-1');
184
+ expect(classes).toContain('@[320px]:grid-cols-2');
185
+ expect(classes).not.toMatch(/(^|\s)(sm|md|lg|xl):/);
186
+ expect(root.querySelector('section')?.className).toContain('@container');
187
+ });
167
188
  });
@@ -85,7 +85,9 @@ export function EditorThemeSection({ settings, onUpdate }: EditorThemeSectionPro
85
85
  );
86
86
 
87
87
  return (
88
- <section className="space-y-3">
88
+ // `@container`, for the reason `ThemeGrid` states: the card grid's density
89
+ // follows the PANE, and the pane is 174px wide at a 768px window.
90
+ <section className="@container space-y-3">
89
91
  <div>
90
92
  <h4 className="flex items-center gap-2 text-sm font-semibold text-ink">
91
93
  <Palette size={15} className="text-ink/60" />
@@ -98,7 +100,9 @@ export function EditorThemeSection({ settings, onUpdate }: EditorThemeSectionPro
98
100
  </p>
99
101
  </div>
100
102
 
101
- <div className="flex items-center gap-1.5">
103
+ {/* Same row, same wrap as the palette grid's: the pane is 174px wide at
104
+ a 768px window, where three filters plus the count overflow it. */}
105
+ <div className="flex flex-wrap items-center gap-1.5">
102
106
  {FILTERS.map((option) => (
103
107
  <button
104
108
  key={option.id}
@@ -115,12 +119,12 @@ export function EditorThemeSection({ settings, onUpdate }: EditorThemeSectionPro
115
119
  {option.label}
116
120
  </button>
117
121
  ))}
118
- <span className="ml-auto font-mono text-[11px] text-ink/50">
122
+ <span className="ml-auto min-w-0 font-mono text-[11px] text-ink/50 whitespace-nowrap">
119
123
  {filter === 'all' ? `${themes.length} themes` : `${themes.length} shown`}
120
124
  </span>
121
125
  </div>
122
126
 
123
- <div className="grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3">
127
+ <div className="grid grid-cols-1 gap-2 @[320px]:grid-cols-2 @[560px]:grid-cols-3">
124
128
  {/* `Auto` is a card rather than a checkbox: it is one of the choices,
125
129
  and a checkbox beside a grid makes the default look like an
126
130
  override of the thing it is a peer of. It is drawn under EVERY
@@ -36,8 +36,14 @@ export function ThemeCard({ theme, selected, onSelect }: ThemeCardProps) {
36
36
  : 'border-ink/20 bg-paper hover:border-ink/40 hover:bg-ink/5'
37
37
  }`}
38
38
  >
39
- <div className="flex items-center gap-2">
40
- <span className="truncate font-semibold text-ink" title={theme.name}>
39
+ {/* `min-w-0` on the name and the badge as a group: a flex item's default
40
+ `min-width: auto` is its min-content width, so the name refused to
41
+ shrink and the selected card's check was painted past the pane's own
42
+ edge — measured at a 768px window, where this card is 83px wide and
43
+ the check landed 6px outside the dialog (which is `overflow-hidden`,
44
+ so it was clipped rather than scrolled). */}
45
+ <div className="flex min-w-0 items-center gap-2">
46
+ <span className="min-w-0 truncate font-semibold text-ink" title={theme.name}>
41
47
  {theme.name}
42
48
  </span>
43
49
  <span className="shrink-0 rounded-full border border-ink/15 px-1.5 py-px text-[10px] font-semibold uppercase tracking-wider text-ink/50">