@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,72 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * A `read` of a directory, as the tree omp printed.
8
+ *
9
+ * Split out of `Read` for the file-size ceiling, not for reuse: the panel is
10
+ * one card and its branches are exclusive. The props are exactly what the
11
+ * listing needs — the rows already sliced to the tail, how many were dropped,
12
+ * and omp's own trailing notice — so the panel keeps its line-budget policy and
13
+ * this component only draws.
14
+ */
15
+
16
+ import { FileText, Folder, Info } from 'lucide-preact';
17
+ import type { DirEntry } from '@/shared/lib/code/parser';
18
+
19
+ interface ReadDirectoryProps {
20
+ /** The rows to draw, tail-limited by the panel's line budget. */
21
+ entries: DirEntry[];
22
+ /** How many earlier rows the limit dropped. */
23
+ skipped: number;
24
+ /** omp's own footer line, when the listing carried one. */
25
+ notice?: string;
26
+ }
27
+
28
+ export function ReadDirectory({ entries, skipped, notice }: ReadDirectoryProps) {
29
+ return (
30
+ <div className="overflow-hidden rounded-lg border border-ink/8 bg-paper">
31
+ {skipped > 0 && (
32
+ <div className="flex items-center gap-1.5 border-b border-ink/8 bg-canvas/60 px-3 py-1.5 text-[10px] text-ink/50">
33
+ <Info size={11} className="shrink-0" />
34
+ <span>… {skipped} earlier entries hidden</span>
35
+ </div>
36
+ )}
37
+ <div className="max-h-72 divide-y divide-ink/[0.04] overflow-y-auto font-mono text-[11px]">
38
+ {entries.map((entry, idx) => (
39
+ <div
40
+ key={idx}
41
+ className="flex items-center gap-2 px-3 py-1.5 transition-colors hover:bg-ink/[0.02]"
42
+ style={{ paddingLeft: `${Math.max(12, (entry.indent + 1) * 16)}px` }}
43
+ >
44
+ {entry.isDir ? (
45
+ <Folder size={12} className="shrink-0 text-ink/60" />
46
+ ) : (
47
+ <FileText size={12} className="shrink-0 text-ink/40" />
48
+ )}
49
+ <span
50
+ className={`min-w-0 flex-1 truncate ${entry.isDir ? 'font-semibold text-ink' : 'text-ink/80'}`}
51
+ >
52
+ {entry.name}
53
+ {entry.isDir && '/'}
54
+ </span>
55
+ {entry.size && <span className="shrink-0 font-mono text-[10px] text-ink/40">{entry.size}</span>}
56
+ {entry.time && (
57
+ <span className="shrink-0 rounded bg-ink/5 px-1 py-0.2 font-mono text-[10px] text-ink/45">
58
+ {entry.time}
59
+ </span>
60
+ )}
61
+ </div>
62
+ ))}
63
+ </div>
64
+ {notice && (
65
+ <div className="flex items-center gap-1.5 border-t border-ink/8 bg-canvas/60 px-3 py-1.5 text-[10px] text-ink/50">
66
+ <Info size={11} className="shrink-0" />
67
+ <span>{notice}</span>
68
+ </div>
69
+ )}
70
+ </div>
71
+ );
72
+ }
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The picture a `read` answers with, and the full-size view behind a click.
8
+ *
9
+ * The panel drew the result's own bytes with no affordance: a screenshot the
10
+ * tool returned sat at `max-h-72`, so fine text in a 4K capture was unreadable
11
+ * and there was no way to zoom it. The full-size surface is the same one the
12
+ * `eval` screenshot strip opens (`ImageFullscreen` → `FullscreenViewer`): a
13
+ * picture is one interaction wherever a tool returns one, and a second dialog
14
+ * shell for this card is how two previews drift apart.
15
+ */
16
+
17
+ import { useState } from 'preact/hooks';
18
+ import { ImageFullscreen } from '@/client/components/common/image-viewer/fullscreen';
19
+
20
+ interface ReadImageProps {
21
+ /** Raw-byte URL the result carries, or the raw-file route for the path fallback. */
22
+ src: string;
23
+ /** The file's name, used as the `alt`, the dialog's label and the title. */
24
+ name: string;
25
+ }
26
+
27
+ export function ReadImage({ src, name }: ReadImageProps) {
28
+ const [open, setOpen] = useState(false);
29
+
30
+ return (
31
+ <>
32
+ <div className="overflow-hidden rounded-lg border border-ink/8 bg-paper">
33
+ <button
34
+ type="button"
35
+ onClick={() => setOpen(true)}
36
+ title={`${name} — open full size`}
37
+ aria-label={`Open ${name} full size`}
38
+ className="group flex max-h-80 w-full cursor-pointer items-center justify-center overflow-auto bg-canvas/60 p-3"
39
+ >
40
+ <img
41
+ src={src}
42
+ alt={name}
43
+ className="max-h-72 max-w-full object-contain transition-opacity group-hover:opacity-90"
44
+ />
45
+ </button>
46
+ </div>
47
+
48
+ {open && <ImageFullscreen src={src} name={name} onClose={() => setOpen(false)} />}
49
+ </>
50
+ );
51
+ }
@@ -0,0 +1,91 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The DOM harness both `read` panel suites mount through.
8
+ *
9
+ * Two files share it because the panel answers two different questions — what
10
+ * it does with a result that carries no text (the lazy `/api/fs/read` fallback,
11
+ * the markdown branch) and what it paints when the result is a picture — and
12
+ * each suite is at the repo's per-file ceiling on its own.
13
+ *
14
+ * `happy-dom` is installed as globals here rather than in the suites so the two
15
+ * cannot drift on which globals a mounted panel needs. `fetch` is stubbed
16
+ * because the panel reads the status AND the body: a refused read is
17
+ * `ok: false` with an `error`, and the assertions are about which sentence the
18
+ * panel printed.
19
+ */
20
+
21
+ import { Window } from 'happy-dom';
22
+ import { h, render } from 'preact';
23
+ import { act } from 'preact/test-utils';
24
+ import { Read } from '@/client/components/workspace/chat-timeline/tool-renderers/panels/Read';
25
+ import type { ToolCallData } from '@/shared/types';
26
+
27
+ const DOM_GLOBALS = ['window', 'document', 'navigator', 'Node', 'Element', 'HTMLElement', 'HTMLInputElement', 'Event', 'MouseEvent', 'KeyboardEvent', 'fetch'] as const;
28
+ const nativeGlobals: Partial<Record<(typeof DOM_GLOBALS)[number], unknown>> = {};
29
+
30
+ /** Every URL the panel asked `/api/fs/read` for, in order. */
31
+ export const fetchCalls: string[] = [];
32
+
33
+ /** The next response the stub hands back. Defaults to a 200 carrying `hello`. */
34
+ export let nextResponse: { ok: boolean; status: number; body: unknown } = {
35
+ ok: true,
36
+ status: 200,
37
+ body: { content: 'hello' },
38
+ };
39
+
40
+ /** Replace the stub's answer; call from `beforeEach` or inside a test. */
41
+ export function setNextResponse(response: { ok: boolean; status: number; body: unknown }): void {
42
+ nextResponse = response;
43
+ }
44
+
45
+ /** Install the browser globals and the fetch stub; call from `beforeAll`. */
46
+ export function installReadDom(): void {
47
+ const win = new Window({ url: 'http://localhost' });
48
+ const target = globalThis as unknown as Record<string, unknown>;
49
+ for (const key of DOM_GLOBALS) {
50
+ nativeGlobals[key] = target[key];
51
+ target[key] = (win as unknown as Record<string, unknown>)[key];
52
+ }
53
+ const stub = (async (url: string) => {
54
+ fetchCalls.push(String(url));
55
+ const { ok, status, body } = nextResponse;
56
+ return { ok, status, json: async () => body };
57
+ }) as unknown as typeof globalThis.fetch;
58
+ globalThis.fetch = stub;
59
+ }
60
+
61
+ /** Put the previous globals back; call from `afterAll`. */
62
+ export function restoreReadDom(): void {
63
+ const target = globalThis as unknown as Record<string, unknown>;
64
+ for (const key of DOM_GLOBALS) {
65
+ if (nativeGlobals[key] === undefined) delete target[key];
66
+ else target[key] = nativeGlobals[key];
67
+ }
68
+ }
69
+
70
+ /** Mount the panel for one call and flush the effect + its fetch microtask chain. */
71
+ export async function mountRead(tool: ToolCallData): Promise<HTMLElement> {
72
+ const container = document.createElement('div');
73
+ document.body.appendChild(container);
74
+ await act(async () => {
75
+ render(h(Read, { tool, output: tool.output ?? '' }), container);
76
+ });
77
+ // The reader awaits `fetch` and then `res.json()`, and each state write lands
78
+ // a turn later; a few separate `act` passes drain that chain without binding
79
+ // the test to the clock.
80
+ for (let pass = 0; pass < 4; pass += 1) {
81
+ await act(async () => {
82
+ await Promise.resolve();
83
+ });
84
+ }
85
+ return container;
86
+ }
87
+
88
+ /** A `read` call with the fields every case shares. */
89
+ export function readTool(partial: Partial<ToolCallData>): ToolCallData {
90
+ return { id: 'r1', type: 'read', name: 'read', title: 'read', output: '', status: 'success', details: {}, ...partial } as ToolCallData;
91
+ }
@@ -4,19 +4,19 @@
4
4
  */
