@kabmo-labs/kabmo 0.61.0 → 0.62.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 (506) hide show
  1. package/README.md +53 -49
  2. package/dist/client/index.html +1 -1
  3. package/dist/client/index.js +1157 -825
  4. package/dist/client/static/js/{Body-ab8wswhm.js → Body-z6kstvk6.js} +3 -3
  5. package/dist/client/static/js/{CsvGrid-czssywvz.js → CsvGrid-f73c0s4e.js} +2 -2
  6. package/dist/client/static/js/{DocxView-ke0dwdmt.js → DocxView-a1pb7nsb.js} +3 -3
  7. package/dist/client/static/js/{DrawioView-a1whhy84.js → DrawioView-r61gcg24.js} +2 -2
  8. package/dist/client/static/js/{HtmlPreview-dr32dwjy.js → HtmlPreview-vt7j0b05.js} +1 -1
  9. package/dist/client/static/js/ImageView-4nhr5dtm.js +1 -0
  10. package/dist/client/static/js/LayoutWrapper-vwhy0vhj.js +2 -0
  11. package/dist/client/static/js/MergeDiffView-f4h9ss71.js +1 -0
  12. package/dist/client/static/js/Modal-cadmjkak.js +60 -0
  13. package/dist/client/static/js/{PdfView-2kdn91f9.js → PdfView-mppt2gkd.js} +1 -1
  14. package/dist/client/static/js/SessionsView-vvsaw9f0.js +1 -0
  15. package/dist/client/static/js/{SheetView-ettr9pdw.js → SheetView-5s9zfx9g.js} +9 -9
  16. package/dist/client/static/js/{SvgPreview-hzcejjry.js → SvgPreview-ff78xn3e.js} +1 -1
  17. package/dist/client/static/js/{abnfDiagram-O67JEVCF-kdmv4y72.js → abnfDiagram-O67JEVCF-p29sh3w2.js} +1 -1
  18. package/dist/client/static/js/architecture-7GRP2DOG-83w3kytq.js +1 -0
  19. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-qyrwaq0x.js → architectureDiagram-NJMV4G6O-nbpdyea3.js} +3 -3
  20. package/dist/client/static/js/{astro-yphdvdty.js → astro-qtfmc8x7.js} +1 -1
  21. package/dist/client/static/js/bash-wcy12qjx.js +1 -0
  22. package/dist/client/static/js/{blockDiagram-BEXU5L5S-tszxy2g7.js → blockDiagram-BEXU5L5S-t8xbexa6.js} +6 -6
  23. package/dist/client/static/js/c-vvantfth.js +1 -0
  24. package/dist/client/static/js/{c4Diagram-YGBWAQC7-0ye36hhv.js → c4Diagram-YGBWAQC7-9fwf2zxk.js} +3 -3
  25. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-szgk1shv.js → classDiagram-v2-NBCMYWYE-nbapgqbs.js} +4 -4
  26. package/dist/client/static/js/{cose-bilkent-JH36ORCC-0s9s4mmv.js → cose-bilkent-JH36ORCC-k54mmydp.js} +1 -1
  27. package/dist/client/static/js/cpp-5x63r6g0.js +1 -0
  28. package/dist/client/static/js/css-j2j6f03w.js +1 -0
  29. package/dist/client/static/js/css-qk59j6rj.js +1 -0
  30. package/dist/client/static/js/cynefin-OW5HDTMX-80z02zrj.js +1 -0
  31. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-664g28ze.js → cynefinDiagram-VND7K2PF-qdg32wah.js} +1 -1
  32. package/dist/client/static/js/{dagre-6A5THRUB-ga4rp1jx.js → dagre-6A5THRUB-qzshg1vs.js} +2 -2
  33. package/dist/client/static/js/{diagram-22UHCM2B-aagj46ty.js → diagram-22UHCM2B-197hemfa.js} +11 -11
  34. package/dist/client/static/js/{diagram-3UASUU5V-20qk6whk.js → diagram-3UASUU5V-236gnjr6.js} +1 -1
  35. package/dist/client/static/js/{diagram-ATOU4E4O-1vg1tfca.js → diagram-ATOU4E4O-vjgpyaaq.js} +3 -3
  36. package/dist/client/static/js/{diagram-CDSNMT55-90d6jrqs.js → diagram-CDSNMT55-ywvzcx7z.js} +4 -4
  37. package/dist/client/static/js/{diagram-MLGK6HIB-8je4z8m1.js → diagram-MLGK6HIB-9ey7ev7j.js} +1 -1
  38. package/dist/client/static/js/{diagram-MPIPVDR6-0kzpexsj.js → diagram-MPIPVDR6-vrqbb6r7.js} +2 -2
  39. package/dist/client/static/js/{dockerfile-5nrbr0ef.js → dockerfile-4nked309.js} +1 -1
  40. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-47yg36zx.js → ebnfDiagram-ZINNZB2B-hvnkevqy.js} +1 -1
  41. package/dist/client/static/js/{elixir-3nwnd9yw.js → elixir-3jvh6v4k.js} +1 -1
  42. package/dist/client/static/js/{elk-276RUBZZ-5hqp6r2d.js → elk-276RUBZZ-nej6yy1c.js} +1 -1
  43. package/dist/client/static/js/{erDiagram-OPXOYQCR-bt9te7r0.js → erDiagram-OPXOYQCR-ww453xcy.js} +5 -5
  44. package/dist/client/static/js/{erlang-p5c4n3t0.js → erlang-4fz73a1q.js} +1 -1
  45. package/dist/client/static/js/eventmodeling-NTZA5JFV-y9pq2709.js +1 -0
  46. package/dist/client/static/js/flowDiagram-KWPJA3E3-e6v7513q.js +1 -0
  47. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-kzc13swm.js → ganttDiagram-FUAMR5RP-abc5wy70.js} +3 -3
  48. package/dist/client/static/js/gitGraph-4MIJSDKK-fzaf9azs.js +1 -0
  49. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-bjf8aa3j.js → gitGraphDiagram-X574FWY7-4acqzj2h.js} +7 -7
  50. package/dist/client/static/js/graphql-hpkvdvk7.js +1 -0
  51. package/dist/client/static/js/html-x12gb1wk.js +1 -0
  52. package/dist/client/static/js/{index-v88m5sva.js → index-0g82ph6h.js} +2 -2
  53. package/dist/client/static/js/{index-1fmjhm2d.js → index-0w1jzang.js} +5 -5
  54. package/dist/client/static/js/{index-kj70d2q9.js → index-1svt0cdw.js} +2 -2
  55. package/dist/client/static/js/{index-m24sebb0.js → index-1tb4py5v.js} +2 -2
  56. package/dist/client/static/js/index-2gt9krtj.js +4 -0
  57. package/dist/client/static/js/index-2x9m7s1a.js +1 -0
  58. package/dist/client/static/js/index-3fvqmz3m.js +4 -0
  59. package/dist/client/static/js/{index-k9yf2txw.js → index-42wvbkm5.js} +2 -2
  60. package/dist/client/static/js/index-477vtt51.js +2 -0
  61. package/dist/client/static/js/{index-ca6tmamh.js → index-4px56qaz.js} +2 -2
  62. package/dist/client/static/js/{index-excgtjhx.js → index-5anvw7xg.js} +36 -36
  63. package/dist/client/static/js/index-5nb9k2ph.js +1 -0
  64. package/dist/client/static/js/{index-97sw4d9n.js → index-615je3km.js} +2 -2
  65. package/dist/client/static/js/{index-jz4012t5.js → index-66qxrh5n.js} +1 -1
  66. package/dist/client/static/js/{index-a145x0w2.js → index-7kct1sz1.js} +2 -2
  67. package/dist/client/static/js/{index-hwv7bfxc.js → index-8e0d8y30.js} +2 -2
  68. package/dist/client/static/js/{index-s4j2ghmx.js → index-90bq56xw.js} +2 -2
  69. package/dist/client/static/js/{index-wsy6y5em.js → index-b1gzh60t.js} +11 -11
  70. package/dist/client/static/js/{index-10vzyga1.js → index-bypkmjrz.js} +2 -2
  71. package/dist/client/static/js/{index-n8r7r86r.js → index-c1vd63yd.js} +2 -2
  72. package/dist/client/static/js/index-c9f0hejv.js +3 -0
  73. package/dist/client/static/js/{index-2dmew334.js → index-cgqj15g0.js} +2 -2
  74. package/dist/client/static/js/{index-mtav0rpf.js → index-cts5re1t.js} +2 -2
  75. package/dist/client/static/js/index-dxc14kmm.js +1 -0
  76. package/dist/client/static/js/{index-krdz5vby.js → index-dxyjxhm1.js} +2 -2
  77. package/dist/client/static/js/{index-zr3965k9.js → index-edpyqz9f.js} +1 -1
  78. package/dist/client/static/js/{index-h7agc069.js → index-eesepb70.js} +2 -2
  79. package/dist/client/static/js/{index-r38e0rya.js → index-evh437bz.js} +2 -2
  80. package/dist/client/static/js/index-ey6v4t5b.js +1 -0
  81. package/dist/client/static/js/{index-025s3fp8.js → index-fsd7n336.js} +2 -2
  82. package/dist/client/static/js/{index-yfcy4cf6.js → index-h7a7fqag.js} +2 -2
  83. package/dist/client/static/js/{index-11qn05g9.js → index-hffgwnvz.js} +2 -2
  84. package/dist/client/static/js/index-j734ev6q.js +482 -0
  85. package/dist/client/static/js/{index-9g2nzgpx.js → index-jcbp1d9d.js} +6 -6
  86. package/dist/client/static/js/index-jg5h18sm.js +2 -0
  87. package/dist/client/static/js/{index-bq9f0mxp.js → index-jtdve6xw.js} +7 -7
  88. package/dist/client/static/js/{index-kyr612aa.js → index-k0bqrb1y.js} +1 -1
  89. package/dist/client/static/js/{index-bdtftrym.js → index-kegevd10.js} +2 -2
  90. package/dist/client/static/js/{index-fr6wsqk8.js → index-kqcfxkch.js} +2 -2
  91. package/dist/client/static/js/{index-sr14vwn5.js → index-kv1xnem9.js} +2 -2
  92. package/dist/client/static/js/{index-xy0m8te9.js → index-m54ctmxr.js} +1 -1
  93. package/dist/client/static/js/index-mgzbypt5.js +314 -0
  94. package/dist/client/static/js/{index-85jfn1fz.js → index-mh52531j.js} +2 -2
  95. package/dist/client/static/js/{index-776n5n29.js → index-mhz5ywa4.js} +5 -5
  96. package/dist/client/static/js/{index-3j2he86h.js → index-nnwdbg3t.js} +2 -2
  97. package/dist/client/static/js/{index-3x7cbxwq.js → index-nxd6z7f9.js} +2 -2
  98. package/dist/client/static/js/{index-dabnbvbc.js → index-pjrbt77c.js} +2 -2
  99. package/dist/client/static/js/index-r7h4pm42.js +2 -0
  100. package/dist/client/static/js/index-ratrdgc9.js +2 -0
  101. package/dist/client/static/js/{index-475dc6h9.js → index-rhmvh9w5.js} +2 -2
  102. package/dist/client/static/js/{index-twwsn91p.js → index-sqzjwy9h.js} +2 -2
  103. package/dist/client/static/js/{index-z5s9tmj8.js → index-tckzkw0f.js} +2 -2
  104. package/dist/client/static/js/index-tza9h3q6.css +1 -0
  105. package/dist/client/static/js/{index-qccydkze.js → index-vhjfr093.js} +2 -2
  106. package/dist/client/static/js/{index-653x8zdq.js → index-w0j96eyy.js} +8 -8
  107. package/dist/client/static/js/{index-24a40rw8.js → index-ws04kxy9.js} +1 -1
  108. package/dist/client/static/js/{index-a3bpmw2r.js → index-x1yqmzpr.js} +2 -2
  109. package/dist/client/static/js/{index-fb2fjndj.js → index-x2f7wykb.js} +6 -6
  110. package/dist/client/static/js/index-y8405hdg.js +10 -0
  111. package/dist/client/static/js/{index-sx83ans2.js → index-yxk7dgnb.js} +2 -2
  112. package/dist/client/static/js/{index-bkn6jtn1.js → index-zavecxak.js} +2 -2
  113. package/dist/client/static/js/{index-vn59zz0k.js → index-zg7q3kcb.js} +2 -2
  114. package/dist/client/static/js/{index-enm77k5z.js → index-zhn9vv3z.js} +2 -2
  115. package/dist/client/static/js/{index-vgcw01yk.js → index-zy963qbh.js} +1 -1
  116. package/dist/client/static/js/info-A6RAGUB7-t7pbg7rt.js +1 -0
  117. package/dist/client/static/js/{infoDiagram-VRGFBTTK-jy5zvvj8.js → infoDiagram-VRGFBTTK-9pe7w3r5.js} +2 -2
  118. package/dist/client/static/js/ini-522adp5a.js +1 -0
  119. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-pfky1nnf.js → ishikawaDiagram-OU5B5YK6-38arfrx5.js} +2 -2
  120. package/dist/client/static/js/java-z0rgs7v6.js +1 -0
  121. package/dist/client/static/js/javascript-fv87f565.js +1 -0
  122. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-mvaf7rfh.js → journeyDiagram-ZHPQQLJL-kcwzjgtz.js} +4 -4
  123. package/dist/client/static/js/json-1czq1ped.js +1 -0
  124. package/dist/client/static/js/jsx-1fch2jyr.js +1 -0
  125. package/dist/client/static/js/{julia-rpd1y9vh.js → julia-pzzxbptm.js} +1 -1
  126. package/dist/client/static/js/{kanban-definition-PNTS6WVX-hw2xwe6e.js → kanban-definition-PNTS6WVX-nmegwy9w.js} +15 -15
  127. package/dist/client/static/js/lua-nn8bpjev.js +1 -0
  128. package/dist/client/static/js/markdown-38tqrgkn.js +1 -0
  129. package/dist/client/static/js/{mermaid.core-hsw87hmq.js → mermaid.core-3aae27b9.js} +7 -7
  130. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-wfe4d846.js → mindmap-definition-NLK3R4M7-zsaq4e65.js} +12 -12
  131. package/dist/client/static/js/one-dark-pro-trnff03z.js +1 -0
  132. package/dist/client/static/js/one-light-ck31ptqs.js +1 -0
  133. package/dist/client/static/js/packet-AYTQ26CC-rwac7scq.js +1 -0
  134. package/dist/client/static/js/{pegDiagram-GJSIUBJH-cvnmxgst.js → pegDiagram-GJSIUBJH-2b6whj1p.js} +1 -1
  135. package/dist/client/static/js/{perl-kmtz9dnv.js → perl-zdkbbjd2.js} +1 -1
  136. package/dist/client/static/js/{php-bttrsbxy.js → php-ktaxff6g.js} +1 -1
  137. package/dist/client/static/js/pie-WAS4IAKB-gjz20apz.js +1 -0
  138. package/dist/client/static/js/{pieDiagram-5QR66LMP-0n3gz7sv.js → pieDiagram-5QR66LMP-y09ar7vz.js} +3 -3
  139. package/dist/client/static/js/properties-kncqeqhn.js +1 -0
  140. package/dist/client/static/js/python-gx8ggmyh.js +1 -0
  141. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-9qqh6xvv.js → quadrantDiagram-O4NWA36T-mapfzs06.js} +3 -3
  142. package/dist/client/static/js/r-x8rftkm3.js +1 -0
  143. package/dist/client/static/js/radar-RG4KPBEZ-akwdknab.js +1 -0
  144. package/dist/client/static/js/railroad-74A4TZTK-m5v4rfhx.js +1 -0
  145. package/dist/client/static/js/railroad-abnf-HS5TGJTU-k2gmqcjb.js +1 -0
  146. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-1zdsfjf4.js +1 -0
  147. package/dist/client/static/js/railroad-peg-WCYAUIDC-e98evqb6.js +1 -0
  148. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-5f3x3762.js → railroadDiagram-XR7U4H2S-70qy7qdh.js} +1 -1
  149. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-a68bv6kh.js → requirementDiagram-PLB6GJNP-2vb2gp3e.js} +3 -3
  150. package/dist/client/static/js/{ruby-dve3y59w.js → ruby-ytqv3pqz.js} +1 -1
  151. package/dist/client/static/js/{rust-qjhdt4b0.js → rust-6sddyxnt.js} +1 -1
  152. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-ry7xcphh.js → sankeyDiagram-IPEJSGJF-9jd8ebrn.js} +3 -3
  153. package/dist/client/static/js/{sass-emxqt5p2.js → sass-dvbra5b6.js} +1 -1
  154. package/dist/client/static/js/{scss-4j4t3r6y.js → scss-sy7w8916.js} +1 -1
  155. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-mekzzhet.js → sequenceDiagram-PO4LG4MO-w7z84f80.js} +7 -7
  156. package/dist/client/static/js/{sizeCapture-INFHLROL-pvc16ame.js → sizeCapture-INFHLROL-q8w7ehgx.js} +1 -1
  157. package/dist/client/static/js/sql-99y0qnag.js +1 -0
  158. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-3ytxby83.js → stateDiagram-v2-GCMORJYK-4978hapr.js} +3 -3
  159. package/dist/client/static/js/{svelte-dbsx1ehx.js → svelte-xvs3fkza.js} +1 -1
  160. package/dist/client/static/js/{swimlanes-2SLR337P-c2zfp416.js → swimlanes-2SLR337P-eshg5fjy.js} +1 -1
  161. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-914e28hd.js +8 -0
  162. package/dist/client/static/js/timeline-definition-EJHVYXUP-5h5q357k.js +120 -0
  163. package/dist/client/static/js/treeView-Q6P3EWNA-fkm3a7gx.js +1 -0
  164. package/dist/client/static/js/treemap-WGGIJYW6-hm4ktxjf.js +1 -0
  165. package/dist/client/static/js/tsx-phngprp0.js +1 -0
  166. package/dist/client/static/js/typescript-m62a7zr2.js +1 -0
  167. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-sz6b7bnv.js → usecaseDiagram-POWQR4AR-4j69y3zx.js} +20 -20
  168. package/dist/client/static/js/vennDiagram-UO4OBE2U-pa9p5jpw.js +34 -0
  169. package/dist/client/static/js/{vue-hyr58df9.js → vue-p4g4avm3.js} +1 -1
  170. package/dist/client/static/js/wardley-WFR3VGLG-3y2rvdmy.js +1 -0
  171. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-xvtyvde9.js → wardleyDiagram-VNRHLVJA-hjddd656.js} +3 -3
  172. package/dist/client/static/js/xml-59n0cjn6.js +1 -0
  173. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-jcs20s84.js → xychartDiagram-PMCCYNJV-8ng5m849.js} +4 -4
  174. package/dist/client/static/js/yaml-9fw908s4.js +1 -0
  175. package/dist/client/tailwindcss-oxide.linux-x64-gnu-c0fa36dv.node +0 -0
  176. package/dist/client/tailwindcss-oxide.linux-x64-musl-kr04sh0e.node +0 -0
  177. package/marketplace/plugins/command-runner/package.json +2 -2
  178. package/marketplace/plugins/command-runner/src/app.tsx +2 -5
  179. package/marketplace/plugins/command-runner/src/panel/CustomForm.tsx +35 -52
  180. package/marketplace/plugins/command-runner/src/panel/Groups.tsx +6 -5
  181. package/marketplace/plugins/command-runner/src/panel/Header.tsx +18 -54
  182. package/marketplace/plugins/command-runner/src/panel/Output.tsx +3 -7
  183. package/marketplace/plugins/command-runner/src/panel/Row.tsx +19 -38
  184. package/marketplace/plugins/command-runner/src/panel/index.tsx +1 -4
  185. package/marketplace/plugins/git-forge/package.json +2 -2
  186. package/marketplace/plugins/git-forge/src/app.tsx +2 -0
  187. package/marketplace/plugins/git-forge/src/panel/Credential.tsx +8 -15
  188. package/marketplace/plugins/git-forge/src/panel/Header.tsx +35 -66
  189. package/marketplace/plugins/git-forge/src/panel/ItemView.tsx +7 -13
  190. package/marketplace/plugins/git-forge/src/panel/List.tsx +28 -56
  191. package/marketplace/plugins/git-forge/src/panel/Row.tsx +7 -9
  192. package/marketplace/plugins/git-forge/src/panel/Sidebar.tsx +21 -31
  193. package/marketplace/plugins/git-forge/src/panel/Write.tsx +26 -40
  194. package/marketplace/plugins/git-forge/src/panel/index.tsx +0 -1
  195. package/marketplace/plugins/github-actions/package.json +2 -2
  196. package/marketplace/plugins/github-actions/src/app.tsx +2 -0
  197. package/marketplace/plugins/github-actions/src/panel/Actions.tsx +9 -17
  198. package/marketplace/plugins/github-actions/src/panel/LogView.tsx +4 -13
  199. package/marketplace/plugins/github-actions/src/panel/Row.tsx +4 -5
  200. package/marketplace/plugins/github-actions/src/panel/RunView.tsx +8 -15
  201. package/marketplace/plugins/github-actions/src/panel/index.test.tsx +3 -2
  202. package/marketplace/plugins/github-actions/src/panel/index.tsx +31 -37
  203. package/marketplace/plugins/kanban/package.json +2 -2
  204. package/marketplace/plugins/kanban/src/app.tsx +2 -0
  205. package/marketplace/plugins/kanban/src/panel/CardSheet.tsx +88 -98
  206. package/marketplace/plugins/kanban/src/panel/CardTile.tsx +6 -10
  207. package/marketplace/plugins/kanban/src/panel/StageColumn.tsx +22 -18
  208. package/marketplace/plugins/kanban/src/panel/StageSheet.tsx +59 -70
  209. package/marketplace/plugins/kanban/src/panel/index.tsx +37 -52
  210. package/marketplace/plugins/kanban/src/panel/use-board.ts +2 -0
  211. package/marketplace/plugins/session-info/package.json +2 -2
  212. package/marketplace/plugins/session-info/src/app.tsx +6 -3
  213. package/marketplace/plugins/stats/package.json +2 -2
  214. package/marketplace/plugins/stats/src/KillConfirm.test.tsx +6 -4
  215. package/marketplace/plugins/stats/src/KillConfirm.tsx +26 -76
  216. package/marketplace/plugins/stats/src/ProcessTable.tsx +8 -6
  217. package/marketplace/plugins/stats/src/RefreshButton.tsx +7 -5
  218. package/marketplace/plugins/stats/src/app.tsx +11 -9
  219. package/package.json +10 -10
  220. package/src/cli/lib/commands/plugin.js +8 -5
  221. package/src/client/bootstrap.d.ts +5 -0
  222. package/src/client/chat-title-overlay.test.ts +53 -0
  223. package/src/client/components/auth/login-screen/index.tsx +31 -3
  224. package/src/client/components/common/SignOutButton.tsx +4 -5
  225. package/src/client/components/common/account-badge/index.tsx +31 -0
  226. package/src/client/components/common/footer-version/index.tsx +40 -0
  227. package/src/client/components/common/fullscreen-viewer/fullscreen-viewer.test.tsx +24 -0
  228. package/src/client/components/common/fullscreen-viewer/index.tsx +22 -31
  229. package/src/client/components/common/header-controls/MoreMenu.tsx +5 -56
  230. package/src/client/components/common/header-controls/index.test.tsx +2 -6
  231. package/src/client/components/common/header-controls/index.tsx +9 -25
  232. package/src/client/components/common/header-controls/phone-row.test.tsx +3 -16
  233. package/src/client/components/common/shell-update-button/index.tsx +2 -2
  234. package/src/client/components/common/zoom-pan-stage/index.tsx +54 -50
  235. package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +4 -5
  236. package/src/client/components/layout/desktop-layout/index.tsx +2 -4
  237. package/src/client/components/layout/left-bar/index.tsx +25 -3
  238. package/src/client/components/layout/rail-toggle.test.tsx +112 -0
  239. package/src/client/components/layout/session-sidebar/CategoryHeader.accent.test.tsx +81 -0
  240. package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +11 -3
  241. package/src/client/components/layout/session-sidebar/Footer.test.tsx +36 -0
  242. package/src/client/components/layout/session-sidebar/Footer.tsx +42 -61
  243. package/src/client/components/layout/session-sidebar/FooterHost.tsx +5 -1
  244. package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +30 -10
  245. package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +4 -0
  246. package/src/client/components/layout/session-sidebar/modern/index.tsx +8 -1
  247. package/src/client/components/layout/session-sidebar/modern/workspace-header.test.tsx +25 -4
  248. package/src/client/components/layout/session-title-bar/index.tsx +13 -5
  249. package/src/client/components/layout/top-bars.test.tsx +4 -2
  250. package/src/client/components/mobile/LayoutWrapper.tsx +3 -1
  251. package/src/client/components/mobile/RightSidebar.tsx +12 -3
  252. package/src/client/components/mobile/SessionSidebar.tsx +6 -2
  253. package/src/client/components/mobile/drawer-layout.test.tsx +7 -3
  254. package/src/client/components/mobile/drawer-strip.tsx +9 -2
  255. package/src/client/components/mobile/mobile-main-view/Header.test.tsx +29 -9
  256. package/src/client/components/mobile/mobile-main-view/Header.tsx +43 -12
  257. package/src/client/components/mobile/mobile-right-sidebar/Chrome.tsx +12 -1
  258. package/src/client/components/mobile/mobile-right-sidebar/FullDiff.tsx +9 -2
  259. package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +1 -0
  260. package/src/client/components/mobile/mobile-right-sidebar/Header.tsx +9 -1
  261. package/src/client/components/mobile/mobile-right-sidebar/StatusBar.tsx +4 -2
  262. package/src/client/components/mobile/mobile-session-sidebar/Body.tsx +1 -1
  263. package/src/client/components/mobile/mobile-session-sidebar/Footer.tsx +48 -46
  264. package/src/client/components/mobile/mobile-session-sidebar/Header.tsx +18 -1
  265. package/src/client/components/mobile/mobile-session-sidebar/Item.test.tsx +4 -0
  266. package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +4 -6
  267. package/src/client/components/mobile/right-drawer-nav.test.tsx +53 -1
  268. package/src/client/components/settings/Band.tsx +5 -2
  269. package/src/client/components/settings/Modal.tsx +8 -5
  270. package/src/client/components/settings/Sidebar.tsx +5 -3
  271. package/src/client/components/settings/apply-side-effects.ts +5 -0
  272. package/src/client/components/settings/categories/AccountSettings.tsx +266 -0
  273. package/src/client/components/settings/categories/ProjectSettings.tsx +2 -0
  274. package/src/client/components/settings/categories/account-settings/Dialogs.tsx +223 -0
  275. package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.test.tsx +3 -4
  276. package/src/client/components/settings/categories/appearance-settings/ChromeStyleSection.tsx +66 -39
  277. package/src/client/components/settings/categories/connect-settings/DeviceTable.tsx +7 -4
  278. package/src/client/components/settings/categories/project-settings/DetailsForm.tsx +14 -1
  279. package/src/client/components/settings/categories/project-settings/ProjectSharing.tsx +130 -0
  280. package/src/client/components/settings/categories/project-settings/SidebarList.tsx +5 -0
  281. package/src/client/components/settings/category-content.tsx +3 -0
  282. package/src/client/components/workspace/chat-timeline/AiMessageFooterSheet.tsx +3 -1
  283. package/src/client/components/workspace/chat-timeline/ComposerDockFrame.tsx +2 -1
  284. package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +3 -1
  285. package/src/client/components/workspace/chat-timeline/SessionSkeleton.tsx +1 -1
  286. package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +1 -0
  287. package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +9 -2
  288. package/src/client/components/workspace/chat-timeline/chat-input/expansion.test.ts +1 -1
  289. package/src/client/components/workspace/chat-timeline/chat-input/expansion.ts +2 -1
  290. package/src/client/components/workspace/chat-timeline/chat-input/narrow.test.tsx +34 -0
  291. package/src/client/components/workspace/chat-timeline/composer-dock-frame.test.tsx +9 -0
  292. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/styles.test.tsx +4 -1
  293. package/src/client/components/workspace/editor/Tab.tsx +19 -26
  294. package/src/client/components/workspace/editor/Tabs.test.ts +13 -7
  295. package/src/client/components/workspace/git-panel/commit-modal/Header.tsx +1 -0
  296. package/src/client/components/workspace/git-panel/commit-modal/floating.test.ts +46 -0
  297. package/src/client/components/workspace/git-panel/commit-modal/index.tsx +2 -0
  298. package/src/client/components/workspace/model-dropdown/Fullscreen.tsx +4 -5
  299. package/src/client/components/workspace/panel-tabs/TabChip.tsx +40 -39
  300. package/src/client/components/workspace/panel-tabs/TabStrip.connected.test.tsx +76 -58
  301. package/src/client/components/workspace/panel-tabs/TabStrip.test.tsx +9 -9
  302. package/src/client/components/workspace/panel-tabs/TabStrip.tsx +14 -1
  303. package/src/client/components/workspace/panel-tabs/index.tsx +1 -1
  304. package/src/client/components/workspace/plugin-panel/catalog.tsx +22 -5
  305. package/src/client/components/workspace/plugin-panel/chrome.test.tsx +89 -0
  306. package/src/client/components/workspace/plugin-panel/chrome.tsx +62 -0
  307. package/src/client/data/settings/omp-schema.json +40 -4
  308. package/src/client/floating-phone.test.ts +189 -0
  309. package/src/client/floating.css +205 -2
  310. package/src/client/floating.test.ts +43 -0
  311. package/src/client/glass.css +47 -0
  312. package/src/client/hooks/chat/omp/index.ts +6 -5
  313. package/src/client/hooks/chat/omp/prompt-send.test.ts +18 -0
  314. package/src/client/hooks/chat/omp/prompt-send.ts +26 -8
  315. package/src/client/hooks/chat/omp/session-list.tsx +20 -8
  316. package/src/client/hooks/chat/timeline/deferred-model.ts +13 -5
  317. package/src/client/hooks/chat/timeline/index.ts +2 -0
  318. package/src/client/hooks/chat/timeline/send-props.ts +14 -0
  319. package/src/client/hooks/chat/timeline/send-steer.test.ts +11 -2
  320. package/src/client/hooks/chat/timeline/send-switch.test.ts +92 -0
  321. package/src/client/hooks/chat/timeline/send.test-util.ts +37 -7
  322. package/src/client/hooks/chat/timeline/send.test.ts +11 -2
  323. package/src/client/hooks/chat/timeline/send.ts +62 -42
  324. package/src/client/hooks/editor/image-generation.ts +24 -0
  325. package/src/client/hooks/editor/resolve-viewer.test.ts +26 -20
  326. package/src/client/hooks/editor/resolve-viewer.ts +14 -5
  327. package/src/client/hooks/editor/use-file-editor.test.ts +34 -0
  328. package/src/client/hooks/editor/use-file-editor.ts +6 -2
  329. package/src/client/hooks/settings/accounts.ts +162 -0
  330. package/src/client/hooks/ui/auth.ts +58 -3
  331. package/src/client/hooks/ui/border-style.test.ts +5 -4
  332. package/src/client/hooks/ui/border-style.ts +3 -2
  333. package/src/client/hooks/ui/mobile-chrome-style.ts +68 -0
  334. package/src/client/hooks/ui/navbar-controls.test.ts +1 -2
  335. package/src/client/hooks/ui/navbar-controls.ts +0 -3
  336. package/src/client/hooks/ui/zoom-gesture.ts +104 -0
  337. package/src/client/lib/desktop/titlebar.test.ts +21 -0
  338. package/src/client/lib/desktop/titlebar.ts +34 -0
  339. package/src/client/lib/plugins/bootstrap.test.ts +20 -0
  340. package/src/client/lib/plugins/bootstrap.tsx +10 -15
  341. package/src/client/lib/plugins/kit-components.test.tsx +119 -0
  342. package/src/client/lib/plugins/kit-components.tsx +79 -0
  343. package/src/client/lib/plugins/kit.ts +8 -0
  344. package/src/client/lib/plugins/slots.test.ts +34 -0
  345. package/src/client/lib/plugins/slots.ts +31 -4
  346. package/src/client/lib/plugins/stylesheets.ts +10 -11
  347. package/src/client/lib/ui/pinch.test.ts +74 -0
  348. package/src/client/lib/ui/pinch.ts +104 -0
  349. package/src/client/lib/ui/safe-area.test.ts +25 -0
  350. package/src/client/lib/ui/safe-area.ts +23 -0
  351. package/src/client/main.tsx +8 -1
  352. package/src/client/tailwind.css +54 -1
  353. package/src/server/index.ts +2 -0
  354. package/src/server/lib/assets/shell-attributes.server.ts +12 -4
  355. package/src/server/lib/assets/shell-attributes.test.ts +19 -18
  356. package/src/server/lib/auth/client-address.test.ts +2 -2
  357. package/src/server/lib/auth/guard.test.ts +2 -2
  358. package/src/server/lib/auth/guard.ts +81 -97
  359. package/src/server/lib/auth/handover-guard.test.ts +1 -1
  360. package/src/server/lib/auth/rate-limit.test.ts +2 -2
  361. package/src/server/lib/auth/token.test.ts +1 -1
  362. package/src/server/lib/auth/workspace-gate.server.ts +34 -0
  363. package/src/server/lib/bundler/css.test.ts +16 -0
  364. package/src/server/lib/connect/devices.server.test.ts +12 -0
  365. package/src/server/lib/connect/devices.server.ts +63 -19
  366. package/src/server/lib/connect/pairing.server.ts +5 -3
  367. package/src/server/lib/connect/status.server.ts +2 -2
  368. package/src/server/lib/db/schema.test.ts +3 -3
  369. package/src/server/lib/db/schema.ts +6 -0
  370. package/src/server/lib/harness/update-spawn.server.test.ts +97 -0
  371. package/src/server/lib/harness/update-spawn.server.ts +10 -0
  372. package/src/server/lib/models/provider-icon-override.server.test.ts +140 -0
  373. package/src/server/lib/models/provider-icon-override.server.ts +197 -0
  374. package/src/server/lib/models/provider-icon-store.server.ts +8 -0
  375. package/src/server/lib/models/provider-icon.server.ts +31 -6
  376. package/src/server/lib/omp/session/artifacts.server.test.ts +11 -7
  377. package/src/server/lib/omp/session/artifacts.server.ts +21 -17
  378. package/src/server/lib/panels/build.server.ts +19 -2
  379. package/src/server/lib/panels/css.server.test.ts +141 -0
  380. package/src/server/lib/panels/css.server.ts +255 -0
  381. package/src/server/lib/panels/plugin-ui-contract.test.ts +64 -0
  382. package/src/server/lib/panels/registry-stylesheet.server.test.ts +69 -0
  383. package/src/server/lib/panels/scan.server.ts +13 -7
  384. package/src/server/lib/panels/source-warnings.server.test.ts +65 -0
  385. package/src/server/lib/panels/source-warnings.server.ts +71 -0
  386. package/src/server/lib/realtime/topics/catalog.server.ts +3 -0
  387. package/src/server/lib/realtime/topics.server.ts +14 -0
  388. package/src/server/lib/sessions/last-opened-client.server.ts +1 -1
  389. package/src/server/lib/workspace/access.server.ts +108 -0
  390. package/src/server/lib/workspace/project-patch.server.ts +4 -2
  391. package/src/server/lib/workspace/register-folder.server.ts +19 -5
  392. package/src/server/lib/workspace/session-access.server.ts +55 -0
  393. package/src/server/lib/workspace/tenancy-schema.server.ts +40 -0
  394. package/src/server/plugins/ssr.ts +19 -3
  395. package/src/server/routes/accounts/index.ts +8 -0
  396. package/src/server/routes/accounts/management.test.ts +174 -0
  397. package/src/server/routes/accounts/management.ts +166 -0
  398. package/src/server/routes/auth/login.ts +22 -8
  399. package/src/server/routes/auth/logout.ts +1 -1
  400. package/src/server/routes/auth/password.ts +40 -33
  401. package/src/server/routes/auth/revoke.test.ts +1 -1
  402. package/src/server/routes/auth/revoke.ts +26 -8
  403. package/src/server/routes/auth/routes.test.ts +3 -3
  404. package/src/server/routes/auth/state.ts +14 -7
  405. package/src/server/routes/connect/devices.ts +7 -4
  406. package/src/server/routes/connect/pair.ts +4 -3
  407. package/src/server/routes/connect/status.ts +4 -2
  408. package/src/server/routes/connect/tunnels.ts +2 -1
  409. package/src/server/routes/folders/batch-delete.ts +12 -0
  410. package/src/server/routes/folders/clone.ts +7 -2
  411. package/src/server/routes/folders/create.ts +3 -1
  412. package/src/server/routes/folders/folder.ts +44 -4
  413. package/src/server/routes/folders/index.ts +3 -0
  414. package/src/server/routes/folders/shares.ts +62 -0
  415. package/src/server/routes/index.ts +2 -0
  416. package/src/server/routes/panels/build.ts +1 -1
  417. package/src/server/routes/panels/css.test.ts +22 -0
  418. package/src/server/routes/panels/css.ts +5 -7
  419. package/src/server/routes/realtime/ws.ts +16 -1
  420. package/src/server/routes/sessions/list.ts +3 -2
  421. package/src/server/routes/settings/projects.ts +46 -7
  422. package/src/server/routes/settings/provider-icon.ts +18 -0
  423. package/src/shared/lib/chat/timeline/tool-render-mode.test.ts +2 -2
  424. package/src/shared/lib/chat/timeline/tool-render-mode.ts +6 -3
  425. package/src/shared/lib/icons/tint-hues.generated.ts +38 -37
  426. package/src/shared/lib/omp/config/schema-releases-19-4.test.ts +27 -1
  427. package/src/shared/lib/omp/session/prewarm-misc.test.ts +1 -1
  428. package/src/shared/lib/realtime/protocol.ts +16 -0
  429. package/src/shared/lib/settings/defaults.ts +2 -1
  430. package/src/shared/lib/settings/sections.ts +1 -1
  431. package/src/shared/lib/theme/border-style.test.ts +11 -9
  432. package/src/shared/lib/theme/border-style.ts +7 -7
  433. package/src/shared/lib/theme/chrome-style.test.ts +15 -0
  434. package/src/shared/lib/theme/chrome-style.ts +16 -1
  435. package/src/shared/types/index.ts +1 -0
  436. package/src/shared/types/settings/state.ts +6 -5
  437. package/src/test-support/file-editor.test-util.ts +25 -6
  438. package/tsconfig.json +21 -0
  439. package/dist/client/static/js/ImageView-zf4kh5wp.js +0 -1
  440. package/dist/client/static/js/LayoutWrapper-dncbzcea.js +0 -2
  441. package/dist/client/static/js/MergeDiffView-btdx9yb9.js +0 -1
  442. package/dist/client/static/js/Modal-5cxfw2rv.js +0 -60
  443. package/dist/client/static/js/SessionsView-vbn0nvx4.js +0 -1
  444. package/dist/client/static/js/architecture-7GRP2DOG-sxrkxwbq.js +0 -1
  445. package/dist/client/static/js/bash-bcbct9gc.js +0 -1
  446. package/dist/client/static/js/c-fn9jz26e.js +0 -1
  447. package/dist/client/static/js/cpp-a1q64mke.js +0 -1
  448. package/dist/client/static/js/css-b92azee8.js +0 -1
  449. package/dist/client/static/js/css-sn00sq6v.js +0 -1
  450. package/dist/client/static/js/cynefin-OW5HDTMX-g1xwa8b9.js +0 -1
  451. package/dist/client/static/js/eventmodeling-NTZA5JFV-05p61bka.js +0 -1
  452. package/dist/client/static/js/flowDiagram-KWPJA3E3-500fcx2a.js +0 -1
  453. package/dist/client/static/js/gitGraph-4MIJSDKK-z1yehwys.js +0 -1
  454. package/dist/client/static/js/graphql-8d8bn59j.js +0 -1
  455. package/dist/client/static/js/html-6hdrwtz2.js +0 -1
  456. package/dist/client/static/js/index-0kcnghxn.js +0 -4
  457. package/dist/client/static/js/index-2zhmmtye.js +0 -2
  458. package/dist/client/static/js/index-4vtc4xct.js +0 -481
  459. package/dist/client/static/js/index-5srvxsht.js +0 -2
  460. package/dist/client/static/js/index-6c1s0v4b.js +0 -1
  461. package/dist/client/static/js/index-cvm2ha01.js +0 -1
  462. package/dist/client/static/js/index-d11mbz2q.js +0 -4
  463. package/dist/client/static/js/index-fen0x3qh.js +0 -1
  464. package/dist/client/static/js/index-gwgh27h3.js +0 -314
  465. package/dist/client/static/js/index-hxy1sadd.js +0 -2
  466. package/dist/client/static/js/index-pg87cgpy.js +0 -2
  467. package/dist/client/static/js/index-q1a40v20.js +0 -3
  468. package/dist/client/static/js/index-qmvstmvh.js +0 -1
  469. package/dist/client/static/js/index-t6nqy2n5.css +0 -1
  470. package/dist/client/static/js/index-wf5j0009.js +0 -10
  471. package/dist/client/static/js/index-y6zbkh4p.js +0 -2
  472. package/dist/client/static/js/info-A6RAGUB7-dqyaxjc1.js +0 -1
  473. package/dist/client/static/js/ini-g6a5xsaw.js +0 -1
  474. package/dist/client/static/js/java-n596am4c.js +0 -1
  475. package/dist/client/static/js/javascript-zc1qnyyp.js +0 -1
  476. package/dist/client/static/js/json-7k70qbkj.js +0 -1
  477. package/dist/client/static/js/jsx-sndenqrc.js +0 -1
  478. package/dist/client/static/js/lua-djd3g9q5.js +0 -1
  479. package/dist/client/static/js/markdown-r2tpvxpn.js +0 -1
  480. package/dist/client/static/js/one-dark-pro-ckq5capv.js +0 -1
  481. package/dist/client/static/js/one-light-a908z398.js +0 -1
  482. package/dist/client/static/js/packet-AYTQ26CC-7jxzax4z.js +0 -1
  483. package/dist/client/static/js/pie-WAS4IAKB-wc9wxr7f.js +0 -1
  484. package/dist/client/static/js/properties-brn72zdk.js +0 -1
  485. package/dist/client/static/js/python-g9mghwgm.js +0 -1
  486. package/dist/client/static/js/r-e247x4mw.js +0 -1
  487. package/dist/client/static/js/radar-RG4KPBEZ-kwj5padj.js +0 -1
  488. package/dist/client/static/js/railroad-74A4TZTK-h8sdx3w5.js +0 -1
  489. package/dist/client/static/js/railroad-abnf-HS5TGJTU-2wmwx246.js +0 -1
  490. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-h4cdgw3y.js +0 -1
  491. package/dist/client/static/js/railroad-peg-WCYAUIDC-q7m0tfd0.js +0 -1
  492. package/dist/client/static/js/sql-0kar81jy.js +0 -1
  493. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-9gm67sq4.js +0 -8
  494. package/dist/client/static/js/timeline-definition-EJHVYXUP-xtvv4za2.js +0 -120
  495. package/dist/client/static/js/treeView-Q6P3EWNA-yv9640h3.js +0 -1
  496. package/dist/client/static/js/treemap-WGGIJYW6-7kpzjg21.js +0 -1
  497. package/dist/client/static/js/tsx-gjxfjnbk.js +0 -1
  498. package/dist/client/static/js/typescript-bm89v3gk.js +0 -1
  499. package/dist/client/static/js/vennDiagram-UO4OBE2U-56q0qs51.js +0 -34
  500. package/dist/client/static/js/wardley-WFR3VGLG-mggay64p.js +0 -1
  501. package/dist/client/static/js/xml-b7824nx0.js +0 -1
  502. package/dist/client/static/js/yaml-kqqktdv1.js +0 -1
  503. package/src/server/lib/auth/client-address.ts +0 -89
  504. package/src/server/lib/auth/config.ts +0 -133
  505. package/src/server/lib/auth/rate-limit.ts +0 -146
  506. package/src/server/lib/auth/token.ts +0 -220
