@kabmo-labs/kabmo 0.41.0 → 0.42.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 (305) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +533 -518
  3. package/dist/client/static/js/{CsvGrid-60njj97j.js → CsvGrid-20k047ht.js} +2 -2
  4. package/dist/client/static/js/{DocxView-rsv0j46a.js → DocxView-qpvhfcmg.js} +5 -5
  5. package/dist/client/static/js/{DrawioView-n2g5df3a.js → DrawioView-178skky8.js} +2 -2
  6. package/dist/client/static/js/ImageView-460th5qa.js +1 -0
  7. package/dist/client/static/js/LayoutWrapper-5cv0dty8.js +2 -0
  8. package/dist/client/static/js/Modal-wks6p4r5.js +38 -0
  9. package/dist/client/static/js/{PdfView-1r7a0qkp.js → PdfView-y51g03nr.js} +1 -1
  10. package/dist/client/static/js/SessionsView-rsmvn7ks.js +1 -0
  11. package/dist/client/static/js/{SheetView-bt5pp042.js → SheetView-z7yvb05v.js} +25 -25
  12. package/dist/client/static/js/{SvgPreview-vfmqgmrx.js → SvgPreview-yehgzhem.js} +1 -1
  13. package/dist/client/static/js/{abnfDiagram-O67JEVCF-8k5hk1yx.js → abnfDiagram-O67JEVCF-6zxpcy8b.js} +1 -1
  14. package/dist/client/static/js/architecture-7GRP2DOG-9q06651f.js +1 -0
  15. package/dist/client/static/js/architectureDiagram-NJMV4G6O-m98sgh3c.js +36 -0
  16. package/dist/client/static/js/{astro-0rh34hha.js → astro-nn7xg0we.js} +1 -1
  17. package/dist/client/static/js/bash-fjzhxy10.js +1 -0
  18. package/dist/client/static/js/{blockDiagram-BEXU5L5S-04sbtdth.js → blockDiagram-BEXU5L5S-cp7rervg.js} +5 -5
  19. package/dist/client/static/js/c-wqtyezvw.js +1 -0
  20. package/dist/client/static/js/c4Diagram-YGBWAQC7-t31recqm.js +38 -0
  21. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-18cc0bsb.js → classDiagram-v2-NBCMYWYE-fy8x3dkx.js} +5 -5
  22. package/dist/client/static/js/{cose-bilkent-JH36ORCC-dk683zvp.js → cose-bilkent-JH36ORCC-va7ybm9e.js} +1 -1
  23. package/dist/client/static/js/cpp-y0nzwner.js +1 -0
  24. package/dist/client/static/js/css-a13jmmnc.js +1 -0
  25. package/dist/client/static/js/css-n2waj098.js +1 -0
  26. package/dist/client/static/js/cynefin-OW5HDTMX-w7a38g4g.js +1 -0
  27. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-m2sx8d8s.js → cynefinDiagram-VND7K2PF-4k0k429c.js} +2 -2
  28. package/dist/client/static/js/{dagre-6A5THRUB-qf3pr59p.js → dagre-6A5THRUB-ykdhxq6t.js} +2 -2
  29. package/dist/client/static/js/{diagram-22UHCM2B-twnz23mt.js → diagram-22UHCM2B-5nvwx7b6.js} +8 -8
  30. package/dist/client/static/js/{diagram-3UASUU5V-417bas6t.js → diagram-3UASUU5V-hc7zsjgw.js} +1 -1
  31. package/dist/client/static/js/diagram-ATOU4E4O-97ae07y7.js +3 -0
  32. package/dist/client/static/js/diagram-CDSNMT55-b56nnbbs.js +30 -0
  33. package/dist/client/static/js/{diagram-MLGK6HIB-7a0h1hs3.js → diagram-MLGK6HIB-37rygr9k.js} +1 -1
  34. package/dist/client/static/js/{diagram-MPIPVDR6-w75bftmd.js → diagram-MPIPVDR6-wv3vhhfk.js} +2 -2
  35. package/dist/client/static/js/{dockerfile-g5qbaeq3.js → dockerfile-0efb1z6e.js} +1 -1
  36. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-vdzm3tsv.js → ebnfDiagram-ZINNZB2B-13fv7vxg.js} +1 -1
  37. package/dist/client/static/js/{elixir-gpez1k9m.js → elixir-mabagxwa.js} +1 -1
  38. package/dist/client/static/js/{elk-276RUBZZ-2fsbb484.js → elk-276RUBZZ-xam60ktz.js} +1 -1
  39. package/dist/client/static/js/{erDiagram-OPXOYQCR-vnkztq7d.js → erDiagram-OPXOYQCR-24ctv2ee.js} +6 -6
  40. package/dist/client/static/js/{erlang-jqqa3ehb.js → erlang-zwy7cqdk.js} +1 -1
  41. package/dist/client/static/js/eventmodeling-NTZA5JFV-6wrjccyw.js +1 -0
  42. package/dist/client/static/js/flowDiagram-KWPJA3E3-19vjkg84.js +1 -0
  43. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-pbvcch52.js → ganttDiagram-FUAMR5RP-766a8fqw.js} +2 -2
  44. package/dist/client/static/js/gitGraph-4MIJSDKK-4je2p50v.js +1 -0
  45. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-dkvktvzr.js → gitGraphDiagram-X574FWY7-fmwjkgh6.js} +2 -2
  46. package/dist/client/static/js/graphql-gvb7e2eb.js +1 -0
  47. package/dist/client/static/js/html-bwyt0ayy.js +1 -0
  48. package/dist/client/static/js/{index-rc8wrs2a.js → index-03pyvmcz.js} +2 -2
  49. package/dist/client/static/js/index-13dr1t1r.js +314 -0
  50. package/dist/client/static/js/{index-rebnv57p.js → index-13xbwcbz.js} +2 -2
  51. package/dist/client/static/js/{index-pbsm2vw7.js → index-1c0pnsjd.js} +2 -2
  52. package/dist/client/static/js/index-1rxa9zxp.js +1 -0
  53. package/dist/client/static/js/{index-c6kx7s6a.js → index-2hpy58d0.js} +2 -2
  54. package/dist/client/static/js/{index-f8pq132s.js → index-2x9eqztp.js} +1 -1
  55. package/dist/client/static/js/{index-pn91shfp.js → index-4cncqz8j.js} +2 -2
  56. package/dist/client/static/js/index-4j8rgr4p.js +1 -0
  57. package/dist/client/static/js/{index-x2kb1kx5.js → index-4mstdh41.js} +3 -3
  58. package/dist/client/static/js/index-4z4ax55k.js +12 -0
  59. package/dist/client/static/js/{index-55hq7tnj.js → index-6ge6gk9w.js} +1 -1
  60. package/dist/client/static/js/{index-re1xz433.js → index-7t63akyt.js} +1 -1
  61. package/dist/client/static/js/{index-zye9309h.js → index-8b3t2y77.js} +2 -2
  62. package/dist/client/static/js/index-8hgm0abr.js +474 -0
  63. package/dist/client/static/js/index-8jqawh3r.js +2 -0
  64. package/dist/client/static/js/index-95en3p3g.js +9 -0
  65. package/dist/client/static/js/{index-rdqn92tc.js → index-97qst4k9.js} +2 -2
  66. package/dist/client/static/js/{index-xfa5hswh.js → index-9vdbnvmk.js} +1 -1
  67. package/dist/client/static/js/{index-zfykeg7x.js → index-a9t9gdew.js} +9 -9
  68. package/dist/client/static/js/{index-ds6a2cx7.js → index-b4y5g48d.js} +5 -5
  69. package/dist/client/static/js/{index-hz177dr2.js → index-czagykbq.js} +2 -2
  70. package/dist/client/static/js/{index-yq9vnd1y.js → index-dfqmwm7j.js} +2 -2
  71. package/dist/client/static/js/{index-tgper3yy.js → index-dydwcp3n.js} +2 -2
  72. package/dist/client/static/js/{index-0c6vpk89.js → index-e1yz59fa.js} +2 -2
  73. package/dist/client/static/js/{index-ce4vytm6.js → index-e6any867.js} +2 -2
  74. package/dist/client/static/js/{index-j5ram1ve.js → index-ejdnjh5c.js} +2 -2
  75. package/dist/client/static/js/index-f4vr1c6e.css +1 -0
  76. package/dist/client/static/js/{index-cytks03p.js → index-feffxxss.js} +2 -2
  77. package/dist/client/static/js/{index-6fx2t6y7.js → index-grczkttn.js} +12 -12
  78. package/dist/client/static/js/{index-s78n0dtv.js → index-hga3e13s.js} +2 -2
  79. package/dist/client/static/js/{index-ajjq0b8y.js → index-hw14rhen.js} +2 -2
  80. package/dist/client/static/js/index-hzwr5fm9.js +4 -0
  81. package/dist/client/static/js/{index-sj4y8kj2.js → index-j17h4z6f.js} +2 -2
  82. package/dist/client/static/js/{index-a4ed3mks.js → index-ka2rc2cr.js} +5 -5
  83. package/dist/client/static/js/{index-djv15k5s.js → index-ktbrmp29.js} +2 -2
  84. package/dist/client/static/js/{index-3rymer2w.js → index-nbexks3x.js} +1 -1
  85. package/dist/client/static/js/{index-ngk9h0v9.js → index-nh29fkk9.js} +2 -2
  86. package/dist/client/static/js/{index-gn92c6hp.js → index-p0ez6hqd.js} +2 -2
  87. package/dist/client/static/js/{index-e7yf273s.js → index-pkes9492.js} +2 -2
  88. package/dist/client/static/js/{index-fg965t62.js → index-pysqpc5n.js} +2 -2
  89. package/dist/client/static/js/index-qj34r6d0.js +1 -0
  90. package/dist/client/static/js/{index-ntcqyqd5.js → index-qx6x4z0y.js} +2 -2
  91. package/dist/client/static/js/{index-agdbjh5k.js → index-r8cc80w5.js} +2 -2
  92. package/dist/client/static/js/{index-9dnkfpx4.js → index-rab39785.js} +2 -2
  93. package/dist/client/static/js/{index-haaz8t7e.js → index-sk9ej289.js} +2 -2
  94. package/dist/client/static/js/{index-9fnzcg2x.js → index-sq3r1xhf.js} +2 -2
  95. package/dist/client/static/js/{index-pfbyfab5.js → index-sx809d6d.js} +2 -2
  96. package/dist/client/static/js/{index-7w3gqw2b.js → index-sz3mxjvy.js} +1 -1
  97. package/dist/client/static/js/{index-4jk8ngjg.js → index-tqycj126.js} +2 -2
  98. package/dist/client/static/js/{index-0xaz2eyv.js → index-vcn1kcpy.js} +3 -3
  99. package/dist/client/static/js/{index-2z9wrb46.js → index-x7f5ysch.js} +2 -2
  100. package/dist/client/static/js/index-xe5cqwnf.js +1 -0
  101. package/dist/client/static/js/index-xxe52zrm.js +2 -0
  102. package/dist/client/static/js/{index-amawahyh.js → index-yvxa7hd8.js} +2 -2
  103. package/dist/client/static/js/{index-e6qjfcz9.js → index-z6kpc98a.js} +1 -1
  104. package/dist/client/static/js/{index-yzg9mbsv.js → index-zjydzxhm.js} +1 -1
  105. package/dist/client/static/js/{index-ne131hmw.js → index-zvazj4va.js} +2 -2
  106. package/dist/client/static/js/info-A6RAGUB7-k0z5qdew.js +1 -0
  107. package/dist/client/static/js/{infoDiagram-VRGFBTTK-mh6yks62.js → infoDiagram-VRGFBTTK-tqytmzp1.js} +1 -1
  108. package/dist/client/static/js/ini-2gvjwh83.js +1 -0
  109. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-hnfqppnv.js → ishikawaDiagram-OU5B5YK6-rp77ff6m.js} +1 -1
  110. package/dist/client/static/js/java-1xwcq79s.js +1 -0
  111. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-s4nv1f3q.js → journeyDiagram-ZHPQQLJL-c7bxrhf1.js} +2 -2
  112. package/dist/client/static/js/json-4pqjabgq.js +1 -0
  113. package/dist/client/static/js/jsx-wcsss15s.js +1 -0
  114. package/dist/client/static/js/{julia-yre4bxb9.js → julia-2eekpjq8.js} +1 -1
  115. package/dist/client/static/js/{kanban-definition-PNTS6WVX-t8kbfefp.js → kanban-definition-PNTS6WVX-j2pxewqq.js} +5 -5
  116. package/dist/client/static/js/lua-h7vjcn0h.js +1 -0
  117. package/dist/client/static/js/markdown-f30jjjh9.js +1 -0
  118. package/dist/client/static/js/{mermaid.core-0784021p.js → mermaid.core-cqqe1krg.js} +6 -6
  119. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-swkkze8c.js → mindmap-definition-NLK3R4M7-s03k32p9.js} +5 -5
  120. package/dist/client/static/js/one-dark-pro-9tt0a020.js +1 -0
  121. package/dist/client/static/js/one-light-5fg4r0ra.js +1 -0
  122. package/dist/client/static/js/packet-AYTQ26CC-6cnvmb2z.js +1 -0
  123. package/dist/client/static/js/{pegDiagram-GJSIUBJH-jqayzh7z.js → pegDiagram-GJSIUBJH-dfg2j0zc.js} +1 -1
  124. package/dist/client/static/js/{perl-weeskn1v.js → perl-5vxax0nr.js} +1 -1
  125. package/dist/client/static/js/{php-vf3045p9.js → php-hgrgdq63.js} +1 -1
  126. package/dist/client/static/js/pie-WAS4IAKB-m9z1mztn.js +1 -0
  127. package/dist/client/static/js/{pieDiagram-5QR66LMP-w03a65ky.js → pieDiagram-5QR66LMP-pshd1j79.js} +1 -1
  128. package/dist/client/static/js/properties-ymexza6q.js +1 -0
  129. package/dist/client/static/js/python-31ycwa66.js +1 -0
  130. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-2j7sfa9s.js → quadrantDiagram-O4NWA36T-cvvvmtk2.js} +4 -4
  131. package/dist/client/static/js/r-t2nne4xp.js +1 -0
  132. package/dist/client/static/js/radar-RG4KPBEZ-8m9rkex6.js +1 -0
  133. package/dist/client/static/js/railroad-74A4TZTK-wc55emj8.js +1 -0
  134. package/dist/client/static/js/railroad-abnf-HS5TGJTU-2y2rnrzq.js +1 -0
  135. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-zzcc9x0v.js +1 -0
  136. package/dist/client/static/js/railroad-peg-WCYAUIDC-z82na5nb.js +1 -0
  137. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-jtkkgy34.js → railroadDiagram-XR7U4H2S-h53p3sha.js} +1 -1
  138. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-t85ckjdb.js → requirementDiagram-PLB6GJNP-bdv2fkxd.js} +4 -4
  139. package/dist/client/static/js/{ruby-1a2ryzy6.js → ruby-8pxcn21w.js} +1 -1
  140. package/dist/client/static/js/{rust-736r0f0v.js → rust-j80dxgjg.js} +1 -1
  141. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-5pfkw8ne.js → sankeyDiagram-IPEJSGJF-xqnnvmhy.js} +2 -2
  142. package/dist/client/static/js/{sass-tq4vw7hd.js → sass-bm32bb5k.js} +1 -1
  143. package/dist/client/static/js/{scss-x7ddw6gb.js → scss-e2dndbfa.js} +1 -1
  144. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-55vs9zv5.js → sequenceDiagram-PO4LG4MO-3p67305f.js} +10 -10
  145. package/dist/client/static/js/{sizeCapture-INFHLROL-pzqqd7f4.js → sizeCapture-INFHLROL-f87525h7.js} +1 -1
  146. package/dist/client/static/js/sql-bwnasywx.js +1 -0
  147. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-6nhrph8n.js → stateDiagram-v2-GCMORJYK-e5st1fy3.js} +6 -6
  148. package/dist/client/static/js/{svelte-0hv6pak2.js → svelte-ztkaww47.js} +1 -1
  149. package/dist/client/static/js/{swimlanes-2SLR337P-6tcnxfbv.js → swimlanes-2SLR337P-ceghkbez.js} +1 -1
  150. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-vc8hvfya.js +8 -0
  151. package/dist/client/static/js/{timeline-definition-EJHVYXUP-1dz46nt5.js → timeline-definition-EJHVYXUP-f7evs443.js} +2 -2
  152. package/dist/client/static/js/treeView-Q6P3EWNA-kzh6cm3f.js +1 -0
  153. package/dist/client/static/js/treemap-WGGIJYW6-wz5ed560.js +1 -0
  154. package/dist/client/static/js/tsx-zfy727zs.js +1 -0
  155. package/dist/client/static/js/typescript-p3syh43m.js +1 -0
  156. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-b3jfveq6.js → usecaseDiagram-POWQR4AR-0gpn21p7.js} +27 -27
  157. package/dist/client/static/js/{vennDiagram-UO4OBE2U-dnc3jqvp.js → vennDiagram-UO4OBE2U-4spzy428.js} +1 -1
  158. package/dist/client/static/js/{vue-zccj3qa5.js → vue-xm1dxpmy.js} +1 -1
  159. package/dist/client/static/js/wardley-WFR3VGLG-zewbfccz.js +1 -0
  160. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-466m8400.js → wardleyDiagram-VNRHLVJA-745xr2pa.js} +4 -4
  161. package/dist/client/static/js/xml-4enq788a.js +1 -0
  162. package/dist/client/static/js/xychartDiagram-PMCCYNJV-7dr9qwx5.js +7 -0
  163. package/dist/client/static/js/yaml-pjtt3jsc.js +1 -0
  164. package/package.json +1 -1
  165. package/src/client/components/common/batch-selection/folder-state.ts +2 -2
  166. package/src/client/components/common/server-control/Panel.tsx +16 -5
  167. package/src/client/components/common/server-control/index.test.tsx +63 -9
  168. package/src/client/components/common/session-row/TrailingSlot.tsx +8 -0
  169. package/src/client/components/common/session-row/index.tsx +16 -9
  170. package/src/client/components/layout/session-sidebar/CategoryItem.tsx +1 -1
  171. package/src/client/components/layout/session-sidebar/ClassicView.tsx +13 -0
  172. package/src/client/components/layout/session-sidebar/HarnessFilter.tsx +175 -0
  173. package/src/client/components/layout/session-sidebar/SessionList.tsx +9 -1
  174. package/src/client/components/layout/session-sidebar/SessionsView.tsx +6 -0
  175. package/src/client/components/layout/session-sidebar/harness-filter.test.tsx +173 -0
  176. package/src/client/components/layout/session-sidebar/modern/FilterChips.tsx +63 -18
  177. package/src/client/components/layout/session-sidebar/modern/SearchField.tsx +1 -1
  178. package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +21 -12
  179. package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +1 -1
  180. package/src/client/components/layout/session-sidebar/modern/index.tsx +11 -2
  181. package/src/client/components/layout/session-sidebar/modern/search-field.test.tsx +96 -0
  182. package/src/client/components/layout/session-sidebar/session-list-states.test.tsx +3 -0
  183. package/src/client/components/layout/session-sidebar/variant-props.ts +7 -0
  184. package/src/client/components/mobile/SessionSidebar.tsx +14 -25
  185. package/src/client/components/mobile/mobile-session-sidebar/ClassicDrawer.tsx +19 -0
  186. package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +1 -1
  187. package/src/client/components/settings/categories/omp-settings/EngineHeader.tsx +1 -1
  188. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.image.test.ts +147 -0
  189. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.test.ts +51 -83
  190. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.tsx +44 -63
  191. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/ReadDirectory.tsx +72 -0
  192. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/ReadImage.tsx +51 -0
  193. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/read-test-util.ts +91 -0
  194. package/src/client/components/workspace/git-panel/commit-modal/CommitRow.test.ts +80 -62
  195. package/src/client/components/workspace/git-panel/commit-modal/CommitRow.tsx +15 -33
  196. package/src/client/components/workspace/git-panel/commit-modal/Header.tsx +1 -1
  197. package/src/client/components/workspace/terminal-panel/copy.test.ts +179 -0
  198. package/src/client/components/workspace/terminal-panel/copy.ts +76 -0
  199. package/src/client/components/workspace/terminal-panel/mount.ts +13 -0
  200. package/src/client/data/settings/omp-schema.json +39 -18
  201. package/src/client/hooks/chat/omp/pending-child.test.ts +1 -1
  202. package/src/client/hooks/chat/omp/session-sidebar-controller.test.ts +61 -0
  203. package/src/client/hooks/chat/omp/session-sidebar-controller.ts +37 -39
  204. package/src/client/hooks/chat/omp/sidebar-filter.ts +62 -0
  205. package/src/client/hooks/chat/timeline/session-changes.test.ts +85 -0
  206. package/src/client/hooks/chat/timeline/session-changes.ts +8 -5
  207. package/src/client/hooks/shell/servers.ts +60 -2
  208. package/src/client/hooks/ui/updates/mobile-flow.ts +56 -0
  209. package/src/client/tailwind.css +58 -0
  210. package/src/server/lib/harness/acp/commands.test.ts +1 -0
  211. package/src/server/lib/harness/acp/commands.ts +12 -4
  212. package/src/server/lib/harness/acp/replay-transcript.ts +32 -13
  213. package/src/server/lib/harness/acp/session-transcript.server.test.ts +162 -0
  214. package/src/server/lib/harness/acp/session-transcript.server.ts +350 -0
  215. package/src/server/lib/harness/acp/session.ts +6 -1
  216. package/src/server/lib/harness/schema.server.ts +18 -0
  217. package/src/server/lib/harness/spawn.server.ts +14 -1
  218. package/src/server/lib/models/provider-icon-fetch.ts +2 -2
  219. package/src/server/lib/models/provider-icon-parse.test.ts +0 -12
  220. package/src/server/lib/models/provider-icon-parse.ts +0 -8
  221. package/src/server/lib/omp/rpc/frame-fold.test.ts +16 -1
  222. package/src/server/lib/omp/rpc/frame-fold.ts +17 -4
  223. package/src/server/lib/omp/session/blobs.server.test.ts +34 -0
  224. package/src/server/lib/omp/session/blobs.server.ts +8 -3
  225. package/src/server/lib/omp/session/delete.server.ts +4 -0
  226. package/src/server/lib/omp/session/sidebar-activity.server.test.ts +2 -1
  227. package/src/server/routes/agent/harness-command.test.ts +71 -0
  228. package/src/server/routes/agent/harness-command.ts +27 -13
  229. package/src/server/routes/chat/imported.ts +5 -2
  230. package/src/server/routes/chat/live-meta.ts +42 -0
  231. package/src/server/routes/chat/session.test.ts +110 -0
  232. package/src/server/routes/chat/session.ts +31 -34
  233. package/src/shared/lib/chat/transcript-rows.ts +22 -0
  234. package/src/shared/lib/fs/file-kind.test.ts +46 -3
  235. package/src/shared/lib/fs/file-kind.ts +40 -9
  236. package/src/shared/lib/omp/config/schema-releases.test.ts +29 -0
  237. package/src/shared/lib/workspace/harness-filter.test.ts +89 -0
  238. package/src/shared/lib/workspace/harness-filter.ts +75 -0
  239. package/src/{client/lib → shared/lib/workspace}/session-tree.test.ts +1 -1
  240. package/src/shared/lib/workspace/session-visibility.test.ts +71 -0
  241. package/src/shared/lib/workspace/session-visibility.ts +48 -23
  242. package/src/shared/lib/workspace/sidebar-filter-row.test.ts +64 -23
  243. package/src/shared/lib/workspace/sidebar-filter-row.ts +89 -31
  244. package/dist/client/static/js/ImageView-t330jx6y.js +0 -1
  245. package/dist/client/static/js/LayoutWrapper-qp6nsw65.js +0 -2
  246. package/dist/client/static/js/Modal-sbya4ahp.js +0 -38
  247. package/dist/client/static/js/SessionsView-yqs5m8tj.js +0 -1
  248. package/dist/client/static/js/architecture-7GRP2DOG-1wqga929.js +0 -1
  249. package/dist/client/static/js/architectureDiagram-NJMV4G6O-7jcb7fgy.js +0 -36
  250. package/dist/client/static/js/bash-vv2ysp0a.js +0 -1
  251. package/dist/client/static/js/c-67jyc7sg.js +0 -1
  252. package/dist/client/static/js/c4Diagram-YGBWAQC7-vwac9za0.js +0 -38
  253. package/dist/client/static/js/cpp-crfbnwv8.js +0 -1
  254. package/dist/client/static/js/css-2re5mbea.js +0 -1
  255. package/dist/client/static/js/css-983fbv00.js +0 -1
  256. package/dist/client/static/js/cynefin-OW5HDTMX-j2dpdgkh.js +0 -1
  257. package/dist/client/static/js/diagram-ATOU4E4O-n63cpdnx.js +0 -3
  258. package/dist/client/static/js/diagram-CDSNMT55-v86p14dd.js +0 -30
  259. package/dist/client/static/js/eventmodeling-NTZA5JFV-xjvjawd3.js +0 -1
  260. package/dist/client/static/js/flowDiagram-KWPJA3E3-j21f2bfg.js +0 -1
  261. package/dist/client/static/js/gitGraph-4MIJSDKK-r0zbk95f.js +0 -1
  262. package/dist/client/static/js/graphql-npbd9fdx.js +0 -1
  263. package/dist/client/static/js/html-1cpe2xc8.js +0 -1
  264. package/dist/client/static/js/index-1sw00wm0.js +0 -2
  265. package/dist/client/static/js/index-7fwppdkn.js +0 -1
  266. package/dist/client/static/js/index-ae91g8ka.js +0 -9
  267. package/dist/client/static/js/index-b6cyn4hr.js +0 -314
  268. package/dist/client/static/js/index-efn233xp.js +0 -4
  269. package/dist/client/static/js/index-esx3zwnt.js +0 -1
  270. package/dist/client/static/js/index-fbbp5cwj.js +0 -2
  271. package/dist/client/static/js/index-g1cggqgx.js +0 -12
  272. package/dist/client/static/js/index-ghsdzs4m.js +0 -1
  273. package/dist/client/static/js/index-gs7ytgdw.js +0 -474
  274. package/dist/client/static/js/index-jqs23cc7.css +0 -1
  275. package/dist/client/static/js/index-qjsy6p86.js +0 -1
  276. package/dist/client/static/js/info-A6RAGUB7-a8xap43w.js +0 -1
  277. package/dist/client/static/js/ini-df5bw23e.js +0 -1
  278. package/dist/client/static/js/java-8j33rj1p.js +0 -1
  279. package/dist/client/static/js/json-g5ggnd94.js +0 -1
  280. package/dist/client/static/js/jsx-f6p72qpc.js +0 -1
  281. package/dist/client/static/js/lua-bahx6qze.js +0 -1
  282. package/dist/client/static/js/markdown-9dhg1fax.js +0 -1
  283. package/dist/client/static/js/one-dark-pro-h5tmw145.js +0 -1
  284. package/dist/client/static/js/one-light-x7vj1pxr.js +0 -1
  285. package/dist/client/static/js/packet-AYTQ26CC-b5bvg6v1.js +0 -1
  286. package/dist/client/static/js/pie-WAS4IAKB-77ee73zg.js +0 -1
  287. package/dist/client/static/js/properties-49mfnee4.js +0 -1
  288. package/dist/client/static/js/python-qb69wp1s.js +0 -1
  289. package/dist/client/static/js/r-s3mf2tch.js +0 -1
  290. package/dist/client/static/js/radar-RG4KPBEZ-cp79xtvb.js +0 -1
  291. package/dist/client/static/js/railroad-74A4TZTK-dcpgqhcb.js +0 -1
  292. package/dist/client/static/js/railroad-abnf-HS5TGJTU-qasqv686.js +0 -1
  293. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-e46908rd.js +0 -1
  294. package/dist/client/static/js/railroad-peg-WCYAUIDC-7009t6bk.js +0 -1
  295. package/dist/client/static/js/sql-aczp05f2.js +0 -1
  296. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-7xrkrkpa.js +0 -8
  297. package/dist/client/static/js/treeView-Q6P3EWNA-tpn62q8j.js +0 -1
  298. package/dist/client/static/js/treemap-WGGIJYW6-w910f1g4.js +0 -1
  299. package/dist/client/static/js/tsx-s1shkfg9.js +0 -1
  300. package/dist/client/static/js/typescript-htx9v6bf.js +0 -1
  301. package/dist/client/static/js/wardley-WFR3VGLG-pt9tq808.js +0 -1
  302. package/dist/client/static/js/xml-wr1dxav5.js +0 -1
  303. package/dist/client/static/js/xychartDiagram-PMCCYNJV-kryrpqp1.js +0 -7
  304. package/dist/client/static/js/yaml-0y9fdskg.js +0 -1
  305. /package/src/{client/lib → shared/lib/workspace}/session-tree.ts +0 -0
