@kabmo-labs/kabmo 0.44.0 → 0.45.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 (253) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +1 -1
  3. package/dist/client/static/js/{CsvGrid-1t2q46rg.js → CsvGrid-z74weshk.js} +2 -2
  4. package/dist/client/static/js/{DocxView-301hxnwk.js → DocxView-dpe5x9ab.js} +5 -5
  5. package/dist/client/static/js/{DrawioView-47bwea5t.js → DrawioView-ftzwjf8v.js} +2 -2
  6. package/dist/client/static/js/{ImageView-68zdx5ex.js → ImageView-vchn6wyq.js} +1 -1
  7. package/dist/client/static/js/LayoutWrapper-1x0gnppc.js +2 -0
  8. package/dist/client/static/js/{Modal-fb9b4gq6.js → Modal-tteg7vtb.js} +18 -18
  9. package/dist/client/static/js/{PdfView-m64ksepp.js → PdfView-vjec8z3z.js} +1 -1
  10. package/dist/client/static/js/{SessionsView-zyjwhpzm.js → SessionsView-g7z3fxbp.js} +1 -1
  11. package/dist/client/static/js/{SheetView-e88sqprx.js → SheetView-hhtfkdhe.js} +25 -25
  12. package/dist/client/static/js/{SvgPreview-hs9a713t.js → SvgPreview-48n3ex6p.js} +1 -1
  13. package/dist/client/static/js/{abnfDiagram-O67JEVCF-fnr5kyqk.js → abnfDiagram-O67JEVCF-bpvzdara.js} +1 -1
  14. package/dist/client/static/js/architecture-7GRP2DOG-bch3nye9.js +1 -0
  15. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-7v003363.js → architectureDiagram-NJMV4G6O-xw62cr7j.js} +3 -3
  16. package/dist/client/static/js/{astro-t9vjc0mc.js → astro-56b0as3q.js} +1 -1
  17. package/dist/client/static/js/bash-mevzaywf.js +1 -0
  18. package/dist/client/static/js/{blockDiagram-BEXU5L5S-k4mwbw3d.js → blockDiagram-BEXU5L5S-x3a6cgar.js} +4 -4
  19. package/dist/client/static/js/{c4Diagram-YGBWAQC7-688zq6f4.js → c4Diagram-YGBWAQC7-katvaxbj.js} +2 -2
  20. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-h0s16pxr.js → classDiagram-v2-NBCMYWYE-bjz4mqqh.js} +3 -3
  21. package/dist/client/static/js/{cose-bilkent-JH36ORCC-qb2t8qq5.js → cose-bilkent-JH36ORCC-fsn80psf.js} +1 -1
  22. package/dist/client/static/js/cpp-wk9z0c5g.js +1 -0
  23. package/dist/client/static/js/css-3w3p9s67.js +1 -0
  24. package/dist/client/static/js/cynefin-OW5HDTMX-vqy5jtnk.js +1 -0
  25. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-syhtcr7b.js → cynefinDiagram-VND7K2PF-cfhbsnkm.js} +2 -2
  26. package/dist/client/static/js/{dagre-6A5THRUB-7wgbx6cm.js → dagre-6A5THRUB-j2wt7ns6.js} +2 -2
  27. package/dist/client/static/js/{diagram-22UHCM2B-951cmp5h.js → diagram-22UHCM2B-abrdj714.js} +8 -8
  28. package/dist/client/static/js/{diagram-3UASUU5V-mvdbqt7b.js → diagram-3UASUU5V-dbn15bxn.js} +1 -1
  29. package/dist/client/static/js/{diagram-ATOU4E4O-hkvdtgdm.js → diagram-ATOU4E4O-y79pwf7w.js} +3 -3
  30. package/dist/client/static/js/{diagram-CDSNMT55-bkkz35ca.js → diagram-CDSNMT55-f8ryt86n.js} +2 -2
  31. package/dist/client/static/js/{diagram-MLGK6HIB-z6pcrkc3.js → diagram-MLGK6HIB-ws7wn3q9.js} +1 -1
  32. package/dist/client/static/js/{diagram-MPIPVDR6-mkwf8j4m.js → diagram-MPIPVDR6-zmznrg13.js} +2 -2
  33. package/dist/client/static/js/{dockerfile-7gd570bm.js → dockerfile-qgc921kw.js} +1 -1
  34. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-trym26ts.js → ebnfDiagram-ZINNZB2B-y5q7hy1v.js} +1 -1
  35. package/dist/client/static/js/{elixir-z77c7tfn.js → elixir-12pgbgtq.js} +1 -1
  36. package/dist/client/static/js/{elk-276RUBZZ-gkhz67v6.js → elk-276RUBZZ-vddwbn6q.js} +1 -1
  37. package/dist/client/static/js/{erDiagram-OPXOYQCR-gkyr5cqs.js → erDiagram-OPXOYQCR-qdqcx4g4.js} +6 -6
  38. package/dist/client/static/js/{erlang-6vrvh2m6.js → erlang-811btv6p.js} +1 -1
  39. package/dist/client/static/js/eventmodeling-NTZA5JFV-65ph4s3m.js +1 -0
  40. package/dist/client/static/js/flowDiagram-KWPJA3E3-nh2tb65b.js +1 -0
  41. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-1qpme6ks.js → ganttDiagram-FUAMR5RP-763hk9rm.js} +1 -1
  42. package/dist/client/static/js/gitGraph-4MIJSDKK-t45ekjb6.js +1 -0
  43. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-wbg3kqak.js → gitGraphDiagram-X574FWY7-bgx1q5nw.js} +4 -4
  44. package/dist/client/static/js/graphql-027z8sc0.js +1 -0
  45. package/dist/client/static/js/html-fqda6wxx.js +1 -0
  46. package/dist/client/static/js/{index-ks23y2cd.js → index-03j5j1j0.js} +2 -2
  47. package/dist/client/static/js/{index-czedkbmb.js → index-05hx4ftf.js} +2 -2
  48. package/dist/client/static/js/index-0vk6v4y4.js +2 -0
  49. package/dist/client/static/js/{index-83pwa9c0.js → index-1nwwvv29.js} +1 -1
  50. package/dist/client/static/js/{index-31hntzse.js → index-228yzebd.js} +5 -5
  51. package/dist/client/static/js/{index-xf36nmbm.js → index-2b1wnvez.js} +2 -2
  52. package/dist/client/static/js/{index-6t21c6jt.js → index-34ff2vq6.js} +2 -2
  53. package/dist/client/static/js/{index-1923aj4g.js → index-3d21hpk7.js} +2 -2
  54. package/dist/client/static/js/{index-hfsvwfgw.js → index-3h2mr90j.js} +2 -2
  55. package/dist/client/static/js/{index-svmzgtcx.js → index-3sqndc9n.js} +2 -2
  56. package/dist/client/static/js/{index-6gyk52ff.js → index-47wn2gjx.js} +1 -1
  57. package/dist/client/static/js/{index-6ah5sj5y.js → index-4b5b6g0k.js} +1 -1
  58. package/dist/client/static/js/{index-53ysgsd2.js → index-5b2vsbcf.js} +1 -1
  59. package/dist/client/static/js/{index-qm92sf9w.js → index-5mrqfs82.js} +12 -12
  60. package/dist/client/static/js/{index-62ng8tkj.js → index-61j9qkck.js} +3 -3
  61. package/dist/client/static/js/index-6bm4pw90.css +1 -0
  62. package/dist/client/static/js/{index-fj4k07zt.js → index-6sqmhdyv.js} +2 -2
  63. package/dist/client/static/js/{index-gtkhz0hj.js → index-8dtp7mt0.js} +2 -2
  64. package/dist/client/static/js/index-a11ptyzf.js +1 -0
  65. package/dist/client/static/js/{index-nvevymac.js → index-acphtw1r.js} +2 -2
  66. package/dist/client/static/js/{index-pxm44qfd.js → index-cj39b26c.js} +1 -1
  67. package/dist/client/static/js/{index-wytdbvax.js → index-dgjerk4w.js} +3 -3
  68. package/dist/client/static/js/{index-ad4x44d6.js → index-dn6pqym4.js} +6 -6
  69. package/dist/client/static/js/{index-nr8s5xm9.js → index-ehg2ftnp.js} +2 -2
  70. package/dist/client/static/js/{index-jbkkwa2q.js → index-f51jxezc.js} +2 -2
  71. package/dist/client/static/js/index-f7paep2f.js +2 -0
  72. package/dist/client/static/js/{index-qkjx6521.js → index-f98dhbt4.js} +4 -4
  73. package/dist/client/static/js/{index-92n96mgd.js → index-fbct0jcf.js} +2 -2
  74. package/dist/client/static/js/{index-bjqz7swa.js → index-fqatn0vh.js} +1 -1
  75. package/dist/client/static/js/{index-tzdm1y3z.js → index-gcwmpfr4.js} +2 -2
  76. package/dist/client/static/js/{index-v5npdwy2.js → index-gmq5pbcv.js} +51 -51
  77. package/dist/client/static/js/{index-fbpc1wx6.js → index-gzafyqsr.js} +21 -21
  78. package/dist/client/static/js/{index-4y4hshcx.js → index-gzp4j2h5.js} +2 -2
  79. package/dist/client/static/js/{index-nqjd3hh5.js → index-h0rmkz9n.js} +2 -2
  80. package/dist/client/static/js/{index-8trggh1z.js → index-jpp0zm7t.js} +7 -7
  81. package/dist/client/static/js/{index-qf9x7yet.js → index-kg2sk8cf.js} +1 -1
  82. package/dist/client/static/js/{index-rpzxrr2d.js → index-mrw7qweg.js} +1 -1
  83. package/dist/client/static/js/{index-s8bktzpg.js → index-mwm8aptp.js} +1 -1
  84. package/dist/client/static/js/{index-c3v62nvt.js → index-n1ga63de.js} +2 -2
  85. package/dist/client/static/js/{index-22whvfdw.js → index-nzhwd6t3.js} +2 -2
  86. package/dist/client/static/js/{index-tr2pkfs6.js → index-p21mvqc2.js} +2 -2
  87. package/dist/client/static/js/{index-qsw5edtk.js → index-pfj3sd1n.js} +5 -5
  88. package/dist/client/static/js/{index-pysqpc5n.js → index-pxq4v81r.js} +2 -2
  89. package/dist/client/static/js/{index-07yh7qx0.js → index-q76jfb54.js} +1 -1
  90. package/dist/client/static/js/{index-6s4mrdew.js → index-qt9jc4ck.js} +2 -2
  91. package/dist/client/static/js/{index-ehacfgwm.js → index-r6e44vkx.js} +1 -1
  92. package/dist/client/static/js/{index-232nsp2c.js → index-szk3vk8h.js} +1 -1
  93. package/dist/client/static/js/{index-e6rm5xzj.js → index-t0yv1375.js} +1 -1
  94. package/dist/client/static/js/{index-n0matkz9.js → index-vgcm2g0g.js} +2 -2
  95. package/dist/client/static/js/{index-kwpaz891.js → index-vkerrwpa.js} +2 -2
  96. package/dist/client/static/js/{index-v7bcgh77.js → index-w57zbym7.js} +2 -2
  97. package/dist/client/static/js/{index-yfjvx4yf.js → index-wqrdgt1g.js} +2 -2
  98. package/dist/client/static/js/{index-barbpakv.js → index-x2wvq4ae.js} +2 -2
  99. package/dist/client/static/js/{index-3w845q50.js → index-x7rfmwg8.js} +2 -2
  100. package/dist/client/static/js/{index-cq98p2rb.js → index-xkwybnf3.js} +179 -179
  101. package/dist/client/static/js/info-A6RAGUB7-mw29xbwf.js +1 -0
  102. package/dist/client/static/js/{infoDiagram-VRGFBTTK-yebngg8c.js → infoDiagram-VRGFBTTK-e66pw8d9.js} +1 -1
  103. package/dist/client/static/js/ini-3cx6tmv4.js +1 -0
  104. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-kh4nqj6q.js → ishikawaDiagram-OU5B5YK6-ehc0q24d.js} +1 -1
  105. package/dist/client/static/js/java-zs6qh1dm.js +1 -0
  106. package/dist/client/static/js/javascript-b9mkygak.js +1 -0
  107. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-4khnf8x1.js → journeyDiagram-ZHPQQLJL-hye05qtd.js} +2 -2
  108. package/dist/client/static/js/jsx-gahhfczw.js +1 -0
  109. package/dist/client/static/js/{julia-svwxx41e.js → julia-mgsev9df.js} +1 -1
  110. package/dist/client/static/js/{kanban-definition-PNTS6WVX-snmq3wq4.js → kanban-definition-PNTS6WVX-vce614m8.js} +6 -6
  111. package/dist/client/static/js/lua-d8enp14s.js +1 -0
  112. package/dist/client/static/js/markdown-qetaj4vp.js +1 -0
  113. package/dist/client/static/js/{mermaid.core-yctw30sk.js → mermaid.core-gc79re5p.js} +7 -7
  114. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-atfv66wq.js → mindmap-definition-NLK3R4M7-ft1whaf5.js} +3 -3
  115. package/dist/client/static/js/one-dark-pro-rvg5xm1a.js +1 -0
  116. package/dist/client/static/js/one-light-2b5w3ksh.js +1 -0
  117. package/dist/client/static/js/packet-AYTQ26CC-md85wpjq.js +1 -0
  118. package/dist/client/static/js/{pegDiagram-GJSIUBJH-hpbtxjht.js → pegDiagram-GJSIUBJH-2s4ykhaa.js} +1 -1
  119. package/dist/client/static/js/{perl-mr0ds2ex.js → perl-6n93vjsa.js} +1 -1
  120. package/dist/client/static/js/{php-5h3wt6tv.js → php-w23nmbtc.js} +1 -1
  121. package/dist/client/static/js/pie-WAS4IAKB-4grcqnp8.js +1 -0
  122. package/dist/client/static/js/{pieDiagram-5QR66LMP-9zrtkdr2.js → pieDiagram-5QR66LMP-7h8dp0z3.js} +2 -2
  123. package/dist/client/static/js/properties-g6tpq003.js +1 -0
  124. package/dist/client/static/js/python-cy06fzhg.js +1 -0
  125. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-xq970vx1.js → quadrantDiagram-O4NWA36T-pteyxjxr.js} +2 -2
  126. package/dist/client/static/js/r-vw8berfv.js +1 -0
  127. package/dist/client/static/js/radar-RG4KPBEZ-7j9prhg1.js +1 -0
  128. package/dist/client/static/js/railroad-74A4TZTK-g8x2jps1.js +1 -0
  129. package/dist/client/static/js/railroad-abnf-HS5TGJTU-cbg7k68h.js +1 -0
  130. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-xfvjk9f8.js +1 -0
  131. package/dist/client/static/js/railroad-peg-WCYAUIDC-7w97805z.js +1 -0
  132. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-1g9jchbk.js → railroadDiagram-XR7U4H2S-68z9wdt0.js} +1 -1
  133. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-ntt088y4.js → requirementDiagram-PLB6GJNP-c08nmey6.js} +3 -3
  134. package/dist/client/static/js/{ruby-nn836rtq.js → ruby-ag3b3t9t.js} +1 -1
  135. package/dist/client/static/js/{rust-eygk56y5.js → rust-ke5ec0w5.js} +1 -1
  136. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-95k8c5v6.js → sankeyDiagram-IPEJSGJF-2r3kvjs5.js} +3 -3
  137. package/dist/client/static/js/{sass-c2bk03e4.js → sass-x0eez0kp.js} +1 -1
  138. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-qfvxrwfa.js → sequenceDiagram-PO4LG4MO-ctjycd88.js} +6 -6
  139. package/dist/client/static/js/{sizeCapture-INFHLROL-0m7dc5nd.js → sizeCapture-INFHLROL-97ndea95.js} +1 -1
  140. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-femwcn7n.js → stateDiagram-v2-GCMORJYK-aqnmsb96.js} +3 -3
  141. package/dist/client/static/js/{svelte-bfy1rq5g.js → svelte-tg19by0f.js} +1 -1
  142. package/dist/client/static/js/{swimlanes-2SLR337P-5n1qq48r.js → swimlanes-2SLR337P-v50cx1nx.js} +1 -1
  143. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-e227mz39.js +8 -0
  144. package/dist/client/static/js/{timeline-definition-EJHVYXUP-vdsj18be.js → timeline-definition-EJHVYXUP-1ggrtdcj.js} +4 -4
  145. package/dist/client/static/js/treeView-Q6P3EWNA-xhf1r6c3.js +1 -0
  146. package/dist/client/static/js/treemap-WGGIJYW6-4n3j7ekq.js +1 -0
  147. package/dist/client/static/js/tsx-3dzv8h6k.js +1 -0
  148. package/dist/client/static/js/typescript-44vs0wn4.js +1 -0
  149. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-psjbrprk.js → usecaseDiagram-POWQR4AR-ybcwhpzs.js} +19 -19
  150. package/dist/client/static/js/{vennDiagram-UO4OBE2U-4yn9kac9.js → vennDiagram-UO4OBE2U-p9ggrt07.js} +4 -4
  151. package/dist/client/static/js/{vue-0fwtgwj4.js → vue-mhj4sme0.js} +1 -1
  152. package/dist/client/static/js/wardley-WFR3VGLG-fb0py35r.js +1 -0
  153. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-js0tbpca.js → wardleyDiagram-VNRHLVJA-v79nb9kx.js} +2 -2
  154. package/dist/client/static/js/xml-yvv5fn3k.js +1 -0
  155. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-svr38ygh.js → xychartDiagram-PMCCYNJV-43thqscz.js} +2 -2
  156. package/dist/client/static/js/yaml-avewh7n5.js +1 -0
  157. package/marketplace/marketplace.json +7 -0
  158. package/marketplace/plugins/github-actions/README.md +142 -0
  159. package/marketplace/plugins/github-actions/icon.svg +12 -0
  160. package/marketplace/plugins/github-actions/package.json +30 -0
  161. package/marketplace/plugins/github-actions/settings-schema.json +27 -0
  162. package/marketplace/plugins/github-actions/src/app.tsx +32 -0
  163. package/marketplace/plugins/github-actions/src/panel/Actions.tsx +105 -0
  164. package/marketplace/plugins/github-actions/src/panel/LogView.tsx +76 -0
  165. package/marketplace/plugins/github-actions/src/panel/Row.tsx +59 -0
  166. package/marketplace/plugins/github-actions/src/panel/RunView.tsx +197 -0
  167. package/marketplace/plugins/github-actions/src/panel/format.ts +74 -0
  168. package/marketplace/plugins/github-actions/src/panel/index.test.tsx +86 -0
  169. package/marketplace/plugins/github-actions/src/panel/index.tsx +256 -0
  170. package/marketplace/plugins/github-actions/src/panel/picker.test.tsx +68 -0
  171. package/marketplace/plugins/github-actions/src/panel/test-fixtures.ts +98 -0
  172. package/marketplace/plugins/github-actions/src/panel/test-harness.tsx +175 -0
  173. package/marketplace/plugins/github-actions/src/protocol.ts +156 -0
  174. package/marketplace/plugins/github-actions/src/server/github.test.ts +264 -0
  175. package/marketplace/plugins/github-actions/src/server/github.ts +309 -0
  176. package/marketplace/plugins/github-actions/src/server/http.test.ts +150 -0
  177. package/marketplace/plugins/github-actions/src/server/http.ts +202 -0
  178. package/marketplace/plugins/github-actions/src/server/json.ts +44 -0
  179. package/marketplace/plugins/github-actions/src/server/logtext.test.ts +84 -0
  180. package/marketplace/plugins/github-actions/src/server/logtext.ts +59 -0
  181. package/marketplace/plugins/github-actions/src/server/progress.test.ts +96 -0
  182. package/marketplace/plugins/github-actions/src/server/progress.ts +62 -0
  183. package/marketplace/plugins/github-actions/src/server/remote.ts +84 -0
  184. package/marketplace/plugins/github-actions/src/server/scope.ts +51 -0
  185. package/marketplace/plugins/github-actions/src/server/token.ts +84 -0
  186. package/marketplace/plugins/github-actions/src/server.ts +163 -0
  187. package/marketplace/plugins/github-actions/src/state.test.ts +55 -0
  188. package/marketplace/plugins/github-actions/src/state.ts +63 -0
  189. package/marketplace/plugins/github-actions/tsconfig.json +16 -0
  190. package/package.json +1 -1
  191. package/src/client/components/mobile/RightSidebar.tsx +164 -66
  192. package/src/client/components/mobile/header-titlebar.test.tsx +92 -0
  193. package/src/client/components/mobile/mobile-right-sidebar/Chrome.tsx +179 -0
  194. package/src/client/components/mobile/panel-chips.test.tsx +12 -0
  195. package/src/client/components/mobile/panel-chips.tsx +5 -1
  196. package/src/client/components/mobile/right-drawer-nav.test.tsx +258 -0
  197. package/src/client/components/settings/apply-side-effects.ts +6 -0
  198. package/src/client/components/settings/categories/appearance-settings/PanelNavSection.tsx +123 -2
  199. package/src/client/components/workspace/panel-tabs/Home.tsx +14 -2
  200. package/src/client/components/workspace/panel-tabs/TabChip.tsx +173 -0
  201. package/src/client/components/workspace/panel-tabs/TabStrip.test.tsx +118 -0
  202. package/src/client/components/workspace/panel-tabs/TabStrip.tsx +89 -102
  203. package/src/client/components/workspace/panel-tabs/index.tsx +9 -1
  204. package/src/client/hooks/workspace/mobile-right-panel-nav.ts +63 -0
  205. package/src/client/hooks/workspace/panel-nav.test.ts +39 -1
  206. package/src/client/lib/ui/control-plate.ts +33 -0
  207. package/src/server/lib/bundler/titlebar-css.test.ts +5 -3
  208. package/src/shared/lib/settings/defaults.ts +2 -1
  209. package/src/shared/lib/workspace/panel-nav.test.ts +36 -0
  210. package/src/shared/lib/workspace/panel-nav.ts +43 -0
  211. package/src/shared/types/settings/state.ts +9 -1
  212. package/dist/client/static/js/LayoutWrapper-vw54s8ra.js +0 -2
  213. package/dist/client/static/js/architecture-7GRP2DOG-mq93vqx9.js +0 -1
  214. package/dist/client/static/js/bash-fjzhxy10.js +0 -1
  215. package/dist/client/static/js/cpp-9f6zkdd4.js +0 -1
  216. package/dist/client/static/js/css-y4y3qtsb.js +0 -1
  217. package/dist/client/static/js/cynefin-OW5HDTMX-qyg5rjr5.js +0 -1
  218. package/dist/client/static/js/eventmodeling-NTZA5JFV-15yz245z.js +0 -1
  219. package/dist/client/static/js/flowDiagram-KWPJA3E3-n1sapfye.js +0 -1
  220. package/dist/client/static/js/gitGraph-4MIJSDKK-xtjwv160.js +0 -1
  221. package/dist/client/static/js/graphql-amk52c95.js +0 -1
  222. package/dist/client/static/js/html-2y935m7r.js +0 -1
  223. package/dist/client/static/js/index-19ffgf9a.js +0 -2
  224. package/dist/client/static/js/index-204ae4vs.js +0 -2
  225. package/dist/client/static/js/index-n6fbd265.js +0 -1
  226. package/dist/client/static/js/index-sc7r305t.css +0 -1
  227. package/dist/client/static/js/info-A6RAGUB7-e31s2xvj.js +0 -1
  228. package/dist/client/static/js/ini-kemnmt16.js +0 -1
  229. package/dist/client/static/js/java-caqpfm88.js +0 -1
  230. package/dist/client/static/js/javascript-zegm06a1.js +0 -1
  231. package/dist/client/static/js/jsx-bvterpm5.js +0 -1
  232. package/dist/client/static/js/lua-1hcfm8ya.js +0 -1
  233. package/dist/client/static/js/markdown-n6na4ykv.js +0 -1
  234. package/dist/client/static/js/one-dark-pro-c1vnxka7.js +0 -1
  235. package/dist/client/static/js/one-light-mbxx52p5.js +0 -1
  236. package/dist/client/static/js/packet-AYTQ26CC-mtzmsrk4.js +0 -1
  237. package/dist/client/static/js/pie-WAS4IAKB-85nwadmj.js +0 -1
  238. package/dist/client/static/js/properties-nxcks67c.js +0 -1
  239. package/dist/client/static/js/python-58p0gqn0.js +0 -1
  240. package/dist/client/static/js/r-eyn8en0g.js +0 -1
  241. package/dist/client/static/js/radar-RG4KPBEZ-ae3jdajx.js +0 -1
  242. package/dist/client/static/js/railroad-74A4TZTK-3m0s7cse.js +0 -1
  243. package/dist/client/static/js/railroad-abnf-HS5TGJTU-pz22c3eb.js +0 -1
  244. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-cgqgqq15.js +0 -1
  245. package/dist/client/static/js/railroad-peg-WCYAUIDC-ts0nmcxb.js +0 -1
  246. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-n85hawg8.js +0 -8
  247. package/dist/client/static/js/treeView-Q6P3EWNA-fvpt3hm8.js +0 -1
  248. package/dist/client/static/js/treemap-WGGIJYW6-4z9s24je.js +0 -1
  249. package/dist/client/static/js/tsx-fnzxsv25.js +0 -1
  250. package/dist/client/static/js/typescript-0ppbqrb6.js +0 -1
  251. package/dist/client/static/js/wardley-WFR3VGLG-73mrhkmy.js +0 -1
  252. package/dist/client/static/js/xml-v1ytr8qz.js +0 -1
  253. package/dist/client/static/js/yaml-txrqz62t.js +0 -1