5
5
 
6
6
  /**
7
- * Clicking a commit row opens its full message.
7
+ * Selection is the only state that reveals a commit's detail.
8
8
  *
9
- * The row drew `%s` alone, so a commit whose body carried the reasoning — the
10
- * common shape in this repository — showed one line and gave no way to read
11
- * the rest. What these mounts pin is the pair that makes the affordance
12
- * honest: a commit WITH a body expands on click (the subject stays, the body
13
- * appears below it), and a one-line commit offers nothing to expand, because a
14
- * chevron that opens an empty block reads as a broken row.
9
+ * The row used to fire two events on one click: select the commit and toggle
10
+ * its expansion. The file list could then be open on a row that was not the
11
+ * selected one. These mounts pin the replacement contract: the body and the
12
+ * changed-file list render for the selected commit, and clicking a row only
13
+ * selects it.
15
14
  */
16
15
 
17
16
  import { afterAll, beforeAll, describe, expect, test } from 'bun:test';
18
17
  import { Window } from 'happy-dom';
19
18
  import { h, render } from 'preact';
19
+ import { useState } from 'preact/hooks';
20
20
  import { act } from 'preact/test-utils';
21
21
  import { CommitRow } from '@/client/components/workspace/git-panel/commit-modal/CommitRow';
22
22
  import type { GitCommit } from '@/shared/types/git';