@@ -0,0 +1,173 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The harness filter, mounted.
8
+ *
9
+ * The rules that matter are the ones a screenshot cannot show: the control is
10
+ * ABSENT while one agent owns the list (a filter with one choice can only be
11
+ * wrong), and an active filter whose last row disappeared keeps its entry so
12
+ * the list it emptied can be restored. Both are asserted here rather than
13
+ * through the sidebar, which would need a socket to reach the same two states.
14
+ */
15
+
16
+ import { afterAll, afterEach, beforeAll, describe, expect, test } from 'bun:test';
17
+ import { Window } from 'happy-dom';
18
+ import { h, render } from 'preact';
19
+ import { act } from 'preact/test-utils';
20
+
21
+ import { HarnessFilter } from '@/client/components/layout/session-sidebar/HarnessFilter';
22
+ import type { HarnessFilterOption } from '@/shared/lib/workspace/harness-filter';
23
+
24
+ const DOM_GLOBALS = ['window', 'document', 'navigator', 'Node', 'Element', 'HTMLElement', 'HTMLInputElement', 'Event', 'MouseEvent', 'KeyboardEvent'] as const;
25
+ const nativeGlobals: Partial<Record<(typeof DOM_GLOBALS)[number], unknown>> = {};
26
+
27
+ let container: HTMLElement;
28
+
29
+ beforeAll(() => {
30
+ const win = new Window({ url: 'http://localhost' });
31
+ const target = globalThis as unknown as Record<string, unknown>;
32
+ for (const key of DOM_GLOBALS) {
33
+ if (!(key in nativeGlobals)) nativeGlobals[key] = target[key];
34
+ target[key] = (win as unknown as Record<string, unknown>)[key];
35
+ }
36
+ });
37
+
38
+ afterAll(() => {
39
+ const target = globalThis as unknown as Record<string, unknown>;
40
+ for (const key of DOM_GLOBALS) {
41
+ if (nativeGlobals[key] === undefined) delete target[key];
42
+ else target[key] = nativeGlobals[key];
43
+ }
44
+ });
45
+
46
+ afterEach(() => {
47
+ if (container) render(null, container);
48
+ container?.remove();
49
+ });
50
+
51
+ const OPTIONS: HarnessFilterOption[] = [
52
+ { harness: 'omp-rpc', label: 'omp', count: 3 },
53
+ { harness: 'claude', label: 'claude', count: 1 },
54
+ ];
55
+
56
+ async function mount(node: preact.ComponentChild) {
57
+ container = document.createElement('div');
58
+ document.body.appendChild(container);
59
+ await act(async () => {
60
+ render(node, container);
61
+ });
62
+ return container;
63
+ }
64
+
65
+ /** The trigger is the only button inside the mounted container. */
66
+ function trigger(el: HTMLElement): HTMLButtonElement {
67
+ return el.querySelector('button')!;
68
+ }
69
+
70
+ /** A row of the portalled menu, by its visible text. */
71
+ function menuRow(label: string): HTMLButtonElement | undefined {
72
+ return [...document.body.querySelectorAll('button')].find((button) => (
73
+ button.textContent?.includes(label) && !container.contains(button)
74
+ ));
75
+ }
76
+
77
+ async function openMenu(el: HTMLElement) {
78
+ await act(async () => {
79
+ trigger(el).dispatchEvent(new MouseEvent('click', { bubbles: true }));
80
+ });
81
+ }
82
+
83
+ describe('the harness filter', () => {
84
+ test('is absent while one agent owns the list', async () => {
85
+ const el = await mount(h(HarnessFilter, {
86
+ options: [{ harness: 'omp-rpc', label: 'omp', count: 4 }],
87
+ value: null,
88
+ onChange: () => {},
89
+ }));
90
+
91
+ expect(el.querySelector('button')).toBeNull();
92
+ });
93
+
94
+ test('the trigger names the whole list, and the menu counts each harness', async () => {
95
+ const el = await mount(h(HarnessFilter, { options: OPTIONS, value: null, onChange: () => {} }));
96
+
97
+ expect(trigger(el).textContent).toContain('All harnesses');
98
+ expect(trigger(el).getAttribute('aria-expanded')).toBe('false');
99
+
100
+ await openMenu(el);
101
+ expect(trigger(el).getAttribute('aria-expanded')).toBe('true');
102
+ expect(menuRow('omp')?.textContent).toContain('3');
103
+ expect(menuRow('claude')?.textContent).toContain('1');
104
+ // The glyph is decoration inside a named row, not a second announcement.
105
+ expect(menuRow('claude')?.querySelector('[data-harness="claude"]')?.getAttribute('aria-hidden')).toBe('true');
106
+ });
107
+
108
+ test('picking a harness reports it and closes the menu', async () => {
109
+ const picked: Array<string | null> = [];
110
+ const el = await mount(h(HarnessFilter, {
111
+ options: OPTIONS,
112
+ value: null,
113
+ onChange: (next) => picked.push(next),
114
+ }));
115
+
116
+ await openMenu(el);
117
+ await act(async () => {
118
+ menuRow('claude')?.dispatchEvent(new MouseEvent('click', { bubbles: true }));
119
+ });
120
+
121
+ expect(picked).toEqual(['claude']);
122
+ expect(trigger(el).getAttribute('aria-expanded')).toBe('false');
123
+ });
124
+
125
+ test('an active filter names itself on the trigger and can be cleared', async () => {
126
+ const picked: Array<string | null> = [];
127
+ const el = await mount(h(HarnessFilter, {
128
+ options: OPTIONS,
129
+ value: 'claude',
130
+ onChange: (next) => picked.push(next),
131
+ }));
132
+
133
+ expect(trigger(el).textContent).toContain('claude');
134
+ expect(trigger(el).textContent).toContain('1');
135
+
136
+ await openMenu(el);
137
+ await act(async () => {
138
+ menuRow('All harnesses')?.dispatchEvent(new MouseEvent('click', { bubbles: true }));
139
+ });
140
+ expect(picked).toEqual([null]);
141
+ });
142
+
143
+ test('the icon form names itself for assistive tech and still opens the menu', async () => {
144
+ const el = await mount(h(HarnessFilter, {
145
+ options: OPTIONS,
146
+ value: 'claude',
147
+ onChange: () => {},
148
+ form: 'icon',
149
+ }));
150
+
151
+ // No room for the words in the 22px slot: the label lives on the control.
152
+ expect(trigger(el).textContent).not.toContain('claude');
153
+ expect(trigger(el).getAttribute('aria-label')).toBe('Filter by harness: claude');
154
+ expect(trigger(el).getAttribute('aria-haspopup')).toBe('menu');
155
+
156
+ await openMenu(el);
157
+ expect(menuRow('All harnesses')).toBeDefined();
158
+ });
159
+
160
+ test('an active filter with no rows left keeps an entry so it can be cleared', async () => {
161
+ const el = await mount(h(HarnessFilter, {
162
+ options: [{ harness: 'omp-rpc', label: 'omp', count: 2 }],
163
+ value: 'claude',
164
+ onChange: () => {},
165
+ }));
166
+
167
+ expect(trigger(el).textContent).toContain('claude');
168
+ expect(trigger(el).textContent).toContain('0');
169
+
170
+ await openMenu(el);
171
+ expect(menuRow('claude')?.textContent).toContain('0');
172
+ });
173
+ });
@@ -4,10 +4,10 @@
4
4
  */
