@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kabmo-labs/kabmo",
3
- "version": "0.41.0",
3
+ "version": "0.42.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>",
@@ -52,9 +52,9 @@ export interface FolderBatchState {
52
52
  selectableIds: string[];
53
53
  /** Header click: select or unselect everything this header owns. */
54
54
  toggleFolderSelection: () => void;
55
- /** Rows to render — every offered row while selecting, else the window. */
55
+ /** Rows to render — every offered row while selecting, else the window's roots and their branches. */
56
56
  rendered: SessionItemData[];
57
- /** Rows the next "Show more" reveals; 0 while selecting. */
57
+ /** ROOT rows the next "Show more" reveals (their branches follow); 0 while selecting. */
58
58
  hiddenCount: number;
59
59
  }
60
60
 
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  import { useState } from 'preact/hooks';
18
- import { Check, Loader2, Play, Plus, RefreshCw, Server, Square, Trash2 } from 'lucide-preact';
18
+ import { Check, Loader2, Play, Plus, RefreshCw, Server, Square, Trash2, X } from 'lucide-preact';
19
19
  import { AnchoredMenu } from '@/client/components/common/anchored-menu';
20
20
  import { anchorRectOf } from '@/shared/lib/ui/menu-anchor';
21
21
  import type { ShellServersStore } from '@/client/hooks/shell/servers';