@@ -0,0 +1,53 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The transcript reserves the session title it scrolls under.
8
+ *
9
+ * The desktop title bar is an OVERLAY (`chat-title-overlay` in
10
+ * `WorkspacePanels`), not a row above the transcript. The first row of a chat
11
+ * that does not fill the pane — a new session's first user prompt — therefore
12
+ * opens at `scrollTop: 0` directly underneath the bar and is painted over by
13
+ * the title. The bar and the reserve read one height, and the floating chrome
14
+ * raises that height by its gutter, so the two cannot drift.
15
+ *
16
+ * The reserve is padding on the SCROLLER, never on the pane: a longer
17
+ * transcript still slides under the bar, which is what its canvas gradient and
18
+ * the glass mask are for.
19
+ */
20
+
21
+ import { describe, expect, test } from 'bun:test';
22
+ import { readClientCss, ruleBody } from '@/test-support/glass-css';
23
+
24
+ describe('session title overlay', () => {
25
+ test('one height sizes the bar and the transcript reserve under it', async () => {
26
+ const [tailwind, floating] = await Promise.all([
27
+ readClientCss('tailwind.css'),
28
+ readClientCss('floating.css'),
29
+ ]);
30
+ expect(tailwind).toContain('--chat-title-height: 2.5rem;');
31
+ expect(ruleBody(tailwind, '[data-session-title]')).toContain(
32
+ 'height: var(--chat-title-height)',
33
+ );
34
+ // The bar plus the reading gutter the scroller already had at its top.
35
+ expect(ruleBody(tailwind, '.app-window[data-desktop] [data-chat-scroller]')).toContain(
36
+ 'padding-top: calc(var(--chat-title-height) + 1rem)',
37
+ );
38
+ // Floating is the same line pushed down by the window's gutter.
39
+ expect(
40
+ ruleBody(floating, "html[data-chrome='floating'] .app-window[data-desktop]"),
41
+ ).toContain('--chat-title-height: calc(2.5rem + var(--float-gutter))');
42
+ });
43
+
44
+ test('the glass mask stops at the same height', async () => {
45
+ const glass = await readClientCss('glass.css');
46
+ const timeline = ruleBody(
47
+ glass,
48
+ 'html[data-chrome="floating"][data-surface="glass"] .app-window[data-desktop] [data-chat-timeline]',
49
+ );
50
+ expect(timeline).toContain('transparent var(--chat-title-height)');
51
+ expect(timeline).toContain('#000 calc(var(--chat-title-height) + 10px)');
52
+ });
53
+ });
@@ -21,11 +21,15 @@
21
21
  import { CHECKBOX_CLASS } from '@/client/components/common/checkbox/style';