5
5
 
6
6
  /**
7
- * The `modern` sidebar's filter row: what the list is showing, plus the way into
8
- * batch selection.
7
+ * The `modern` sidebar's filter row: what the list is showing, which agent ran
8
+ * it, plus the way into batch selection.
9
9
  *
10
- * Two chips and one mode, and they are two different kinds of thing:
10
+ * Three axes and one mode, and they are not the same kind of thing:
11
11
  *
12
12
  * - **All / Running** are one choice — the focus. Selecting one deselects the
13
13
  * other, so they are drawn as a segmented pair and report `aria-pressed`.
@@ -15,10 +15,13 @@
15
15
  * can be on at the same time as either focus. It carries a colour
16
16
  * (`--theme-warning`) because an archived list is not the list the user
17
17
  * expects, and that fact should not be readable only from a label.
18
- * - **Select** enters batch mode. It has TWO forms, chosen by measured width
19
- * (`filterSelectForm`): a trailing glyph while the row is narrow, and a chip
20
- * once four chips fit. Either way it is the LAST item and it alone sits at the
21
- * row's trailing edge (`ml-auto`) — the three filter chips never move.
18
+ * - **Harness** is the other separate axis: a dropdown immediately right of
19
+ * `Archived`, because that is where the user looks for "which agent". Its two
20
+ * forms are chosen by measured width too (`filterRowForms`).
21
+ * - **Select** enters batch mode. It has TWO forms, chosen by measured width:
22
+ * a trailing glyph while the row is narrow, and a chip once four chips fit.
23
+ * Either way it is the LAST item and it alone sits at the row's trailing edge
24
+ * (`ml-auto`) — the filter group never moves.
22
25
  *
23
26
  * **Only Select is right-aligned, never the chip group.** The group is a reading
24
27
  * order — All, Running, Archived — and it starts at the same left edge as the
@@ -30,12 +33,18 @@
30
33
  * **This row never wraps.** It is a control strip, and a second line of chips
31
34
  * pushes the list down and reads as a layout break: the four-chip version
32
35
  * measured 265px against 256px of content at the 280px default, which is what
33
- * `Select` falling onto a line of its own looked like.
36
+ * `Select` falling onto a line of its own looked like. The harness control is
37
+ * part of that budget, so adding it never pushes `Select` off the row — and at
38
+ * the 264px floor, where even the narrow forms do not fit, it is the harness
39
+ * control alone that wraps (`filterRowForms(...).wrap`), never a filter chip or
40
+ * `Select`.
34
41
  */
