@kabmo-labs/kabmo 0.58.1 → 0.59.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 (391) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +513 -495
  3. package/dist/client/static/js/{Body-ysmhxbvk.js → Body-jqq4654r.js} +3 -3
  4. package/dist/client/static/js/{CsvGrid-w90pxyn2.js → CsvGrid-avw0taqb.js} +2 -2
  5. package/dist/client/static/js/{DocxView-evxn6kaq.js → DocxView-d221vr6g.js} +3 -3
  6. package/dist/client/static/js/{DrawioView-tmdevwf4.js → DrawioView-gjsy7p01.js} +2 -2
  7. package/dist/client/static/js/{HtmlPreview-bpsn2z9p.js → HtmlPreview-949393v1.js} +1 -1
  8. package/dist/client/static/js/ImageView-pan9pqtm.js +1 -0
  9. package/dist/client/static/js/LayoutWrapper-p0qmghgt.js +2 -0
  10. package/dist/client/static/js/MergeDiffView-swt467g7.js +1 -0
  11. package/dist/client/static/js/Modal-4spmcn44.js +60 -0
  12. package/dist/client/static/js/{PdfView-txxn6qff.js → PdfView-dzj2s6rj.js} +1 -1
  13. package/dist/client/static/js/SessionsView-b6szjdg5.js +1 -0
  14. package/dist/client/static/js/{SheetView-52b33e6f.js → SheetView-jpc178g5.js} +11 -11
  15. package/dist/client/static/js/{SvgPreview-hrk4pfm1.js → SvgPreview-94fap32p.js} +1 -1
  16. package/dist/client/static/js/{abnfDiagram-O67JEVCF-at77sybc.js → abnfDiagram-O67JEVCF-a6eyfzrj.js} +1 -1
  17. package/dist/client/static/js/architecture-7GRP2DOG-bwn1drdz.js +1 -0
  18. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-raw33jgg.js → architectureDiagram-NJMV4G6O-pgmyfncy.js} +3 -3
  19. package/dist/client/static/js/{astro-qha7sceh.js → astro-ryr2ajmg.js} +1 -1
  20. package/dist/client/static/js/bash-zknkkwkw.js +1 -0
  21. package/dist/client/static/js/{blockDiagram-BEXU5L5S-b6e90fbk.js → blockDiagram-BEXU5L5S-rf51jyb2.js} +4 -4
  22. package/dist/client/static/js/c-0w02jkxb.js +1 -0
  23. package/dist/client/static/js/{c4Diagram-YGBWAQC7-msg9y1c6.js → c4Diagram-YGBWAQC7-0faj48jp.js} +2 -2
  24. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-jmrd1h8r.js → classDiagram-v2-NBCMYWYE-bvzsws8x.js} +4 -4
  25. package/dist/client/static/js/{cose-bilkent-JH36ORCC-na65ebq3.js → cose-bilkent-JH36ORCC-j1amnd3m.js} +1 -1
  26. package/dist/client/static/js/cpp-p5b4vean.js +1 -0
  27. package/dist/client/static/js/css-9jzbvdyz.js +1 -0
  28. package/dist/client/static/js/css-sn00sq6v.js +1 -0
  29. package/dist/client/static/js/cynefin-OW5HDTMX-jbc50ks8.js +1 -0
  30. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-9xkkw71m.js → cynefinDiagram-VND7K2PF-f73w6zzz.js} +2 -2
  31. package/dist/client/static/js/{dagre-6A5THRUB-p59f19tv.js → dagre-6A5THRUB-a5vgvjsg.js} +2 -2
  32. package/dist/client/static/js/{diagram-22UHCM2B-2e2rcvn7.js → diagram-22UHCM2B-6y9efamp.js} +9 -9
  33. package/dist/client/static/js/{diagram-3UASUU5V-r9ds8vgr.js → diagram-3UASUU5V-2mycy7xm.js} +1 -1
  34. package/dist/client/static/js/{diagram-ATOU4E4O-jgwxv7v8.js → diagram-ATOU4E4O-10zgjb66.js} +3 -3
  35. package/dist/client/static/js/{diagram-CDSNMT55-20m35eqq.js → diagram-CDSNMT55-bewa52yf.js} +4 -4
  36. package/dist/client/static/js/{diagram-MLGK6HIB-vt3kxt2m.js → diagram-MLGK6HIB-mh3b7gd3.js} +1 -1
  37. package/dist/client/static/js/{diagram-MPIPVDR6-c47rgxf1.js → diagram-MPIPVDR6-gvdrbdm5.js} +2 -2
  38. package/dist/client/static/js/{dockerfile-gtcyey0q.js → dockerfile-6bn19kg0.js} +1 -1
  39. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-aszw3xy3.js → ebnfDiagram-ZINNZB2B-2prre93c.js} +1 -1
  40. package/dist/client/static/js/{elixir-w92v180e.js → elixir-fyxw6d70.js} +1 -1
  41. package/dist/client/static/js/{elk-276RUBZZ-gbvr3gry.js → elk-276RUBZZ-9t6t9kc6.js} +2 -2
  42. package/dist/client/static/js/{erDiagram-OPXOYQCR-1hqca8qe.js → erDiagram-OPXOYQCR-etcggr5n.js} +6 -6
  43. package/dist/client/static/js/{erlang-v7344938.js → erlang-97ayje6m.js} +1 -1
  44. package/dist/client/static/js/eventmodeling-NTZA5JFV-b37ey01t.js +1 -0
  45. package/dist/client/static/js/flowDiagram-KWPJA3E3-7c2ncsw7.js +1 -0
  46. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-07v22te5.js → ganttDiagram-FUAMR5RP-cdc4mwhs.js} +3 -3
  47. package/dist/client/static/js/gitGraph-4MIJSDKK-mvqq7tcs.js +1 -0
  48. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-y068jtz9.js → gitGraphDiagram-X574FWY7-55d0fa7x.js} +8 -8
  49. package/dist/client/static/js/graphql-xzykn0ba.js +1 -0
  50. package/dist/client/static/js/html-2zc3shky.js +1 -0
  51. package/dist/client/static/js/{index-r8d4bk86.js → index-10vzyga1.js} +2 -2
  52. package/dist/client/static/js/{index-8d8ce00v.js → index-27gwghmp.js} +2 -2
  53. package/dist/client/static/js/{index-zhgh7a31.js → index-2f6afhze.js} +2 -2
  54. package/dist/client/static/js/{index-nptbz7sv.js → index-3akjcs82.js} +1 -1
  55. package/dist/client/static/js/{index-fhtnvqgf.js → index-3j2he86h.js} +2 -2
  56. package/dist/client/static/js/index-461ga40v.js +2 -0
  57. package/dist/client/static/js/{index-9qf2h9jb.js → index-51rbgeh9.js} +12 -12
  58. package/dist/client/static/js/{index-s4dpkds5.js → index-537m8a3x.js} +2 -2
  59. package/dist/client/static/js/{index-tdg7hz80.js → index-58z2hatp.js} +2 -2
  60. package/dist/client/static/js/{index-4tbdws4r.js → index-5e4e18tg.js} +2 -2
  61. package/dist/client/static/js/{index-gqrt766t.js → index-60cxxnpk.js} +61 -61
  62. package/dist/client/static/js/{index-th61y26d.js → index-69mnn71v.js} +2 -2
  63. package/dist/client/static/js/{index-e0kahttb.js → index-6bsez5n6.js} +1 -1
  64. package/dist/client/static/js/{index-gaa39w5q.js → index-8tzt0dek.js} +2 -2
  65. package/dist/client/static/js/{index-zs7kw0be.js → index-8z9aqgf3.js} +4 -4
  66. package/dist/client/static/js/{index-ewryzs4g.js → index-92h38pwg.js} +2 -2
  67. package/dist/client/static/js/{index-f61c25vn.js → index-9rvjegmy.js} +3 -3
  68. package/dist/client/static/js/{index-80kx6dm6.js → index-a3bpmw2r.js} +2 -2
  69. package/dist/client/static/js/{index-xmg1x6zv.js → index-a5ecn5yx.js} +5 -5
  70. package/dist/client/static/js/{index-azz46nwc.js → index-ax8gaayq.js} +2 -2
  71. package/dist/client/static/js/{index-wn28m9h7.js → index-c253x7vt.js} +8 -8
  72. package/dist/client/static/js/{index-y0f3wbc3.js → index-d9sfavx1.js} +2 -2
  73. package/dist/client/static/js/{index-5hvt233n.js → index-db6s66jr.js} +2 -2
  74. package/dist/client/static/js/index-eggbcdwx.js +481 -0
  75. package/dist/client/static/js/{index-e4nge3f4.js → index-f13ern5e.js} +1 -1
  76. package/dist/client/static/js/index-f6t91mpp.js +2 -0
  77. package/dist/client/static/js/{index-wxqcnsrq.js → index-fr91ghwb.js} +2 -2
  78. package/dist/client/static/js/{index-tq3t3qm4.js → index-fsa18ns9.js} +2 -2
  79. package/dist/client/static/js/{index-fv7nybnf.js → index-fyt8m8ah.js} +2 -2
  80. package/dist/client/static/js/{index-007sewcn.js → index-gcad7b6g.js} +2 -2
  81. package/dist/client/static/js/{index-rxt8sf9a.js → index-h1xbx74w.js} +2 -2
  82. package/dist/client/static/js/{index-medk4f18.js → index-j1ksa4x2.js} +2 -2
  83. package/dist/client/static/js/{index-sxag9ptg.js → index-jct0jryd.js} +2 -2
  84. package/dist/client/static/js/{index-qefssj0m.js → index-jpvng27a.js} +1 -1
  85. package/dist/client/static/js/{index-vw8b29ek.js → index-me0b6wkw.js} +1 -1
  86. package/dist/client/static/js/{index-6x0kn8pb.js → index-mhrkjbjq.js} +2 -2
  87. package/dist/client/static/js/{index-fe92hqmb.js → index-mngpcca7.js} +4 -4
  88. package/dist/client/static/js/index-mttx9327.css +1 -0
  89. package/dist/client/static/js/{index-5xxbbzqa.js → index-mx5y9vt9.js} +7 -7
  90. package/dist/client/static/js/{index-3ymw778n.js → index-ndqtff48.js} +2 -2
  91. package/dist/client/static/js/{index-cmjyet7w.js → index-nf4hq5tg.js} +27 -27
  92. package/dist/client/static/js/{index-cpp43af3.js → index-njhrm5qa.js} +9 -9
  93. package/dist/client/static/js/index-nnwcbp2d.js +2 -0
  94. package/dist/client/static/js/{index-3p732mvs.js → index-np2rfq06.js} +2 -2
  95. package/dist/client/static/js/{index-2s17netq.js → index-nwbr15b3.js} +2 -2
  96. package/dist/client/static/js/{index-an7fq7f6.js → index-pa70qj4p.js} +1 -1
  97. package/dist/client/static/js/index-pe5f2gmn.js +1 -0
  98. package/dist/client/static/js/{index-1e0rt7c6.js → index-pgy7ree5.js} +5 -5
  99. package/dist/client/static/js/index-pzwf6hwe.js +4 -0
  100. package/dist/client/static/js/{index-7sq6cjt1.js → index-q3k8r0ms.js} +11 -11
  101. package/dist/client/static/js/{index-j830qk07.js → index-rw84kefb.js} +2 -2
  102. package/dist/client/static/js/{index-94d416ee.js → index-s9ts6qbj.js} +2 -2
  103. package/dist/client/static/js/{index-vny4ymjf.js → index-sg65xdey.js} +1 -1
  104. package/dist/client/static/js/{index-hb7a7m9m.js → index-skvfxcd8.js} +1 -1
  105. package/dist/client/static/js/{index-1e710snk.js → index-sx2yz2wx.js} +1 -1
  106. package/dist/client/static/js/{index-kzzvrqnv.js → index-trq7bdvk.js} +2 -2
  107. package/dist/client/static/js/{index-v8xhgfeq.js → index-vs2y8gxr.js} +2 -2
  108. package/dist/client/static/js/index-wwyjzhgs.js +2 -0
  109. package/dist/client/static/js/{index-374xq5a4.js → index-xe447cw3.js} +1 -1
  110. package/dist/client/static/js/index-y09de44h.js +2 -0
  111. package/dist/client/static/js/{index-jxsha63v.js → index-y4cx8cqf.js} +2 -2
  112. package/dist/client/static/js/{index-c9aqx3ht.js → index-yg38s8t3.js} +1 -1
  113. package/dist/client/static/js/{index-dxq1tbwm.js → index-yh7gngsh.js} +2 -2
  114. package/dist/client/static/js/{index-3m1dksmy.js → index-yrwm437g.js} +2 -2
  115. package/dist/client/static/js/{index-7ynf3s2w.js → index-z82nd2bd.js} +2 -2
  116. package/dist/client/static/js/info-A6RAGUB7-zkv4crz7.js +1 -0
  117. package/dist/client/static/js/{infoDiagram-VRGFBTTK-1x83h4k4.js → infoDiagram-VRGFBTTK-9xph6cr5.js} +2 -2
  118. package/dist/client/static/js/ini-62r3vxaf.js +1 -0
  119. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-et6z3c28.js → ishikawaDiagram-OU5B5YK6-3gshs3v8.js} +2 -2
  120. package/dist/client/static/js/java-kacycary.js +1 -0
  121. package/dist/client/static/js/javascript-zc1qnyyp.js +1 -0
  122. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-sw669e7a.js → journeyDiagram-ZHPQQLJL-fa8x56mf.js} +2 -2
  123. package/dist/client/static/js/json-yrwpn6bd.js +1 -0
  124. package/dist/client/static/js/jsx-b40ag8q1.js +1 -0
  125. package/dist/client/static/js/{julia-z14p8jsx.js → julia-agc5kfvg.js} +1 -1
  126. package/dist/client/static/js/{kanban-definition-PNTS6WVX-aqxg95kx.js → kanban-definition-PNTS6WVX-fybp2hh4.js} +6 -6
  127. package/dist/client/static/js/lua-bk961f37.js +1 -0
  128. package/dist/client/static/js/markdown-b7rgzgd6.js +1 -0
  129. package/dist/client/static/js/mermaid.core-jjh5ggp0.js +12 -0
  130. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-530anpc4.js → mindmap-definition-NLK3R4M7-gtfbg619.js} +4 -4
  131. package/dist/client/static/js/one-dark-pro-vht9rv39.js +1 -0
  132. package/dist/client/static/js/one-light-arxc5whh.js +1 -0
  133. package/dist/client/static/js/packet-AYTQ26CC-dgpge627.js +1 -0
  134. package/dist/client/static/js/{pegDiagram-GJSIUBJH-5zar6hvy.js → pegDiagram-GJSIUBJH-1a51sbqv.js} +1 -1
  135. package/dist/client/static/js/{perl-1na2x6yd.js → perl-v5vbtzgf.js} +1 -1
  136. package/dist/client/static/js/{php-x75tt7w3.js → php-83qwy98t.js} +1 -1
  137. package/dist/client/static/js/pie-WAS4IAKB-b8pgsqrd.js +1 -0
  138. package/dist/client/static/js/{pieDiagram-5QR66LMP-3bx8syvw.js → pieDiagram-5QR66LMP-zd9svyyn.js} +3 -3
  139. package/dist/client/static/js/properties-k8gbzggp.js +1 -0
  140. package/dist/client/static/js/python-343tspad.js +1 -0
  141. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-yaarpr2e.js → quadrantDiagram-O4NWA36T-5gtw2m6s.js} +2 -2
  142. package/dist/client/static/js/r-ycdwmv8g.js +1 -0
  143. package/dist/client/static/js/radar-RG4KPBEZ-fmfe5y27.js +1 -0
  144. package/dist/client/static/js/railroad-74A4TZTK-b5tks4ce.js +1 -0
  145. package/dist/client/static/js/railroad-abnf-HS5TGJTU-0sf4m0ze.js +1 -0
  146. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-pjfy3pt7.js +1 -0
  147. package/dist/client/static/js/railroad-peg-WCYAUIDC-nr8ngt42.js +1 -0
  148. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-ag41q4nt.js → railroadDiagram-XR7U4H2S-3ccwpfzz.js} +1 -1
  149. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-g8sr48h4.js → requirementDiagram-PLB6GJNP-sasndrrp.js} +3 -3
  150. package/dist/client/static/js/{ruby-3h22qahv.js → ruby-994n5j6e.js} +1 -1
  151. package/dist/client/static/js/{rust-r27demr5.js → rust-n9z2c9m3.js} +1 -1
  152. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-t1wbd1hh.js → sankeyDiagram-IPEJSGJF-2ahb4sda.js} +3 -3
  153. package/dist/client/static/js/{sass-8bq5r2tz.js → sass-p6g7qdv2.js} +1 -1
  154. package/dist/client/static/js/{scss-c04ezwnn.js → scss-4j4t3r6y.js} +1 -1
  155. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-407mjqty.js → sequenceDiagram-PO4LG4MO-bfj90kz1.js} +7 -7
  156. package/dist/client/static/js/{sizeCapture-INFHLROL-w38zb9ky.js → sizeCapture-INFHLROL-5tygxmtc.js} +1 -1
  157. package/dist/client/static/js/sql-kwpd5w07.js +1 -0
  158. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-4cvgymkc.js → stateDiagram-v2-GCMORJYK-533xw76e.js} +3 -3
  159. package/dist/client/static/js/{svelte-egg3x4tw.js → svelte-bek3h1sz.js} +1 -1
  160. package/dist/client/static/js/{swimlanes-2SLR337P-w7ts2rzw.js → swimlanes-2SLR337P-gd3d04pk.js} +1 -1
  161. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-xxmvdyg4.js +8 -0
  162. package/dist/client/static/js/{timeline-definition-EJHVYXUP-nq46nzy9.js → timeline-definition-EJHVYXUP-fvqvgqvg.js} +3 -3
  163. package/dist/client/static/js/treeView-Q6P3EWNA-23r9fa68.js +1 -0
  164. package/dist/client/static/js/treemap-WGGIJYW6-mxxzdrj6.js +1 -0
  165. package/dist/client/static/js/tsx-gjxfjnbk.js +1 -0
  166. package/dist/client/static/js/typescript-4dchbnya.js +1 -0
  167. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-q144snzb.js → usecaseDiagram-POWQR4AR-tm1f0m4x.js} +15 -15
  168. package/dist/client/static/js/{vennDiagram-UO4OBE2U-2wemak2p.js → vennDiagram-UO4OBE2U-2vdvv1hd.js} +4 -4
  169. package/dist/client/static/js/{vue-d7p4wv35.js → vue-y44m889c.js} +1 -1
  170. package/dist/client/static/js/wardley-WFR3VGLG-cbqtax1x.js +1 -0
  171. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-bb2qvvgr.js → wardleyDiagram-VNRHLVJA-7avcjznx.js} +4 -4
  172. package/dist/client/static/js/xml-xs6qz3ya.js +1 -0
  173. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-9dr05fdq.js → xychartDiagram-PMCCYNJV-g39y526n.js} +4 -4
  174. package/dist/client/static/js/yaml-174nk5bn.js +1 -0
  175. package/package.json +7 -7
  176. package/src/client/borders.css +15 -3
  177. package/src/client/components/common/ComposerTextarea.test.tsx +13 -1
  178. package/src/client/components/common/ComposerTextarea.tsx +8 -2
  179. package/src/client/components/common/MarkdownRenderer.tsx +11 -2
  180. package/src/client/components/common/harness-glyph/harness-glyph.test.ts +0 -4
  181. package/src/client/components/common/harness-glyph/index.tsx +4 -5
  182. package/src/client/components/common/markdown-inline-file.test.tsx +90 -15
  183. package/src/client/components/common/session-actions-menu/index.test.tsx +45 -0
  184. package/src/client/components/common/session-actions-menu/index.tsx +6 -1
  185. package/src/client/components/layout/desktop-layout/RightColumn.tsx +4 -1
  186. package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +28 -35
  187. package/src/client/components/layout/desktop-layout/index.tsx +5 -3
  188. package/src/client/components/layout/desktop-layout/resizer/index.tsx +13 -3
  189. package/src/client/components/layout/desktop-layout/resizer/panel.test.ts +41 -0
  190. package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +21 -1
  191. package/src/client/components/layout/session-sidebar/CategoryHeader.worktree.test.tsx +1 -0
  192. package/src/client/components/layout/session-sidebar/CategoryItem.tsx +8 -2
  193. package/src/client/components/layout/session-sidebar/ClassicView.tsx +2 -0
  194. package/src/client/components/layout/session-sidebar/SessionList.tsx +4 -0
  195. package/src/client/components/layout/session-sidebar/SessionsView.tsx +22 -1
  196. package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +45 -28
  197. package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +9 -3
  198. package/src/client/components/layout/session-sidebar/modern/index.tsx +2 -0
  199. package/src/client/components/layout/session-sidebar/modern/workspace-header.test.tsx +27 -11
  200. package/src/client/components/layout/session-sidebar/search-results.test.tsx +29 -16
  201. package/src/client/components/layout/session-sidebar/session-list-states.test.tsx +1 -0
  202. package/src/client/components/layout/session-sidebar/variant-props.ts +2 -0
  203. package/src/client/components/mobile/LayoutWrapper.tsx +9 -0
  204. package/src/client/components/mobile/SessionSidebar.tsx +4 -0
  205. package/src/client/components/mobile/left-drawer-nav.test.tsx +1 -1
  206. package/src/client/components/mobile/mobile-session-sidebar/Body.tsx +4 -0
  207. package/src/client/components/mobile/mobile-session-sidebar/ClassicDrawer.tsx +3 -0
  208. package/src/client/components/mobile/mobile-session-sidebar/Item.test.tsx +85 -0
  209. package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +30 -14
  210. package/src/client/components/mobile/mobile-session-sidebar/List.tsx +4 -0
  211. package/src/client/components/settings/apply-side-effects.test.ts +31 -0
  212. package/src/client/components/settings/apply-side-effects.ts +7 -0
  213. package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.tsx +3 -2
  214. package/src/client/components/settings/categories/appearance-settings/SidebarStyleSection.test.tsx +95 -0
  215. package/src/client/components/settings/categories/appearance-settings/SidebarStyleSection.tsx +35 -0
  216. package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +1 -0
  217. package/src/client/components/workspace/chat-timeline/MessageItem.gutter.test.ts +26 -0
  218. package/src/client/components/workspace/chat-timeline/MessageItem.tsx +6 -3
  219. package/src/client/components/workspace/chat-timeline/ThinkingSection.test.tsx +17 -0
  220. package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +9 -3
  221. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +39 -2
  222. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +19 -4
  223. package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +28 -21
  224. package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.wait.test.tsx +48 -0
  225. package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +44 -21
  226. package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.test.ts +24 -0
  227. package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.tsx +44 -18
  228. package/src/client/components/workspace/chat-timeline/chat-input/GoalSurfaces.tsx +2 -1
  229. package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.test.ts +35 -0
  230. package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.tsx +33 -12
  231. package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.test.tsx +24 -0
  232. package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +14 -3
  233. package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +24 -1
  234. package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +78 -135
  235. package/src/client/components/workspace/chat-timeline/chat-input/VoiceButton.tsx +58 -0
  236. package/src/client/components/workspace/chat-timeline/chat-input/action-base.ts +42 -0
  237. package/src/client/components/workspace/chat-timeline/chat-input/index.tsx +1 -0
  238. package/src/client/components/workspace/chat-timeline/chat-input/mode-icons.test.ts +108 -0
  239. package/src/client/components/workspace/chat-timeline/chat-input/mode-icons.tsx +122 -0
  240. package/src/client/components/workspace/chat-timeline/chat-input/narrow.test.tsx +78 -20
  241. package/src/client/components/workspace/chat-timeline/chat-input/styles/index.tsx +11 -5
  242. package/src/client/components/workspace/chat-timeline/chat-input/styles.test.tsx +19 -0
  243. package/src/client/components/workspace/chat-timeline/composer-dock-frame.test.tsx +9 -0
  244. package/src/client/components/workspace/chat-timeline/index.tsx +1 -1
  245. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OptionRow.test.tsx +125 -0
  246. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OptionRow.tsx +84 -27
  247. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Mcp.test.tsx +18 -0
  248. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Mcp.tsx +14 -5
  249. package/src/client/components/workspace/model-dropdown/HarnessTabs.tsx +31 -10
  250. package/src/client/components/workspace/model-dropdown/Header.tsx +13 -5
  251. package/src/client/components/workspace/model-dropdown/Panel.tsx +18 -0
  252. package/src/client/components/workspace/model-dropdown/ThinkingLevels.tsx +51 -0
  253. package/src/client/components/workspace/model-dropdown/Trigger.tsx +99 -0
  254. package/src/client/components/workspace/model-dropdown/bands.ts +51 -0
  255. package/src/client/components/workspace/model-dropdown/harness-tabs.test.tsx +21 -5
  256. package/src/client/components/workspace/model-dropdown/index.tsx +20 -47
  257. package/src/client/components/workspace/model-dropdown/thinking-levels.test.tsx +108 -0
  258. package/src/client/components/workspace/model-dropdown/trigger.test.ts +54 -8
  259. package/src/client/hooks/chat/composer/attachments.test.ts +12 -0
  260. package/src/client/hooks/chat/composer/attachments.ts +16 -4
  261. package/src/client/hooks/chat/composer/pipeline.test.ts +14 -0
  262. package/src/client/hooks/chat/composer/pipeline.ts +15 -6
  263. package/src/client/hooks/chat/omp/session-list.activity.test.ts +20 -0
  264. package/src/client/hooks/chat/omp/session-merges.ts +18 -6
  265. package/src/client/hooks/chat/omp/session-sidebar-controller.ts +4 -0
  266. package/src/client/hooks/chat/timeline/scope.test.ts +17 -0
  267. package/src/client/hooks/chat/timeline/scope.ts +6 -1
  268. package/src/client/hooks/chat/timeline/send-refusal.test.ts +19 -0
  269. package/src/client/hooks/chat/timeline/send-steer.test.ts +17 -0
  270. package/src/client/hooks/chat/timeline/send.ts +17 -0
  271. package/src/client/hooks/editor/quick-open.ts +41 -0
  272. package/src/client/hooks/ui/border-style.test.ts +13 -0
  273. package/src/client/hooks/ui/markdown-render.ts +11 -6
  274. package/src/client/hooks/ui/open-inline-file.test.ts +16 -0
  275. package/src/client/hooks/ui/open-inline-file.ts +4 -2
  276. package/src/client/hooks/ui/show-more.ts +11 -1
  277. package/src/client/hooks/ui/ui-feedback.test.ts +11 -0
  278. package/src/client/hooks/ui/verified-inline-files.test.tsx +143 -0
  279. package/src/client/hooks/ui/verified-inline-files.ts +165 -0
  280. package/src/client/hooks/workspace/mobile-workspace-panels.test.tsx +116 -0
  281. package/src/client/hooks/workspace/mobile-workspace-panels.ts +73 -0
  282. package/src/client/hooks/workspace/panel-resize.test.ts +127 -0
  283. package/src/client/hooks/workspace/panel-resize.ts +81 -0
  284. package/src/client/hooks/workspace/session-list-limit.test.ts +80 -0
  285. package/src/client/hooks/workspace/session-list-limit.ts +69 -0
  286. package/src/client/hooks/workspace/session-pin.ts +58 -0
  287. package/src/client/hooks/workspace/workspace-panels-mode.test.tsx +87 -0
  288. package/src/client/hooks/workspace/workspace-panels-mode.ts +76 -0
  289. package/src/client/lib/router/branch-params.test.ts +17 -1
  290. package/src/client/lib/router/branch-params.ts +18 -0
  291. package/src/client/lib/ui/pressed.ts +15 -0
  292. package/src/client/tailwind.css +30 -10
  293. package/src/server/lib/connect/cloudflared.lifecycle.test.ts +25 -9
  294. package/src/server/lib/db/schema.test.ts +1 -1
  295. package/src/server/lib/db/schema.ts +17 -0
  296. package/src/server/lib/harness/activity.server.test.ts +81 -0
  297. package/src/server/lib/harness/activity.server.ts +55 -0
  298. package/src/server/lib/harness/spawn.server.ts +9 -0
  299. package/src/server/lib/omp/session/delete.server.ts +4 -2
  300. package/src/server/lib/omp/session/sidebar-activity.server.test.ts +24 -2
  301. package/src/server/lib/omp/session/sidebar-data.canonical.test.ts +14 -0
  302. package/src/server/lib/sessions/last-opened.server.test.ts +17 -0
  303. package/src/server/lib/sessions/last-opened.server.ts +18 -1
  304. package/src/server/routes/sessions/index.ts +3 -2
  305. package/src/server/routes/sessions/routes.test.ts +29 -46
  306. package/src/server/routes/sessions/session.ts +40 -62
  307. package/src/server/routes/sessions/state.test.ts +89 -0
  308. package/src/server/routes/sessions/state.ts +86 -0
  309. package/src/shared/lib/chat/attachment-budget.test.ts +74 -0
  310. package/src/shared/lib/chat/attachment-budget.ts +111 -0
  311. package/src/shared/lib/chat/attachments.test.ts +0 -17
  312. package/src/shared/lib/chat/attachments.ts +0 -53
  313. package/src/shared/lib/chat/timeline/block-chrome.test.ts +35 -0
  314. package/src/shared/lib/chat/timeline/block-chrome.ts +21 -0
  315. package/src/shared/lib/markdown/degenerate-emphasis.test.ts +64 -0
  316. package/src/shared/lib/markdown/degenerate-emphasis.ts +90 -0
  317. package/src/shared/lib/markdown/inline-file.test.ts +79 -22
  318. package/src/shared/lib/markdown/inline-file.ts +57 -25
  319. package/src/shared/lib/markdown/marked.ts +5 -1
  320. package/src/shared/lib/settings/defaults.ts +2 -0
  321. package/src/shared/lib/theme/border-style.ts +1 -1
  322. package/src/shared/lib/workspace/active-project.test.ts +17 -1
  323. package/src/shared/lib/workspace/active-project.ts +9 -0
  324. package/src/shared/lib/workspace/project-settings-delete.test.ts +97 -0
  325. package/src/shared/lib/workspace/project-settings.test.ts +2 -34
  326. package/src/shared/lib/workspace/project-settings.ts +6 -0
  327. package/src/shared/lib/workspace/session-list-limit.test.ts +31 -0
  328. package/src/shared/lib/workspace/session-list-limit.ts +32 -0
  329. package/src/shared/lib/workspace/sidebar-sort.test.ts +21 -0
  330. package/src/shared/lib/workspace/workspace-panel-widths.ts +1 -1
  331. package/src/shared/lib/workspace/workspace-session.test.ts +34 -0
  332. package/src/shared/lib/workspace/workspace-session.ts +40 -0
  333. package/src/shared/types/settings/state.ts +10 -0
  334. package/dist/client/static/js/ImageView-ssazqckj.js +0 -1
  335. package/dist/client/static/js/LayoutWrapper-qwpfq4dq.js +0 -2
  336. package/dist/client/static/js/MergeDiffView-en6aazw8.js +0 -1
  337. package/dist/client/static/js/Modal-zjnhj9nb.js +0 -60
  338. package/dist/client/static/js/SessionsView-eryjtmb2.js +0 -1
  339. package/dist/client/static/js/architecture-7GRP2DOG-v05ap4e3.js +0 -1
  340. package/dist/client/static/js/bash-n5d0esqg.js +0 -1
  341. package/dist/client/static/js/c-pk766wx0.js +0 -1
  342. package/dist/client/static/js/cpp-3pt91jvm.js +0 -1
  343. package/dist/client/static/js/css-q2k6afe3.js +0 -1
  344. package/dist/client/static/js/css-sp1cgdbr.js +0 -1
  345. package/dist/client/static/js/cynefin-OW5HDTMX-sqv0ze38.js +0 -1
  346. package/dist/client/static/js/eventmodeling-NTZA5JFV-t4dzf5s7.js +0 -1
  347. package/dist/client/static/js/flowDiagram-KWPJA3E3-c16xmjyv.js +0 -1
  348. package/dist/client/static/js/gitGraph-4MIJSDKK-0jq8y0qd.js +0 -1
  349. package/dist/client/static/js/graphql-qx4tt6ze.js +0 -1
  350. package/dist/client/static/js/html-5e0g8664.js +0 -1
  351. package/dist/client/static/js/index-4ddgpqm0.css +0 -1
  352. package/dist/client/static/js/index-5g2j626a.js +0 -1
  353. package/dist/client/static/js/index-cc7qbfvn.js +0 -477
  354. package/dist/client/static/js/index-f27wvdky.js +0 -4
  355. package/dist/client/static/js/index-m5n0zsft.js +0 -2
  356. package/dist/client/static/js/index-rqt8mem9.js +0 -2
  357. package/dist/client/static/js/index-s9k82stc.js +0 -2
  358. package/dist/client/static/js/index-skwem10a.js +0 -2
  359. package/dist/client/static/js/index-tv9rn2nd.js +0 -2
  360. package/dist/client/static/js/info-A6RAGUB7-szttx3v5.js +0 -1
  361. package/dist/client/static/js/ini-bdk46a3d.js +0 -1
  362. package/dist/client/static/js/java-3g3925cf.js +0 -1
  363. package/dist/client/static/js/javascript-av46zx4c.js +0 -1
  364. package/dist/client/static/js/json-hdyzmffz.js +0 -1
  365. package/dist/client/static/js/jsx-y8r9mrdq.js +0 -1
  366. package/dist/client/static/js/lua-wf5k6p3r.js +0 -1
  367. package/dist/client/static/js/markdown-9bf16dx7.js +0 -1
  368. package/dist/client/static/js/mermaid.core-6cgqsgcf.js +0 -12
  369. package/dist/client/static/js/one-dark-pro-9hnhtkpr.js +0 -1
  370. package/dist/client/static/js/one-light-2n5y8592.js +0 -1
  371. package/dist/client/static/js/packet-AYTQ26CC-401149bv.js +0 -1
  372. package/dist/client/static/js/pie-WAS4IAKB-bgfv8tfz.js +0 -1
  373. package/dist/client/static/js/properties-xk4dn00p.js +0 -1
  374. package/dist/client/static/js/python-7sgz05n4.js +0 -1
  375. package/dist/client/static/js/r-w4qxm0pv.js +0 -1
  376. package/dist/client/static/js/radar-RG4KPBEZ-pw720590.js +0 -1
  377. package/dist/client/static/js/railroad-74A4TZTK-n2a30ngs.js +0 -1
  378. package/dist/client/static/js/railroad-abnf-HS5TGJTU-rn5rx9qt.js +0 -1
  379. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-t4yryhtd.js +0 -1
  380. package/dist/client/static/js/railroad-peg-WCYAUIDC-c4ebgvrr.js +0 -1
  381. package/dist/client/static/js/sql-sd00wgem.js +0 -1
  382. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-v82nym6b.js +0 -8
  383. package/dist/client/static/js/treeView-Q6P3EWNA-bxgt5yhm.js +0 -1
  384. package/dist/client/static/js/treemap-WGGIJYW6-hh3595m0.js +0 -1
  385. package/dist/client/static/js/tsx-h5yzg80q.js +0 -1
  386. package/dist/client/static/js/typescript-qy1sbhea.js +0 -1
  387. package/dist/client/static/js/wardley-WFR3VGLG-6bza7h1b.js +0 -1
  388. package/dist/client/static/js/xml-mrk4xakv.js +0 -1
  389. package/dist/client/static/js/yaml-xaza6dra.js +0 -1
  390. package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.test.tsx +0 -110
  391. package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +0 -86