22
22
  import { useEffect, useState } from 'preact/hooks';
23
23
  import type { FunctionComponent } from 'preact/compat';
24
- import { Eye, EyeOff, Loader2 } from 'lucide-preact';
25
- import { login, probeSession } from '@/client/hooks/ui/auth';
24
+ import { Eye, EyeOff, Loader2, Users } from 'lucide-preact';
25
+ import { fetchLoginAccounts, login, probeSession } from '@/client/hooks/ui/auth';
26
26
  import { BrandWordmark } from '@/client/components/common/brand-wordmark';
27
+ import { SearchSelect } from '@/client/components/common/search-select';
28
+ import type { AccountSummary } from '@kabmo-labs/kabmo-auth/account';
27
29
 
28
30
  export const LoginScreen: FunctionComponent = () => {
31
+ const [accounts, setAccounts] = useState<AccountSummary[]>([]);
32
+ const [accountId, setAccountId] = useState('');
29
33
  const [password, setPassword] = useState('');
30
34
  const [showPassword, setShowPassword] = useState(false);
31
35
  const [trustDevice, setTrustDevice] = useState(false);
@@ -50,6 +54,11 @@ export const LoginScreen: FunctionComponent = () => {
50
54
  });
51
55
  };
52
56
  leaveIfSignedIn();