35
42
 
36
43
  import { Archive, ListChecks, X } from 'lucide-preact';
37
44
  import { useToolbarRowWidth } from '@/client/hooks/workspace/toolbar-row-width';
38
- import { filterSelectForm } from '@/shared/lib/workspace/sidebar-filter-row';
45
+ import { HarnessFilter } from '@/client/components/layout/session-sidebar/HarnessFilter';
46
+ import { filterRowForms } from '@/shared/lib/workspace/sidebar-filter-row';
47
+ import type { HarnessFilterOption } from '@/shared/lib/workspace/harness-filter';
39
48
  import type { SessionFocus } from '@/shared/lib/workspace/session-focus';
40
49
 
41
50
  interface FilterChipsProps {
@@ -45,6 +54,11 @@ interface FilterChipsProps {
45
54
  runningCount: number;
46
55
  showArchived: boolean;
47
56
  onToggleArchived: () => void;
57
+ /** The harness the list is narrowed to, or null for every harness. */
58
+ harnessFilter: string | null;
59
+ onHarnessFilterChange: (harness: string | null) => void;
60
+ /** The harnesses the list holds, with row counts — the filter's menu. */
61
+ harnessOptions: HarnessFilterOption[];
48
62
  /** True while a batch selection is active — the control reads pressed. */
49
63
  selecting: boolean;
50
64
  /** Enter or leave workspace batch-selection mode. */
@@ -62,19 +76,39 @@ export function FilterChips({
62
76
  runningCount,
63
77
  showArchived,
64
78
  onToggleArchived,
79
+ harnessFilter,
80
+ onHarnessFilterChange,
81
+ harnessOptions,
65
82
  selecting,
66
83
  onToggleSelect,
67
84
  }: FilterChipsProps) {
68
- // Measured, not guessed: the sidebar is dragged, so the form has to follow the
69
- // panel's real content width (see `filterSelectForm`). The row carries no
85
+ // Measured, not guessed: the sidebar is dragged, so the forms have to follow
86
+ // the panel's real content width (see `filterRowForms`). The row carries no
70
87
  // padding of its own — its `px-3` lives on the wrapper — hence `0`.
71
88
  const { ref, width } = useToolbarRowWidth(0);
72
- const form = filterSelectForm(width, runningCount);
89
+ const forms = filterRowForms(width, runningCount);
73
90
  const selectGlyph = selecting ? <X size={10} /> : <ListChecks size={10} />;
74
91
 
92
+ // DOM order decides which control wraps when the row runs out of room. On a
93
+ // wide row the harness sits before Select (right of Archived); on the narrow
94
+ // fallback it sits AFTER Select, so the 22px Select glyph keeps the row's
95
+ // trailing edge and the harness alone drops to a second line. Letting the
96
+ // order stand would wrap Select instead — the one control the row exists to
97
+ // keep reachable.
98
+ const harness = (
99
+ <HarnessFilter
100
+ options={harnessOptions}
101
+ value={harnessFilter}
102
+ onChange={onHarnessFilterChange}
103
+ // On its own line there is room for the label, so the fallback is the
104
+ // full chip — the same control the row before this one drew.
105
+ form={forms.wrap ? 'chip' : forms.harness}
106
+ />
107
+ );
108
+
75
109
  return (
76
110
  <div className="px-3 pb-2">
77
- <div ref={ref} className="flex flex-nowrap items-center gap-1">
111
+ <div ref={ref} className={`flex items-center gap-1 ${forms.wrap ? 'flex-wrap' : 'flex-nowrap'}`}>
78
112
  <div className="flex shrink-0 items-center gap-1" role="group" aria-label="Session filters">
79
113
  <button
80
114
  type="button"
@@ -114,12 +148,17 @@ export function FilterChips({
114
148
  </button>
115
149
  </div>
116
150
 
151
+ {/* The harness dropdown sits immediately right of `Archived`: it is a
152
+ filter axis beside the archive one, not a mode. Its form is part of
153
+ the row's budget, so a chip here can never push `Select` off. */}
154
+ {forms.wrap ? null : harness}
155
+
117
156
  {/* Select is a SIBLING of the filter group, never a member of it. Inside
118
157
  the group `ml-auto` has no free space to claim — the group is
119
158
  `shrink-0` and only as wide as its chips — so the fourth chip landed
120
159
  immediately after `Archived` instead of at the row's trailing edge.
121
160
  Out here it is the row's own spare space that pushes it right. */}
122
- {form === 'chip' ? (
161
+ {forms.select === 'chip' ? (
123
162
  <button
124
163
  type="button"
125
164
  onClick={onToggleSelect}
@@ -137,13 +176,19 @@ export function FilterChips({
137
176
  title={selecting ? 'Cancel selection' : 'Select workspaces'}
138
177
  aria-label={selecting ? 'Cancel selection' : 'Select workspaces'}
139
178
  aria-pressed={selecting}
140
- className={`ml-auto inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md transition-colors cursor-pointer ${
141
- selecting ? 'bg-ink/10 text-ink' : 'text-ink/55 hover:bg-ink/[0.06] hover:text-ink'
142
- }`}
179
+ className={`ml-auto inline-flex shrink-0 items-center justify-center rounded-md transition-colors cursor-pointer ${
180
+ forms.select === 'mini' ? 'h-[22px] w-[22px]' : 'h-7 w-7'
181
+ } ${selecting ? 'bg-ink/10 text-ink' : 'text-ink/55 hover:bg-ink/[0.06] hover:text-ink'}`}
143
182
  >
144
- {selecting ? <X size={14} /> : <ListChecks size={14} />}
183
+ {selecting
184
+ ? <X size={forms.select === 'mini' ? 12 : 14} />
185
+ : <ListChecks size={forms.select === 'mini' ? 12 : 14} />}
145
186
  </button>
146
187
  )}
188
+
189
+ {/* The narrow fallback: after Select in DOM order, so the row's trailing
190
+ glyph stays put and this control alone takes the second line. */}
191
+ {forms.wrap ? harness : null}
147
192
  </div>
148
193
  </div>
149
194
  );
@@ -54,7 +54,7 @@ export function SearchField({ value, onChange, touch = false }: SearchFieldProps
54
54
  onChange={(event) => onChange(event.currentTarget.value)}
55
55
  placeholder="Search workspaces & sessions"
56
56
  aria-label="Search workspaces and sessions"
57
- className={`min-w-0 flex-1 bg-transparent text-ink outline-none placeholder:text-ink/40 ${
57
+ className={`kabmo-search-field min-w-0 flex-1 bg-transparent text-ink outline-none placeholder:text-ink/40 ${
58
58
  touch ? 'text-[13px]' : 'text-xs'
59
59
  }`}
60
60
  />
@@ -24,13 +24,19 @@
24
24
  * The icon column, the title column and the TRAILING column are the same columns
25
25
  * as a session row's (`common/session-row`): 4px of inset, a 16px slot (18px on
26
26
  * touch), then 8px before the text; and on the right, a 22px (28px on touch)
27
- * action box ending 4px inside the list's content edge. Measured before this
28
- * rule existed, the folder mark's centre sat at x=20 while the row's status glyph
29
- * sat at 24, the folder name at 34 while the session title started at 40, and the
30
- * two `⋯` triggers were 9px apart (8px vs 16px from the panel edge) — three steps
31
- * that made the list look like two lists. A header that "looked about right" is
32
- * what produced them: the pair has to be stated, so it is stated here and in
33
- * `session-row`.
27
+ * action box ending 3px (4px on touch) inside the list's content edge — half
28
+ * the difference between it and the action row's 28px (36px) sort control.
29
+ * Measured before this rule existed, the folder mark's centre sat at x=20 while
30
+ * the row's status glyph sat at 24, the folder name at 34 while the session
31
+ * title started at 40, and the two `⋯` triggers were 9px apart (8px vs 16px
32
+ * from the panel edge) — three steps that made the list look like two lists. A
33
+ * header that "looked about right" is what produced them: the pair has to be
34
+ * stated, so it is stated here and in `session-row`.
35
+ *
36
+ * The list's content edge is the action row's (`modern/index.tsx` +
37
+ * `.session-list-gutter`), which is why the trailing column needs only the
38
+ * half-box difference: with a scrollbar taking 8px, the rows used to sit 8px
39
+ * inside the sort icon and no inset could close that gap.
34
40
  *
35
41
  * The actions are the same components the classic header uses — `+` opens a
36
42
  * chat in THIS folder and `⋯` is `WorkspaceOptionsMenu` — so pin, delete,
@@ -158,12 +164,15 @@ export function WorkspaceHeader({
158
164
  </span>
159
165
  </button>
160
166
 
161
- {/* `pr-1`: the action cluster ends where a session row's trailing control
162
- ends (4px inside the list's content edge), so the two `⋯` columns are
163
- one column — measured before this rule, the folder's sat 8px from the
164
- panel edge and the row's 16px, a 9px step between glyph centres. */}
167
+ {/* `pr-[3px]` on the desktop and `pr-1` on touch: the action cluster ends
168
+ on the SAME inset as a session row's trailing column
169
+ (`common/session-row`) — half the difference between the 22px (28px)
170
+ `⋯` box and the action row's 28px (36px) sort control — so the two
171
+ `⋯` columns and the sort icon share one centre. The list's content
172
+ edge is the action row's content edge (`.session-list-gutter`), which
173
+ is what makes that half difference the whole story. */}
165
174
  {!batchActive && (
166
- <div className="flex shrink-0 items-center gap-0.5 pr-1">
175
+ <div className={`flex shrink-0 items-center gap-0.5 ${touch ? 'pr-1' : 'pr-[3px]'}`}>
167
176
  <button
168
177
  type="button"
169
178
  title="New Session"
@@ -36,7 +36,7 @@ import { useSidebarData } from '@/client/hooks/chat/omp/session-list';
36
36
  import { SessionRow, sessionRowBranchStyle, type SessionRowDensity } from '@/client/components/common/session-row';
37
37
  import { SessionBranch, branchControlFor } from '@/client/components/common/session-branch';
38
38
  import type { BranchControl } from '@/client/components/common/session-branch';
39
- import { buildSessionTree } from '@/client/lib/session-tree';
39
+ import { buildSessionTree } from '@/shared/lib/workspace/session-tree';
40
40
  import { SessionDeleteModal } from '@/client/components/common/session-delete-modal';
41
41
  import { WorkspaceOptionsMenu } from '@/client/components/common/workspace-options-menu';
42
42
  import { NewWorktreeModal } from '@/client/components/workspace/worktree-modal/index';
@@ -27,6 +27,7 @@ import { SidebarActionRow } from '@/client/components/layout/session-sidebar/mod
27
27
  import { WorkspaceSection } from '@/client/components/layout/session-sidebar/modern/WorkspaceSection';
28
28
  import { ModernSidebarSkeleton } from '@/client/components/layout/session-sidebar/modern/Skeleton';
29
29
  import { SessionListNotice } from '@/client/components/layout/session-sidebar/SessionListNotice';
30
+ import { harnessBadgeLabel } from '@/shared/lib/harness/catalog';
30
31
  import {
31
32
  focusFolders,
32
33
  runningSessionCount,
@@ -50,6 +51,9 @@ export function ModernSidebarView({
50
51
  onToggleOptions,
51
52
  onCloseOptions,
52
53
  onSortChange,
54
+ harnessFilter,
55
+ onHarnessFilterChange,
56
+ harnessOptions,
53
57
  onRefresh,
54
58
  refreshing,
55
59
  scheduledCount,
@@ -91,6 +95,9 @@ export function ModernSidebarView({
91
95
  runningCount={runningCount}
92
96
  showArchived={showArchived}
93
97
  onToggleArchived={onToggleArchived}
98
+ harnessFilter={harnessFilter}
99
+ onHarnessFilterChange={onHarnessFilterChange}
100
+ harnessOptions={harnessOptions}
94
101
  selecting={selecting}
95
102
  onToggleSelect={onSelectWorkspaces}
96
103
  />
@@ -110,7 +117,7 @@ export function ModernSidebarView({
110
117
  touch={touch}
111
118
  />
112
119
 
113
- <div className="mt-1 flex-1 scrollbar-overlay-container px-2 pb-3">
120
+ <div className="mt-1 flex-1 scrollbar-overlay-container pl-2 session-list-gutter pb-3">
114
121
  {failed ? (
115
122
  <SessionListNotice touch={touch} onRetry={onRefresh} refreshing={refreshing} />
116
123
  ) : initializing ? (
@@ -121,7 +128,9 @@ export function ModernSidebarView({
121
128
  ? 'Nothing is running right now.'
122
129
  : searchQuery
123
130
  ? 'No workspace or chat matches that search.'
124
- : 'No workspaces yet.'}
131
+ : harnessFilter
132
+ ? `No chats on ${harnessBadgeLabel(harnessFilter)}.`
133
+ : 'No workspaces yet.'}
125
134
  </div>
126
135
  ) : (
127
136
  <div className="space-y-3">
@@ -0,0 +1,96 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The `modern` sidebar's search line.
8
+ *
9
+ * The field draws its own clear control, so it must opt out of the engine's:
10
+ * `type="search"` makes WebKit and Blink paint `::-webkit-search-cancel-button`
11
+ * inside the input, and the sidebar then showed two X's — the native one beside
12
+ * the app's labelled button. The DOM cannot show the native glyph, so the
13
+ * contract asserted here is the one that suppresses it: the input carries
14
+ * `kabmo-search-field` (the rule in `tailwind.css`) and the app's button is the
15
+ * only clear control in the field.
16
+ *
17
+ * Rendered with `h()` against happy-dom, following `modern/reveal-row.test.tsx`.
18
+ */
19
+
20
+ import { afterAll, afterEach, beforeAll, describe, expect, test } from 'bun:test';
21
+ import { Window } from 'happy-dom';
22
+ import { h, render } from 'preact';
23
+
24
+ import { SearchField } from '@/client/components/layout/session-sidebar/modern/SearchField';
25
+
26
+ const DOM_GLOBALS = ['window', 'document', 'navigator', 'Node', 'Element', 'HTMLElement', 'Event', 'MouseEvent'] as const;
27
+ const nativeGlobals: Partial<Record<(typeof DOM_GLOBALS)[number], unknown>> = {};
28
+
29
+ let container: HTMLElement;
30
+
31
+ beforeAll(() => {
32
+ const win = new Window({ url: 'http://localhost' });
33
+ const target = globalThis as unknown as Record<string, unknown>;
34
+ for (const key of DOM_GLOBALS) {
35
+ if (!(key in nativeGlobals)) nativeGlobals[key] = target[key];
36
+ target[key] = (win as unknown as Record<string, unknown>)[key];
37
+ }
38
+ });
39
+
40
+ afterAll(() => {
41
+ const target = globalThis as unknown as Record<string, unknown>;
42
+ for (const key of DOM_GLOBALS) {
43
+ if (nativeGlobals[key] === undefined) delete target[key];
44
+ else target[key] = nativeGlobals[key];
45
+ }
46
+ });
47
+
48
+ afterEach(() => {
49
+ if (container) render(null, container);
50
+ container?.remove();
51
+ });
52
+
53
+ function mount(props: { value: string; onChange?: (value: string) => void; touch?: boolean }) {
54
+ if (container) {
55
+ render(null, container);
56
+ container.remove();
57
+ }
58
+ container = document.createElement('div');
59
+ document.body.appendChild(container);
60
+ render(h(SearchField, { onChange: () => {}, ...props }), container);
61
+ return container.querySelector('input') as HTMLInputElement;
62
+ }
63
+
64
+ const buttons = () => Array.from(container.querySelectorAll('button'));
65
+
66
+ describe('modern sidebar search field', () => {
67
+ test('the input opts out of the engine clear control', () => {
68
+ const input = mount({ value: '' });
69
+ expect(input.type).toBe('search');
70
+ expect(input.classList.contains('kabmo-search-field')).toBe(true);
71
+ });
72
+
73
+ test('an empty field has no clear control at all', () => {
74
+ mount({ value: '' });
75
+ expect(buttons()).toHaveLength(0);
76
+ });
77
+
78
+ test('a query leaves exactly one clear control, and it is the app\'s', () => {
79
+ mount({ value: 'kabmo' });
80
+ const clear = buttons();
81
+ expect(clear).toHaveLength(1);
82
+ expect(clear[0]!.getAttribute('aria-label')).toBe('Clear search');
83
+ });
84
+
85
+ test('the clear control empties the query', () => {
86
+ const seen: string[] = [];
87
+ mount({ value: 'kabmo', onChange: (value) => seen.push(value) });
88
+ buttons()[0]!.click();
89
+ expect(seen).toEqual(['']);
90
+ });
91
+
92
+ test('the touch variant keeps the same single clear control', () => {
93
+ mount({ value: 'kabmo', touch: true });
94
+ expect(buttons()).toHaveLength(1);
95
+ });
96
+ });
@@ -71,6 +71,9 @@ function props(overrides: Record<string, unknown> = {}) {
71
71
  onToggleOptions: () => {},
72
72
  onCloseOptions: () => {},
73
73
  onSortChange: () => {},
74
+ harnessFilter: null,
75
+ onHarnessFilterChange: () => {},
76
+ harnessOptions: [],
74
77
  onRefresh: () => {},
75
78
  refreshing: false,
76
79
  scheduledCount: 0,
@@ -20,6 +20,7 @@
20
20
  */
21
21
 
22
22
  import type { SessionSortOption, WorkspaceFolderData } from '@/shared/types';
23
+ import type { HarnessFilterOption } from '@/shared/lib/workspace/harness-filter';
23
24
  import type { BatchBinding } from '@/client/components/common/batch-selection/types';
24
25
  import type { ToastTone } from '@/shared/lib/ui/toast-duration';
25
26
 
@@ -52,6 +53,12 @@ export interface SessionSidebarVariantProps {
52
53
  onCloseOptions: () => void;
53
54
  onSortChange: (option: SessionSortOption) => void;
54
55
 
56
+ /** The harness the list is narrowed to, or null for every harness. */
57
+ harnessFilter: string | null;
58
+ onHarnessFilterChange: (harness: string | null) => void;
59
+ /** The harnesses the list holds, with row counts — the filter's menu. */
60
+ harnessOptions: HarnessFilterOption[];
61
+
55
62
  /** Reload the list; `refreshing` spins whatever the style's refresh control is. */
56
63
  onRefresh: () => void;
57
64
  refreshing: boolean;
@@ -3,17 +3,12 @@ import { MobileSessionHeader } from '@/client/components/mobile/mobile-session-s
3
3
  import { ClassicDrawer } from '@/client/components/mobile/mobile-session-sidebar/ClassicDrawer';
4
4
  import { ModernSidebarView } from '@/client/components/layout/session-sidebar/modern';
5
5
  import { MobileSessionFooter } from '@/client/components/mobile/mobile-session-sidebar/Footer';
6
- import { useShellOffer } from '@/client/hooks/ui/updates/shell-download';
7
- import { useKabmoEvent } from '@/client/hooks/ui/window-event';
6
+ import { useMobileUpdateFlow } from '@/client/hooks/ui/updates/mobile-flow';
8
7
  import { useToasts } from '@/client/hooks/ui/toasts';
9
8
  import { useCancelWait } from '@/client/hooks/chat/waiting/cancel';
10
9
  import { useWaitingDispatch } from '@/client/hooks/chat/waiting/dispatch';
11
- import { useUpdates } from '@/client/hooks/ui/updates';
12
10
  import { useSidebarStyle } from '@/client/hooks/workspace/sidebar-style';
13
- import { UPDATE_REQUEST_EVENT } from '@/shared/lib/updates/popup-state';
14
- import { useUpdateCheckRequest } from '@/client/hooks/ui/updates/check-request';
15
11
  import { openKeyBindingHelp } from '@/client/lib/commands/overlays';
16
- import { updateOutcomeTone } from '@/shared/lib/ui/toast-duration';
17
12
  import { useScheduledTaskCount } from '@/client/hooks/workspace/scheduled-tasks';
18
13
  import { phoneLeftStripVisible } from '@/shared/lib/workspace/mobile-dock';
19
14
  import { MobileDockBody, MobileDockStrip } from '@/client/components/mobile/mobile-session-sidebar/Dock';
@@ -99,6 +94,9 @@ export function MobileSessionSidebar({
99
94
  setOptionsOpen,
100
95
  sortOption,
101
96
  handleSortChange,
97
+ harnessFilter,
98
+ setHarnessFilter,
99
+ harnessOptions,
102
100
  processedFolders,
103
101
  sessionStatus,
104
102
  handleSelectSession,
@@ -117,30 +115,15 @@ export function MobileSessionSidebar({
117
115
  const [schedulerOpen, setSchedulerOpen] = useState(false);
118
116
  const scheduledCount = useScheduledTaskCount();
119
117
  const [aboutOpen, setAboutOpen] = useState(false);
120
- const updates = useUpdates();
121
- // An update inside a native shell, an install on an Android browser, nothing
122
- // elsewhere — see `useShellOffer`.
123
- const shellDownload = useShellOffer();
124
118
  const { pushToast } = useToasts();
125
119
  const cancelWait = useCancelWait(pushToast);
126
120
  useWaitingDispatch({ onNotice: pushToast });
127
-
128
- // The popup's "Update now" hands the run over rather than starting its own —
129
- // see the desktop sidebar. The phone must also bring the drawer forward, or
130
- // the About modal would open over the chat with the user still looking at the
131
- // session list they came from.
132
- useKabmoEvent(UPDATE_REQUEST_EVENT, () => {
133
- onClose();
134
- setAboutOpen(true);
135
- void updates.apply('kabmo').then((result) => {
136
- if (!result) return;
137
- pushToast(result.message, updateOutcomeTone(result));
138
- });
121
+ const { updates, shellDownload } = useMobileUpdateFlow({
122
+ onClose,
123
+ openAbout: () => setAboutOpen(true),
124
+ pushToast,
139
125
  });
140
126
 
141
- // The same native row as the desktop's: one check, one verdict, drawer stays.
142
- useUpdateCheckRequest(updates, pushToast);
143
-
144
127
  const handleNewSessionAndClose = () => {
145
128
  onNewSession();
146
129
  onClose();
@@ -200,6 +183,9 @@ export function MobileSessionSidebar({
200
183
  onToggleOptions: () => setOptionsOpen(!optionsOpen),
201
184
  onCloseOptions: () => setOptionsOpen(false),
202
185
  onSortChange: handleSortChange,
186
+ harnessFilter,
187
+ onHarnessFilterChange: setHarnessFilter,
188
+ harnessOptions,
203
189
  onRefresh: refreshNow,
204
190
  refreshing: isRefreshing,
205
191
  scheduledCount,
@@ -268,6 +254,9 @@ export function MobileSessionSidebar({
268
254
  sortOption={sortOption}
269
255
  optionsOpen={optionsOpen}
270
256
  showArchived={showArchived}
257
+ harnessFilter={harnessFilter}
258
+ onHarnessFilterChange={setHarnessFilter}
259
+ harnessOptions={harnessOptions}
271
260
  optionsRef={optionsRef}
272
261
  scheduledCount={scheduledCount}
273
262
  refreshing={isRefreshing}