@@ -195,13 +195,13 @@ export function ServerPanel({ open, onClose, variant, store, triggerRef }: Serve
195
195
  </span>
196
196
  <button
197
197
  type="button"
198
- onClick={() => void store.reload()}
199
- disabled={store.busy}
198
+ onClick={() => void store.refresh()}
199
+ disabled={store.refreshing || store.busy}
200
200
  title="Refresh: re-probe every server"
201
201
  aria-label="Refresh servers"
202
202
  className="p-1 rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer disabled:opacity-40"
203
203
  >
204
- <RefreshCw size={12} className={store.busy ? 'animate-spin' : ''} />
204
+ <RefreshCw size={12} className={store.refreshing ? 'animate-spin' : ''} />
205
205
  </button>
206
206
  </div>
207
207
 
@@ -254,7 +254,18 @@ export function ServerPanel({ open, onClose, variant, store, triggerRef }: Serve
254
254
  </div>
255
255
 
256
256
  {store.error && (
257
- <p className="px-3 py-1.5 text-[10px] text-error border-t border-ink/10">{store.error}</p>
257
+ <div className="flex items-start gap-1.5 px-3 py-1.5 border-t border-ink/10">
258
+ <p className="flex-1 text-[10px] text-error">{store.error}</p>
259
+ <button
260
+ type="button"
261
+ onClick={store.dismissError}
262
+ title="Dismiss"
263
+ aria-label="Dismiss the error"
264
+ className="p-0.5 rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer flex-shrink-0"
265
+ >
266
+ <X size={10} />
267
+ </button>
268
+ </div>
258
269
  )}
259
270
 
260
271
  <div className="border-t border-ink/10 px-2 py-2 space-y-1.5">
@@ -69,22 +69,28 @@ let win: Window;
69
69
  let container: HTMLElement;
70
70
  let calls: Array<{ command: string; args?: Record<string, unknown> }>;
71
71
 
72
+ /**
73
+ * The bridge the shells install. The test replaces it to answer, refuse, or hold
74
+ * a reply open — the same door the shell uses, which is what makes this a test
75
+ * of the bridge rather than of a stub only this suite knows about.
76
+ */
77
+ function setShellCall(call: (method: string, params?: Record<string, unknown>) => Promise<unknown>) {
78
+ const shellWindow = win as unknown as {
79
+ __kabmoCall?: (method: string, params?: Record<string, unknown>) => Promise<unknown>;
80
+ };
81
+ shellWindow.__kabmoCall = call;
82
+ }
83
+
72
84
  function mount(next: ShellServersState | Error, variant: 'nav' | 'chip' = 'nav', open = true) {
73
85
  calls = [];
74
86
  win.document.body.innerHTML = '';
75
87
  container = win.document.createElement('div') as unknown as HTMLElement;
76
88
  win.document.body.appendChild(container as never);
77
- // The transport the shells install: `__kabmoCall` answers through the same
78
- // door the shell uses, which is what makes this a test of the bridge rather
79
- // than of a stub only this suite knows about.
80
- const shellWindow = win as unknown as {
81
- __kabmoCall?: (method: string, params?: Record<string, unknown>) => Promise<unknown>;
82
- };
83
- shellWindow.__kabmoCall = async (method, params) => {
89
+ setShellCall(async (method, params) => {
84
90
  calls.push({ command: method, args: params });
85
91
  if (next instanceof Error) throw next;
86
92
  return next;
87
- };
93
+ });
88
94
  act(() => {
89
95
  render(h(ServerControl, { variant }), container as never);
90
96
  });
@@ -201,7 +207,7 @@ describe('ServerControl', () => {
201
207
  await settle();
202
208
  expect(container.querySelector('[aria-label="Choose a server"]')).toBeNull();
203
209
 
204
- (win as unknown as { __kabmoCall?: unknown }).__kabmoCall = async () => state();
210
+ setShellCall(async () => state());
205
211
  mountHeader();
206
212
  await settle();
207
213
  expect(container.querySelector('[aria-label="Choose a server"]')).not.toBeNull();
@@ -214,4 +220,52 @@ describe('ServerControl', () => {
214
220
  await settle();
215
221
  expect(text()).toContain('root address');
216
222
  });
223
+
224
+ /**
225
+ * The refresh button's spin is the only sign the press did anything: a local
226
+ * list answers in milliseconds, and the old `busy` flag was set by mutations
227
+ * only, so the icon never turned. The floor keeps the spin visible.
228
+ */
229
+ test('the refresh button spins while the shell re-probes, then stops', async () => {
230
+ mount(DESKTOP);
231
+ await settle();
232
+ const gate = Promise.withResolvers<void>();
233
+ setShellCall(async (method) => {
234
+ if (method === 'servers_state') await gate.promise;
235
+ return DESKTOP;
236
+ });
237
+ const refresh = win.document.querySelector('[aria-label="Refresh servers"]') as unknown as HTMLButtonElement;
238
+ act(() => {
239
+ refresh.click();
240
+ });
241
+ await settle();
242
+ expect(refresh.disabled).toBe(true);
243
+ expect(refresh.querySelector('svg')?.getAttribute('class') ?? '').toContain('animate-spin');
244
+
245
+ gate.resolve();
246
+ const floor = Promise.withResolvers<void>();
247
+ setTimeout(floor.resolve, 450);
248
+ await floor.promise;
249
+ await settle();
250
+ expect(refresh.disabled).toBe(false);
251
+ expect(refresh.querySelector('svg')?.getAttribute('class') ?? '').not.toContain('animate-spin');
252
+ });
253
+
254
+ /**
255
+ * A failed Start used to leave its sentence in the panel until the page was
256
+ * reloaded: the 4-second poll never cleared it, and the store outlives the
257
+ * popover. The sentence is dismissible, and closing the panel drops it.
258
+ */
259
+ test('a refused start can be dismissed without reloading the page', async () => {
260
+ mount(new Error('The local server exited during startup.'));
261
+ await settle();
262
+ expect(text()).toContain('exited during startup');
263
+ const dismiss = win.document.querySelector('[aria-label="Dismiss the error"]') as unknown as HTMLButtonElement;
264
+ expect(dismiss).not.toBeNull();
265
+ act(() => {
266
+ dismiss.click();
267
+ });
268
+ await settle();
269
+ expect(text()).not.toContain('exited during startup');
270
+ });
217
271
  });
@@ -20,6 +20,14 @@
20
20
  * workspace header's action cluster uses, so the two `⋯` columns share one
21
21
  * centre. A box that merely fit the glyph (14px + a 4px pad) put the row's dots
22
22
  * 2px left of the header's on touch.
23
+ *
24
+ * That box is NARROWER than the action row's sort control (28px, 36px on
25
+ * touch), so the row's right inset is 3px (4px on touch) — half the difference,
26
+ * centring the `⋯` on the sort glyph. The age keeps its 4px inset inside the
27
+ * box, which is exactly the glyph's own inset — so at rest the age ends on the
28
+ * same x as the sort icon's right edge, and on hover the dots take its place on
29
+ * that line. The list's content edge is the action row's (`.session-list-gutter`
30
+ * in `tailwind.css`), so no scrollbar-width correction belongs here.
23
31
  */
24
32
 
25
33
  import type { TargetedMouseEvent } from 'preact';
@@ -25,13 +25,20 @@
25
25
  * ## The gutter is shared with the workspace header, numerically
26
26
  *
27
27
  * 4px of inset, the leading slot (16px; 18px on touch), then 8px before the
28
- * text; and on the trailing side a 22px (28px on touch) box ending 4px inside
29
- * the row's own edge — the same numbers `WorkspaceHeader` uses, so the status
30
- * glyph sits under the folder mark, the title under the folder name, and the two
31
- * `⋯` triggers share one column. `pl-1 pr-1`, not the `px-2` this row started
32
- * with: the header's own `px-1` is inside a container that starts at the list's
33
- * edge, and matching the row's padding to the header's is what makes the columns
34
- * line up.
28
+ * text; and on the trailing side a 22px (28px on touch) box — the same numbers
29
+ * `WorkspaceHeader` uses, so the status glyph sits under the folder mark, the
30
+ * title under the folder name, and the two `⋯` triggers share one column.
31
+ *
32
+ * The right inset is 3px (4px on touch), which is exactly half the difference
33
+ * between the trailing box and the chrome control it lines up with. The action
34
+ * row's sort trigger is a 28px box (36px on touch); a row's `⋯` box is 22px
35
+ * (28px). The list's content edge is the action row's content edge (see
36
+ * `.session-list-gutter`), so centring the narrower box needs only that half
37
+ * difference — the reported "titik tiga tidak lurus dengan sort". The age keeps
38
+ * its 4px inset inside the box, which is the glyph's own inset, so at rest the
39
+ * age ends on the sort icon's right edge and on hover the dots take its place
40
+ * on that line. `WorkspaceHeader` states the same inset; the row and the header
41
+ * move together.
35
42
  *
36
43
  * ## The touch row is exactly as tall as the folder header
37
44
  *
@@ -61,7 +68,7 @@ export type SessionRowDensity = 'compact' | 'touch';
61
68
  /** What a subagent row under this chrome's rows borrows from it. */
62
69
  export function sessionRowBranchStyle(touch: boolean): BranchRowStyle {
63
70
  return {
64
- inset: 'pl-1 pr-1',
71
+ inset: touch ? 'pl-1 pr-1' : 'pl-1 pr-[3px]',
65
72
  insetPx: 4,
66
73
  slotWidth: touch ? 18 : 16,
67
74
  markGap: 8,
@@ -185,7 +192,7 @@ export function SessionRow({
185
192
  onClick={selectable ? onToggleSelect : onClick}
186
193
  onContextMenu={hasActions && !selectable ? menu.openAtCursor : undefined}
187
194
  className={`group/item relative flex w-full items-center rounded-lg text-xs transition-colors select-none cursor-pointer ${
188
- touch ? 'py-0.5 pl-1 pr-1' : 'py-[7px] pl-1 pr-1'
195
+ touch ? 'py-0.5 pl-1 pr-1' : 'py-[7px] pl-1 pr-[3px]'
189
196
  } ${
190
197
  (selectable && selected) || menuOpen
191
198
  ? SESSION_ROW_ATTENTION_CLASS
@@ -11,7 +11,7 @@ import { SessionItem, SESSION_ITEM_BRANCH_STYLE } from '@/client/components/layo
11
11
  import { CategoryHeader } from '@/client/components/layout/session-sidebar/CategoryHeader';
12
12
  import { SessionBranch, branchControlFor } from '@/client/components/common/session-branch';
13
13
  import type { BranchControl } from '@/client/components/common/session-branch';
14
- import { buildSessionTree } from '@/client/lib/session-tree';
14
+ import { buildSessionTree } from '@/shared/lib/workspace/session-tree';
15
15
  import { useExpandedSessions } from '@/client/hooks/workspace/expanded-sessions';
16
16
  import { formatFullDate, relativeTimeAgo } from '@/shared/lib/workspace/relative-time';
17
17
  import { isPendingSessionId } from '@/shared/lib/omp/session/default-title';
@@ -18,6 +18,7 @@
18
18
 
19
19
  import { useState } from 'preact/hooks';
20
20
  import { SessionSidebarToolbar } from '@/client/components/layout/session-sidebar/Toolbar';
21
+ import { HarnessFilter } from '@/client/components/layout/session-sidebar/HarnessFilter';
21
22
  import { SessionSidebarSessionList } from '@/client/components/layout/session-sidebar/SessionList';
22
23
  import { SessionListSkeleton } from '@/client/components/layout/session-sidebar/Skeleton';
23
24
  import { SessionListNotice } from '@/client/components/layout/session-sidebar/SessionListNotice';
@@ -39,6 +40,9 @@ export function ClassicSidebarView({
39
40
  onToggleOptions,
40
41
  onCloseOptions,
41
42
  onSortChange,
43
+ harnessFilter,
44
+ onHarnessFilterChange,
45
+ harnessOptions,
42
46
  onRefresh,
43
47
  refreshing,
44
48
  scheduledCount,
@@ -100,6 +104,14 @@ export function ClassicSidebarView({
100
104
  selecting={batchActive}
101
105
  />
102
106
 
107
+ <div className="px-3 pt-2 pb-1">
108
+ <HarnessFilter
109
+ options={harnessOptions}
110
+ value={harnessFilter}
111
+ onChange={onHarnessFilterChange}
112
+ />
113
+ </div>
114
+
103
115
  {failed ? (
104
116
  <SessionListNotice onRetry={onRefresh} refreshing={refreshing} />
105
117
  ) : initializing ? (
@@ -110,6 +122,7 @@ export function ClassicSidebarView({
110
122
  activeSessionId={activeSessionId}
111
123
  searchQuery={searchQuery}
112
124
  showArchived={showArchived}
125
+ harnessFilter={harnessFilter}
113
126
  sessionStatus={sessionStatus}
114
127
  onSelectSession={onSelectSession}
115
128
  onNewSessionForFolder={onNewSessionForFolder}
@@ -0,0 +1,175 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The sidebar's harness filter: which agent ran the chat.
8
+ *
9
+ * A DROPDOWN, not a chip row. The list can hold a dozen harnesses (the built-in
10
+ * catalog alone is seventeen), and a chip per harness measured three wrapped
11
+ * lines at the 280px default — chrome that pushed the rows down and still hid
12
+ * the tail. One trigger whose contents grow is the shape that survives the next
13
+ * agent, the same reason the session row's actions live behind `⋯`.
14
+ *
15
+ * It sits immediately right of `Archived` in the `modern` filter row, and takes
16
+ * two forms chosen by that row's measured width (`filterRowForms`): the full
17
+ * chip, and the harness's own mark in the row's 22px slot. The classic chromes
18
+ * still draw it as a standalone line under the toolbar.
19
+ *
20
+ * The options are counted over the unfiltered list (`harnessFilterOptions`), so
21
+ * a number is a fact about the workspaces rather than about what the current
22
+ * filter shows.
23
+ *
24
+ * **The control is hidden while the list holds one harness and no filter is
25
+ * active.** A filter with one choice can only be wrong, and most users run one
26
+ * agent — it appears the moment a second agent has a row, which is the moment
27
+ * the question exists.
28
+ *
29
+ * **An active filter whose harness has no rows left is still offered**, with a
30
+ * count of 0. Dropping it would leave the list empty with nothing on screen
31
+ * explaining why, and no way back to `All` except a reload.
32
+ *
33
+ * The menu is `AnchoredMenu` (portalled, measured) because the sidebar is a
34
+ * scroller: an `absolute` panel would be clipped at its edge and drift with the
35
+ * rows.
36
+ */
37
+
38
+ import { useState } from 'preact/hooks';
39
+ import { Bot, Check, ChevronDown } from 'lucide-preact';
40
+ import { AnchoredMenu } from '@/client/components/common/anchored-menu';
41
+ import { HarnessGlyph, HARNESS_GLYPH_SIZE } from '@/client/components/common/harness-glyph';
42
+ import { harnessBadgeLabel } from '@/shared/lib/harness/catalog';
43
+ import { anchorRectOf, type AnchorRect } from '@/shared/lib/ui/menu-anchor';
44
+ import type { HarnessFilterOption } from '@/shared/lib/workspace/harness-filter';
45
+
46
+ interface HarnessFilterProps {
47
+ /** The harnesses the list holds, with row counts. */
48
+ options: HarnessFilterOption[];
49
+ /** The active harness, or null for every harness. */
50
+ value: string | null;
51
+ onChange: (harness: string | null) => void;
52
+ /** The narrow form for the filter row; the classic chrome draws the chip. */
53
+ form?: 'chip' | 'icon';
54
+ /** The classic chrome's standalone row: taller targets. */
55
+ touch?: boolean;
56
+ }
57
+
58
+ const TRIGGER_BASE = 'inline-flex max-w-full shrink-0 items-center border font-medium transition-colors cursor-pointer';
59
+ const TRIGGER_ON = 'border-ink bg-ink text-paper';
60
+ const TRIGGER_OFF = 'border-ink/15 text-ink/60 hover:border-ink/30 hover:text-ink';
61
+ const ROW_BASE = 'w-full px-2.5 py-1.5 flex items-center gap-2 text-left hover:bg-ink/5 cursor-pointer';
62
+ const ROW_ON = 'bg-ink/10 font-semibold text-ink';
63
+ const ROW_OFF = 'text-ink/75';
64
+
65
+ export function HarnessFilter({
66
+ options,
67
+ value,
68
+ onChange,
69
+ form = 'chip',
70
+ touch = false,
71
+ }: HarnessFilterProps) {
72
+ const [anchor, setAnchor] = useState<AnchorRect | null>(null);
73
+ // The active harness may have lost its last row since the click. It keeps a
74
+ // row so the filter that emptied the list is visible and clearable.
75
+ const shown = value && !options.some((option) => option.harness === value)
76
+ ? [{ harness: value, label: harnessBadgeLabel(value), count: 0 }, ...options]
77
+ : options;
78
+ if (shown.length < 2 && !value) return null;
79
+
80
+ const active = value ? shown.find((option) => option.harness === value) : undefined;
81
+ const label = active ? active.label : 'All harnesses';
82
+
83
+ const trigger = form === 'icon' ? (
84
+ <button
85
+ type="button"
86
+ aria-haspopup="menu"
87
+ aria-expanded={anchor !== null}
88
+ aria-label={`Filter by harness: ${label}`}
89
+ title={value ? `Harness: ${label}` : 'Filter by harness'}
90
+ onClick={(event) => setAnchor(anchor ? null : anchorRectOf(event.currentTarget))}
91
+ className={`${TRIGGER_BASE} h-[22px] w-[22px] justify-center rounded-md ${
92
+ value ? 'border-ink bg-ink text-paper' : 'border-ink/15 text-ink/55 hover:border-ink/30 hover:text-ink'
93
+ }`}
94
+ >
95
+ {active ? (
96
+ <HarnessGlyph
97
+ harness={active.harness}
98
+ size={HARNESS_GLYPH_SIZE.compact}
99
+ inherit
100
+ decorative
101
+ />
102
+ ) : (
103
+ <Bot size={13} />
104
+ )}
105
+ </button>
106
+ ) : (
107
+ <button
108
+ type="button"
109
+ aria-haspopup="menu"
110
+ aria-expanded={anchor !== null}
111
+ title="Filter by harness"
112
+ onClick={(event) => setAnchor(anchor ? null : anchorRectOf(event.currentTarget))}
113
+ className={`${TRIGGER_BASE} gap-1 rounded-full ${touch ? 'px-2 py-1 text-xs' : 'px-2 py-0.5 text-[11px]'} ${
114
+ value ? TRIGGER_ON : TRIGGER_OFF
115
+ }`}
116
+ >
117
+ {active ? (
118
+ <HarnessGlyph
119
+ harness={active.harness}
120
+ size={HARNESS_GLYPH_SIZE.compact}
121
+ inherit
122
+ decorative
123
+ />
124
+ ) : null}
125
+ <span className="max-w-[9rem] truncate">{label}</span>
126
+ {active ? <span className="font-mono tabular-nums opacity-70">{active.count}</span> : null}
127
+ <ChevronDown size={11} className="shrink-0 opacity-60" />
128
+ </button>
129
+ );
130
+
131
+ return (
132
+ <>
133
+ {trigger}
134
+
135
+ <AnchoredMenu
136
+ anchor={anchor}
137
+ align="start"
138
+ ariaLabel="Filter by harness"
139
+ className="w-56 bg-paper border border-ink/15 rounded-lg shadow-xl py-1 text-xs"
140
+ onClose={() => setAnchor(null)}
141
+ >
142
+ <button
143
+ type="button"
144
+ onClick={() => {
145
+ onChange(null);
146
+ setAnchor(null);
147
+ }}
148
+ className={`${ROW_BASE} ${!value ? ROW_ON : ROW_OFF}`}
149
+ >
150
+ <span className="flex-1 truncate">All harnesses</span>
151
+ {!value ? <Check size={12} /> : null}
152
+ </button>
153
+ {shown.map((option) => {
154
+ const on = option.harness === value;
155
+ return (
156
+ <button
157
+ key={option.harness}
158
+ type="button"
159
+ onClick={() => {
160
+ onChange(option.harness);
161
+ setAnchor(null);
162
+ }}
163
+ className={`${ROW_BASE} ${on ? ROW_ON : ROW_OFF}`}
164
+ >
165
+ <HarnessGlyph harness={option.harness} size={HARNESS_GLYPH_SIZE.compact} decorative />
166
+ <span className="flex-1 truncate">{option.label}</span>
167
+ <span className="font-mono tabular-nums text-ink/50">{option.count}</span>
168
+ {on ? <Check size={12} /> : null}
169
+ </button>
170
+ );
171
+ })}
172
+ </AnchoredMenu>
173
+ </>
174
+ );
175
+ }
@@ -1,4 +1,5 @@
1
1
  import { Category } from '@/client/components/layout/session-sidebar/CategoryItem';
2
+ import { harnessBadgeLabel } from '@/shared/lib/harness/catalog';
2
3
  import type { BatchBinding } from '@/client/components/common/batch-selection/types';
3
4
  import type { WorkspaceFolderData } from '@/shared/types';
4
5
  import type { ToastTone } from '@/shared/lib/ui/toast-duration';
@@ -8,6 +9,8 @@ interface SessionSidebarSessionListProps {
8
9
  activeSessionId: number | string | null;
9
10
  searchQuery: string;
10
11
  showArchived: boolean;
12
+ /** The active harness filter, so an empty list can name what emptied it. */
13
+ harnessFilter?: string | null;
11
14
  sessionStatus: Record<string, 'stream' | 'finish' | 'abort'>;
12
15
  onSelectSession: (id: number | string) => void;
13
16
  onNewSessionForFolder: (id: number) => void;
@@ -27,6 +30,7 @@ export function SessionSidebarSessionList({
27
30
  activeSessionId,
28
31
  searchQuery,
29
32
  showArchived,
33
+ harnessFilter,
30
34
  sessionStatus,
31
35
  onSelectSession,
32
36
  onNewSessionForFolder,
@@ -43,7 +47,11 @@ export function SessionSidebarSessionList({
43
47
  <div className="flex-1 scrollbar-overlay-container p-2 space-y-4">
44
48
  {folders.length === 0 ? (
45
49
  <div className="text-center py-8 text-xs text-muted">
46
- {searchQuery ? 'No results found.' : 'No workspaces available.'}
50
+ {searchQuery
51
+ ? 'No results found.'
52
+ : harnessFilter
53
+ ? `No chats on ${harnessBadgeLabel(harnessFilter)}.`
54
+ : 'No workspaces available.'}
47
55
  </div>
48
56
  ) : (
49
57
  folders.map(folder => (
@@ -70,6 +70,9 @@ export function SessionsView({
70
70
  setOptionsOpen,
71
71
  sortOption,
72
72
  handleSortChange,
73
+ harnessFilter,
74
+ setHarnessFilter,
75
+ harnessOptions,
73
76
  processedFolders,
74
77
  sessionStatus,
75
78
  handleSelectSession,
@@ -180,6 +183,9 @@ export function SessionsView({
180
183
  onToggleOptions: () => setOptionsOpen(!optionsOpen),
181
184
  onCloseOptions: () => setOptionsOpen(false),
182
185
  onSortChange: handleSortChange,
186
+ harnessFilter,
187
+ onHarnessFilterChange: setHarnessFilter,
188
+ harnessOptions,
183
189
  onRefresh: refreshNow,
184
190
  refreshing: isRefreshing,
185
191
  scheduledCount,