57
+ void fetchLoginAccounts().then((result) => {
58
+ if (!result) return;
59
+ setAccounts(result.accounts);
60
+ setAccountId((current) => current || result.accounts[0]?.id || '');
61
+ });
53
62
  const handleVisibility = () => {
54
63
  if (!document.hidden) leaveIfSignedIn();
55
64
  };
@@ -62,7 +71,7 @@ export const LoginScreen: FunctionComponent = () => {
62
71
  if (!password || busy) return;
63
72
  setBusy(true);
64
73
  setError('');
65
- const result = await login(password, trustDevice);
74
+ const result = await login(accountId || accounts[0]?.id || '', password, trustDevice);
66
75
  // A success reloads the page, so reaching here means it failed.
67
76
  setBusy(false);
68
77
  if (!result.ok) {
@@ -90,6 +99,25 @@ export const LoginScreen: FunctionComponent = () => {
90
99
  <p className="text-xs text-ink/60">This instance is password protected.</p>
91
100
  </div>
92
101
 
102
+ {accounts.length > 1 && (
103
+ <div className="space-y-1.5">
104
+ <span className="block text-xs font-semibold text-ink">Sign in as</span>
105
+ <SearchSelect
106
+ value={accountId}
107
+ options={accounts.map((entry) => ({ value: entry.id, label: entry.name }))}
108
+ triggerLabel={accounts.find((entry) => entry.id === accountId)?.name ?? 'Choose an account'}
109
+ placeholder="Choose an account"
110
+ ariaLabel="Sign in as"
111
+ onChange={setAccountId}
112
+ allowEmpty={false}
113
+ heading="Account"
114
+ searchPlaceholder="Search accounts…"
115
+ icon={() => <Users size={14} className="text-ink/60 flex-shrink-0" />}
116
+ triggerClassName="w-full flex items-center justify-between gap-2 px-3 py-2 rounded-lg border border-ink/20 hover:border-ink/40 bg-paper text-sm text-ink transition-colors cursor-pointer focus:outline-none focus:border-ink/50"
117
+ />
118
+ </div>
119
+ )}
120
+
93
121
  <div className="relative">
94
122
  <input
95
123
  type={showPassword ? 'text' : 'password'}
@@ -4,12 +4,11 @@
4
4
  */
5
5
 
6
6
  /**
7
- * Sign out of this browser, from either layout's header.
7
+ * Sign out of this browser, from the sidebar footer.
8
8
  *
9
- * ONE component for both headers, for the reason `ReloadPageButton` is one: the
10
- * two must agree on the accessible name, or a spec that addresses "Sign out"
11
- * finds it on the desktop and not on the phone. Each layout passes only its own
12
- * hit area, exactly as the reload control does.
9
+ * ONE component for both layouts' footers, so the accessible name cannot
10
+ * disagree between the desktop strip and the phone drawer. Each layout passes
11
+ * only its own hit area.
13
12
  *
14
13
  * ## Why a lock, and why the label says what it does
15
14
  *
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The signed-in account, in the sidebar footer.
8
+ *
9
+ * A name is shown, not an opaque avatar: the footer is the one place in the app
10
+ * that says who this browser is acting as. It truncates rather than wrapping,
11
+ * and the title carries the full value.
12
+ */
13
+
14
+ import { UserRound } from 'lucide-preact';
15
+ import { useAccount, useAuthEnabled } from '@/client/hooks/ui/auth';
16
+
17
+ export function AccountBadge({ className = '', labelClassName = '' }: { className?: string; labelClassName?: string }) {
18
+ const authEnabled = useAuthEnabled();
19
+ const account = useAccount();
20
+ if (!authEnabled || !account) return null;
21
+ return (
22
+ <span
23
+ className={`inline-flex min-w-0 items-center gap-1.5 text-ink/60 ${className}`}
24
+ title={`Signed in as ${account.name}`}
25
+ aria-label={`Signed in as ${account.name}`}
26
+ >
27
+ <UserRound size={14} className="shrink-0 text-ink/45" />
28
+ <span className={`max-w-[112px] truncate text-[11px] font-medium text-ink/70 ${labelClassName}`}>{account.name}</span>
29
+ </span>
30
+ );
31
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The footer's version stamp and update offer.
8
+ *
9
+ * The offer is a word where the footer has room and a glyph where it does not;
10
+ * both forms keep the same accessible name, so the control never becomes an
11
+ * unnamed icon.
12
+ */
13
+
14
+ import { ArrowUpCircle } from 'lucide-preact';
15
+ import packageJson from '@/../package.json';
16
+
17
+ interface FooterVersionInfoProps {
18
+ updateAvailable?: boolean;
19
+ onUpdateClick?: () => void;
20
+ }
21
+
22
+ export function FooterVersionInfo({ updateAvailable, onUpdateClick }: FooterVersionInfoProps) {
23
+ return (
24
+ <div className="flex shrink-0 items-center gap-2">
25
+ <span className="hidden font-mono text-[10px] text-ink/40 @[320px]:inline">v{packageJson.version}</span>
26
+ {updateAvailable && (
27
+ <button
28
+ type="button"
29
+ onClick={onUpdateClick}
30
+ title="Update available"
31
+ aria-label="Update available"
32
+ className="inline-flex items-center gap-1 rounded-full border border-ink/20 px-1 py-0.5 text-[10px] font-semibold text-ink transition-colors hover:border-ink/40 @[480px]:px-2"
33
+ >
34
+ <ArrowUpCircle size={12} className="@[480px]:hidden" />
35
+ <span className="hidden @[480px]:inline">update</span>
36
+ </button>
37
+ )}
38
+ </div>
39
+ );
40
+ }
@@ -77,6 +77,30 @@ describe('FullscreenViewer', () => {
77
77
  expect(percent()).toBe('100%');
78
78
  });
79
79
 
80
+ // Two touch contacts spreading apart must drive the same scale the pill
81
+ // does, through the shared gesture hook — the wiring a pinch regression
82
+ // (frozen viewer, zoom about a corner) shows up in.
83
+ test('a two-finger pinch scales the view about the contacts', () => {
84
+ const root = mount(viewer(() => {}));
85
+ const stage = root.ownerDocument.querySelector('.fullscreen-viewer-stage') as HTMLElement;
86
+ const pointer = (type: string, pointerId: number, clientX: number) =>
87
+ stage.dispatchEvent(
88
+ new window.PointerEvent(type, { bubbles: true, button: 0, pointerId, pointerType: 'touch', clientX, clientY: 100 }),
89
+ );
90
+
91
+ act(() => {
92
+ pointer('pointerdown', 1, 100);
93
+ pointer('pointerdown', 2, 200);
94
+ pointer('pointermove', 2, 300);
95
+ });
96
+ expect(percent()).toBe('200%');
97
+
98
+ act(() => {
99
+ pointer('pointermove', 2, 200);
100
+ });
101
+ expect(percent()).toBe('100%');
102
+ });
103
+
80
104
  test('keyboard: +/- zoom and Esc closes', () => {
81
105
  let closed = 0;
82
106
  const root = mount(viewer(() => closed++));
@@ -19,7 +19,9 @@
19
19
  * fit exactly like a diagram whose size was read from the markup.
20
20
  */
21
21
 
22
- import type { ComponentChildren, TargetedPointerEvent, TargetedWheelEvent } from 'preact';
22
+ import type { ComponentChildren, TargetedWheelEvent } from 'preact';
23
+ import { useZoomGesture } from '@/client/hooks/ui/zoom-gesture';
24
+ import type { PinchFrame } from '@/client/lib/ui/pinch';
23
25
  import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'preact/hooks';
24
26
  import { createPortal } from 'preact/compat';
25
27
  import { Maximize2, Minus, Plus, X } from 'lucide-preact';
@@ -40,12 +42,6 @@ interface View {
40
42
  y: number;
41
43
  }
42
44
 
43
- interface Drag {
44
- pointerId: number;
45
- x: number;
46
- y: number;
47
- }
48
-
49
45
  interface Size {
50
46
  width: number;
51
47
  height: number;
@@ -80,10 +76,8 @@ export interface FullscreenViewerProps {
80
76
  export function FullscreenViewer({ onClose, ariaLabel, measureKey, overlay, children }: FullscreenViewerProps) {
81
77
  const stageRef = useRef<HTMLDivElement>(null);
82
78
  const canvasRef = useRef<HTMLDivElement>(null);
83
- const dragRef = useRef<Drag | null>(null);
84
79
  const [size, setSize] = useState<Size | null>(null);
85
80
  const [view, setView] = useState<View>({ scale: 1, x: 0, y: 0 });
86
- const [dragging, setDragging] = useState(false);
87
81
  /** Whether the reader moved the view themselves: a later measurement then
88
82
  * must not yank their zoom back to a fit. An image that decodes after mount
89
83
  * grows from 0 to its natural size, so the first real measurement HAS to
@@ -168,29 +162,26 @@ export function FullscreenViewer({ onClose, ariaLabel, measureKey, overlay, chil
168
162
  [zoomBy],
169
163
  );
170
164
 
171
- const handlePointerDown = useCallback((event: TargetedPointerEvent<HTMLDivElement>) => {
172
- if (event.button !== 0) return;
173
- userAdjustedRef.current = true;
174
- dragRef.current = { pointerId: event.pointerId, x: event.clientX, y: event.clientY };
175
- event.currentTarget.setPointerCapture(event.pointerId);
176
- setDragging(true);
165
+ /** A pinch scales about the two fingers and pans with their midpoint. */
166
+ const applyPinch = useCallback((frame: PinchFrame) => {
167
+ setView((current) => {
168
+ const stage = stageRef.current?.getBoundingClientRect();
169
+ const zoomed = zoomTo(current, current.scale * frame.scale, frame.x, frame.y, stage);
170
+ return { scale: zoomed.scale, x: zoomed.x + frame.dx, y: zoomed.y + frame.dy };
171
+ });
177
172
  }, []);
178
173
 
179
- const handlePointerMove = useCallback((event: TargetedPointerEvent<HTMLDivElement>) => {
180
- const drag = dragRef.current;
181
- if (!drag || drag.pointerId !== event.pointerId) return;
182
- const dx = event.clientX - drag.x;
183
- const dy = event.clientY - drag.y;
184
- drag.x = event.clientX;
185
- drag.y = event.clientY;
174
+ const panBy = useCallback((dx: number, dy: number) => {
186
175
  setView((current) => ({ ...current, x: current.x + dx, y: current.y + dy }));
187
176
  }, []);
188
177
 
189
- const endDrag = useCallback((event: TargetedPointerEvent<HTMLDivElement>) => {
190
- if (dragRef.current?.pointerId !== event.pointerId) return;
191
- dragRef.current = null;
192
- setDragging(false);
193
- }, []);
178
+ const { dragging, onPointerDown, onPointerMove, onPointerUp, onPointerCancel } = useZoomGesture({
179
+ onStart: () => {
180
+ userAdjustedRef.current = true;
181
+ },
182
+ onPan: panBy,
183
+ onPinch: applyPinch,
184
+ });
194
185
 
195
186
  const handleDoubleClick = useCallback(() => {
196
187
  if (Math.abs(view.scale - 1) < 0.01) {
@@ -258,10 +249,10 @@ export function FullscreenViewer({ onClose, ariaLabel, measureKey, overlay, chil
258
249
  ref={stageRef}
259
250
  tabIndex={-1}
260
251
  className={`fullscreen-viewer-stage absolute inset-0 overflow-hidden outline-none ${dragging ? 'cursor-grabbing' : 'cursor-grab'}`}
261
- onPointerDown={handlePointerDown}
262
- onPointerMove={handlePointerMove}
263
- onPointerUp={endDrag}
264
- onPointerCancel={endDrag}
252
+ onPointerDown={onPointerDown}
253
+ onPointerMove={onPointerMove}
254
+ onPointerUp={onPointerUp}
255
+ onPointerCancel={onPointerCancel}
265
256
  onDblClick={handleDoubleClick}
266
257
  >
267
258
  <div className="absolute inset-0 flex items-center justify-center">
@@ -4,13 +4,10 @@
4
4
  */
5
5
 
6
6
  /**
7
- * The phone header's `⋯` menu: the two controls that do not need a slot.
7
+ * The phone header's `⋯` menu: the controls that do not need a slot.
8
8
  *
9
- * Reload and sign-out are rare actions, and each costs 36px of a header that is
10
- * already sharing 320–412px between the wordmark, the session title and the
11
- * four controls that ARE used mid-conversation (context, panel, and whatever a
12
- * plugin contributes). Behind `⋯` they still cost 36px — but 36px ONCE, for
13
- * both, against 72px standing in the row.
9
+ * Reload is rare, and costs 36px of a header already sharing 320–412px between
10
+ * the wordmark, the session title and the controls used mid-conversation.
14
11
  *
15
12
  * This is the same answer the sidebar toolbar reached when its row ran out of
16
13
  * room (`ToolbarOverflowMenu`): hiding a control outright makes it unreachable
@@ -18,19 +15,11 @@
18
15
  * nothing on screen to say so. A menu keeps it one click away and names it in
19
16
  * words rather than as a glyph.
20
17
  *
21
- * ## Sign-out confirms HERE, not in the row it came from
22
- *
23
- * `SignOutButton` is a two-press control because it sits a pixel from reload.
24
- * A menu already costs an open and a click, so the confirmation is the first
25
- * row press: the row turns into `Click again to sign out` and the second press
26
- * ends the session. The safety property is unchanged — one stray click still
27
- * cannot sign the user out — and focus never leaves the menu.
28
18
  */
29
19
 
30
- import { Ellipsis, Lock, LockOpen, RefreshCw } from 'lucide-preact';
20
+ import { Ellipsis, RefreshCw } from 'lucide-preact';
31
21
  import { useEffect, useRef, useState } from 'preact/hooks';
32
22
  import { useOnClickOutside } from '@/client/hooks/ui/on-click-outside';
33
- import { logout, useAuthEnabled, useAuthState } from '@/client/hooks/ui/auth';
34
23
  import { PluginIdProvider } from '@kabmo-labs/kabmo-ui';
35
24
  import { requestOpenPanel } from '@/shared/lib/workspace/panel-open';
36
25
  import { CONTROL_BOX } from '@/client/lib/ui/control-plate';
@@ -56,51 +45,25 @@ export function HeaderMoreMenu({
56
45
  /** Controls the user switched off; their rows are gone from this menu too. */
57
46
  hidden?: string[];
58
47
  }) {
59
- const authEnabled = useAuthEnabled();
60
- const authState = useAuthState();
61
48
  const [open, setOpen] = useState(false);
62
- const [confirming, setConfirming] = useState(false);
63
- const [busy, setBusy] = useState(false);
64
49
  const rootRef = useRef<HTMLDivElement>(null);
65
50
  useOnClickOutside(rootRef, () => setOpen(false));
66
51
 
67
- const canSignOut = authEnabled && authState !== 'required';
68
52
  // The open flag is mirrored into a ref so the Escape listener can be bound
69
53
  // ONCE, at mount. Binding it from an effect keyed on `open` lost the first
70
- // keypress after the click that opened the menu — the effect had not run yet
71
- // — and a menu that swallows Escape intermittently is worse than one that
72
- // never does, because the user cannot tell which they are looking at.
54
+ // keypress after the click that opened the menu.
73
55
  const openRef = useRef(open);
74
56
  openRef.current = open;
75
57
 
76
- // A menu left open while the session ends elsewhere would offer an action for
77
- // a session that no longer exists — the same rule `SignOutButton` applies.
78
- useEffect(() => {
79
- if (!canSignOut) setConfirming(false);
80
- }, [canSignOut]);
81
-
82
58
  useEffect(() => {
83
59
  const onKeyDown = (event: globalThis.KeyboardEvent) => {
84
60
  if (event.key !== 'Escape' || !openRef.current) return;
85
61
  setOpen(false);
86
- setConfirming(false);
87
62
  };
88
63
  document.addEventListener('keydown', onKeyDown);
89
64
  return () => document.removeEventListener('keydown', onKeyDown);
90
65
  }, []);
91
66
 
92
- const signOut = async () => {
93
- if (busy) return;
94
- if (!confirming) {
95
- setConfirming(true);
96
- return;
97
- }
98
- setBusy(true);
99
- // `logout` reloads into the login screen; a failure still leaves no usable
100
- // session, so there is nothing to recover here.
101
- await logout();
102
- };
103
-
104
67
  return (
105
68
  <div className="relative" ref={rootRef}>
106
69
  <button
@@ -163,20 +126,6 @@ export function HeaderMoreMenu({
163
126
  </button>
164
127
  ))}
165
128
 
166
- {canSignOut && !hidden.includes(NAVBAR_CONTROL.signout) && (
167
- <button
168
- type="button"
169
- role="menuitem"
170
- onClick={signOut}
171
- disabled={busy}
172
- className={ROW_CLASS}
173
- aria-expanded={confirming}
174
- data-confirming={confirming ? 'true' : undefined}
175
- >
176
- {confirming ? <LockOpen size={14} /> : <Lock size={14} />}
177
- <span>{confirming ? 'Click again to sign out' : 'Sign out'}</span>
178
- </button>
179
- )}
180
129
  </div>
181
130
  )}
182
131
  </div>
@@ -210,7 +210,7 @@ async function mount(
210
210
  }
211
211
 
212
212
  describe('HeaderControls', () => {
213
- test('desktop draws install, plugin slots, reload, context, lock, right side', async () => {
213
+ test('desktop draws install, plugin slots, reload, context, right side', async () => {
214
214
  await mount('desktop');
215
215
 
216
216
  expect(controlNames()).toEqual([
@@ -218,7 +218,6 @@ describe('HeaderControls', () => {
218
218
  'Demo Stats',
219
219
  'Reload page',
220
220
  'Context usage',
221
- 'Sign out',
222
221
  'Toggle Right Side',
223
222
  ]);
224
223
  });
@@ -234,7 +233,7 @@ describe('HeaderControls', () => {
234
233
  const groups = [...root.children] as HTMLElement[];
235
234
  expect(groups).toHaveLength(2);
236
235
  expect(controlNames(groups[0])).toEqual(['Context usage', 'Demo Stats', 'Install Kabmo']);
237
- expect(controlNames(groups[1])).toEqual(['Reload page', 'Sign out', 'Toggle Right Side']);
236
+ expect(controlNames(groups[1])).toEqual(['Reload page', 'Toggle Right Side']);
238
237
  });
239
238
 
240
239
  test('a native shell leads the right group with the server selector', async () => {
@@ -250,7 +249,6 @@ describe('HeaderControls', () => {
250
249
  expect(controlNames(groups[1])).toEqual([
251
250
  'Servers',
252
251
  'Reload page',
253
- 'Sign out',
254
252
  'Toggle Right Side',
255
253
  ]);
256
254
  } finally {
@@ -282,7 +280,6 @@ describe('HeaderControls', () => {
282
280
  expect(controlNames()).toEqual([
283
281
  'Install Kabmo',
284
282
  'Demo Stats',
285
- 'Sign out',
286
283
  'Toggle Right Side',
287
284
  ]);
288
285
  });
@@ -327,7 +324,6 @@ describe('HeaderControls', () => {
327
324
  'Demo Stats',
328
325
  'Reload page',
329
326
  'Context usage',
330
- 'Sign out',
331
327
  'Open Right Panel',
332
328
  ]);
333
329
  });
@@ -1,7 +1,6 @@
1
1
  import { PanelRight } from 'lucide-preact';
2
2
  import { PWAInstallButton } from '@/client/components/common/PWAInstallButton';
3
3
  import { ReloadPageButton } from '@/client/components/common/ReloadPageButton';
4
- import { SignOutButton } from '@/client/components/common/SignOutButton';
5
4
  import { ContextUsageButton } from '@/client/components/common/context-usage-button';
6
5
  import { HeaderPanelButtons } from '@/client/components/common/header-panel-buttons';
7
6
  import { ServerControl } from '@/client/components/common/server-control';
@@ -9,7 +8,6 @@ import type { HeaderEntries } from '@/client/components/common/header-panel-butt
9
8
  import { HeaderMoreMenu } from '@/client/components/common/header-controls/MoreMenu';
10
9
  import { WindowControls } from '@/client/components/common/window-controls';
11
10
  import { drawsWindowControls } from '@/client/lib/desktop/titlebar';
12
- import { useAuthEnabled, useAuthState } from '@/client/hooks/ui/auth';
13
11
  import { useViewportAtLeast } from '@/client/hooks/ui/media-query';
14
12
  import { CONTROL_BOX, CONTROL_GLYPH_PX, CONTROL_ROW_GAP } from '@/client/lib/ui/control-plate';
15
13
  import { NAVBAR_CONTROL, navbarPluginControlId, type NavbarControlId } from '@/client/hooks/ui/navbar-controls';
@@ -31,7 +29,7 @@ export type HeaderLayout = 'desktop' | 'mobile';
31
29
  * A wider phone or a rotated one gets them back — the fold is not a device
32
30
  * class, it is the width at which the row stops fitting.
33
31
  */
34
- const MOBILE_FULL_ROW_PX = { without: 400, withSignOut: 436 } as const;
32
+ const MOBILE_FULL_ROW_PX = 400;
35
33
 
36
34
  export interface HeaderControlsProps {
37
35
  layout: HeaderLayout;
@@ -102,8 +100,7 @@ const ICON_SIZE: Record<HeaderLayout, number> = CONTROL_GLYPH_PX;
102
100
  * 2. Plugin header slots
103
101
  * 3. Reload page — desktop; behind `⋯` on a phone
104
102
  * 4. Context usage
105
- * 5. Sign out (the lock) — desktop; behind `⋯` on a phone
106
- * 6. Right side — the editor column, the right panel and their
103
+ * 5. Right side — the editor column, the right panel and their
107
104
  * rail, as ONE toggle; the editor column's own
108
105
  * switch lives on the panel's corner instead
109
106
  * 7. More actions (`⋯`) — phone only, in the slot the two moved controls
@@ -113,8 +110,8 @@ const ICON_SIZE: Record<HeaderLayout, number> = CONTROL_GLYPH_PX;
113
110
  * so `split` spends the width between them instead of hugging the right one:
114
111
  *
115
112
  * LEFT, readouts and selectors — context usage → plugin slots → install
116
- * RIGHT, page actions — server selector → reload → sign out →
117
- * right-side toggle → page-drawn window controls
113
+ * RIGHT, page actions — server selector → reload → right-side
114
+ * toggle → page-drawn window controls
118
115
  *
119
116
  * The right-side toggle is the last app control, so it keeps the activity
120
117
  * rail's axis. The Windows/Linux caption cluster follows it because those
@@ -129,8 +126,8 @@ const ICON_SIZE: Record<HeaderLayout, number> = CONTROL_GLYPH_PX;
129
126
  * and the session title — the only functional thing in the left group. Reload
130
127
  * and sign-out are rare (a reload is Cmd/Ctrl+R; a sign-out happens once a
131
128
  * session), while context and the right panel are read and pressed mid-turn.
132
- * Measured with a UI password set and all four standing in the row, the title
133
- * got 89px at 390 and 19px at 320 — one letter and an ellipsis.
129
+ * Measured with every control standing in the row, the title got 89px at 390
130
+ * and 19px at 320 — one letter and an ellipsis.
134
131
  *
135
132
  * The fold is therefore a WIDTH, not a layout: `MOBILE_FULL_ROW_PX` is the
136
133
  * narrowest header that still fits every control beside a full 150px picker,
@@ -155,33 +152,22 @@ export function HeaderControls({
155
152
  const isPluginHidden = (pluginId: string) => hidden.includes(navbarPluginControlId(pluginId));
156
153
  const inlineEntries = entries.inline.filter((entry) => !isPluginHidden(entry.pluginId));
157
154
  const foldedEntries = entries.folded.filter((entry) => !isPluginHidden(entry.pluginId));
158
- const authEnabled = useAuthEnabled();
159
- const authState = useAuthState();
160
- const signOutShown = authEnabled && authState !== 'required';
161
- // Called unconditionally: a hook inside the ternary below would run in a
162
- // different order on the two layouts.
163
- const wideRow = useViewportAtLeast(signOutShown ? MOBILE_FULL_ROW_PX.withSignOut : MOBILE_FULL_ROW_PX.without);
155
+ const wideRow = useViewportAtLeast(MOBILE_FULL_ROW_PX);
164
156
  const wideEnoughForAll = layout === 'desktop' || wideRow;
165
- // A phone folds the two rare controls only while the row cannot hold them.
157
+ // A phone folds the rare reload control only while the row cannot hold it.
166
158
  const folded = layout === 'mobile' && !wideEnoughForAll;
167
- // The `⋯` trigger is drawn only while it has a row to offer: with both
168
- // folded controls switched off and no plugin entry folded, an empty menu is
169
- // a button that opens nothing.
170
159
  const moreRows =
171
- (folded && (!isHidden(NAVBAR_CONTROL.reload) || (signOutShown && !isHidden(NAVBAR_CONTROL.signout)))) ||
172
- foldedEntries.length > 0;
160
+ (folded && !isHidden(NAVBAR_CONTROL.reload)) || foldedEntries.length > 0;
173
161
 
174
162
  const installShown = layout === 'desktop' && !isHidden(NAVBAR_CONTROL.install);
175
163
  const reloadShown = (layout === 'desktop' || !folded) && !isHidden(NAVBAR_CONTROL.reload);
176
164
  const contextShown = !isHidden(NAVBAR_CONTROL.context);
177
- const signOutInRow = (layout === 'desktop' || !folded) && !isHidden(NAVBAR_CONTROL.signout) && signOutShown;
178
165
  const rightPanelShown = !isHidden(NAVBAR_CONTROL.rightPanel);
179
166
 
180
167
  const install = installShown ? <PWAInstallButton /> : null;
181
168
  const plugins = <HeaderPanelButtons layout={layout} entries={inlineEntries} />;
182
169
  const reload = reloadShown ? <ReloadPageButton size={size} className={iconClass} /> : null;
183
170
  const context = contextShown ? <ContextUsageButton sessionId={sessionId} layout={layout} /> : null;
184
- const signout = signOutInRow ? <SignOutButton size={size} className={iconClass} /> : null;
185
171
  const rightPanel = rightPanelShown ? (layout === 'mobile' ? (
186
172
  <button
187
173
  type="button"
@@ -235,7 +221,6 @@ export function HeaderControls({
235
221
  <div className={`flex items-center ${CONTROL_ROW_GAP}`}>
236
222
  <ServerControl variant="nav" />
237
223
  {reload}
238
- {signout}
239
224
  {rightPanel}
240
225
  {more}
241
226
  {windowControls}
@@ -254,7 +239,6 @@ export function HeaderControls({
254
239
  row fits every control at 400px open and 436px with the lock. */}
255
240
  {reload}
256
241
  {context}
257
- {signout}
258
242
  {rightPanel}
259
243
  {more}
260
244
  {windowControls}
@@ -228,7 +228,6 @@ describe('the phone row', () => {
228
228
  'Demo Stats',
229
229
  'Reload page',
230
230
  'Context usage',
231
- 'Sign out',
232
231
  'Open Right Panel',
233
232
  ]);
234
233
  });
@@ -237,30 +236,18 @@ describe('the phone row', () => {
237
236
  await mountPhone(360);
238
237
 
239
238
  expect(controlNames()).not.toContain('Reload page');
240
- expect(controlNames()).not.toContain('Sign out');
241
239
 
242
240
  const trigger = container.querySelector('button[aria-label="More actions"]') as HTMLElement;
243
241
  expect(trigger.getAttribute('aria-expanded')).toBe('false');
244
242
  const menu = await openMenu();
245
243
  expect(menu.textContent).toContain('Reload page');
246
- expect(menu.textContent).toContain('Sign out');
247
244
  expect(trigger.getAttribute('aria-expanded')).toBe('true');
248
245
  });
249
246
 
250
- test('a control switched off is gone from the ⋯ menu too', async () => {
247
+ test('a control switched off leaves no empty ⋯ menu', async () => {
251
248
  await mountPhone(360, ['reload']);
252
-
253
- const menu = await openMenu();
254
- expect(menu.textContent).not.toContain('Reload page');
255
- // Sign out is still off the row, so the menu keeps its row and the trigger
256
- // still has something to offer.
257
- expect(menu.textContent).toContain('Sign out');
258
-
259
- render(null, container);
260
- container.remove();
261
- await mountPhone(360, ['reload', 'signout']);
262
- // Nothing folded and nothing left in the menu: the trigger is not drawn,
263
- // rather than opening an empty panel.
249
+ // Reload is the only folded control now that sign-out lives in the footer,
250
+ // so hiding it leaves the trigger with nothing to open.
264
251
  expect(container.querySelector('button[aria-label="More actions"]')).toBeNull();
265
252
  });
266
253
  });