@@ -1,11 +1,12 @@
1
1
  import { useCallback, useRef, useState } from 'preact/hooks';
2
- import { Check, ChevronDown, LockKeyhole } from 'lucide-preact';
2
+ import { Check, ChevronDown } from 'lucide-preact';
3
3
  import { AnchoredMenu } from '@/client/components/common/anchored-menu';
4
4
  import { anchorRectOf, type AnchorRect } from '@/shared/lib/ui/menu-anchor';
5
5
  import type { ApprovalMode } from '@kabmo-labs/kabmo-omp/access-mode';
6
6
  import { APPROVAL_MODES } from '@kabmo-labs/kabmo-omp/access-mode';
7
7
  import type { SessionModeState } from '@kabmo-labs/kabmo-harness/session-modes';
8
8
  import { accessLevelCopy } from '@/client/components/workspace/chat-timeline/chat-input/access-levels';
9
+ import { ComposerModeIcon, composerModeIconKind } from '@/client/components/workspace/chat-timeline/chat-input/mode-icons';
9
10
 
10
11
  export interface AccessDropdownProps {
11
12
  value: ApprovalMode;
@@ -66,6 +67,14 @@ export function AccessDropdown({ value, onSelect, harness, iconOnly = false, lad
66
67
  const label = activeLadder
67
68
  ? currentLadder?.name ?? (activeLadder.currentValue || 'Access')
68
69
  : copy.labels[value];
70
+ // The narrow chip shows this glyph ALONE, so it follows the CURRENT row —
71
+ // a static lock made every access level look identical once the label was
72
+ // dropped (see `useComposerNarrow`).
73
+ const triggerKind = composerModeIconKind(
74
+ activeLadder
75
+ ? { value: activeLadder.currentValue, ...(currentLadder?.name ? { name: currentLadder.name } : {}) }
76
+ : { value, name: copy.labels[value] },
77
+ );
69
78
 
70
79
  // Selection is owned by ChatInput; this dropdown only reports user choices.
71
80
  const handleSelect = (mode: ApprovalMode) => {
@@ -85,7 +94,7 @@ export function AccessDropdown({ value, onSelect, harness, iconOnly = false, lad
85
94
  aria-controls={showAccess ? listboxId : undefined}
86
95
  className="tap-chip flex items-center space-x-1 rounded-md px-1.5 py-1 text-xs font-medium text-muted transition-colors hover:bg-ink/5 hover:text-ink"
87
96
  >
88
- <LockKeyhole size={12} className="text-ink/60" />
97
+ <ComposerModeIcon kind={triggerKind} size={12} />
89
98
  {/* The label is dropped whole below the composer's label width — never
90
99
  clipped to a letter and never allowed to wrap: `whitespace-nowrap`
91
100
  is what kept `Always ask` off two lines, and the flag is what keeps
@@ -118,7 +127,10 @@ export function AccessDropdown({ value, onSelect, harness, iconOnly = false, lad
118
127
  choice.value === activeLadder.currentValue ? 'bg-ink/10 font-medium text-ink' : 'text-ink/75'
119
128
  }`}
120
129
  >
121
- <span>{choice.name}</span>
130
+ <span className="flex min-w-0 items-center gap-2">
131
+ <ComposerModeIcon kind={composerModeIconKind(choice)} size={12} />
132
+ <span className="truncate">{choice.name}</span>
133
+ </span>
122
134
  {choice.value === activeLadder.currentValue && <Check size={12} className="text-ink shrink-0" />}
123
135
  </button>
124
136
  ))
@@ -134,7 +146,10 @@ export function AccessDropdown({ value, onSelect, harness, iconOnly = false, lad
134
146
  value === mode ? 'bg-ink/10 font-medium text-ink' : 'text-ink/75'
135
147
  }`}
136
148
  >
137
- <span>{copy.labels[mode]}</span>
149
+ <span className="flex min-w-0 items-center gap-2">
150
+ <ComposerModeIcon kind={composerModeIconKind({ value: mode, name: copy.labels[mode] })} size={12} />
151
+ <span className="truncate">{copy.labels[mode]}</span>
152
+ </span>
138
153
  {value === mode && <Check size={12} className="text-ink shrink-0" />}
139
154
  </button>
140
155
  ))}
@@ -4,6 +4,7 @@ import { File as FileIcon, Maximize2, Minimize2, Paperclip, X } from 'lucide-pre
4
4
  import type { Attachment } from '@/shared/types';
5
5
  import { attachmentName } from '@/shared/lib/chat/attachments';
6
6
  import { ModeToggles } from '@/client/components/workspace/chat-timeline/chat-input/ModeToggles';
7
+ import { actionBox } from '@/client/components/workspace/chat-timeline/chat-input/action-base';
7
8
  import { WaitingDependencyPicker, type WaitingCandidate } from '@/client/components/workspace/chat-timeline/chat-input/WaitingDependencyPicker';
8
9
  import type { ComposerModes } from '@/client/components/workspace/chat-timeline/chat-input/modes-props';
9
10
 
@@ -134,13 +135,33 @@ export function AttachmentToolbar({ attachments, onFilesSelected, onRemove, mode
134
135
  </div>
135
136
  ))}
136
137
 
138
+ {/* The NEXT prompt's wait pick. On a phone it leads the trailing group,
139
+ to the LEFT of Plan/Goal: the mode pair is the column the user reads
140
+ against Stop/Send, and a wait pick between them and the stretch
141
+ control pushed the pair off that column. On a desktop the modes live
142
+ in the bottom toolbar, so this is the last control before the
143
+ stretch button. Its panel is portalled and placed from the trigger's
144
+ rectangle, so it flips and scrolls instead of running off the window
145
+ — the header sits at the bottom of a desktop viewport and at the top
146
+ of a stretched phone one. */}
147
+ {showWaiting && waiting && (
148
+ <div className="ml-auto flex-shrink-0">
149
+ <WaitingDependencyPicker
150
+ candidates={waiting.candidates}
151
+ value={waiting.value}
152
+ onChange={waiting.onChange}
153
+ iconOnly={iconOnly}
154
+ />
155
+ </div>
156
+ )}
157
+
137
158
  {/* Plan/Goal sit HERE on a phone, not in the bottom row: that row is a
138
159
  single line whose left cluster (model, thinking, access) already
139
160
  fills it, so a third group pushed the voice button under the model
140
- label. `ml-auto` keeps them on the row's trailing edge, away from
141
- the paperclip and any attachment chips. */}
161
+ label. `ml-auto` keeps the group on the row's trailing edge when no
162
+ wait pick precedes it; with a pick, that control already took it. */}
142
163
  {modes && onOpenGoal && (
143
- <div className="ml-auto flex-shrink-0">
164
+ <div className={`${showWaiting ? '' : 'ml-auto '}flex-shrink-0`}>
144
165
  <ModeToggles
145
166
  plan={modes.plan}
146
167
  goal={modes.goalOpen}
@@ -158,25 +179,11 @@ export function AttachmentToolbar({ attachments, onFilesSelected, onRemove, mode
158
179
  </div>
159
180
  )}
160
181
 
161
- {/* The NEXT prompt's wait pick, immediately before the stretch control
162
- on BOTH layouts. Its panel is portalled and placed from the
163
- trigger's rectangle, so it flips and scrolls instead of running off
164
- the window — the header sits at the bottom of a desktop viewport and
165
- at the top of a stretched phone one. */}
166
- {showWaiting && waiting && (
167
- <div className={`${modesTrailing ? '' : 'ml-auto '}flex-shrink-0`}>
168
- <WaitingDependencyPicker
169
- candidates={waiting.candidates}
170
- value={waiting.value}
171
- onChange={waiting.onChange}
172
- iconOnly={iconOnly}
173
- />
174
- </div>
175
- )}
176
-
177
182
  {/* The stretch control, always last on the row. `ml-auto` unless a
178
183
  trailing group already took it, so the groups stay apart from the
179
- paperclip and the attachment chips. */}
184
+ paperclip and the attachment chips. Its box comes from the action
185
+ cluster's own pair, so its glyph sits on the Send/mic column below
186
+ even where the row's `px-3` matches but the old `p-1` box did not. */}
180
187
  {onToggleExpand && (
181
188
  <button
182
189
  type="button"
@@ -188,7 +195,7 @@ export function AttachmentToolbar({ attachments, onFilesSelected, onRemove, mode
188
195
  // as a tool card whose title is "composer".
189
196
  aria-label={expanded ? 'Restore composer' : 'Maximize composer'}
190
197
  title={expanded ? 'Restore composer' : 'Maximize composer'}
191
- className={`tap-target ${modesTrailing || showWaiting ? '' : 'ml-auto '}flex items-center justify-center p-1 rounded transition-colors shrink-0 ${
198
+ className={`tap-target ${modesTrailing || showWaiting ? '' : 'ml-auto '}${actionBox(iconOnly)} flex items-center justify-center rounded transition-colors shrink-0 ${
192
199
  expanded ? 'bg-ink/10 text-ink' : 'text-ink/60 hover:bg-ink/5 hover:text-ink'
193
200
  }`}
194
201
  >
@@ -16,9 +16,29 @@ import { h, render } from 'preact';
16
16
  import { act } from 'preact/test-utils';
17
17
  import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
18
18
  import { AttachmentToolbar } from '@/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar';
19
+ import type { ComposerModes } from '@/client/components/workspace/chat-timeline/chat-input/modes-props';
19
20
 
20
21
  const candidates = [{ id: 'sess-a', title: 'Refactor parser', folderName: 'alpha' }];
21
22
 
23
+ /** The mode slice the phone composer hands the attachment row. */
24
+ const MODES: ComposerModes = {
25
+ plan: false,
26
+ goal: false,
27
+ goalOpen: false,
28
+ goalRecord: null,
29
+ goalContinuation: null,
30
+ goalEvaluating: false,
31
+ goalArm: null,
32
+ disarmGoal: () => {},
33
+ pending: false,
34
+ planAvailable: true,
35
+ goalAvailable: true,
36
+ error: null,
37
+ clearError: () => {},
38
+ onTogglePlan: () => {},
39
+ onGoalAction: async () => ({ ok: true }),
40
+ };
41
+
22
42
  const mounted: HTMLElement[] = [];
23
43
 
24
44
  beforeAll(() => {
@@ -67,6 +87,34 @@ describe('AttachmentToolbar wait pick', () => {
67
87
  expect(picker!.compareDocumentPosition(expand!) & 4).toBe(4);
68
88
  });
69
89
 
90
+ test('on a phone the pick leads the mode pair, left of Plan/Goal', async () => {
91
+ const host = await mount(
92
+ h(AttachmentToolbar, {
93
+ attachments: [],
94
+ onFilesSelected: () => {},
95
+ onRemove: () => {},
96
+ onToggleExpand: () => {},
97
+ iconOnly: true,
98
+ modes: MODES,
99
+ onOpenGoal: () => {},
100
+ waiting: { value: null, candidates, onChange: () => {} },
101
+ }),
102
+ );
103
+
104
+ const picker = host.querySelector('[data-testid="wait-picker"]') as HTMLElement | null;
105
+ const plan = host.querySelector('[aria-label="Enter plan mode"]') as HTMLElement | null;
106
+ const expand = host.querySelector('[aria-label="Maximize composer"]') as HTMLElement | null;
107
+ expect(picker).not.toBeNull();
108
+ expect(plan).not.toBeNull();
109
+ expect(expand).not.toBeNull();
110
+ // Wait pick → Plan/Goal → stretch. The pick carries `ml-auto` so the whole
111
+ // group stays on the trailing edge; the mode wrapper follows it.
112
+ expect(picker!.compareDocumentPosition(plan!) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
113
+ expect(plan!.compareDocumentPosition(expand!) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
114
+ expect(picker!.parentElement?.parentElement?.className).toContain('ml-auto');
115
+ expect(plan!.parentElement?.parentElement?.className).not.toContain('ml-auto');
116
+ });
117
+
70
118
  test('the panel is portalled, fixed, and clamped inside the viewport', async () => {
71
119
  const host = await mount(
72
120
  h(AttachmentToolbar, {
@@ -27,6 +27,7 @@ import { AttachmentToolbar } from '@/client/components/workspace/chat-timeline/c
27
27
  import { ComposerNotice } from '@/client/components/workspace/chat-timeline/chat-input/ComposerNotice';
28
28
  import { ComposerTextarea } from '@/client/components/common/ComposerTextarea';
29
29
  import { ComposerToolbar } from '@/client/components/workspace/chat-timeline/chat-input/Toolbar';
30
+ import { VoiceButton } from '@/client/components/workspace/chat-timeline/chat-input/VoiceButton';
30
31
  import { VoiceNotice } from '@/client/components/workspace/chat-timeline/chat-input/VoiceNotice';
31
32
 
32
33
  export interface ComposerRowsInput {
@@ -106,6 +107,30 @@ export function composerRows({
106
107
  pickerPlacement,
107
108
  ...input
108
109
  }: ComposerRowsInput): Record<ComposerRow, ComponentChildren> {
110
+ const draft = (
111
+ <ComposerTextarea
112
+ value={input.value}
113
+ onChange={input.onChange}
114
+ onSend={input.submit}
115
+ disabled={input.disabled}
116
+ appSettings={input.appSettings}
117
+ rootPath={input.rootPath}
118
+ sessionId={input.sessionId ?? null}
119
+ {...(input.harness ? { harness: input.harness } : {})}
120
+ enablePicker={input.enablePicker}
121
+ placement={pickerPlacement}
122
+ // On a phone the textarea shares its row with the mic, so it is the
123
+ // member that gives up width; the mic itself never shrinks.
124
+ wrapperClassName={`${wrapperClass}${input.isMobile ? ' flex-1 min-w-0' : ''}`}
125
+ placeholder={input.placeholder}
126
+ className={`composer-draft w-full bg-transparent border-none focus:outline-none resize-none text-ink placeholder-ink/40 disabled:opacity-50 disabled:cursor-not-allowed ${textareaClass}`}
127
+ onPaste={input.onPaste}
128
+ variant={input.variant}
129
+ textareaRef={input.textareaRef}
130
+ onReady={input.onTextareaReady}
131
+ />
132
+ );
133
+
109
134
  return {
110
135
  attachments: (
111
136
  <AttachmentToolbar
@@ -144,27 +169,25 @@ export function composerRows({
144
169
  // height back by removing the box, not by shrinking it, and the attachment
145
170
  // row then carries the "Type here" target that brings it back. A `h-0` box
146
171
  // would keep a focusable element with no pixels.
147
- draft: input.compact ? null : (
148
- <ComposerTextarea
149
- value={input.value}
150
- onChange={input.onChange}
151
- onSend={input.submit}
152
- disabled={input.disabled}
153
- appSettings={input.appSettings}
154
- rootPath={input.rootPath}
155
- sessionId={input.sessionId ?? null}
156
- {...(input.harness ? { harness: input.harness } : {})}
157
- enablePicker={input.enablePicker}
158
- placement={pickerPlacement}
159
- wrapperClassName={wrapperClass}
160
- placeholder={input.placeholder}
161
- className={`composer-draft w-full bg-transparent border-none focus:outline-none resize-none text-ink placeholder-ink/40 disabled:opacity-50 disabled:cursor-not-allowed ${textareaClass}`}
162
- onPaste={input.onPaste}
163
- variant={input.variant}
164
- textareaRef={input.textareaRef}
165
- onReady={input.onTextareaReady}
166
- />
167
- ),
172
+ //
173
+ // The phone's mic lives HERE, at the right of the textarea and above Send,
174
+ // so it never competes with the model/access cluster in the toolbar row.
175
+ draft: input.compact ? null : input.isMobile ? (
176
+ <div className="flex flex-1 min-h-0 items-end">
177
+ {draft}
178
+ <VoiceButton
179
+ supported={input.voiceSupported}
180
+ listening={input.voiceListening}
181
+ busy={input.voiceBusy}
182
+ hint={input.voiceHint}
183
+ onToggle={input.onVoiceToggle}
184
+ isMobile
185
+ // `mr-3` is the toolbar's own `px-3`: the mic's right edge then sits
186
+ // on Send's, one column down, instead of 4px past it.
187
+ className="mb-2 mr-3"
188
+ />
189
+ </div>
190
+ ) : draft,
168
191
 
169
192
  // Dictation progress / failure, beside the toolbar that owns the mic.
170
193
  voice: <VoiceNotice status={input.voiceStatus} error={input.voiceError} />,
@@ -109,6 +109,30 @@ describe('GoalBanner', () => {
109
109
  expect(el.querySelector('[title*="Success criteria"]')).not.toBeNull();
110
110
  });
111
111
 
112
+ test('a streaming turn is the goal WAITING, not active', () => {
113
+ // omp reports `status: "active"` for the whole life of an open goal, the
114
+ // time it spends waiting for a turn included. Repeating that word made the
115
+ // row claim the goal was working whenever the chat streamed; the goal's own
116
+ // process is the loop's audit, so a streaming turn must read waiting.
117
+ const el = paint({ running: true, continuation: { turn: 3, maxTurns: 25 } });
118
+ const banner = el.querySelector('[data-goal-banner]');
119
+ expect(banner?.getAttribute('data-goal-phase')).toBe('waiting');
120
+ expect(el.textContent).toContain('waiting');
121
+ expect(el.querySelector('.animate-spin')).toBeNull();
122
+ });
123
+
124
+ test('an idle open goal waits for its next turn', () => {
125
+ const el = paint();
126
+ expect(el.querySelector('[data-goal-banner]')?.getAttribute('data-goal-phase')).toBe('waiting');
127
+ });
128
+
129
+ test('the loop deciding is the only "active" phase', () => {
130
+ const el = paint({ evaluating: true });
131
+ expect(el.querySelector('[data-goal-banner]')?.getAttribute('data-goal-phase')).toBe('active');
132
+ expect(el.textContent).toContain('active');
133
+ expect(el.querySelector('.animate-spin')).not.toBeNull();
134
+ });
135
+
112
136
  test('a paused goal offers Resume, not Pause', () => {
113
137
  const actions: GoalAction[] = [];
114
138
  const el = paint({ record: { ...record, status: 'paused' }, continuation: { turn: 4, maxTurns: 25 } }, actions);
@@ -16,6 +16,16 @@
16
16
  * Modelled on a queued-message row (`QueueList`): status word, the objective,
17
17
  * its figures, and only the actions that apply right now.
18
18
  *
19
+ * ## The status word is the LIVE phase, not omp's durable status
20
+ *
21
+ * omp reports `active` for the whole life of an open goal — the minutes it
22
+ * spends waiting for a turn to finish included — so repeating the record's
23
+ * status made the row say "active" forever, streaming or idle. The goal's own
24
+ * process is the loop between turns (Kabmo's audit, `evaluating`); a streaming
25
+ * turn is the AGENT working, and the goal is waiting for it. The row therefore
26
+ * reads `waiting` unless the loop is deciding, and only a non-`active` durable
27
+ * status (paused, budget-limited) or a stop verdict keeps its own word.
28
+ *
19
29
  * ## What the turn counter is, exactly
20
30
  *
21
31
  * `continuation` comes from the child's own `KABMO_GOAL_CONTINUATION` frame,
@@ -33,7 +43,7 @@
33
43
  * business being a stray click beside Pause.
34
44
  */
35
45
 
36
- import { AlertTriangle, CheckCircle2, CircleDot, Loader2, Pause, Play, SlidersHorizontal, Target } from 'lucide-preact';
46
+ import { AlertTriangle, CheckCircle2, Loader2, Pause, Play, SlidersHorizontal, Target } from 'lucide-preact';
37
47
  import type { GoalContinuation, GoalContinuationStop, GoalRecord } from '@kabmo-labs/kabmo-omp/mode/types';
38
48
  import { formatGoalDuration, formatGoalTokens } from '@kabmo-labs/kabmo-omp/mode/format';
39
49
  import { isGoalOpen } from '@kabmo-labs/kabmo-omp/mode/status';
@@ -88,14 +98,15 @@ export interface GoalBannerProps {
88
98
  record: GoalRecord;
89
99
  /**
90
100
  * The CHAT's run state — the timeline's `timelineRunning`, not the composer's
91
- * local one. A goal turn driven by another tab or another Kabmo instance is
92
- * still this goal's turn, and the sidebar spinner already reports it.
101
+ * local one. It never makes the goal "active" (that is the loop's window);
102
+ * it only says which wait the row is in, for the tooltip.
93
103
  */
94
104
  running: boolean;
95
105
  /** The child's last automatic turn, or null when it has not reported one. */
96
106
  continuation: GoalContinuation | null;
97
107
  /** The loop is deciding whether to open another turn (it emits nothing else
98
- * for that window, so the spinner covers it). */
108
+ * for that window, so the spinner covers it). This is the ONLY window in
109
+ * which the goal itself is running. */
99
110
  evaluating: boolean;
100
111
  /** A mode command is in flight; the row reads as pending rather than absent. */
101
112
  pending: boolean;
@@ -119,10 +130,20 @@ export function GoalBanner({ record, running, continuation, evaluating, pending,
119
130
  const stopReason = continuation?.stopped;
120
131
  const stop = stopReason && STOP_UI[stopReason] ? stopReason : null;
121
132
  const stopped = !paused && stop !== null;
122
- // The spinner covers both halves of "not idle": a streaming turn, and the
123
- // auditor Kabmo runs after it (`goal_evaluating`).
124
- const busy = running || evaluating;
125
- const tone = busy ? 'text-ink/45' : stopped ? STOP_UI[stop].tone : paused ? 'text-warning-text' : 'text-ink/45';
133
+ // omp's record is durable, not live: `active` covers the minutes between
134
+ // turns. Only the loop's own window is "active"; a streaming turn and an idle
135
+ // gap are both the goal waiting (see the module comment).
136
+ const loopActive = evaluating;
137
+ const phase = paused
138
+ ? 'paused'
139
+ : stop
140
+ ? STOP_UI[stop].badge
141
+ : record.status === 'active'
142
+ ? loopActive
143
+ ? 'active'
144
+ : 'waiting'
145
+ : record.status;
146
+ const tone = loopActive ? 'text-ink/45' : stopped ? STOP_UI[stop].tone : paused ? 'text-warning-text' : 'text-ink/45';
126
147
  const badge = paused
127
148
  ? 'bg-warning/10 text-warning-text'
128
149
  : stop === 'complete'
@@ -130,6 +151,15 @@ export function GoalBanner({ record, running, continuation, evaluating, pending,
130
151
  : stop
131
152
  ? 'bg-warning/10 text-warning-text'
132
153
  : 'bg-ink/8 text-ink/60';
154
+ const phaseTitle = stop
155
+ ? STOP_UI[stop].title
156
+ : paused
157
+ ? 'Goal is paused'
158
+ : loopActive
159
+ ? 'The goal loop is deciding whether to continue'
160
+ : running
161
+ ? 'Goal is waiting for the current turn to finish'
162
+ : 'Goal is waiting for its next turn';
133
163
 
134
164
  const tokens =
135
165
  record.tokenBudget !== undefined
@@ -145,13 +175,11 @@ export function GoalBanner({ record, running, continuation, evaluating, pending,
145
175
  // the background was only ever separation.
146
176
  className="flex items-center gap-2 px-3 py-1.5 text-[11px]"
147
177
  data-goal-banner={record.status}
178
+ data-goal-phase={phase}
148
179
  data-goal-stop={stop ?? undefined}
149
180
  >
150
- <span
151
- className={`shrink-0 ${tone}`}
152
- title={stop ? STOP_UI[stop].title : `Goal is ${record.status}`}
153
- >
154
- {busy ? (
181
+ <span className={`shrink-0 ${tone}`} title={phaseTitle}>
182
+ {loopActive ? (
155
183
  <Loader2 size={12} className="animate-spin" />
156
184
  ) : stop === 'complete' ? (
157
185
  <CheckCircle2 size={12} />
@@ -163,7 +191,7 @@ export function GoalBanner({ record, running, continuation, evaluating, pending,
163
191
  </span>
164
192
 
165
193
  <span className={`shrink-0 rounded-full px-1.5 py-px font-mono text-[10px] uppercase tracking-wider ${badge}`}>
166
- {paused ? record.status : stop ? STOP_UI[stop].badge : record.status}
194
+ {phase}
167
195
  </span>
168
196
 
169
197
  <span className="min-w-0 flex-1 truncate text-ink/75" title={record.objective}>
@@ -180,14 +208,12 @@ export function GoalBanner({ record, running, continuation, evaluating, pending,
180
208
  <span aria-live="polite" className={`shrink-0 font-mono text-[10px] ${stopped ? tone : 'text-ink/45'}`}>
181
209
  {stop && continuation ? (
182
210
  <span title={STOP_UI[stop].title}>{stopChip(stop, continuation)}</span>
211
+ ) : loopActive ? (
212
+ <span title="The auditor is checking the turn that just ended">evaluating</span>
183
213
  ) : continuation ? (
184
214
  <span title="Automatic goal turns taken this session">
185
215
  turn {continuation.turn}/{continuation.maxTurns}
186
216
  </span>
187
- ) : evaluating ? (
188
- <span title="The auditor is checking the turn that just ended">evaluating</span>
189
- ) : running ? (
190
- <CircleDot size={11} className="animate-pulse" />
191
217
  ) : null}
192
218
  </span>
193
219
 
@@ -24,7 +24,8 @@ import type { ComposerModes } from '@/client/components/workspace/chat-timeline/
24
24
 
25
25
  export interface GoalSurfacesProps {
26
26
  modes?: ComposerModes;
27
- /** The chat-level run flag (`chatRunning`), for the strip's spinner. */
27
+ /** The chat-level run flag (`chatRunning`): the strip waits while it is true,
28
+ * and only the goal loop's own window (`goalEvaluating`) reads as active. */
28
29
  running: boolean;
29
30
  /** Whether the modal is open, owned by the composer. */
30
31
  open: boolean;
@@ -87,6 +87,27 @@ describe('ModeToggles', () => {
87
87
  expect(el.querySelector('[aria-label="Set a goal"]')?.getAttribute('aria-pressed')).toBe('false');
88
88
  });
89
89
 
90
+ test('the phone arrangement boxes the chips like the action cluster', () => {
91
+ const el = paint({ iconOnly: true });
92
+ for (const label of ['Enter plan mode', 'Set a goal']) {
93
+ const chip = el.querySelector(`[aria-label="${label}"]`) as HTMLElement | null;
94
+ expect(chip).not.toBeNull();
95
+ // The Goal chip's box has to match Stop/Send's `actionBox`, or its glyph
96
+ // sits 2px inside the column they share on a fine-pointer phone shell.
97
+ expect(chip?.classList.contains('w-8')).toBe(true);
98
+ expect(chip?.classList.contains('h-8')).toBe(true);
99
+ }
100
+ // The pair is spaced like the row's other controls, not 2px apart.
101
+ expect((el.firstElementChild as HTMLElement).className).toContain('gap-1.5');
102
+ });
103
+
104
+ test('a labelled desktop chip keeps its content width', () => {
105
+ const el = paint();
106
+ const plan = el.querySelector('[aria-label="Enter plan mode"]') as HTMLElement | null;
107
+ expect(plan?.classList.contains('w-8')).toBe(false);
108
+ expect((el.firstElementChild as HTMLElement).className).toContain('gap-0.5');
109
+ });
110
+
90
111
  test('Plan is hidden while Goal is on, because omp refuses both at once', () => {
91
112
  const el = paint({ planAvailable: false, goal: true });
92
113
  expect(el.querySelector('[aria-label="Enter plan mode"]')).toBeNull();
@@ -94,6 +115,20 @@ describe('ModeToggles', () => {
94
115
  expect(el.querySelector('[aria-label="Manage the active goal"]')).not.toBeNull();
95
116
  });
96
117
 
118
+ test('the active fill shrink-wraps the glyph, not the 44px touch target', () => {
119
+ // `.tap-chip` is 44x44 under `(pointer: coarse)`. Painting `bg-ink` on that
120
+ // button turned two 12px glyphs into two ink slabs in the phone's attachment
121
+ // row (measured at 390x844); the paint belongs on the inner pill so the hit
122
+ // area can keep the floor without becoming the visual.
123
+ const el = paint({ plan: true, goal: true });
124
+ for (const label of ['Leave plan mode', 'Manage the active goal']) {
125
+ const button = el.querySelector(`[aria-label="${label}"]`) as HTMLButtonElement | null;
126
+ expect(button).not.toBeNull();
127
+ expect(button?.className).not.toContain('bg-ink');
128
+ expect((button?.firstElementChild as HTMLElement | null)?.className).toContain('bg-ink');
129
+ }
130
+ });
131
+
97
132
  test('Goal is not offered where the harness cannot express one', () => {
98
133
  // A non-omp ACP agent has no `/kabmo-mode` extension and no selector that
99
134
  // can carry an objective, so the button's only outcome is a refusal — the
@@ -27,6 +27,16 @@
27
27
  * `@[420px]` copy beside it is how the labels came on at a width where the row
28
28
  * had no room for them.
29
29
  *
30
+ * ## Why the fill lives on an inner span
31
+ *
32
+ * `.tap-chip` is a real 44x44 target under `(pointer: coarse)` (see
33
+ * `tailwind.css`). Painting the active state on the BUTTON therefore turned a
34
+ * 12px glyph into a 44x44 ink block: two of them sat side by side in the
35
+ * phone's attachment row with 2px between, and the pressed state read as a
36
+ * slab, not a chip. The hit area must keep the touch floor; the paint must
37
+ * shrink-wrap the content inside it. On a fine pointer the inner span is the
38
+ * button's whole box, so the desktop measurement is unchanged.
39
+ *
30
40
  * ## Why Goal opens a modal
31
41
  *
32
42
  * Plan mode is a boolean: on means "explore before editing". Goal mode is not —
@@ -35,11 +45,13 @@
35
45
  * it is off, and offers pause/resume/drop when it is on.
36
46
  */
37
47
 
38
- import { ClipboardList, Target } from 'lucide-preact';
48
+ import { Target } from 'lucide-preact';
39
49
  import type { GoalRecord } from '@kabmo-labs/kabmo-omp/mode/types';
40
50
  import type { ArmedGoal } from '@kabmo-labs/kabmo-omp/mode/actions';
41
51
  import type { SessionModeState } from '@kabmo-labs/kabmo-harness/session-modes';
42
52
  import { SessionModeDropdown } from '@/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown';
53
+ import { ComposerModeIcon } from '@/client/components/workspace/chat-timeline/chat-input/mode-icons';
54
+ import { actionBox } from '@/client/components/workspace/chat-timeline/chat-input/action-base';
43
55
 
44
56
  export interface ModeTogglesProps {
45
57
  plan: boolean;
@@ -96,8 +108,13 @@ export function ModeToggles({
96
108
  // More than one mode: the dropdown can express every value, including plan,
97
109
  // so the single-purpose Plan button would be a second control for one item.
98
110
  const hasModeMenu = Boolean(mode && mode.values.length > 1 && onSelectMode);
111
+ // On the phone arrangement each chip takes the action cluster's own box, so
112
+ // the Goal chip's glyph lands on the Stop/Send column instead of 2px inside
113
+ // it, and the pair is spaced like the row's other controls. Labels keep
114
+ // their content width on the desktop toolbar.
115
+ const chipBox = iconOnly ? actionBox(true) : '';
99
116
  return (
100
- <div className="flex items-center gap-0.5">
117
+ <div className={`flex items-center ${iconOnly ? 'gap-1.5' : 'gap-0.5'}`}>
101
118
  {hasModeMenu && mode && onSelectMode && (
102
119
  <SessionModeDropdown mode={mode} pending={pending} onSelect={onSelectMode} iconOnly={iconOnly} />
103
120
  )}
@@ -108,12 +125,14 @@ export function ModeToggles({
108
125
  aria-pressed={plan}
109
126
  aria-label={plan ? 'Leave plan mode' : 'Enter plan mode'}
110
127
  title={plan ? 'Plan mode is on — the agent explores before editing' : 'Plan mode: explore and draft before any edit'}
111
- className={`tap-chip flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors cursor-pointer ${
112
- plan ? 'bg-ink text-canvas' : 'text-muted hover:bg-ink/5'
113
- } ${pending ? 'opacity-60' : ''}`}
128
+ className={`tap-chip ${chipBox} flex items-center justify-center rounded transition-colors cursor-pointer ${pending ? 'opacity-60' : ''}`}
114
129
  >
115
- <ClipboardList size={12} className={plan ? '' : 'text-ink/60'} />
116
- {!iconOnly && <span className="whitespace-nowrap">Plan</span>}
130
+ <span className={`flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors ${
131
+ plan ? 'bg-ink text-canvas' : 'text-muted hover:bg-ink/5'
132
+ }`}>
133
+ <ComposerModeIcon kind="plan" size={12} className={plan ? '' : 'text-ink/60'} />
134
+ {!iconOnly && <span className="whitespace-nowrap">Plan</span>}
135
+ </span>
117
136
  </button>
118
137
  )}
119
138
 
@@ -127,12 +146,14 @@ export function ModeToggles({
127
146
  aria-pressed={goal || Boolean(goalArm)}
128
147
  aria-label={goalArm ? 'Edit the armed goal' : goal ? 'Manage the active goal' : 'Set a goal'}
129
148
  title={goalArm ? 'Goal armed: it starts with your next message' : goalTitle(goal, goalRecord)}
130
- className={`tap-chip flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors cursor-pointer ${
131
- goal ? 'bg-ink text-canvas' : goalArm ? 'border border-dashed border-ink/30 text-muted' : 'text-muted hover:bg-ink/5'
132
- } ${pending ? 'opacity-60' : ''}`}
149
+ className={`tap-chip ${chipBox} flex items-center justify-center rounded transition-colors cursor-pointer ${pending ? 'opacity-60' : ''}`}
133
150
  >
134
- <Target size={12} className={goal ? '' : 'text-ink/60'} />
135
- {!iconOnly && <span className="whitespace-nowrap">Goal</span>}
151
+ <span className={`flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors ${
152
+ goal ? 'bg-ink text-canvas' : goalArm ? 'border border-dashed border-ink/30 text-muted' : 'text-muted hover:bg-ink/5'
153
+ }`}>
154
+ <Target size={12} className={goal ? '' : 'text-ink/60'} />
155
+ {!iconOnly && <span className="whitespace-nowrap">Goal</span>}
156
+ </span>
136
157
  </button>
137
158
  )}
138
159
  </div>
@@ -91,4 +91,28 @@ describe('SessionModeDropdown', () => {
91
91
  const trigger = el.querySelector('button[aria-haspopup="listbox"]');
92
92
  expect(trigger?.getAttribute('aria-label')).toBe('Session mode: Mode');
93
93
  });
94
+
95
+ test('Plan and Build name themselves with their own glyphs', async () => {
96
+ const el = await mount(
97
+ {
98
+ currentValue: 'plan',
99
+ values: [
100
+ { value: 'build', name: 'Build' },
101
+ { value: 'plan', name: 'Plan' },
102
+ { value: 'architect', name: 'architect' },
103
+ ],
104
+ },
105
+ () => {},
106
+ );
107
+ const trigger = el.querySelector('button[aria-haspopup="listbox"]') as HTMLButtonElement;
108
+ expect(trigger.querySelector('[data-mode-icon="plan"]')).not.toBeNull();
109
+
110
+ await act(async () => { trigger.click(); });
111
+ const rows = [...document.body.querySelectorAll('[role="option"]')];
112
+ expect(rows.map((row) => row.querySelector('[data-mode-icon]')?.getAttribute('data-mode-icon'))).toEqual([
113
+ 'build',
114
+ 'plan',
115
+ 'workflow',
116
+ ]);
117
+ });
94
118
  });