@kabmo-labs/kabmo 0.58.0 → 0.58.1

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 (216) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +457 -444
  3. package/dist/client/static/js/{Body-karkrzkc.js → Body-ysmhxbvk.js} +3 -3
  4. package/dist/client/static/js/{CsvGrid-j03knmbe.js → CsvGrid-w90pxyn2.js} +1 -1
  5. package/dist/client/static/js/{DocxView-e8408vzs.js → DocxView-evxn6kaq.js} +1 -1
  6. package/dist/client/static/js/{DrawioView-fj4mfzch.js → DrawioView-tmdevwf4.js} +1 -1
  7. package/dist/client/static/js/{HtmlPreview-9g8xwzgw.js → HtmlPreview-bpsn2z9p.js} +1 -1
  8. package/dist/client/static/js/{ImageView-sz4fzz9k.js → ImageView-ssazqckj.js} +1 -1
  9. package/dist/client/static/js/{LayoutWrapper-q6q4h04a.js → LayoutWrapper-qwpfq4dq.js} +2 -2
  10. package/dist/client/static/js/MergeDiffView-en6aazw8.js +1 -0
  11. package/dist/client/static/js/{Modal-ahecatp5.js → Modal-zjnhj9nb.js} +19 -19
  12. package/dist/client/static/js/{PdfView-8jtdx5hd.js → PdfView-txxn6qff.js} +1 -1
  13. package/dist/client/static/js/{SessionsView-jwp8xvw5.js → SessionsView-eryjtmb2.js} +1 -1
  14. package/dist/client/static/js/{SheetView-hwx8s864.js → SheetView-52b33e6f.js} +1 -1
  15. package/dist/client/static/js/{SvgPreview-ete36nzv.js → SvgPreview-hrk4pfm1.js} +1 -1
  16. package/dist/client/static/js/{abnfDiagram-O67JEVCF-7nsqzz6z.js → abnfDiagram-O67JEVCF-at77sybc.js} +1 -1
  17. package/dist/client/static/js/architecture-7GRP2DOG-v05ap4e3.js +1 -0
  18. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-xvpkfq2f.js → architectureDiagram-NJMV4G6O-raw33jgg.js} +3 -3
  19. package/dist/client/static/js/{astro-rsrqgjjx.js → astro-qha7sceh.js} +1 -1
  20. package/dist/client/static/js/{blockDiagram-BEXU5L5S-0saahcs6.js → blockDiagram-BEXU5L5S-b6e90fbk.js} +6 -6
  21. package/dist/client/static/js/{c4Diagram-YGBWAQC7-ktpqnb4a.js → c4Diagram-YGBWAQC7-msg9y1c6.js} +2 -2
  22. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-x67cz3ms.js → classDiagram-v2-NBCMYWYE-jmrd1h8r.js} +5 -5
  23. package/dist/client/static/js/{cose-bilkent-JH36ORCC-9wzmhkz8.js → cose-bilkent-JH36ORCC-na65ebq3.js} +1 -1
  24. package/dist/client/static/js/css-q2k6afe3.js +1 -0
  25. package/dist/client/static/js/cynefin-OW5HDTMX-sqv0ze38.js +1 -0
  26. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-dmmgmv99.js → cynefinDiagram-VND7K2PF-9xkkw71m.js} +1 -1
  27. package/dist/client/static/js/{dagre-6A5THRUB-ygkkms1t.js → dagre-6A5THRUB-p59f19tv.js} +2 -2
  28. package/dist/client/static/js/{diagram-22UHCM2B-qxj0pqb4.js → diagram-22UHCM2B-2e2rcvn7.js} +8 -8
  29. package/dist/client/static/js/{diagram-3UASUU5V-77k8w5dt.js → diagram-3UASUU5V-r9ds8vgr.js} +2 -2
  30. package/dist/client/static/js/{diagram-ATOU4E4O-m0h86vf4.js → diagram-ATOU4E4O-jgwxv7v8.js} +3 -3
  31. package/dist/client/static/js/{diagram-CDSNMT55-5v28kaeg.js → diagram-CDSNMT55-20m35eqq.js} +4 -4
  32. package/dist/client/static/js/{diagram-MLGK6HIB-zgcg9gaz.js → diagram-MLGK6HIB-vt3kxt2m.js} +1 -1
  33. package/dist/client/static/js/{diagram-MPIPVDR6-10c9s6e6.js → diagram-MPIPVDR6-c47rgxf1.js} +1 -1
  34. package/dist/client/static/js/{dockerfile-dr9sdsqp.js → dockerfile-gtcyey0q.js} +1 -1
  35. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-mz4022dz.js → ebnfDiagram-ZINNZB2B-aszw3xy3.js} +1 -1
  36. package/dist/client/static/js/{elixir-3dy25ex8.js → elixir-w92v180e.js} +1 -1
  37. package/dist/client/static/js/{elk-276RUBZZ-ccerbsag.js → elk-276RUBZZ-gbvr3gry.js} +1 -1
  38. package/dist/client/static/js/{erDiagram-OPXOYQCR-a8vjyrrw.js → erDiagram-OPXOYQCR-1hqca8qe.js} +2 -2
  39. package/dist/client/static/js/eventmodeling-NTZA5JFV-t4dzf5s7.js +1 -0
  40. package/dist/client/static/js/flowDiagram-KWPJA3E3-c16xmjyv.js +1 -0
  41. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-sz1g29fp.js → ganttDiagram-FUAMR5RP-07v22te5.js} +2 -2
  42. package/dist/client/static/js/gitGraph-4MIJSDKK-0jq8y0qd.js +1 -0
  43. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-efqk42q0.js → gitGraphDiagram-X574FWY7-y068jtz9.js} +8 -8
  44. package/dist/client/static/js/graphql-qx4tt6ze.js +1 -0
  45. package/dist/client/static/js/html-5e0g8664.js +1 -0
  46. package/dist/client/static/js/{index-gw4c5n3a.js → index-007sewcn.js} +1 -1
  47. package/dist/client/static/js/{index-qbqm3c91.js → index-1e0rt7c6.js} +2 -2
  48. package/dist/client/static/js/{index-6qqsy78z.js → index-1e710snk.js} +1 -1
  49. package/dist/client/static/js/{index-kc5yt2cd.js → index-2s17netq.js} +2 -2
  50. package/dist/client/static/js/{index-7s4dge1z.js → index-374xq5a4.js} +1 -1
  51. package/dist/client/static/js/index-4ddgpqm0.css +1 -0
  52. package/dist/client/static/js/{index-6h46r2de.js → index-5g2j626a.js} +1 -1
  53. package/dist/client/static/js/{index-5tp3emtg.js → index-5hvt233n.js} +1 -1
  54. package/dist/client/static/js/{index-ssepzdaz.js → index-5xxbbzqa.js} +5 -5
  55. package/dist/client/static/js/{index-jnxmvxb8.js → index-7sq6cjt1.js} +11 -11
  56. package/dist/client/static/js/{index-q0k1am0g.js → index-80kx6dm6.js} +2 -2
  57. package/dist/client/static/js/{index-2f6psebk.js → index-8d8ce00v.js} +1 -1
  58. package/dist/client/static/js/{index-gqsnyh8k.js → index-94d416ee.js} +1 -1
  59. package/dist/client/static/js/{index-2a0b9ya2.js → index-an7fq7f6.js} +1 -1
  60. package/dist/client/static/js/{index-6ey6y9em.js → index-azz46nwc.js} +2 -2
  61. package/dist/client/static/js/{index-bkwax812.js → index-c9aqx3ht.js} +1 -1
  62. package/dist/client/static/js/{index-rr79n77k.js → index-cc7qbfvn.js} +155 -148
  63. package/dist/client/static/js/{index-wnk9k57k.js → index-cmjyet7w.js} +50 -50
  64. package/dist/client/static/js/{index-f31c6jg8.js → index-cpp43af3.js} +8 -8
  65. package/dist/client/static/js/{index-dz18nn65.js → index-dxq1tbwm.js} +1 -1
  66. package/dist/client/static/js/{index-8aqjj2x2.js → index-e0kahttb.js} +1 -1
  67. package/dist/client/static/js/{index-ts8rhd06.js → index-e4nge3f4.js} +1 -1
  68. package/dist/client/static/js/{index-k4qshngy.js → index-f27wvdky.js} +3 -3
  69. package/dist/client/static/js/{index-7ma44af3.js → index-f61c25vn.js} +1 -1
  70. package/dist/client/static/js/{index-nzq51nbb.js → index-fe92hqmb.js} +5 -5
  71. package/dist/client/static/js/{index-k56patms.js → index-fv7nybnf.js} +2 -2
  72. package/dist/client/static/js/{index-xfyxmaj1.js → index-gqrt766t.js} +44 -44
  73. package/dist/client/static/js/{index-mkp3gwag.js → index-hb7a7m9m.js} +1 -1
  74. package/dist/client/static/js/{index-qkcmspxq.js → index-j830qk07.js} +1 -1
  75. package/dist/client/static/js/{index-6ac860yz.js → index-kzzvrqnv.js} +1 -1
  76. package/dist/client/static/js/{index-x7h04xzf.js → index-m5n0zsft.js} +1 -1
  77. package/dist/client/static/js/{index-q5q8a3qn.js → index-medk4f18.js} +1 -1
  78. package/dist/client/static/js/{index-tnxp90ac.js → index-nptbz7sv.js} +1 -1
  79. package/dist/client/static/js/{index-r1wrke3j.js → index-qefssj0m.js} +1 -1
  80. package/dist/client/static/js/{index-mpyd7qxj.js → index-r8d4bk86.js} +2 -2
  81. package/dist/client/static/js/{index-vf01q99d.js → index-rqt8mem9.js} +2 -2
  82. package/dist/client/static/js/{index-zh550byg.js → index-s4dpkds5.js} +1 -1
  83. package/dist/client/static/js/index-s9k82stc.js +2 -0
  84. package/dist/client/static/js/{index-xygk0v3e.js → index-skwem10a.js} +2 -2
  85. package/dist/client/static/js/{index-k1576e2m.js → index-tv9rn2nd.js} +1 -1
  86. package/dist/client/static/js/{index-dqf0srrp.js → index-vny4ymjf.js} +2 -2
  87. package/dist/client/static/js/{index-w5j1wgcz.js → index-vw8b29ek.js} +1 -1
  88. package/dist/client/static/js/{index-e42ys2q3.js → index-wn28m9h7.js} +7 -7
  89. package/dist/client/static/js/{index-tc07gd33.js → index-wxqcnsrq.js} +2 -2
  90. package/dist/client/static/js/{index-j863hg0d.js → index-xmg1x6zv.js} +6 -6
  91. package/dist/client/static/js/{index-t71k3b28.js → index-zhgh7a31.js} +1 -1
  92. package/dist/client/static/js/{index-vb5a3g01.js → index-zs7kw0be.js} +3 -3
  93. package/dist/client/static/js/info-A6RAGUB7-szttx3v5.js +1 -0
  94. package/dist/client/static/js/{infoDiagram-VRGFBTTK-rykcacj5.js → infoDiagram-VRGFBTTK-1x83h4k4.js} +2 -2
  95. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-rj752kd8.js → ishikawaDiagram-OU5B5YK6-et6z3c28.js} +2 -2
  96. package/dist/client/static/js/javascript-av46zx4c.js +1 -0
  97. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-mtetwn6f.js → journeyDiagram-ZHPQQLJL-sw669e7a.js} +3 -3
  98. package/dist/client/static/js/{julia-mxe3pnz3.js → julia-z14p8jsx.js} +1 -1
  99. package/dist/client/static/js/{kanban-definition-PNTS6WVX-4h5pw5mm.js → kanban-definition-PNTS6WVX-aqxg95kx.js} +7 -7
  100. package/dist/client/static/js/{mermaid.core-bs542jma.js → mermaid.core-6cgqsgcf.js} +3 -3
  101. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-67s4xy7h.js → mindmap-definition-NLK3R4M7-530anpc4.js} +4 -4
  102. package/dist/client/static/js/one-dark-pro-9hnhtkpr.js +1 -0
  103. package/dist/client/static/js/one-light-2n5y8592.js +1 -0
  104. package/dist/client/static/js/packet-AYTQ26CC-401149bv.js +1 -0
  105. package/dist/client/static/js/{pegDiagram-GJSIUBJH-qykb6ssk.js → pegDiagram-GJSIUBJH-5zar6hvy.js} +1 -1
  106. package/dist/client/static/js/{perl-a8eeaqkn.js → perl-1na2x6yd.js} +1 -1
  107. package/dist/client/static/js/{php-6gq92zt8.js → php-x75tt7w3.js} +1 -1
  108. package/dist/client/static/js/pie-WAS4IAKB-bgfv8tfz.js +1 -0
  109. package/dist/client/static/js/{pieDiagram-5QR66LMP-mymrrvck.js → pieDiagram-5QR66LMP-3bx8syvw.js} +2 -2
  110. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-6f8ahd40.js → quadrantDiagram-O4NWA36T-yaarpr2e.js} +2 -2
  111. package/dist/client/static/js/radar-RG4KPBEZ-pw720590.js +1 -0
  112. package/dist/client/static/js/railroad-74A4TZTK-n2a30ngs.js +1 -0
  113. package/dist/client/static/js/railroad-abnf-HS5TGJTU-rn5rx9qt.js +1 -0
  114. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-t4yryhtd.js +1 -0
  115. package/dist/client/static/js/railroad-peg-WCYAUIDC-c4ebgvrr.js +1 -0
  116. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-c3habpvw.js → railroadDiagram-XR7U4H2S-ag41q4nt.js} +1 -1
  117. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-nysqy6te.js → requirementDiagram-PLB6GJNP-g8sr48h4.js} +4 -4
  118. package/dist/client/static/js/{ruby-mc826p2e.js → ruby-3h22qahv.js} +1 -1
  119. package/dist/client/static/js/{rust-m4f4vpvn.js → rust-r27demr5.js} +1 -1
  120. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-s5dtfp3z.js → sankeyDiagram-IPEJSGJF-t1wbd1hh.js} +1 -1
  121. package/dist/client/static/js/{scss-9wz47c6t.js → scss-c04ezwnn.js} +1 -1
  122. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-bb3yp049.js → sequenceDiagram-PO4LG4MO-407mjqty.js} +5 -5
  123. package/dist/client/static/js/{sizeCapture-INFHLROL-0m2msee7.js → sizeCapture-INFHLROL-w38zb9ky.js} +1 -1
  124. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-cd0qgj6t.js → stateDiagram-v2-GCMORJYK-4cvgymkc.js} +3 -3
  125. package/dist/client/static/js/{svelte-5vrwkc13.js → svelte-egg3x4tw.js} +1 -1
  126. package/dist/client/static/js/{swimlanes-2SLR337P-rpb01f7p.js → swimlanes-2SLR337P-w7ts2rzw.js} +1 -1
  127. package/dist/client/static/js/{swimlanesDiagram-TC7HE7FX-zx36y2c8.js → swimlanesDiagram-TC7HE7FX-v82nym6b.js} +1 -1
  128. package/dist/client/static/js/{timeline-definition-EJHVYXUP-tqw2e6y1.js → timeline-definition-EJHVYXUP-nq46nzy9.js} +4 -4
  129. package/dist/client/static/js/treeView-Q6P3EWNA-bxgt5yhm.js +1 -0
  130. package/dist/client/static/js/treemap-WGGIJYW6-hh3595m0.js +1 -0
  131. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-dhf4d5xg.js → usecaseDiagram-POWQR4AR-q144snzb.js} +22 -22
  132. package/dist/client/static/js/{vennDiagram-UO4OBE2U-ztkk79dv.js → vennDiagram-UO4OBE2U-2wemak2p.js} +5 -5
  133. package/dist/client/static/js/{vue-gmjnxjm3.js → vue-d7p4wv35.js} +1 -1
  134. package/dist/client/static/js/wardley-WFR3VGLG-6bza7h1b.js +1 -0
  135. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-ahre5tmv.js → wardleyDiagram-VNRHLVJA-bb2qvvgr.js} +2 -2
  136. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-vak2c50n.js → xychartDiagram-PMCCYNJV-9dr05fdq.js} +4 -4
  137. package/package.json +4 -4
  138. package/src/client/components/common/anchored-menu/index.tsx +11 -4
  139. package/src/client/components/common/session-row/TrailingSlot.tsx +6 -2
  140. package/src/client/components/common/session-row/index.tsx +32 -16
  141. package/src/client/components/common/session-row/session-row.test.tsx +56 -18
  142. package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +24 -3
  143. package/src/client/components/layout/session-sidebar/modern/workspace-header.test.tsx +20 -0
  144. package/src/client/components/workspace/chat-timeline/ChatOverlays.tsx +1 -0
  145. package/src/client/components/workspace/chat-timeline/NewChatModal.tsx +5 -0
  146. package/src/client/components/workspace/chat-timeline/OrchestrationNotice.tsx +81 -162
  147. package/src/client/components/workspace/chat-timeline/SystemNotice.tsx +7 -3
  148. package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +12 -4
  149. package/src/client/components/workspace/chat-timeline/ToolCallingSection.tsx +1 -0
  150. package/src/client/components/workspace/chat-timeline/UserTurn.test.tsx +24 -6
  151. package/src/client/components/workspace/chat-timeline/UserTurn.tsx +17 -4
  152. package/src/client/components/workspace/chat-timeline/block-chrome.test.tsx +16 -0
  153. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +66 -10
  154. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +103 -41
  155. package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +3 -1
  156. package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.test.tsx +2 -2
  157. package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +54 -35
  158. package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.test.tsx +110 -0
  159. package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +51 -32
  160. package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +62 -0
  161. package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +15 -3
  162. package/src/client/components/workspace/chat-timeline/chat-input/access-capability.test.tsx +151 -0
  163. package/src/client/components/workspace/chat-timeline/chat-input/modes-props.ts +5 -0
  164. package/src/client/components/workspace/chat-timeline/fork-preview.test.tsx +1 -1
  165. package/src/client/components/workspace/chat-timeline/target-picker/ParentSessionPicker.test.tsx +21 -5
  166. package/src/client/components/workspace/chat-timeline/target-picker/ParentSessionPicker.tsx +100 -71
  167. package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.test.tsx +9 -9
  168. package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +83 -66
  169. package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.test.tsx +3 -3
  170. package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.tsx +36 -15
  171. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ArtifactChip.tsx +7 -3
  172. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolRowActions.tsx +10 -2
  173. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Card.tsx +2 -2
  174. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Compact.tsx +11 -6
  175. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Minimal.tsx +2 -2
  176. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Trace.tsx +2 -2
  177. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.test.tsx +5 -3
  178. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.tsx +19 -12
  179. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/parity.test.tsx +50 -2
  180. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/props.ts +2 -0
  181. package/src/client/hooks/chat/timeline/access-ladder-wiring.test.ts +111 -0
  182. package/src/client/hooks/chat/timeline/access-ladder.test.ts +66 -0
  183. package/src/client/hooks/chat/timeline/access-ladder.ts +72 -0
  184. package/src/client/hooks/chat/timeline/access-mode.ts +11 -1
  185. package/src/client/hooks/chat/timeline/index.ts +4 -5
  186. package/src/client/hooks/chat/timeline/modes-contract.ts +10 -1
  187. package/src/client/hooks/chat/timeline/modes.ts +10 -2
  188. package/src/server/lib/realtime/topics/session-data.server.ts +6 -5
  189. package/src/server/lib/realtime/topics/session-data.test.ts +35 -0
  190. package/src/shared/lib/chat/orchestration/outcome-markdown.test.ts +57 -0
  191. package/src/shared/lib/chat/orchestration/outcome-markdown.ts +74 -0
  192. package/dist/client/static/js/MergeDiffView-b8f013ws.js +0 -1
  193. package/dist/client/static/js/architecture-7GRP2DOG-dc7zys46.js +0 -1
  194. package/dist/client/static/js/css-9gak6bze.js +0 -1
  195. package/dist/client/static/js/cynefin-OW5HDTMX-9fx59e89.js +0 -1
  196. package/dist/client/static/js/eventmodeling-NTZA5JFV-61d2ee91.js +0 -1
  197. package/dist/client/static/js/flowDiagram-KWPJA3E3-104ywb7w.js +0 -1
  198. package/dist/client/static/js/gitGraph-4MIJSDKK-zkb30q0t.js +0 -1
  199. package/dist/client/static/js/graphql-2ntm7jyh.js +0 -1
  200. package/dist/client/static/js/html-mt2yb43b.js +0 -1
  201. package/dist/client/static/js/index-f44k9k8d.css +0 -1
  202. package/dist/client/static/js/index-ver116ed.js +0 -2
  203. package/dist/client/static/js/info-A6RAGUB7-xxvyt8p8.js +0 -1
  204. package/dist/client/static/js/javascript-0mqgcvps.js +0 -1
  205. package/dist/client/static/js/one-dark-pro-541ed4b7.js +0 -1
  206. package/dist/client/static/js/one-light-nr79mykt.js +0 -1
  207. package/dist/client/static/js/packet-AYTQ26CC-cm8jeesg.js +0 -1
  208. package/dist/client/static/js/pie-WAS4IAKB-8b9xgcxv.js +0 -1
  209. package/dist/client/static/js/radar-RG4KPBEZ-fxr2x2mf.js +0 -1
  210. package/dist/client/static/js/railroad-74A4TZTK-5qd45xk1.js +0 -1
  211. package/dist/client/static/js/railroad-abnf-HS5TGJTU-6fa00vpk.js +0 -1
  212. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-pcbtg7tj.js +0 -1
  213. package/dist/client/static/js/railroad-peg-WCYAUIDC-r0fdhdtp.js +0 -1
  214. package/dist/client/static/js/treeView-Q6P3EWNA-9sn2h4ea.js +0 -1
  215. package/dist/client/static/js/treemap-WGGIJYW6-9fzms0pq.js +0 -1
  216. package/dist/client/static/js/wardley-WFR3VGLG-vy6rp5gp.js +0 -1