@@ -0,0 +1,256 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The Runs panel.
8
+ *
9
+ * Three things it deliberately does NOT own:
10
+ *
11
+ * - **The repository.** `useRepoScope()` is the pick the Files, Search, Source
12
+ * Control, Terminal and Forge panels share, so switching repos anywhere moves
13
+ * this panel too. A private pick would let the panel describe a repository the
14
+ * rest of the window is not looking at.
15
+ * - **The list.** It comes from the plugin's own server half, which is the only
16
+ * part that holds a credential and can reach GitHub.
17
+ * - **A poll.** Reads happen when the panel opens, when the scope or the filter
18
+ * moves, on Refresh, and after a write. A timer would fire against a view
19
+ * nobody is looking at, and a run that finishes while the panel is closed is
20
+ * answered by the next open.
21
+ */
22
+
23
+ import { useEffect, useRef, useState } from 'preact/hooks';
24
+ import { RepoPicker, usePanelHost, useRepoScope, useRpc, useSessionState } from '@kabmo-labs/kabmo-ui';
25
+
26
+ import {
27
+ RPC,
28
+ type ActInput,
29
+ type ActResult,
30
+ type ListInput,
31
+ type RunDetail,
32
+ type RunFilter,
33
+ type RunPage,
34
+ type RunVerb,
35
+ } from '../protocol';
36
+ import { RunView } from './RunView';
37
+ import { RunRowView } from './Row';
38
+ import { age, stateClass, stateMark } from './format';
39
+
40
+ const NO_FILTER: RunFilter = { branch: '', status: '' };
41
+
42
+ const STATUSES = [
43
+ { value: '', label: 'All states' },
44
+ { value: 'in_progress', label: 'Running' },
45
+ { value: 'failure', label: 'Failing' },
46
+ { value: 'success', label: 'Passing' },
47
+ { value: 'queued', label: 'Queued' },
48
+ ] as const;
49
+
50
+ export function ActionsPanel() {
51
+ const host = usePanelHost();
52
+ const scope = useRepoScope();
53
+ const root = scope.root ?? '';
54
+ const repo = scope.repo || '.';
55
+
56
+ const [filter, setFilter] = useSessionState<RunFilter>('actions.filter', NO_FILTER);
57
+ const [selected, setSelected] = useSessionState<number | null>('actions.runId', null);
58
+ const [page, setPage] = useState<RunPage | null>(null);
59
+ const [detail, setDetail] = useState<RunDetail | null>(null);
60
+ const [error, setError] = useState<string | null>(null);
61
+ const [loading, setLoading] = useState(false);
62
+ const [detailError, setDetailError] = useState<string | null>(null);
63
+ const [actBusy, setActBusy] = useState(false);
64
+ const [actMessage, setActMessage] = useState<string | null>(null);
65
+ const [actError, setActError] = useState<string | null>(null);
66
+ const [branchDraft, setBranchDraft] = useState(filter.branch);
67
+
68
+ const list = useRpc<ListInput, RunPage>(RPC.list);
69
+ const run = useRpc<{ root: string; repo: string; id: number }, RunDetail>(RPC.run);
70
+ const act = useRpc<ActInput, ActResult>(RPC.act);
71
+
72
+ // `useRpc` hands back a fresh object per render, so putting `call` in a
73
+ // dependency list re-runs the read on every render — the unbounded loop the
74
+ // forge panel's `use-forge.ts` documents. Refs hold the newest call while the
75
+ // effects key on the facts that actually changed.
76
+ const listCall = useRef(list.call);
77
+ listCall.current = list.call;
78
+ const runCall = useRef(run.call);
79
+ runCall.current = run.call;
80
+ const actCall = useRef(act.call);
81
+ actCall.current = act.call;
82
+
83
+ const filterKey = `${filter.branch}\u0000${filter.status}`;
84
+
85
+ const readList = (): void => {
86
+ if (!root) return;
87
+ setLoading(true);
88
+ void listCall.current({ root, repo, filter }).then((outcome) => {
89
+ setLoading(false);
90
+ if (outcome.ok) {
91
+ setPage(outcome.value as RunPage);
92
+ setError(null);
93
+ } else {
94
+ // A failed read must not leave the PREVIOUS scope's rows on screen under
95
+ // a moved picker — `.wiki` would draw the parent repo's thirty runs.
96
+ setPage(null);
97
+ setError(outcome.error.message);
98
+ }
99
+ });
100
+ };
101
+
102
+ // The scope and the filter are what a page answers; when either moves, the
103
+ // page on hand describes a different question and is dropped before the read.
104
+ useEffect(() => {
105
+ setPage(null);
106
+ setError(null);
107
+ }, [`${root}\u0000${repo}\u0000${filterKey}`]);
108
+
109
+ useEffect(() => {
110
+ if (!host.active) return;
111
+ readList();
112
+ }, [root, repo, filterKey, host.active, host.refreshKey]);
113
+
114
+ const readDetail = (id: number): void => {
115
+ if (!root) return;
116
+ setDetail(null);
117
+ setDetailError(null);
118
+ void runCall.current({ root, repo, id }).then((outcome) => {
119
+ if (outcome.ok) setDetail(outcome.value as RunDetail);
120
+ else setDetailError(outcome.error.message);
121
+ });
122
+ };
123
+
124
+ useEffect(() => {
125
+ if (selected === null) {
126
+ setDetail(null);
127
+ return;
128
+ }
129
+ readDetail(selected);
130
+ }, [selected, root, repo, host.refreshKey]);
131
+
132
+ const onAct = (verb: RunVerb): void => {
133
+ if (selected === null) return;
134
+ setActBusy(true);
135
+ setActError(null);
136
+ setActMessage(null);
137
+ void actCall.current({ root, repo, id: selected, verb }).then((outcome) => {
138
+ setActBusy(false);
139
+ if (outcome.ok) {
140
+ setActMessage((outcome.value as ActResult).message);
141
+ readList();
142
+ readDetail(selected);
143
+ } else {
144
+ setActError(outcome.error.message);
145
+ }
146
+ });
147
+ };
148
+
149
+ if (!root) {
150
+ return <p class="px-3 py-3 text-[11px] text-ink/55">Open a workspace folder to read its Actions runs.</p>;
151
+ }
152
+
153
+ if (selected !== null) {
154
+ if (detailError) {
155
+ return (
156
+ <div class="px-3 py-3">
157
+ <p class="text-[11px] text-error-text">{detailError}</p>
158
+ <button
159
+ type="button"
160
+ onClick={() => setSelected(null)}
161
+ class="mt-2 rounded border border-ink/15 px-2 py-0.5 text-[11px] text-ink/70 hover:bg-ink/5"
162
+ >
163
+ ← Runs
164
+ </button>
165
+ </div>
166
+ );
167
+ }
168
+ if (!detail) return <p class="px-3 py-3 text-[11px] text-ink/50">Reading the run…</p>;
169
+ return (
170
+ <RunView
171
+ detail={detail}
172
+ root={root}
173
+ repo={repo}
174
+ authenticated={page?.authenticated ?? true}
175
+ actBusy={actBusy}
176
+ actError={actError}
177
+ actMessage={actMessage}
178
+ onBack={() => setSelected(null)}
179
+ onAct={onAct}
180
+ />
181
+ );
182
+ }
183
+
184
+ return (
185
+ <div class="flex min-h-0 h-full flex-col">
186
+ <div class="flex flex-wrap items-center gap-1.5 border-b border-ink/10 px-3 py-1.5">
187
+ {/* The SHARED picker, not a copy: a repo chosen here moves Files, Search,
188
+ Source Control, Terminal and Forge, and theirs moves this one. */}
189
+ <RepoPicker scope={scope} className="max-w-[50%]" />
190
+ <input
191
+ value={branchDraft}
192
+ placeholder="any branch"
193
+ aria-label="Branch"
194
+ onInput={(event) => setBranchDraft((event.currentTarget as HTMLInputElement).value)}
195
+ onKeyDown={(event) => {
196
+ if (event.key === 'Enter') setFilter({ ...filter, branch: branchDraft });
197
+ }}
198
+ onBlur={() => {
199
+ if (branchDraft !== filter.branch) setFilter({ ...filter, branch: branchDraft });
200
+ }}
201
+ class="w-24 rounded border border-ink/15 bg-transparent px-1.5 py-0.5 font-mono text-[10.5px] text-ink placeholder:text-ink/35 focus:border-ink/30 focus:outline-none"
202
+ />
203
+ <select
204
+ value={filter.status}
205
+ aria-label="State"
206
+ onChange={(event) => setFilter({ ...filter, status: (event.currentTarget as HTMLSelectElement).value })}
207
+ class="rounded border border-ink/15 bg-transparent px-1 py-0.5 text-[10.5px] text-ink focus:border-ink/30 focus:outline-none"
208
+ >
209
+ {STATUSES.map((option) => (
210
+ <option key={option.value} value={option.value}>
211
+ {option.label}
212
+ </option>
213
+ ))}
214
+ </select>
215
+ <span class="font-mono text-[10px] text-ink/40">
216
+ {page ? `${page.runs.length}${page.total !== null ? `/${page.total}` : ''}` : ''}
217
+ </span>
218
+ <button
219
+ type="button"
220
+ onClick={readList}
221
+ class="ml-auto rounded border border-ink/15 px-1.5 py-0.5 text-[10.5px] text-ink/70 hover:bg-ink/5"
222
+ >
223
+ Refresh
224
+ </button>
225
+ </div>
226
+
227
+ {page?.notes.map((note) => (
228
+ <p key={note} class="border-b border-ink/5 bg-canvas/40 px-3 py-1 text-[10.5px] text-ink/55">
229
+ {note}
230
+ </p>
231
+ ))}
232
+ {error ? <p class="px-3 py-2 text-[11px] text-error-text">{error}</p> : null}
233
+
234
+ <div class="min-h-0 flex-1 overflow-auto">
235
+ {loading && !page ? (
236
+ <p class="px-3 py-3 text-[11px] text-ink/45">Reading runs…</p>
237
+ ) : page && page.runs.length === 0 && !error ? (
238
+ <p class="px-3 py-3 text-[11px] text-ink/55">
239
+ No runs match this filter. Clear the branch or state to see every run.
240
+ </p>
241
+ ) : (
242
+ page?.runs.map((row) => <RunRowView key={row.id} run={row} onOpen={(runRow) => setSelected(runRow.id)} />)
243
+ )}
244
+ </div>
245
+
246
+ <p class="flex items-center gap-1.5 border-t border-ink/10 px-3 py-1 font-mono text-[10px] text-ink/40">
247
+ <span class={page && page.runs[0] ? stateClass(page.runs[0].state) : 'text-ink/40'} aria-hidden="true">
248
+ {page && page.runs[0] ? stateMark(page.runs[0].state) : '–'}
249
+ </span>
250
+ <span class="truncate">
251
+ {page && page.runs[0] ? `latest ${page.runs[0].name} · ${age(page.runs[0].updatedAt)}` : 'no runs read yet'}
252
+ </span>
253
+ </p>
254
+ </div>
255
+ );
256
+ }
@@ -0,0 +1,68 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The panel's header control: the SHARED repository picker.
8
+ *
9
+ * It has its own suite because it asserts something the other panel tests do not
10
+ * — that a pick is written to the slot Files/Search/Source Control/Terminal read,
11
+ * rather than kept privately — and because the two facts it pins are the ones
12
+ * that break silently: a copy of the picker looks identical until another panel
13
+ * fails to follow it, and a stale list under a moved picker looks like a read.
14
+ */
15
+
16
+ import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, test } from 'bun:test';
17
+
18
+ import { clickAndSettle, harness, installDom, mount, resetHarness, restoreDom, row, teardownHarness } from './test-harness';
19
+
20
+ beforeAll(installDom);
21
+ afterAll(restoreDom);
22
+ beforeEach(resetHarness);
23
+ afterEach(teardownHarness);
24
+
25
+ /** The trigger the host draws for the shared pick, found by its own title. */
26
+ function trigger(): Element | null {
27
+ return document.querySelector('[title="Switch git project"]');
28
+ }
29
+
30
+ /** Open the picker and choose the row whose label is `label`. */
31
+ async function pick(label: string): Promise<void> {
32
+ await clickAndSettle(trigger());
33
+ const option = [...document.querySelectorAll('[role="option"]')].find(
34
+ (entry) => (entry.textContent ?? '').trim() === label,
35
+ );
36
+ await clickAndSettle(option);
37
+ }
38
+
39
+ describe('the shared repository picker', () => {
40
+ test('the header draws it, and a pick moves that slot', async () => {
41
+ await mount();
42
+ expect(trigger(), 'the panel must draw the shared picker, not only read the scope').not.toBeNull();
43
+ expect(trigger()?.textContent).toContain('alpha');
44
+
45
+ await pick('ws');
46
+
47
+ // The row is written to the SAME slot Files/Search/Git/Terminal read, which
48
+ // is the only thing that makes the control shared rather than a copy.
49
+ expect(harness.picks).toEqual(['.']);
50
+ expect(trigger()?.textContent).toContain('ws');
51
+ });
52
+
53
+ test('a pick that cannot be read drops the previous scope’s rows', async () => {
54
+ await mount();
55
+ expect(row(2)).not.toBeNull();
56
+
57
+ // The wiki repo is not addressable through the REST API: GitHub answers 404.
58
+ harness.listOutcome = {
59
+ ok: false,
60
+ error: { code: 'handler_error', message: 'Not found (404). The repository may be private.' },
61
+ };
62
+ await pick('ws');
63
+
64
+ expect(harness.picks.at(-1)).toBe('.');
65
+ expect(row(2), 'the old repo’s rows must not survive the pick').toBeNull();
66
+ expect(harness.container?.textContent).toContain('404');
67
+ });
68
+ });
@@ -0,0 +1,98 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The bodies the panel's suites read, so three files do not each own a copy.
8
+ *
9
+ * A suite mounts the assembled panel and asks what it DREW, so the fixture is
10
+ * the answer the server half would have given: one failing run and one passing
11
+ * one, and a run whose first job failed.
12
+ */
13
+
14
+ import type { RunDetail, RunPage, RunRow } from '../protocol';
15
+
16
+ export const RUN_SUCCESS: RunRow = {
17
+ id: 1,
18
+ name: 'Gates',
19
+ title: 'fix(terminal): keep the shell attached',
20
+ branch: 'main',
21
+ event: 'push',
22
+ status: 'completed',
23
+ conclusion: 'success',
24
+ state: 'success',
25
+ number: 9,
26
+ attempt: 1,
27
+ actor: 'ana',
28
+ createdAt: '2026-11-20T10:00:00Z',
29
+ startedAt: '2026-11-20T10:00:00Z',
30
+ updatedAt: '2026-11-20T10:02:00Z',
31
+ url: 'https://github.com/o/r/actions/runs/1',
32
+ };
33
+
34
+ export const RUN_FAILURE: RunRow = {
35
+ ...RUN_SUCCESS,
36
+ id: 2,
37
+ name: 'Release',
38
+ title: 'feat(chat): draggable column',
39
+ conclusion: 'failure',
40
+ state: 'failure',
41
+ number: 185,
42
+ updatedAt: '2026-11-20T12:19:35Z',
43
+ url: 'https://github.com/o/r/actions/runs/2',
44
+ };
45
+
46
+ export function page(overrides: Partial<RunPage> = {}): RunPage {
47
+ return {
48
+ slug: 'kabmo-labs/kabmo',
49
+ host: 'github.com',
50
+ authenticated: true,
51
+ branch: '',
52
+ status: '',
53
+ runs: [RUN_FAILURE, RUN_SUCCESS],
54
+ total: 2,
55
+ truncated: false,
56
+ notes: [],
57
+ ...overrides,
58
+ };
59
+ }
60
+
61
+ export function detail(): RunDetail {
62
+ return {
63
+ run: RUN_FAILURE,
64
+ jobs: [
65
+ {
66
+ id: 11,
67
+ name: 'Gates / Checks',
68
+ status: 'completed',
69
+ conclusion: 'failure',
70
+ state: 'failure',
71
+ startedAt: '2026-11-20T12:12:32Z',
72
+ completedAt: '2026-11-20T12:12:54Z',
73
+ runner: 'GitHub Actions 1000003378',
74
+ labels: ['ubuntu-latest'],
75
+ url: null,
76
+ steps: [
77
+ { number: 1, name: 'Set up job', status: 'completed', conclusion: 'success', state: 'success', startedAt: null, completedAt: null },
78
+ { number: 2, name: 'Test', status: 'completed', conclusion: 'failure', state: 'failure', startedAt: null, completedAt: null },
79
+ ],
80
+ },
81
+ {
82
+ id: 12,
83
+ name: 'E2E / Chromium',
84
+ status: 'completed',
85
+ conclusion: 'success',
86
+ state: 'success',
87
+ startedAt: '2026-11-20T12:12:32Z',
88
+ completedAt: '2026-11-20T12:16:00Z',
89
+ runner: 'GitHub Actions 1000003380',
90
+ labels: ['ubuntu-latest'],
91
+ url: null,
92
+ steps: [],
93
+ },
94
+ ],
95
+ progress: { done: 2, total: 2, failing: 1, running: null, runningStep: null },
96
+ notes: [],
97
+ };
98
+ }
@@ -0,0 +1,175 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The harness both panel suites mount through: a real DOM, the kit configured
8
+ * with the host's own services faked, and the one container the panel renders
9
+ * into.
10
+ *
11
+ * It is a module with MUTABLE state rather than a factory because a suite has to
12
+ * change an answer between the mount and the click — `harness.listOutcome = …` —
13
+ * and every file gets its own copy: `bun test` runs each suite in its own module
14
+ * graph.
15
+ */
16
+
17
+ import { Window } from 'happy-dom';
18
+ import { h, render } from 'preact';
19
+ import { act } from 'preact/test-utils';
20
+ import {
21
+ PanelHostProvider,
22
+ PluginIdProvider,
23
+ configureUiKit,
24
+ type RepoScope,
25
+ type UiKitServices,
26
+ } from '@kabmo-labs/kabmo-ui';
27
+
28
+ import type { RunDetail, RunPage } from '../protocol';
29
+ import { ActionsPanel } from './index';
30
+ import { detail, page } from './test-fixtures';
31
+
32
+ export type RpcOutcome<T> = { ok: true; value: T } | { ok: false; error: { code: string; message: string } };
33
+
34
+ const DOM_GLOBALS = ['window', 'document', 'navigator', 'HTMLElement', 'Node', 'Text', 'Element', 'SVGElement'] as const;
35
+ const saved = new Map<string, unknown>();
36
+
37
+ export const harness = {
38
+ container: null as HTMLElement | null,
39
+ calls: [] as Array<{ method: string; input: unknown }>,
40
+ listOutcome: null as RpcOutcome<RunPage> | null,
41
+ runOutcome: null as RpcOutcome<RunDetail> | null,
42
+ logOutcome: null as RpcOutcome<unknown> | null,
43
+ scope: null as RepoScope | null,
44
+ /** Every repository written to the shared slot, oldest first. */
45
+ picks: [] as string[],
46
+ scopeListeners: new Set<() => void>(),
47
+ };
48
+
49
+ /** happy-dom's globals, installed once per file and restored afterwards. */
50
+ export function installDom(): void {
51
+ const win = new Window({ url: 'http://localhost/' });
52
+ const target = globalThis as unknown as Record<string, unknown>;
53
+ for (const key of DOM_GLOBALS) {
54
+ if (!saved.has(key)) saved.set(key, target[key]);
55
+ target[key] = (win as unknown as Record<string, unknown>)[key];
56
+ }
57
+ }
58
+
59
+ export function restoreDom(): void {
60
+ const target = globalThis as unknown as Record<string, unknown>;
61
+ for (const key of DOM_GLOBALS) {
62
+ if (saved.has(key)) target[key] = saved.get(key);
63
+ else delete target[key];
64
+ }
65
+ }
66
+
67
+ /** A fresh scope, answers and container for one test. */
68
+ export function resetHarness(): void {
69
+ harness.calls = [];
70
+ harness.listOutcome = { ok: true, value: page() };
71
+ harness.runOutcome = { ok: true, value: detail() };
72
+ harness.logOutcome = {
73
+ ok: false,
74
+ error: { code: 'handler_error', message: 'Job logs need a token: GitHub answers 403 to an anonymous read.' },
75
+ };
76
+ harness.scope = {
77
+ root: '/ws',
78
+ repo: 'projects/alpha',
79
+ rows: [
80
+ { repo: '.', label: 'ws', short: 'ws' },
81
+ { repo: 'projects/alpha', label: 'projects/alpha', short: 'alpha' },
82
+ ],
83
+ scanning: false,
84
+ ready: true,
85
+ };
86
+ harness.picks = [];
87
+ harness.scopeListeners = new Set();
88
+
89
+ const services: UiKitServices = {
90
+ context: () => ({ sessionId: 's1', workspacePath: '/ws', theme: 'paper' }),
91
+ subscribe: () => () => {},
92
+ getSessionValue: () => null,
93
+ setSessionValue: () => {},
94
+ readWorkspaceFile: async () => '',
95
+ repoScope: () => harness.scope as RepoScope,
96
+ setRepoScope: (repo) => {
97
+ harness.picks.push(repo);
98
+ // The host resolves the row and re-publishes; a fake that only recorded
99
+ // the call would leave the trigger showing the old pick.
100
+ const current = harness.scope as RepoScope;
101
+ const row = current.rows.find((entry) => entry.repo === repo);
102
+ harness.scope = { ...current, repo, ready: true };
103
+ if (!row) return;
104
+ for (const listener of harness.scopeListeners) listener();
105
+ },
106
+ subscribeRepoScope: (listener) => {
107
+ harness.scopeListeners.add(listener);
108
+ return () => harness.scopeListeners.delete(listener);
109
+ },
110
+ rescanRepoScope: () => {},
111
+ callRpc: async (_pluginId, method, input) => {
112
+ harness.calls.push({ method, input });
113
+ if (method === 'run') return harness.runOutcome as RpcOutcome<RunDetail>;
114
+ if (method === 'log') return harness.logOutcome as RpcOutcome<unknown>;
115
+ if (method === 'act') return { ok: true, value: { message: 'Cancellation requested.' } };
116
+ return harness.listOutcome as RpcOutcome<RunPage>;
117
+ },
118
+ };
119
+ configureUiKit(services);
120
+
121
+ harness.container = document.createElement('div');
122
+ document.body.appendChild(harness.container);
123
+ }
124
+
125
+ export function teardownHarness(): void {
126
+ const container = harness.container;
127
+ if (container) {
128
+ render(null, container);
129
+ container.remove();
130
+ harness.container = null;
131
+ }
132
+ }
133
+
134
+ export async function mount(): Promise<void> {
135
+ const container = harness.container as HTMLElement;
136
+ await act(async () => {
137
+ render(
138
+ h(PanelHostProvider, {
139
+ value: { sessionId: 's1', enabled: true, active: true, refreshKey: 0 },
140
+ children: h(PluginIdProvider, {
141
+ pluginId: 'github-actions',
142
+ children: h(ActionsPanel, {}),
143
+ }),
144
+ }),
145
+ container,
146
+ );
147
+ });
148
+ await act(async () => {
149
+ await Promise.resolve();
150
+ });
151
+ }
152
+
153
+ export function click(element: Element | null | undefined): void {
154
+ element?.dispatchEvent(new window.MouseEvent('click', { bubbles: true }));
155
+ }
156
+
157
+ /**
158
+ * A click and the render it causes.
159
+ *
160
+ * `act` is not ceremony here: a handler's state update is applied by Preact's
161
+ * scheduler, so a bare `dispatchEvent` followed by an assertion reads the DOM
162
+ * BEFORE the click landed and the suite passes on a panel that never updated.
163
+ */
164
+ export async function clickAndSettle(element: Element | null | undefined): Promise<void> {
165
+ await act(async () => {
166
+ click(element);
167
+ });
168
+ await act(async () => {
169
+ await Promise.resolve();
170
+ });
171
+ }
172
+
173
+ export function row(id: number): Element | null {
174
+ return (harness.container as HTMLElement).querySelector(`[data-action-row="${id}"]`);
175
+ }