@@ -75,55 +75,69 @@ async function mount(commitRow: GitCommit, options: { isSelected?: boolean } = {
75
75
  return container;
76
76
  }
77
77
 
78
+ /** A parent that owns the selection, the way the modal does. */
79
+ function Harness({ commitRow }: { commitRow: GitCommit }) {
80
+ const [selected, setSelected] = useState(false);
81
+ return h(CommitRow, {
82
+ commit: commitRow,
83
+ isSelected: selected,
84
+ onSelect: () => setSelected(true),
85
+ onAction: () => {},
86
+ onToggleFile: () => {},
87
+ isExpandedFile: () => false,
88
+ isLoadingFile: () => false,
89
+ isFullContextFile: () => false,
90
+ onToggleContext: () => {},
91
+ fileDiffs: {},
92
+ });
93
+ }
94
+
95
+ async function mountInteractive(commitRow: GitCommit): Promise<HTMLElement> {
96
+ const container = document.createElement('div');
97
+ document.body.appendChild(container);
98
+ await act(async () => {
99
+ render(h(Harness, { commitRow }), container);
100
+ });
101
+ return container;
102
+ }
103
+
78
104
  async function click(el: Element): Promise<void> {
79
105
  await act(async () => {
80
106
  el.dispatchEvent(new window.MouseEvent('click', { bubbles: true }) as unknown as Event);
81
107
  });
82
108
  }
83
109
 
84
- describe('CommitRow message expansion', () => {
85
- test('the body is hidden until the row is clicked', async () => {
86
- const el = await mount(commit('why the change was made'));
87
- expect(el.textContent).toContain('feat(scope): the subject line');
110
+ describe('CommitRow selected detail', () => {
111
+ test('the body is hidden until the commit is selected', async () => {
112
+ const unselected = await mount(commit('why the change was made'));
113
+ expect(unselected.textContent).toContain('feat(scope): the subject line');
114
+ expect(unselected.textContent).not.toContain('why the change was made');
115
+
116
+ const selected = await mount(commit('why the change was made'), { isSelected: true });
117
+ expect(selected.textContent).toContain('why the change was made');
118
+ });
119
+
120
+ test('clicking the row selects the commit and reveals its detail', async () => {
121
+ const el = await mountInteractive(commit('why the change was made'));
88
122
  expect(el.textContent).not.toContain('why the change was made');
89
123
 
90
124
  await click(el.firstElementChild!);
91
125
  expect(el.textContent).toContain('why the change was made');
92
126
  });
93
127
 
94
- test('clicking again collapses the body', async () => {
95
- const el = await mount(commit('why the change was made'));
128
+ test('clicking the selected row again keeps the detail visible', async () => {
129
+ const el = await mountInteractive(commit('why the change was made'));
96
130
  await click(el.firstElementChild!);
97
131
  await click(el.firstElementChild!);
98
- expect(el.textContent).not.toContain('why the change was made');
132
+ expect(el.textContent).toContain('why the change was made');
99
133
  });
100
134
 
101
- test('a one-line commit renders no body and no expand affordance', async () => {
135
+ test('a one-line commit with no files renders no detail affordance', async () => {
102
136
  const el = await mount(commit(undefined));
103
137
  expect(el.textContent).toContain('feat(scope): the subject line');
104
- // The subject row carries no chevron, so the row never promises a body.
138
+ // The subject row carries no chevron, so the row never promises a detail.
105
139
  expect(el.querySelectorAll('svg').length).toBe(1); // the copy-hash icon only
106
140
  });
107
-
108
- test('a click that ends a text selection does not collapse the body', async () => {
109
- const el = await mount(commit('selectable text'));
110
- await click(el.firstElementChild!);
111
- expect(el.textContent).toContain('selectable text');
112
-
113
- // Simulate selecting part of the body, then clicking to copy it.
114
- const range = document.createRange();
115
- range.selectNodeContents(el.querySelector('div.whitespace-pre-wrap')!);
116
- const selection = window.getSelection()!;
117
- selection.removeAllRanges();
118
- selection.addRange(range);
119
-
120
- await click(el.firstElementChild!);
121
- expect(el.textContent).toContain('selectable text');
122
-
123
- selection.removeAllRanges();
124
- await click(el.firstElementChild!);
125
- expect(el.textContent).not.toContain('selectable text');
126
- });
127
141
  });
128
142
 
129
143
  describe('CommitRow changed-file list', () => {
@@ -132,54 +146,58 @@ describe('CommitRow changed-file list', () => {
132
146
  { file: 'src/two.ts', status: 'A', additions: 9, deletions: 0 },
133
147
  ];
134
148
 
135
- test('the file list is hidden until the row is expanded', async () => {
136
- const el = await mount(commit(undefined, files));
137
- expect(el.textContent).toContain('feat(scope): the subject line');
149
+ test('the file list is hidden until the commit is selected', async () => {
150
+ const unselected = await mount(commit(undefined, files));
151
+ expect(unselected.textContent).toContain('feat(scope): the subject line');
152
+ expect(unselected.textContent).not.toContain('src/one.ts');
153
+ expect(unselected.textContent).not.toContain('src/two.ts');
154
+
155
+ const selected = await mount(commit(undefined, files), { isSelected: true });
156
+ expect(selected.textContent).toContain('src/one.ts');
157
+ expect(selected.textContent).toContain('src/two.ts');
158
+ });
159
+
160
+ test('clicking the row selects the commit and reveals the file list', async () => {
161
+ const el = await mountInteractive(commit(undefined, files));
138
162
  expect(el.textContent).not.toContain('src/one.ts');
139
- expect(el.textContent).not.toContain('src/two.ts');
140
163
 
141
164
  await click(el.firstElementChild!);
142
165
  expect(el.textContent).toContain('src/one.ts');
143
166
  expect(el.textContent).toContain('src/two.ts');
144
167
  });
145
168
 
146
- test('a commit with files but no body still expands', async () => {
147
- const el = await mount(commit(undefined, files));
169
+ test('a commit with files but no body still shows the file list when selected', async () => {
170
+ const el = await mount(commit(undefined, files), { isSelected: true });
148
171
  // The chevron is the affordance: without it the file list would be
149
172
  // unreachable on a one-line commit.
150
- expect(el.querySelectorAll('svg').length).toBe(2); // copy-hash + chevron
151
- await click(el.firstElementChild!);
173
+ const subject = Array.from(el.querySelectorAll('button[aria-expanded]')).find((button) =>
174
+ button.textContent?.includes('feat(scope): the subject line')
175
+ );
176
+ expect(subject?.querySelector('svg')).toBeTruthy();
152
177
  expect(el.textContent).toContain('src/one.ts');
153
178
  });
154
179
 
155
- test('the collapsed row states how many files the commit touched', async () => {
180
+ test('the unselected row states how many files the commit touched', async () => {
156
181
  const el = await mount(commit(undefined, files));
157
182
  expect(el.textContent).toContain('2 files');
158
183
  });
159
184
 
160
- test('clicking again collapses the file list', async () => {
161
- const el = await mount(commit(undefined, files));
162
- await click(el.firstElementChild!);
163
- await click(el.firstElementChild!);
164
- expect(el.textContent).not.toContain('src/one.ts');
165
- });
166
-
167
- test('the subject is a button that reports and toggles the expanded state', async () => {
168
- const el = await mount(commit(undefined, files));
169
- const subject = Array.from(el.querySelectorAll('button[aria-expanded]')).find((button) =>
185
+ test('the subject is a button that reports the selected state', async () => {
186
+ const unselected = await mount(commit(undefined, files));
187
+ const unselectedSubject = Array.from(unselected.querySelectorAll('button[aria-expanded]')).find((button) =>
170
188
  button.textContent?.includes('feat(scope): the subject line')
171
189
  ) as HTMLButtonElement | undefined;
172
- expect(subject).toBeTruthy();
173
- expect(subject?.getAttribute('aria-expanded')).toBe('false');
190
+ expect(unselectedSubject?.getAttribute('aria-expanded')).toBe('false');
174
191
 
175
- await click(subject!);
176
- expect(el.textContent).toContain('src/one.ts');
177
- expect(subject?.getAttribute('aria-expanded')).toBe('true');
192
+ const selected = await mount(commit(undefined, files), { isSelected: true });
193
+ const selectedSubject = Array.from(selected.querySelectorAll('button[aria-expanded]')).find((button) =>
194
+ button.textContent?.includes('feat(scope): the subject line')
195
+ ) as HTMLButtonElement | undefined;
196
+ expect(selectedSubject?.getAttribute('aria-expanded')).toBe('true');
178
197
  });
179
198
 
180
199
  test('a file row is a button that reports its own expanded state', async () => {
181
- const el = await mount(commit(undefined, files));
182
- await click(el.firstElementChild!);
200
+ const el = await mount(commit(undefined, files), { isSelected: true });
183
201
  const fileRow = Array.from(el.querySelectorAll('button[aria-expanded]')).find((button) =>
184
202
  button.textContent?.includes('src/one.ts')
185
203
  ) as HTMLButtonElement | undefined;
@@ -2,6 +2,7 @@ import type { TargetedMouseEvent } from 'preact';
2
2
  import { useState } from 'preact/hooks';
3
3
  import { Check, ChevronDown, ChevronRight, Copy } from 'lucide-preact';
4
4
  import type { GitCommit, GitCommitFile } from '@/shared/types/git';
5
+ import { MarkdownRenderer } from '@/client/components/common/MarkdownRenderer';
5
6
  import { CommitActions } from '@/client/components/workspace/git-panel/commit-modal/CommitActions';
6
7
  import { CommitDiffViewer } from '@/client/components/workspace/git-panel/commit-modal/CommitDiffViewer';
7
8
 
@@ -33,12 +34,9 @@ export function CommitRow({
33
34
  headerRef,
34
35
  }: CommitRowProps) {
35
36
  const [copied, setCopied] = useState(false);
36
- const [isExpanded, setIsExpanded] = useState(false);
37
- // A one-line commit with no changed files has nothing to expand, and no
38
- // affordance is drawn, because a chevron that opens an empty block reads as
39
- // a broken row. The changed-file list is part of the expanded block: a page
40
- // of 50 commits otherwise renders every file of every commit at once, which
41
- // buries the subjects the list exists to show.
37
+ // Selection is the only state that reveals the detail. A separate expand
38
+ // toggle made one click fire two events (select and expand), and the file
39
+ // list could be open on a row that was not the selected one.
42
40
  const body = commit.body?.trim() ?? '';
43
41
  const hasBody = body.length > 0;
44
42
  const files = commit.files ?? [];
@@ -58,27 +56,12 @@ export function CommitRow({
58
56
  onToggleFile(commit.hash, file);
59
57
  };
60
58
 
61
- // Clicking the row still selects it for the action strip, and additionally
62
- // opens the full message and the changed-file list, neither of which is
63
- // visible in the collapsed row. A click that ends a text selection must not
64
- // count: copying the message out of an open body would otherwise collapse
65
- // the very block being read.
66
- const handleRowClick = () => {
67
- onSelect(commit);
68
- if (!expandable) return;
69
- const selection = globalThis.getSelection?.();
70
- if (selection && !selection.isCollapsed) return;
71
- setIsExpanded((prev) => !prev);
72
- };
73
-
74
59
  return (
75
60
  <div
76
- onClick={handleRowClick}
61
+ onClick={() => onSelect(commit)}
77
62
  data-testid="commit-row"
78
63
  data-commit-hash={commit.hash}
79
- className={`border-b border-ink/5 transition-colors cursor-pointer ${
80
- isSelected ? 'bg-ink/[0.03]' : 'hover:bg-ink/[0.015]'
81
- }`}
64
+ className="border-b border-ink/5 transition-colors cursor-pointer hover:bg-ink/[0.015]"
82
65
  >
83
66
  <div className="py-2.5 flex flex-col">
84
67
  {/* Commit Header Line */}
@@ -122,9 +105,9 @@ export function CommitRow({
122
105
  type="button"
123
106
  onClick={(e) => {
124
107
  e.stopPropagation();
125
- handleRowClick();
108
+ onSelect(commit);
126
109
  }}
127
- aria-expanded={expandable ? isExpanded : undefined}
110
+ aria-expanded={expandable ? isSelected : undefined}
128
111
  className="flex flex-1 min-w-0 items-start gap-1.5 text-left cursor-pointer rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink/20"
129
112
  >
130
113
  <span
@@ -135,16 +118,16 @@ export function CommitRow({
135
118
  </span>
136
119
  {expandable && (
137
120
  <span className="text-ink/55 flex-shrink-0 mt-0.5" aria-hidden="true">
138
- {isExpanded ? <ChevronDown size={13} /> : <ChevronRight size={13} />}
121
+ {isSelected ? <ChevronDown size={13} /> : <ChevronRight size={13} />}
139
122
  </span>
140
123
  )}
141
124
  </button>
142
125
  </div>
143
126
 
144
- {/* Full commit message body — the subject alone hides it */}
145
- {hasBody && isExpanded && (
146
- <div className="text-[12px] text-ink/70 leading-relaxed whitespace-pre-wrap break-words border-l-2 border-ink/15 pl-2.5 py-0.5 font-mono">
147
- {body}
127
+ {/* Full commit message body, rendered as markdown for the selected commit */}
128
+ {hasBody && isSelected && (
129
+ <div className="border-l-2 border-ink/15 pl-3 py-1">
130
+ <MarkdownRenderer content={body} className="text-ink/70" />
148
131
  </div>
149
132
  )}
150
133
 
@@ -179,9 +162,8 @@ export function CommitRow({
179
162
  </div>
180
163
  )}
181
164
 
182
- {/* Changed Files List — part of the expanded block, so a collapsed
183
- page stays a list of subjects rather than a wall of paths. */}
184
- {hasFiles && isExpanded && (
165
+ {/* Changed Files List, shown for the selected commit */}
166
+ {hasFiles && isSelected && (
185
167
  <div className="mt-2 flex flex-col gap-1">
186
168
  {files.map((file, fileIdx) => {
187
169
  const fileExpanded = isExpandedFile(commit.hash, file.file);
@@ -140,7 +140,7 @@ export function Header({
140
140
  onChange={(e) => onSearchChange(e.currentTarget.value)}
141
141
  placeholder="Filter commits by message, author, or hash..."
142
142
  aria-label="Filter commits"
143
- className="w-full bg-ink/[0.03] border border-ink/15 rounded-md pl-8 pr-3 py-1.5 text-xs text-ink placeholder-ink/40 focus:outline-none focus:border-ink/40 focus-visible:ring-2 focus-visible:ring-ink/20 transition-colors font-mono"
143
+ className="w-full bg-ink/[0.03] border border-ink/15 rounded-md pl-8 pr-3 py-1.5 text-xs text-ink placeholder-ink/40 focus:outline-none focus:border-ink/40 transition-colors font-mono"
144
144
  />
145
145
  {searchQuery && (
146
146
  <button