@@ -23,10 +23,11 @@
23
23
  * object from the row the user clicked to get here.
24
24
  */
25
25
 
26
- import { useMemo, useRef, useState } from 'preact/hooks';
26
+ import { useCallback, useMemo, useRef, useState } from 'preact/hooks';
27
27
  import { Check, ChevronDown, Folder, Plus } from 'lucide-preact';
28
- import { useOnClickOutside } from '@/client/hooks/ui/on-click-outside';
28
+ import { AnchoredMenu } from '@/client/components/common/anchored-menu';
29
29
  import { PickerSearch } from '@/client/components/common/picker-search';
30
+ import { anchorRectOf, type AnchorRect } from '@/shared/lib/ui/menu-anchor';
30
31
  import { getProjectIcon } from '@/shared/lib/workspace/project-icon';
31
32
  import { projectAccentStyle } from '@/shared/lib/workspace/project-accent';
32
33
  import { matchesPickerQuery } from '@/shared/lib/ui/picker-filter';
@@ -78,11 +79,27 @@ export function WorkspacePicker({
78
79
  }: WorkspacePickerProps) {
79
80
  const [open, setOpen] = useState(false);
80
81
  const [query, setQuery] = useState('');
81
- const containerRef = useRef<HTMLDivElement>(null);
82
- useOnClickOutside(containerRef, () => {
82
+ const [anchor, setAnchor] = useState<AnchorRect | null>(null);
83
+ const triggerRef = useRef<HTMLButtonElement>(null);
84
+ const close = useCallback(() => {
83
85
  setOpen(false);
84
86
  setQuery('');
85
- });
87
+ setAnchor(null);
88
+ }, []);
89
+ // The panel is PORTALLED (`AnchoredMenu`): the draft-target row is a scroller
90
+ // on a phone, and an `absolute bottom-full left-0` panel inside it could be
91
+ // clipped by the app shell and widen the row. `placeMenu` clamps it to the
92
+ // window instead.
93
+ const toggle = () => {
94
+ if (open) {
95
+ close();
96
+ return;
97
+ }
98
+ const trigger = triggerRef.current;
99
+ if (!trigger) return;
100
+ setAnchor(anchorRectOf(trigger));
101
+ setOpen(true);
102
+ };
86
103
 
87
104
  const selected = folders.find((candidate) => String(candidate.id) === String(selectedFolderId));
88
105
  const visible = useMemo(
@@ -96,22 +113,22 @@ export function WorkspacePicker({
96
113
  // across a project change would spawn the chat in a path this project
97
114
  // cannot resolve.
98
115
  onClearWorktree?.();
99
- setOpen(false);
100
- setQuery('');
116
+ close();
101
117
  };
102
118
 
103
119
  const label = workspaceLabel(folders, selectedFolderId);
104
120
 
105
121
  return (
106
- <div className="relative shrink-0" ref={containerRef}>
122
+ <div className="shrink-0">
107
123
  <button
124
+ ref={triggerRef}
108
125
  type="button"
109
126
  // Two triggers sit side by side, so each needs a name that says which
110
127
  // question it answers: "kabmo" and "main" alone are both ambiguous.
111
128
  aria-label={`Workspace: ${label}`}
112
129
  aria-haspopup="menu"
113
130
  aria-expanded={open}
114
- onClick={() => setOpen((value) => !value)}
131
+ onClick={toggle}
115
132
  className="tap-chip group flex items-center space-x-1.5 px-1.5 py-1 rounded-md text-xs font-medium text-muted hover:text-ink hover:bg-ink/5 focus-visible:bg-ink/5 transition-all cursor-pointer select-none"
116
133
  >
117
134
  {selected ? (
@@ -126,64 +143,64 @@ export function WorkspacePicker({
126
143
  />
127
144
  </button>
128
145
 
129
- {open && (
130
- <div
131
- role="menu"
132
- className="glass-popover absolute bottom-full left-0 mb-1.5 w-64 bg-paper border border-ink/10 rounded-lg shadow-lg z-50 flex flex-col overflow-hidden text-xs py-1"
133
- >
134
- <div className="px-3 py-1.5 text-[10px] uppercase tracking-wider text-ink/40 font-semibold border-b border-ink/5">
135
- Target Workspace
136
- </div>
137
- <PickerSearch value={query} onChange={setQuery} ariaLabel="Search workspaces" placeholder="Search workspaces…" />
138
- <div className="max-h-56 scrollbar-overlay-container py-1">
139
- {folders.length === 0 ? (
140
- <div className="px-3 py-2 text-ink/40 italic">No workspaces available</div>
141
- ) : visible.length === 0 ? (
142
- <div className="px-3 py-2 text-ink/40 italic">No match for “{query.trim()}”</div>
143
- ) : (
144
- visible.map((folder) => {
145
- const active = String(selectedFolderId) === String(folder.id);
146
- return (
147
- <button
148
- key={folder.id}
149
- type="button"
150
- role="menuitemradio"
151
- aria-checked={active}
152
- onClick={() => pick(folder)}
153
- className={`w-full text-left px-3 py-1.5 flex items-center justify-between transition-colors cursor-pointer ${
154
- active ? 'bg-ink/10 text-ink font-semibold' : 'text-ink/80 hover:bg-ink/5 hover:text-ink'
155
- }`}
156
- >
157
- <span className="flex items-center space-x-2 truncate pr-2">
158
- <WorkspaceMark folder={folder} size={12} />
159
- <span className="truncate font-medium">{folder.name}</span>
160
- </span>
161
- {active && <Check size={12} className="text-ink flex-shrink-0" />}
162
- </button>
163
- );
164
- })
165
- )}
166
- </div>
167
- {/* The dialog is the layout's, not this menu's: the picker only asks
168
- for it, so the action works with the dock collapsed or showing a
169
- plugin panel. */}
170
- <div className="border-t border-ink/5 pt-1">
171
- <button
172
- type="button"
173
- role="menuitem"
174
- onClick={() => {
175
- setOpen(false);
176
- setQuery('');
177
- requestNewWorkspace();
178
- }}
179
- className="w-full text-left px-3 py-1.5 flex items-center gap-2 text-ink/70 hover:bg-ink/5 hover:text-ink transition-colors cursor-pointer"
180
- >
181
- <Plus size={12} className="flex-shrink-0" />
182
- <span className="font-medium">Add new workspace</span>
183
- </button>
184
- </div>
146
+ <AnchoredMenu
147
+ anchor={open ? anchor : null}
148
+ role="menu"
149
+ ariaLabel="Target workspace"
150
+ className="w-64 max-w-[calc(100vw-1rem)] bg-paper border border-ink/10 rounded-lg shadow-lg flex flex-col text-xs py-1"
151
+ onClose={close}
152
+ >
153
+ <div className="px-3 py-1.5 text-[10px] uppercase tracking-wider text-ink/40 font-semibold border-b border-ink/5">
154
+ Target Workspace
155
+ </div>
156
+ <PickerSearch value={query} onChange={setQuery} ariaLabel="Search workspaces" placeholder="Search workspaces…" />
157
+ <div className="max-h-56 scrollbar-overlay-container py-1">
158
+ {folders.length === 0 ? (
159
+ <div className="px-3 py-2 text-ink/40 italic">No workspaces available</div>
160
+ ) : visible.length === 0 ? (
161
+ <div className="px-3 py-2 text-ink/40 italic">No match for “{query.trim()}”</div>
162
+ ) : (
163
+ visible.map((folder) => {
164
+ const active = String(selectedFolderId) === String(folder.id);
165
+ return (
166
+ <button
167
+ key={folder.id}
168
+ type="button"
169
+ role="menuitemradio"
170
+ aria-checked={active}
171
+ onClick={() => pick(folder)}
172
+ className={`w-full text-left px-3 py-1.5 flex items-center justify-between transition-colors cursor-pointer ${
173
+ active ? 'bg-ink/10 text-ink font-semibold' : 'text-ink/80 hover:bg-ink/5 hover:text-ink'
174
+ }`}
175
+ >
176
+ <span className="flex items-center space-x-2 truncate pr-2">
177
+ <WorkspaceMark folder={folder} size={12} />
178
+ <span className="truncate font-medium">{folder.name}</span>
179
+ </span>
180
+ {active && <Check size={12} className="text-ink flex-shrink-0" />}
181
+ </button>
182
+ );
183
+ })
184
+ )}
185
+ </div>
186
+ {/* The dialog is the layout's, not this menu's: the picker only asks
187
+ for it, so the action works with the dock collapsed or showing a
188
+ plugin panel. */}
189
+ <div className="border-t border-ink/5 pt-1">
190
+ <button
191
+ type="button"
192
+ role="menuitem"
193
+ onClick={() => {
194
+ close();
195
+ requestNewWorkspace();
196
+ }}
197
+ className="w-full text-left px-3 py-1.5 flex items-center gap-2 text-ink/70 hover:bg-ink/5 hover:text-ink transition-colors cursor-pointer"
198
+ >
199
+ <Plus size={12} className="flex-shrink-0" />
200
+ <span className="font-medium">Add new workspace</span>
201
+ </button>
185
202
  </div>
186
- )}
203
+ </AnchoredMenu>
187
204
  </div>
188
205
  );
189
206
  }
@@ -214,7 +214,7 @@ describe('WorktreePicker', () => {
214
214
  });
215
215
  await settle();
216
216
 
217
- const text = textOf(host);
217
+ const text = textOf(document.body);
218
218
  expect(text).toContain('Project root');
219
219
  expect(text).toContain('Quick worktree');
220
220
  expect(text).toContain('New worktree…');
@@ -243,7 +243,7 @@ describe('WorktreePicker', () => {
243
243
  });
244
244
  await settle();
245
245
 
246
- const rows = [...host.querySelectorAll('[role="menuitemradio"]')] as HTMLButtonElement[];
246
+ const rows = [...document.body.querySelectorAll('[role="menuitemradio"]')] as HTMLButtonElement[];
247
247
  // Root first, then the worktree.
248
248
  expect(rows.length).toBe(2);
249
249
  await act(async () => {
@@ -300,7 +300,7 @@ describe('WorktreePicker', () => {
300
300
  });
301
301
  await settle();
302
302
 
303
- const quick = [...host.querySelectorAll('[role="menuitem"]')].find((node) =>
303
+ const quick = [...document.body.querySelectorAll('[role="menuitem"]')].find((node) =>
304
304
  (node.textContent ?? '').includes('Quick worktree'),
305
305
  ) as HTMLButtonElement | undefined;
306
306
  expect(quick).toBeDefined();
@@ -23,10 +23,11 @@
23
23
  * picker chose, and this control only ever moves the second half.
24
24
  */
25
25
 
26
- import { useEffect, useMemo, useRef, useState } from 'preact/hooks';
26
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'preact/hooks';
27
27
  import { AlertTriangle, Check, ChevronDown, GitBranch } from 'lucide-preact';
28
- import { useOnClickOutside } from '@/client/hooks/ui/on-click-outside';
28
+ import { AnchoredMenu } from '@/client/components/common/anchored-menu';
29
29
  import { PickerSearch } from '@/client/components/common/picker-search';
30
+ import { anchorRectOf, type AnchorRect } from '@/shared/lib/ui/menu-anchor';
30
31
  import { matchesPickerQuery } from '@/shared/lib/ui/picker-filter';
31
32
  import { createWorktree, useWorktrees } from '@/client/hooks/workspace/worktree/index';
32
33
  import { NewWorktreeModal } from '@/client/components/workspace/worktree-modal/index';
@@ -75,8 +76,26 @@ export function WorktreePicker({ folders, selectedFolderId, target, setTarget, o
75
76
  const [query, setQuery] = useState('');
76
77
  const [creating, setCreating] = useState(false);
77
78
  const [dialogOpen, setDialogOpen] = useState(false);
78
- const containerRef = useRef<HTMLDivElement>(null);
79
- useOnClickOutside(containerRef, () => setOpen(false));
79
+ const [anchor, setAnchor] = useState<AnchorRect | null>(null);
80
+ const triggerRef = useRef<HTMLButtonElement>(null);
81
+ const close = useCallback(() => {
82
+ setOpen(false);
83
+ setAnchor(null);
84
+ }, []);
85
+ // Portalled for the same measured reason as the workspace and parent
86
+ // pickers: this chip can sit anywhere in the wrapped draft-target row, so an
87
+ // `absolute bottom-full left-0` panel ran past a phone's right edge and was
88
+ // clipped by the app shell. `placeMenu` clamps it inside the window.
89
+ const toggle = () => {
90
+ if (open) {
91
+ close();
92
+ return;
93
+ }
94
+ const trigger = triggerRef.current;
95
+ if (!trigger) return;
96
+ setAnchor(anchorRectOf(trigger));
97
+ setOpen(true);
98
+ };
80
99
 
81
100
  const folder = folders.find((candidate) => String(candidate.id) === String(selectedFolderId)) ?? null;
82
101
  const scopeRoot = folder?.project_path ?? null;
@@ -119,12 +138,12 @@ export function WorktreePicker({ folders, selectedFolderId, target, setTarget, o
119
138
 
120
139
  const pickRoot = () => {
121
140
  if (folderId !== null) setTarget({ folderId, worktreePath: null });
122
- setOpen(false);
141
+ close();
123
142
  };
124
143
 
125
144
  const pickWorktree = (worktreePath: string) => {
126
145
  if (folderId !== null) setTarget({ folderId, worktreePath });
127
- setOpen(false);
146
+ close();
128
147
  };
129
148
 
130
149
  /**
@@ -158,13 +177,14 @@ export function WorktreePicker({ folders, selectedFolderId, target, setTarget, o
158
177
  if (!scopeRoot || isRepo !== true) return null;
159
178
 
160
179
  return (
161
- <div className="relative shrink-0" ref={containerRef}>
180
+ <div className="shrink-0">
162
181
  <button
182
+ ref={triggerRef}
163
183
  type="button"
164
184
  aria-label={`Worktree: ${worktreeLabel(worktrees, target)}`}
165
185
  aria-haspopup="menu"
166
186
  aria-expanded={open}
167
- onClick={() => setOpen((value) => !value)}
187
+ onClick={toggle}
168
188
  className="tap-chip group flex items-center space-x-1.5 px-1.5 py-1 rounded-md text-xs font-medium text-muted hover:text-ink hover:bg-ink/5 focus-visible:bg-ink/5 transition-all cursor-pointer select-none"
169
189
  >
170
190
  {dirty > 0 ? (
@@ -183,11 +203,13 @@ export function WorktreePicker({ folders, selectedFolderId, target, setTarget, o
183
203
  />
184
204
  </button>
185
205
 
186
- {open && (
187
- <div
188
- role="menu"
189
- className="glass-popover absolute bottom-full left-0 mb-1.5 w-72 bg-paper border border-ink/10 rounded-lg shadow-lg z-50 flex flex-col overflow-hidden text-xs py-1"
190
- >
206
+ <AnchoredMenu
207
+ anchor={open ? anchor : null}
208
+ role="menu"
209
+ ariaLabel="Target worktree"
210
+ className="w-72 max-w-[calc(100vw-1rem)] bg-paper border border-ink/10 rounded-lg shadow-lg flex flex-col text-xs py-1"
211
+ onClose={close}
212
+ >
191
213
  <PickerSearch value={query} onChange={setQuery} ariaLabel="Search worktrees" placeholder="Search worktrees…" />
192
214
  <div className="px-3 py-1.5 text-[10px] uppercase tracking-wider text-ink/40 font-semibold border-b border-ink/5">
193
215
  Project root
@@ -279,8 +301,7 @@ export function WorktreePicker({ folders, selectedFolderId, target, setTarget, o
279
301
  })
280
302
  )}
281
303
  </div>
282
- </div>
283
- )}
304
+ </AnchoredMenu>
284
305
 
285
306
  <NewWorktreeModal
286
307
  isOpen={dialogOpen}
@@ -37,7 +37,7 @@ interface ArtifactText {
37
37
  }
38
38
 
39
39
  /** The chip + its reader modal, or null when the result was not spilled. */
40
- export function ArtifactChip({ tool }: { tool: ToolCallData }) {
40
+ export function ArtifactChip({ tool, isMobile = false }: { tool: ToolCallData; isMobile?: boolean }) {
41
41
  const ref = artifactRefOf(tool);
42
42
  const { sessionId } = useTimelineScope();
43
43
  const [open, setOpen] = useState(false);
@@ -61,10 +61,14 @@ export function ArtifactChip({ tool }: { tool: ToolCallData }) {
61
61
  : 'Read the full output'
62
62
  }
63
63
  aria-label="Read the full output"
64
- className="inline-flex shrink-0 cursor-pointer items-center gap-1 rounded-full bg-ink/5 px-2 py-0.5 text-[10px] font-semibold text-ink/60 transition-colors hover:bg-ink/10 hover:text-ink"
64
+ className={`inline-flex shrink-0 cursor-pointer items-center rounded-full bg-ink/5 py-0.5 text-[10px] font-semibold text-ink/60 transition-colors hover:bg-ink/10 hover:text-ink ${
65
+ isMobile ? 'px-1.5' : 'gap-1 px-2'
66
+ }`}
65
67
  >
66
68
  <FileText size={10} />
67
- Full output
69
+ {/* The phone row has no width for the word; the `aria-label` and the
70
+ tooltip still name the control. */}
71
+ {!isMobile && 'Full output'}
68
72
  </button>
69
73
  {open && (
70
74
  <ArtifactModal
@@ -25,7 +25,15 @@ import { ArtifactChip } from '@/client/components/workspace/chat-timeline/tool-r
25
25
  import { useTimelineScope } from '@/client/hooks/chat/timeline/scope';
26
26
  import { artifactRefOf } from '@/shared/lib/chat/tool/artifact';
27
27
 
28
- export function ToolRowActions({ tool, isReminder }: { tool: ToolCallData; isReminder: boolean }) {
28
+ export function ToolRowActions({
29
+ tool,
30
+ isReminder,
31
+ isMobile = false,
32
+ }: {
33
+ tool: ToolCallData;
34
+ isReminder: boolean;
35
+ isMobile?: boolean;
36
+ }) {
29
37
  const { sessionId } = useTimelineScope();
30
38
  // Nothing to say: render NOTHING, not an empty flex child. The card's action
31
39
  // slot and the line styles' row both space their children with a gap, so an
@@ -34,7 +42,7 @@ export function ToolRowActions({ tool, isReminder }: { tool: ToolCallData; isRem
34
42
 
35
43
  return (
36
44
  <span className="flex shrink-0 items-center gap-1.5">
37
- <ArtifactChip tool={tool} />
45
+ <ArtifactChip tool={tool} isMobile={isMobile} />
38
46
  {isReminder && (
39
47
  <span className="inline-flex items-center gap-1 rounded-full bg-error/10 px-2 py-0.5 text-[10px] font-semibold text-error-text">
40
48
  <Bell size={10} /> Reminder
@@ -20,7 +20,7 @@ import { ToolRowActions } from '@/client/components/workspace/chat-timeline/tool
20
20
  import { useToolView } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/tool-view';
21
21
  import type { ToolRowProps } from '@/client/components/workspace/chat-timeline/tool-renderers/styles/props';
22
22
 
23
- export const CardRow = memo(function CardRow({ tool, isOpen, onToggle, defaultExpanded = false }: ToolRowProps) {
23
+ export const CardRow = memo(function CardRow({ tool, isOpen, onToggle, defaultExpanded = false, isMobile = false }: ToolRowProps) {
24
24
  const view = useToolView(tool);
25
25
 
26
26
  const handleToggle = useCallback(() => {
@@ -29,7 +29,7 @@ export const CardRow = memo(function CardRow({ tool, isOpen, onToggle, defaultEx
29
29
 
30
30
  // A reminder envelope in the result is the runtime interrupting the call, not
31
31
  // its outcome — the header flags it beside the status badge.
32
- const actions = <ToolRowActions tool={tool} isReminder={view.isReminder} />;
32
+ const actions = <ToolRowActions tool={tool} isReminder={view.isReminder} isMobile={isMobile} />;
33
33
 
34
34
  return (
35
35
  <ToolCardShell
@@ -27,7 +27,7 @@ import { useToolView } from '@/client/components/workspace/chat-timeline/tool-re
27
27
  import { toolToggleLabel } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/toggle-label';
28
28
  import type { ToolRowProps } from '@/client/components/workspace/chat-timeline/tool-renderers/styles/props';
29
29
 
30
- export const CompactRow = memo(function CompactRow({ tool, isOpen, onToggle, defaultExpanded = false }: ToolRowProps) {
30
+ export const CompactRow = memo(function CompactRow({ tool, isOpen, onToggle, defaultExpanded = false, isMobile = false }: ToolRowProps) {
31
31
  const view = useToolView(tool);
32
32
  const [internalOpen, setInternalOpen] = useState(defaultExpanded);
33
33
  const isExpanded = view.alwaysExpanded || (isOpen ?? internalOpen);
@@ -73,14 +73,19 @@ export const CompactRow = memo(function CompactRow({ tool, isOpen, onToggle, def
73
73
  </span>
74
74
  )}
75
75
  </span>
76
- {view.hasBody && !view.alwaysExpanded && (
76
+ </button>
77
+ <ToolRowActions tool={tool} isReminder={view.isReminder} isMobile={isMobile} />
78
+ {/* Pointer-only repeat of the head's toggle, kept outside the button so
79
+ the chip can sit to its left (a button cannot nest in a button). The
80
+ head still owns `aria-expanded`, so this span is hidden from AT. */}
81
+ {view.hasBody && !view.alwaysExpanded && (
82
+ <span onClick={handleToggle} aria-hidden="true" className="shrink-0 cursor-pointer text-ink/30">
77
83
  <ChevronDown
78
84
  size={13}
79
- className={`shrink-0 text-ink/30 transition-transform duration-200 ${isExpanded ? 'rotate-180' : ''}`}
85
+ className={`transition-transform duration-200 ${isExpanded ? 'rotate-180' : ''}`}
80
86
  />
81
- )}
82
- </button>
83
- <ToolRowActions tool={tool} isReminder={view.isReminder} />
87
+ </span>
88
+ )}
84
89
  </div>
85
90
 
86
91
  {isExpanded && view.hasBody && (
@@ -23,7 +23,7 @@ import { useToolView } from '@/client/components/workspace/chat-timeline/tool-re
23
23
  import { toolToggleLabel } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/toggle-label';
24
24
  import type { ToolRowProps } from '@/client/components/workspace/chat-timeline/tool-renderers/styles/props';
25
25
 
26
- export const MinimalRow = memo(function MinimalRow({ tool, isOpen, onToggle, defaultExpanded = false }: ToolRowProps) {
26
+ export const MinimalRow = memo(function MinimalRow({ tool, isOpen, onToggle, defaultExpanded = false, isMobile = false }: ToolRowProps) {
27
27
  const view = useToolView(tool);
28
28
  const [internalOpen, setInternalOpen] = useState(defaultExpanded);
29
29
  const isExpanded = view.alwaysExpanded || (isOpen ?? internalOpen);
@@ -63,7 +63,7 @@ export const MinimalRow = memo(function MinimalRow({ tool, isOpen, onToggle, def
63
63
  {factsLine}
64
64
  </span>
65
65
  </button>
66
- <ToolRowActions tool={tool} isReminder={view.isReminder} />
66
+ <ToolRowActions tool={tool} isReminder={view.isReminder} isMobile={isMobile} />
67
67
  </div>
68
68
 
69
69
  {isExpanded && view.hasBody && (
@@ -25,7 +25,7 @@ import { useToolView } from '@/client/components/workspace/chat-timeline/tool-re
25
25
  import { toolToggleLabel } from '@/client/components/workspace/chat-timeline/tool-renderers/shared/toggle-label';
26
26
  import type { ToolRowProps } from '@/client/components/workspace/chat-timeline/tool-renderers/styles/props';
27
27
 
28
- export const TraceRow = memo(function TraceRow({ tool, isOpen, onToggle, defaultExpanded = false }: ToolRowProps) {
28
+ export const TraceRow = memo(function TraceRow({ tool, isOpen, onToggle, defaultExpanded = false, isMobile = false }: ToolRowProps) {
29
29
  const view = useToolView(tool);
30
30
  const [internalOpen, setInternalOpen] = useState(defaultExpanded);
31
31
  const isExpanded = view.alwaysExpanded || (isOpen ?? internalOpen);
@@ -83,7 +83,7 @@ export const TraceRow = memo(function TraceRow({ tool, isOpen, onToggle, default
83
83
  )}
84
84
  </span>
85
85
  </button>
86
- <ToolRowActions tool={tool} isReminder={view.isReminder} />
86
+ <ToolRowActions tool={tool} isReminder={view.isReminder} isMobile={isMobile} />
87
87
  </div>
88
88
 
89
89
  {isExpanded && view.hasBody && (
@@ -202,8 +202,10 @@ describe('the tui style', () => {
202
202
  const outcome = children.find((node) => node.textContent === '[done]');
203
203
  if (!outcome) throw new Error('no outcome span in the head');
204
204
  expect(outcome.className).toContain('ml-auto');
205
- // A second auto margin would split the free space and park it mid-row.
206
- expect(children.at(-1)?.className).not.toContain('ml-auto');
205
+ // A second auto margin would split the free space and park the outcome
206
+ // mid-row. The toggle glyph moved OUT of the head (the chip sits left of
207
+ // it), so uniqueness of the auto margin is the invariant, not its position.
208
+ expect(children.filter((node) => node.className.includes('ml-auto'))).toHaveLength(1);
207
209
  });
208
210
 
209
211
  test('a subject-less call (eval) still pins its outcome to the right edge', async () => {
@@ -213,7 +215,7 @@ describe('the tui style', () => {
213
215
  const outcome = children.find((node) => node.textContent === '[done]');
214
216
  if (!outcome) throw new Error('no outcome span in the head');
215
217
  expect(outcome.className).toContain('ml-auto');
216
- expect(children.at(-1)?.className).not.toContain('ml-auto');
218
+ expect(children.filter((node) => node.className.includes('ml-auto'))).toHaveLength(1);
217
219
  });
218
220
 
219
221
  test('title and subject are different colours', async () => {
@@ -115,7 +115,7 @@ function Facts({ facts, max = 4 }: { facts: ToolFact[]; max?: number }) {
115
115
  );
116
116
  }
117
117
 
118
- export const TuiRow = memo(function TuiRow({ tool, isOpen, onToggle, defaultExpanded = false }: ToolRowProps) {
118
+ export const TuiRow = memo(function TuiRow({ tool, isOpen, onToggle, defaultExpanded = false, isMobile = false }: ToolRowProps) {
119
119
  const view = useToolView(tool);
120
120
  const [internalOpen, setInternalOpen] = useState(defaultExpanded);
121
121
  const isExpanded = view.alwaysExpanded || (isOpen ?? internalOpen);
@@ -170,11 +170,11 @@ export const TuiRow = memo(function TuiRow({ tool, isOpen, onToggle, defaultExpa
170
170
  margins would SPLIT that space, parking the outcome mid-row. */}
171
171
  <span className={`ml-auto shrink-0 font-semibold ${tone}`}>{`[${status.word.toLowerCase()}]`}</span>
172
172
  {facts.length > 0 && (
173
- // Facts are the LAST thing on the line and they clip as a unit, so a
174
- // long `exit 1 · 412 B` can never widen the row past the panel —
175
- // measured at 390 the unbounded group ran the section to 459/362.
176
- // The whole group carries the tooltip with every fact, so a clipped
177
- // tail is still recoverable.
173
+ // Facts end the HEAD (the chip and the toggle glyph follow it) and
174
+ // they clip as a unit, so a long `exit 1 · 412 B` can never widen
175
+ // the row past the panel — measured at 390 the unbounded group ran
176
+ // the section to 459/362. The whole group carries the tooltip with
177
+ // every fact, so a clipped tail is still recoverable.
178
178
  <span
179
179
  className="min-w-0 shrink truncate font-mono text-[10px]"
180
180
  title={facts.map((fact) => fact.label).join(' · ')}
@@ -183,13 +183,20 @@ export const TuiRow = memo(function TuiRow({ tool, isOpen, onToggle, defaultExpa
183
183
  <Facts facts={facts} max={HEAD_FACT_LIMIT} />
184
184
  </span>
185
185
  )}
186
- {canToggle && (
187
- <span className="shrink-0 pl-1 text-ink/40" aria-hidden="true">
188
- {isExpanded ? '▾' : '▸'}
189
- </span>
190
- )}
191
186
  </button>
192
- <ToolRowActions tool={tool} isReminder={view.isReminder} />
187
+ <ToolRowActions tool={tool} isReminder={view.isReminder} isMobile={isMobile} />
188
+ {/* Pointer-only repeat of the head's toggle: the chip must sit LEFT of
189
+ the glyph, and a button cannot nest inside the row's own button. The
190
+ head still owns `aria-expanded`, so this span is hidden from AT. */}
191
+ {canToggle && (
192
+ <span
193
+ onClick={handleToggle}
194
+ aria-hidden="true"
195
+ className="shrink-0 cursor-pointer text-ink/40"
196
+ >
197
+ {isExpanded ? '▾' : '▸'}
198
+ </span>
199
+ )}
193
200
  </div>
194
201
 
195
202
  {isExpanded && view.hasBody && (
@@ -90,13 +90,13 @@ const ABORTED_TOOL: ToolCallData = {
90
90
  output: '',
91
91
  } as ToolCallData;
92
92
 
93
- async function mount(tools: ToolCallData[], style: string): Promise<HTMLElement> {
93
+ async function mount(tools: ToolCallData[], style: string, isMobile = false): Promise<HTMLElement> {
94
94
  primeKabmoSettings({ kabmo_settings: { toolRenderStyle: style } });
95
95
  await act(async () => {
96
96
  render(
97
97
  h(SessionStateProvider, {
98
98
  sessionId: `parity-${style}`,
99
- children: h(ToolCallingSection, { tools }),
99
+ children: h(ToolCallingSection, { tools, isMobile }),
100
100
  }),
101
101
  container,
102
102
  );
@@ -127,6 +127,54 @@ describe.each(['card', 'compact', 'trace', 'minimal', 'tui'])('style parity: %s'
127
127
  });
128
128
  });
129
129
 
130
+ describe('the full-output chip', () => {
131
+ test('sits left of the row toggle glyph in every style that draws one', async () => {
132
+ for (const [style, glyphOf] of [
133
+ ['card', (el: HTMLElement) => el.querySelector('.lucide-chevron-down')],
134
+ ['compact', (el: HTMLElement) => el.querySelector('.lucide-chevron-down')],
135
+ [
136
+ 'tui',
137
+ (el: HTMLElement) =>
138
+ Array.from(el.querySelectorAll('span')).find((node) => node.textContent === '▸'),
139
+ ],
140
+ ] as const) {
141
+ // Unmount first: preact reuses a same-type instance, so the mode hook
142
+ // would keep the style it read on the previous loop's first render.
143
+ render(null, container);
144
+ const el = await mount([ARTIFACT_TOOL], style);
145
+ expect(el.querySelector('[data-tool-section]')?.getAttribute('data-tool-style')).toBe(style);
146
+ const chip = el.querySelector('[aria-label="Read the full output"]') as HTMLElement;
147
+ const glyph = glyphOf(el) as HTMLElement | null | undefined;
148
+ expect(chip).not.toBeNull();
149
+ expect(glyph).toBeTruthy();
150
+ // Document order is the visual order on one flex line.
151
+ const nodes = Array.from(el.querySelectorAll('*'));
152
+ expect(nodes.indexOf(chip)).toBeLessThan(nodes.indexOf(glyph as Element));
153
+ }
154
+ });
155
+ });
156
+
157
+ describe('the full-output chip on mobile', () => {
158
+ test('drops the word in every style and keeps its accessible name', async () => {
159
+ for (const style of ['card', 'compact', 'trace', 'minimal', 'tui']) {
160
+ // Unmount first so the mode hook reads the style on a fresh render.
161
+ render(null, container);
162
+ const mobile = await mount([ARTIFACT_TOOL], style, true);
163
+ const chip = mobile.querySelector('[aria-label="Read the full output"]') as HTMLButtonElement;
164
+ expect(chip).not.toBeNull();
165
+ expect(chip.textContent?.trim()).toBe('');
166
+ expect(chip.querySelector('svg')).not.toBeNull();
167
+ expect(chip.getAttribute('title')).toContain('Read the full output');
168
+
169
+ render(null, container);
170
+ const desktop = await mount([ARTIFACT_TOOL], style);
171
+ expect(
172
+ desktop.querySelector('[aria-label="Read the full output"]')?.textContent,
173
+ ).toContain('Full output');
174
+ }
175
+ });
176
+ });
177
+
130
178
  describe('the trace node tone', () => {
131
179
  test('an aborted call takes the warning tone, not the muted one', async () => {
132
180
  const el = await mount([ABORTED_TOOL], 'trace');
@@ -19,4 +19,6 @@ export interface ToolRowProps {
19
19
  isOpen?: boolean;
20
20
  onToggle?: (toolId: string) => void;
21
21
  defaultExpanded?: boolean;
22
+ /** Phone layout: the row's out-of-body actions drop their text labels. */
23
+ isMobile?: boolean;
22
24
  }