@kabmo-labs/kabmo 0.39.0 → 0.40.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.
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +363 -363
- package/dist/client/static/js/{CsvGrid-kfcp4sd6.js → CsvGrid-j9nvnhq1.js} +2 -2
- package/dist/client/static/js/{DocxView-atff5w38.js → DocxView-87gnpm81.js} +5 -5
- package/dist/client/static/js/{DrawioView-yfnq4c99.js → DrawioView-a351t8f8.js} +2 -2
- package/dist/client/static/js/ImageView-c139r891.js +1 -0
- package/dist/client/static/js/LayoutWrapper-08axzr3a.js +2 -0
- package/dist/client/static/js/{Modal-2xqd3sss.js → Modal-0weqfqvk.js} +17 -17
- package/dist/client/static/js/{PdfView-mk8paxt1.js → PdfView-n6bwcvc8.js} +1 -1
- package/dist/client/static/js/{SessionsView-ner25qxn.js → SessionsView-awef8ehj.js} +1 -1
- package/dist/client/static/js/{SheetView-s6n3fawm.js → SheetView-k8ymr87w.js} +24 -24
- package/dist/client/static/js/{SvgPreview-8bxvz3ez.js → SvgPreview-5pcp444e.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-tvvz9fha.js → abnfDiagram-O67JEVCF-psav75bx.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-6rbq97t9.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-bybv3wg4.js → architectureDiagram-NJMV4G6O-9bk6ykn7.js} +3 -3
- package/dist/client/static/js/{astro-4ybhkc9b.js → astro-0rh34hha.js} +1 -1
- package/dist/client/static/js/bash-vv2ysp0a.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-h3fs79x6.js → blockDiagram-BEXU5L5S-17xsf182.js} +5 -5
- package/dist/client/static/js/c-67jyc7sg.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-h8p3h54v.js → c4Diagram-YGBWAQC7-jn9j4n04.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-q645r4q6.js → classDiagram-v2-NBCMYWYE-663z1g1r.js} +5 -5
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-p4mm1zcv.js → cose-bilkent-JH36ORCC-vp4yvx8x.js} +1 -1
- package/dist/client/static/js/cpp-crfbnwv8.js +1 -0
- package/dist/client/static/js/css-983fbv00.js +1 -0
- package/dist/client/static/js/css-zj4qzw6r.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-zafxcz2k.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-v2hbc3aq.js → cynefinDiagram-VND7K2PF-dagkrjbh.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-4edpda33.js → dagre-6A5THRUB-8qgwpb5a.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-b6gp813w.js → diagram-22UHCM2B-671xtp0d.js} +11 -11
- package/dist/client/static/js/{diagram-3UASUU5V-s1f3b0ng.js → diagram-3UASUU5V-8nn5fha8.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-ga06kjp5.js → diagram-ATOU4E4O-dnar0ktg.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-wdbmv4td.js → diagram-CDSNMT55-bt0fhk7n.js} +3 -3
- package/dist/client/static/js/{diagram-MLGK6HIB-fkntefcq.js → diagram-MLGK6HIB-tp6dwxdb.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-k2zh7edp.js → diagram-MPIPVDR6-qgx8c8ee.js} +2 -2
- package/dist/client/static/js/{dockerfile-srcym0bs.js → dockerfile-hk0s4qaw.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-4vc4vz9c.js → ebnfDiagram-ZINNZB2B-nmf9r33z.js} +1 -1
- package/dist/client/static/js/{elixir-v9bbxsgg.js → elixir-gpez1k9m.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-g2ppf1by.js → elk-276RUBZZ-dheh5ngz.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-rmnwkb5q.js → erDiagram-OPXOYQCR-8837mk18.js} +5 -5
- package/dist/client/static/js/{erlang-55r0skxa.js → erlang-w9gmf866.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-cq3dvz7e.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-spzh2jxq.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-ptfvae64.js → ganttDiagram-FUAMR5RP-g68mvnje.js} +2 -2
- package/dist/client/static/js/{ghostty-web-2gt2tp72.js → ghostty-web-22pdvhta.js} +4 -4
- package/dist/client/static/js/gitGraph-4MIJSDKK-epgk26pj.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-ne9n3cyf.js → gitGraphDiagram-X574FWY7-ymk81cdj.js} +2 -2
- package/dist/client/static/js/graphql-dewsj5g1.js +1 -0
- package/dist/client/static/js/html-1cpe2xc8.js +1 -0
- package/dist/client/static/js/{index-dmd26a1y.js → index-018ehs1n.js} +1 -1
- package/dist/client/static/js/{index-442mbhwb.js → index-173x4bh0.js} +2 -2
- package/dist/client/static/js/{index-c1be3rva.js → index-2kg3r5jw.js} +2 -2
- package/dist/client/static/js/{index-gvkc9e32.js → index-4j1g7m8g.js} +1 -1
- package/dist/client/static/js/{index-7h5n5rz4.js → index-4j5jwb54.js} +2 -2
- package/dist/client/static/js/{index-8egjccbq.js → index-547h1b8j.js} +52 -52
- package/dist/client/static/js/{index-4pehdq5h.js → index-69xe17c1.js} +2 -2
- package/dist/client/static/js/{index-k5a6r25s.js → index-6wtx7a9x.js} +2 -2
- package/dist/client/static/js/{index-m3r0j562.js → index-8888hgj8.js} +5 -5
- package/dist/client/static/js/{index-8w2tx2k9.js → index-8ggxxp8c.js} +2 -2
- package/dist/client/static/js/{index-b08hx4tw.js → index-9wjnbb3q.js} +2 -2
- package/dist/client/static/js/{index-p89z1qmj.js → index-ag78jnva.js} +1 -1
- package/dist/client/static/js/{index-xrp2zv8z.js → index-agdbjh5k.js} +2 -2
- package/dist/client/static/js/index-aznkfx1z.js +2 -0
- package/dist/client/static/js/{index-cfnxda13.js → index-b612vske.js} +2 -2
- package/dist/client/static/js/{index-k3c3n69j.js → index-bdz08fe2.js} +12 -12
- package/dist/client/static/js/{index-ntx3bbmb.js → index-bgpcf3mr.js} +1 -1
- package/dist/client/static/js/index-bj3wn9je.js +1 -0
- package/dist/client/static/js/{index-7z63xr1s.js → index-c003wb3r.js} +1 -1
- package/dist/client/static/js/{index-5kvvb0zm.js → index-cccrappc.js} +2 -2
- package/dist/client/static/js/{index-k7sdsmgv.js → index-ce4vytm6.js} +2 -2
- package/dist/client/static/js/{index-2rs03vfy.js → index-d1vearmk.js} +2 -2
- package/dist/client/static/js/index-dhrp656p.js +1 -0
- package/dist/client/static/js/{index-k61tdd4a.js → index-dj7y2df7.js} +2 -2
- package/dist/client/static/js/{index-4wtr5wjp.js → index-ek4gwrm8.js} +2 -2
- package/dist/client/static/js/{index-mdxnhndy.js → index-ek7hqfp0.js} +2 -2
- package/dist/client/static/js/{index-drjtwfp5.js → index-fg965t62.js} +2 -2
- package/dist/client/static/js/{index-me7m3516.js → index-g10nr8m6.js} +5 -5
- package/dist/client/static/js/{index-4wvtar0v.js → index-gn92c6hp.js} +2 -2
- package/dist/client/static/js/{index-t6gznaxm.js → index-gx2xefdg.js} +2 -2
- package/dist/client/static/js/{index-q0bph5x0.js → index-haaz8t7e.js} +2 -2
- package/dist/client/static/js/{index-pr7gk5eq.js → index-harsfp4x.js} +10 -10
- package/dist/client/static/js/{index-3fw3sd10.js → index-j4ks5s41.js} +179 -179
- package/dist/client/static/js/{index-cst843zs.css → index-jqs23cc7.css} +1 -1
- package/dist/client/static/js/{index-ymp2wqtc.js → index-js81yrmy.js} +3 -3
- package/dist/client/static/js/{index-enmh3w27.js → index-jy91r3ap.js} +2 -2
- package/dist/client/static/js/{index-y2prm0xm.js → index-mxpgfj6p.js} +2 -2
- package/dist/client/static/js/{index-a7qccdq2.js → index-p2812ygk.js} +1 -1
- package/dist/client/static/js/index-pp6mss9b.js +3 -0
- package/dist/client/static/js/index-q1bqg4f6.js +1 -0
- package/dist/client/static/js/{index-v8vjh5jj.js → index-qnt118mp.js} +1 -1
- package/dist/client/static/js/index-qntpsp98.js +2 -0
- package/dist/client/static/js/{index-fjnkzk12.js → index-qsw5edtk.js} +5 -5
- package/dist/client/static/js/{index-ywpdhntc.js → index-qw5aqk2d.js} +1 -1
- package/dist/client/static/js/{index-9gepbvdt.js → index-r1fe56cn.js} +2 -2
- package/dist/client/static/js/{index-72289dgx.js → index-rc8wrs2a.js} +2 -2
- package/dist/client/static/js/index-rvjc19x7.js +2 -0
- package/dist/client/static/js/{index-9d6x1f3t.js → index-s78n0dtv.js} +2 -2
- package/dist/client/static/js/{index-c36pag9y.js → index-sj4y8kj2.js} +2 -2
- package/dist/client/static/js/{index-qsrw5c67.js → index-vv9ytx0t.js} +2 -2
- package/dist/client/static/js/{index-1sgad84m.js → index-vwc8pdy3.js} +2 -2
- package/dist/client/static/js/{index-8qgwj6m8.js → index-w130cs7d.js} +1 -1
- package/dist/client/static/js/{index-hh05xd1d.js → index-wsqgp9jw.js} +2 -2
- package/dist/client/static/js/{index-61qjr1k0.js → index-wv36ddd5.js} +48 -48
- package/dist/client/static/js/{index-56w8m083.js → index-wy05jt00.js} +2 -2
- package/dist/client/static/js/{index-0j518hqm.js → index-xf36nmbm.js} +2 -2
- package/dist/client/static/js/{index-xdqsqhnn.js → index-y5hxhr7q.js} +4 -4
- package/dist/client/static/js/{index-pzqsp5jw.js → index-y82bk3hr.js} +3 -3
- package/dist/client/static/js/{index-rj81xrvw.js → index-ys4t1am4.js} +2 -2
- package/dist/client/static/js/{index-y3qxrs90.js → index-yzg9mbsv.js} +2 -2
- package/dist/client/static/js/info-A6RAGUB7-0an46pag.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-ctfwcm3n.js → infoDiagram-VRGFBTTK-11trzn8c.js} +1 -1
- package/dist/client/static/js/ini-09e0scxh.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-b0b0pn4y.js → ishikawaDiagram-OU5B5YK6-8xnnymb5.js} +2 -2
- package/dist/client/static/js/java-vnaesxzs.js +1 -0
- package/dist/client/static/js/javascript-zegm06a1.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-kdq12drs.js → journeyDiagram-ZHPQQLJL-wd47j0hy.js} +3 -3
- package/dist/client/static/js/json-g5ggnd94.js +1 -0
- package/dist/client/static/js/jsx-xz71aed4.js +1 -0
- package/dist/client/static/js/{julia-jhe2vd4f.js → julia-c2q0vwpd.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-65x6xn2q.js → kanban-definition-PNTS6WVX-s5rgcp44.js} +4 -4
- package/dist/client/static/js/lua-e4wenyzt.js +1 -0
- package/dist/client/static/js/markdown-yv3p1p7m.js +1 -0
- package/dist/client/static/js/{mermaid.core-0fq63jpa.js → mermaid.core-9fxp8nt2.js} +7 -7
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-p86myex3.js → mindmap-definition-NLK3R4M7-4fyewtst.js} +3 -3
- package/dist/client/static/js/one-dark-pro-ahch85zb.js +1 -0
- package/dist/client/static/js/one-light-9706jgqt.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-5e397pav.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-p2hkk9xb.js → pegDiagram-GJSIUBJH-s2xe2e2k.js} +1 -1
- package/dist/client/static/js/{perl-qhj6tk7k.js → perl-6pa0tn3b.js} +1 -1
- package/dist/client/static/js/{php-arycc4w7.js → php-1zy994pz.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-0zzmzg64.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-bza19wkx.js → pieDiagram-5QR66LMP-1szpjbzy.js} +2 -2
- package/dist/client/static/js/properties-0ag74bdj.js +1 -0
- package/dist/client/static/js/python-zsn5tdbj.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-bxqec9w1.js → quadrantDiagram-O4NWA36T-mv3ee2qa.js} +3 -3
- package/dist/client/static/js/r-mwtqhnw3.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-mtar9742.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-d6a6j9fq.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-1257kd8x.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-v8b6qmas.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-jxpbx410.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-1g3hx3sm.js → railroadDiagram-XR7U4H2S-hgdqjpm9.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-qbjjm48v.js → requirementDiagram-PLB6GJNP-yrfjp9wx.js} +3 -3
- package/dist/client/static/js/{ruby-fb6zzevm.js → ruby-arvs7kz4.js} +1 -1
- package/dist/client/static/js/{rust-jatm47v6.js → rust-3ahjk339.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-t2ythbh7.js → sankeyDiagram-IPEJSGJF-k7k871xa.js} +3 -3
- package/dist/client/static/js/{sass-fzs6a0kr.js → sass-cmkf7nwd.js} +1 -1
- package/dist/client/static/js/{scss-gdb52d0c.js → scss-x7ddw6gb.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-mqsfek2j.js → sequenceDiagram-PO4LG4MO-gd80m0as.js} +7 -7
- package/dist/client/static/js/{sizeCapture-INFHLROL-xj67pgds.js → sizeCapture-INFHLROL-jv6p4834.js} +1 -1
- package/dist/client/static/js/sql-aczp05f2.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-gj4fezak.js → stateDiagram-v2-GCMORJYK-tvphxq2h.js} +3 -3
- package/dist/client/static/js/{svelte-8s3k6qjd.js → svelte-0hv6pak2.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-pgtdd1pk.js → swimlanes-2SLR337P-3dt7nxj2.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-aqnh1hhp.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-q013vdd1.js → timeline-definition-EJHVYXUP-40vvf856.js} +4 -4
- package/dist/client/static/js/treeView-Q6P3EWNA-q3qr7ew7.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-zgbdydeq.js +1 -0
- package/dist/client/static/js/tsx-s1shkfg9.js +1 -0
- package/dist/client/static/js/typescript-htx9v6bf.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-7swsbqnq.js → usecaseDiagram-POWQR4AR-g1j5x0xh.js} +28 -28
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-9dygxdxf.js → vennDiagram-UO4OBE2U-5b8789qk.js} +1 -1
- package/dist/client/static/js/{vue-k3f3chre.js → vue-zccj3qa5.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-b230aajh.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-aaaa9kj3.js → wardleyDiagram-VNRHLVJA-c7x3za3w.js} +3 -3
- package/dist/client/static/js/xml-23y6pgvx.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-tamf39gx.js → xychartDiagram-PMCCYNJV-h0fy45tg.js} +3 -3
- package/dist/client/static/js/yaml-vrayja34.js +1 -0
- package/marketplace/plugins/command-runner/package.json +2 -2
- package/marketplace/plugins/command-runner/src/panel/Custom.test.tsx +1 -0
- package/marketplace/plugins/command-runner/src/panel/Groups.test.tsx +10 -0
- package/marketplace/plugins/command-runner/src/panel/Groups.tsx +24 -3
- package/marketplace/plugins/command-runner/src/panel/index.tsx +1 -0
- package/marketplace/plugins/command-runner/src/protocol.ts +10 -0
- package/marketplace/plugins/command-runner/src/server/discovery.test.ts +30 -0
- package/marketplace/plugins/command-runner/src/server/scan.ts +16 -3
- package/package.json +1 -1
- package/src/client/components/common/header-controls/MoreMenu.tsx +24 -14
- package/src/client/components/common/header-controls/index.test.tsx +22 -0
- package/src/client/components/common/header-controls/index.tsx +8 -2
- package/src/client/components/mobile/LayoutWrapper.tsx +19 -2
- package/src/client/components/mobile/RightSidebar.tsx +49 -1
- package/src/client/components/mobile/SessionSidebar.tsx +25 -1
- package/src/client/components/mobile/header-titlebar.test.tsx +17 -0
- package/src/client/components/mobile/mobile-main-view/Header.test.tsx +43 -0
- package/src/client/components/mobile/mobile-main-view/Header.tsx +30 -0
- package/src/client/components/mobile/mobile-session-sidebar/Dock.tsx +5 -1
- package/src/client/components/mobile/mobile-session-sidebar/Header.tsx +12 -1
- package/src/client/components/mobile/panel-chips.test.tsx +13 -0
- package/src/client/components/mobile/panel-chips.tsx +9 -2
- package/src/client/components/settings/categories/connect-settings/DeviceTable.test.tsx +92 -0
- package/src/client/components/settings/categories/connect-settings/DeviceTable.tsx +22 -3
- package/src/client/components/workspace/git-panel/commit-modal/Header.test.tsx +21 -0
- package/src/client/components/workspace/git-panel/commit-modal/Header.tsx +13 -9
- package/src/client/components/workspace/terminal-panel/focus-target.test.ts +121 -0
- package/src/client/components/workspace/terminal-panel/focus-target.ts +54 -0
- package/src/client/components/workspace/terminal-panel/index.tsx +7 -1
- package/src/client/components/workspace/terminal-panel/instance.ts +82 -0
- package/src/client/components/workspace/terminal-panel/mount.ts +22 -63
- package/src/client/components/workspace/terminal-panel/soft-keyboard.ts +29 -0
- package/src/client/hooks/ui/touch-device.ts +8 -3
- package/src/client/hooks/ui/visibility-menu-trigger.test.ts +155 -0
- package/src/client/hooks/ui/visibility-menu-trigger.ts +85 -0
- package/src/client/hooks/workspace/panel-visibility-menu.ts +50 -0
- package/src/client/lib/ui/soft-keyboard.test.ts +103 -0
- package/src/client/lib/ui/soft-keyboard.ts +90 -0
- package/src/server/lib/auth/guard.ts +8 -2
- package/src/server/lib/connect/devices.server.test.ts +70 -0
- package/src/server/lib/connect/devices.server.ts +43 -1
- package/src/server/lib/connect/last-connect.gate.test.ts +52 -0
- package/src/server/lib/terminal/attach-replay.test.ts +80 -17
- package/src/server/plugins/static.test.ts +23 -1
- package/src/server/plugins/static.ts +24 -1
- package/src/server/routes/connect/devices.ts +5 -4
- package/src/shared/lib/connect/types.ts +1 -0
- package/dist/client/static/js/ImageView-nreh25s0.js +0 -1
- package/dist/client/static/js/LayoutWrapper-0x1q1q5z.js +0 -2
- package/dist/client/static/js/architecture-7GRP2DOG-y0zb4vqa.js +0 -1
- package/dist/client/static/js/bash-k6p3y3pr.js +0 -1
- package/dist/client/static/js/c-ve09y19q.js +0 -1
- package/dist/client/static/js/cpp-vhqp7bcy.js +0 -1
- package/dist/client/static/js/css-77mvf0ca.js +0 -1
- package/dist/client/static/js/css-tys2rrny.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-nt1ed192.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-v4edaxx7.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-jvrvhb9d.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-adzhec96.js +0 -1
- package/dist/client/static/js/graphql-g97hycb3.js +0 -1
- package/dist/client/static/js/html-2syect3n.js +0 -1
- package/dist/client/static/js/index-1jeyjqkh.js +0 -2
- package/dist/client/static/js/index-270y5r9k.js +0 -2
- package/dist/client/static/js/index-5a4w58r2.js +0 -1
- package/dist/client/static/js/index-878d61js.js +0 -1
- package/dist/client/static/js/index-dt22v9ns.js +0 -2
- package/dist/client/static/js/index-jkph8wqq.js +0 -3
- package/dist/client/static/js/index-mmsszqvn.js +0 -1
- package/dist/client/static/js/info-A6RAGUB7-2ye26vqn.js +0 -1
- package/dist/client/static/js/ini-7ffv28px.js +0 -1
- package/dist/client/static/js/java-4x5yky4a.js +0 -1
- package/dist/client/static/js/javascript-4kw2j9t3.js +0 -1
- package/dist/client/static/js/json-h3kwpty2.js +0 -1
- package/dist/client/static/js/jsx-jk20f0dr.js +0 -1
- package/dist/client/static/js/lua-k02dpxq8.js +0 -1
- package/dist/client/static/js/markdown-fhhg7ms6.js +0 -1
- package/dist/client/static/js/one-dark-pro-c4q810z4.js +0 -1
- package/dist/client/static/js/one-light-czk9dzya.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-b0j3te0q.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-28qq62fn.js +0 -1
- package/dist/client/static/js/properties-qhvcxc13.js +0 -1
- package/dist/client/static/js/python-3qsrs510.js +0 -1
- package/dist/client/static/js/r-z2ng7mza.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-fyrcbpyd.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-9s62qncd.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-f7yjmhrk.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-sfrw8gkz.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-4mm4cern.js +0 -1
- package/dist/client/static/js/sql-ypk53ntb.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-zk37paj9.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-a5vgg4gz.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-ctqhajgg.js +0 -1
- package/dist/client/static/js/tsx-zy7hb2hw.js +0 -1
- package/dist/client/static/js/typescript-2hr53c8j.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-ns7e0fqf.js +0 -1
- package/dist/client/static/js/xml-p4742r9b.js +0 -1
- package/dist/client/static/js/yaml-qbckg671.js +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Suspense } from 'preact/compat';
|
|
2
|
+
import { useCallback, useEffect } from 'preact/hooks';
|
|
2
3
|
import { X } from 'lucide-preact';
|
|
3
4
|
import { usePanelCatalog, type PanelBodyProps } from '@/client/components/workspace/plugin-panel/resolve';
|
|
4
5
|
import { PanelHostProvider } from '@kabmo-labs/kabmo-ui';
|
|
@@ -9,7 +10,14 @@ import { useLeftDock } from '@/client/hooks/workspace/left-dock';
|
|
|
9
10
|
import { SESSIONS_VIEW_ID } from '@/shared/lib/workspace/left-dock';
|
|
10
11
|
import { phoneRightPanels } from '@/shared/lib/workspace/mobile-dock';
|
|
11
12
|
import { DEFAULT_RIGHT_PANEL_TYPE } from '@/shared/lib/workspace/right-panels';
|
|
13
|
+
import {
|
|
14
|
+
armTerminalSoftKeyboard,
|
|
15
|
+
panelWantsSoftKeyboard,
|
|
16
|
+
} from '@/client/components/workspace/terminal-panel/soft-keyboard';
|
|
17
|
+
import { releaseSoftKeyboard } from '@/client/lib/ui/soft-keyboard';
|
|
12
18
|
import { PanelChips } from '@/client/components/mobile/panel-chips';
|
|
19
|
+
import { VisibilityMenu } from '@/client/components/layout/VisibilityMenu';
|
|
20
|
+
import { usePanelVisibilityMenu } from '@/client/hooks/workspace/panel-visibility-menu';
|
|
13
21
|
import { titlebarPaddingLeft, titlebarPaddingRight } from '@/shared/lib/ui/titlebar';
|
|
14
22
|
import { dragRegionProps, titlebarInsetLeft } from '@/client/lib/desktop/titlebar';
|
|
15
23
|
|
|
@@ -72,6 +80,34 @@ export function MobileRightSidebar({
|
|
|
72
80
|
const { changes } = useGitStatus(rootPath, activeRepo, enabled);
|
|
73
81
|
const hasGitChanges = changes.length > 0;
|
|
74
82
|
|
|
83
|
+
// A tap on a chip is the gesture that can open the soft keyboard, and the
|
|
84
|
+
// terminal's view mounts after it — so the keyboard is armed here, before the
|
|
85
|
+
// panel exists (`soft-keyboard.ts`). Tapping the chip that is already active
|
|
86
|
+
// must not arm it: the terminal is mounted and focused, and the bridge would
|
|
87
|
+
// take the keyboard away from it.
|
|
88
|
+
const handleSelectTab = useCallback((id: string) => {
|
|
89
|
+
if (id !== activePanel?.id) armTerminalSoftKeyboard(id);
|
|
90
|
+
setActiveTab(id);
|
|
91
|
+
}, [activePanel?.id, setActiveTab]);
|
|
92
|
+
|
|
93
|
+
// The drawer can open on a stored tab that is no longer the terminal (the
|
|
94
|
+
// view was disabled, moved to the left rail, or the session has no
|
|
95
|
+
// workspace). The tap that opened the drawer armed the keyboard optimistically;
|
|
96
|
+
// drop it when the view that actually mounted is not the one that types.
|
|
97
|
+
useEffect(() => {
|
|
98
|
+
if (!panelWantsSoftKeyboard(activePanel?.id)) releaseSoftKeyboard();
|
|
99
|
+
}, [activePanel?.id]);
|
|
100
|
+
|
|
101
|
+
// The phone's right-click: a long press on the drawer's header opens the same
|
|
102
|
+
// panel switch the desktop right rail has. The list follows the drawer's own
|
|
103
|
+
// rule — with the left rail on, a panel placed there is not in this drawer,
|
|
104
|
+
// so it is not offered here either; with the rail off this drawer is the
|
|
105
|
+
// catch-all and lists everything but the session list.
|
|
106
|
+
const panelMenu = usePanelVisibilityMenu(dock.enabled ? 'right' : 'all');
|
|
107
|
+
const menuItems = dock.enabled
|
|
108
|
+
? panelMenu.items
|
|
109
|
+
: panelMenu.items.filter((item) => item.id !== SESSIONS_VIEW_ID);
|
|
110
|
+
|
|
75
111
|
// ONE props object per render, handed to the view AND published on the host
|
|
76
112
|
// context, so a component nested inside the view reads exactly what its
|
|
77
113
|
// top-level one was given.
|
|
@@ -100,6 +136,7 @@ export function MobileRightSidebar({
|
|
|
100
136
|
<div
|
|
101
137
|
className="border-b border-ink/10 flex items-center justify-between px-3 flex-shrink-0 bg-canvas titlebar-drag-region select-none"
|
|
102
138
|
{...dragRegionProps()}
|
|
139
|
+
{...panelMenu.surfaceProps}
|
|
103
140
|
style={{
|
|
104
141
|
height: 'calc(3.5rem + env(safe-area-inset-top, 0px))',
|
|
105
142
|
paddingTop: 'env(safe-area-inset-top, 0px)',
|
|
@@ -115,7 +152,7 @@ export function MobileRightSidebar({
|
|
|
115
152
|
<PanelChips
|
|
116
153
|
panels={catalog}
|
|
117
154
|
activeId={activePanel?.id ?? activeTab}
|
|
118
|
-
onSelect={
|
|
155
|
+
onSelect={handleSelectTab}
|
|
119
156
|
hasGitChanges={hasGitChanges}
|
|
120
157
|
/>
|
|
121
158
|
</div>
|
|
@@ -131,6 +168,17 @@ export function MobileRightSidebar({
|
|
|
131
168
|
</button>
|
|
132
169
|
</div>
|
|
133
170
|
|
|
171
|
+
{panelMenu.anchor ? (
|
|
172
|
+
<VisibilityMenu
|
|
173
|
+
anchor={panelMenu.anchor}
|
|
174
|
+
align="right"
|
|
175
|
+
items={menuItems}
|
|
176
|
+
hidden={panelMenu.hidden}
|
|
177
|
+
onToggle={panelMenu.toggle}
|
|
178
|
+
onClose={panelMenu.close}
|
|
179
|
+
/>
|
|
180
|
+
) : null}
|
|
181
|
+
|
|
134
182
|
{/* Main Tab Content — the same catalog entries the desktop stack draws,
|
|
135
183
|
through the same `render`, so the two layouts cannot hand a view
|
|
136
184
|
different props. The workspace gate below applies per VIEW, not to the
|
|
@@ -20,6 +20,8 @@ import { MobileDrawerDialogs } from '@/client/components/mobile/mobile-session-s
|
|
|
20
20
|
import { useDrawerState } from '@/client/components/mobile/mobile-session-sidebar/use-drawer';
|
|
21
21
|
import { archiveOutcomeMessage } from '@/client/hooks/workspace/batch-archive';
|
|
22
22
|
import { BatchActionBar } from '@/client/components/common/batch-selection/BatchActionBar';
|
|
23
|
+
import { VisibilityMenu } from '@/client/components/layout/VisibilityMenu';
|
|
24
|
+
import { usePanelVisibilityMenu } from '@/client/hooks/workspace/panel-visibility-menu';
|
|
23
25
|
import type { SessionSidebarVariantProps } from '@/client/components/layout/session-sidebar/variant-props';
|
|
24
26
|
|
|
25
27
|
/**
|
|
@@ -103,6 +105,12 @@ export function MobileSessionSidebar({
|
|
|
103
105
|
const { selection, deleteRun, archiveRun, binding: batchBinding, scopeFolder, available, selected } = batch;
|
|
104
106
|
const sidebarStyle = useSidebarStyle();
|
|
105
107
|
|
|
108
|
+
// The phone's right-click: a long press on the drawer's title or its chip
|
|
109
|
+
// strip opens the same panel switch the desktop left rail has. The strip IS
|
|
110
|
+
// the rail here, so the menu lists exactly what the rail can draw — the
|
|
111
|
+
// session list pinned, plus every placed panel, off or on.
|
|
112
|
+
const panelMenu = usePanelVisibilityMenu('left');
|
|
113
|
+
|
|
106
114
|
// Modals state (matching desktop)
|
|
107
115
|
const [newWorkspaceOpen, setNewWorkspaceOpen] = useState(false);
|
|
108
116
|
const [schedulerOpen, setSchedulerOpen] = useState(false);
|
|
@@ -210,6 +218,7 @@ export function MobileSessionSidebar({
|
|
|
210
218
|
<MobileSessionHeader
|
|
211
219
|
onClose={onClose}
|
|
212
220
|
viewLabel={dock.showingSessions ? 'Sessions' : dock.activePanel?.label ?? 'Panel'}
|
|
221
|
+
menuProps={panelMenu.surfaceProps}
|
|
213
222
|
/>
|
|
214
223
|
|
|
215
224
|
{/* The strip is the phone's RAIL, so it follows the switch: with the rail
|
|
@@ -217,7 +226,22 @@ export function MobileSessionSidebar({
|
|
|
217
226
|
always holds Sessions). Requiring a second destination made the
|
|
218
227
|
Settings switch a no-op on a phone with nothing placed. */}
|
|
219
228
|
{phoneLeftStripVisible(dock.enabled) ? (
|
|
220
|
-
<MobileDockStrip
|
|
229
|
+
<MobileDockStrip
|
|
230
|
+
panels={dock.catalog}
|
|
231
|
+
activeId={dock.activeView}
|
|
232
|
+
onSelect={dock.setActiveView}
|
|
233
|
+
menuProps={panelMenu.surfaceProps}
|
|
234
|
+
/>
|
|
235
|
+
) : null}
|
|
236
|
+
|
|
237
|
+
{panelMenu.anchor ? (
|
|
238
|
+
<VisibilityMenu
|
|
239
|
+
anchor={panelMenu.anchor}
|
|
240
|
+
items={panelMenu.items}
|
|
241
|
+
hidden={panelMenu.hidden}
|
|
242
|
+
onToggle={panelMenu.toggle}
|
|
243
|
+
onClose={panelMenu.close}
|
|
244
|
+
/>
|
|
221
245
|
) : null}
|
|
222
246
|
|
|
223
247
|
{/* The list is HIDDEN, never unmounted, while a panel is on screen — the
|
|
@@ -154,6 +154,23 @@ describe('phone headers as a shell title bar', () => {
|
|
|
154
154
|
expect(close.className).toContain('titlebar-no-drag');
|
|
155
155
|
});
|
|
156
156
|
|
|
157
|
+
test('a right-click on the right drawer header opens the panel switch', async () => {
|
|
158
|
+
await mountAsMacShell(() =>
|
|
159
|
+
h(MobileRightSidebar, { enabled: false, onClose: () => {} }),
|
|
160
|
+
);
|
|
161
|
+
const drag = container.querySelector('[data-drag-region]') as HTMLElement;
|
|
162
|
+
act(() => {
|
|
163
|
+
drag.dispatchEvent(new win.MouseEvent('contextmenu', { bubbles: true, cancelable: true }) as unknown as Event);
|
|
164
|
+
});
|
|
165
|
+
const menu = document.querySelector('[role="menu"][aria-label="Panels visibility"]');
|
|
166
|
+
expect(menu).not.toBeNull();
|
|
167
|
+
// The drawer's own catalog: a built-in view is offered, and the session
|
|
168
|
+
// list is not — it is the LEFT drawer's screen, not a panel here.
|
|
169
|
+
expect(menu!.textContent).toContain('Files');
|
|
170
|
+
expect(menu!.textContent).not.toContain('Sessions');
|
|
171
|
+
menu!.parentElement?.remove();
|
|
172
|
+
});
|
|
173
|
+
|
|
157
174
|
/** A browser tab has no shell, so nothing is reserved and nothing is marked. */
|
|
158
175
|
test('a browser marks no drag region and reserves nothing', async () => {
|
|
159
176
|
await act(async () => {
|
|
@@ -20,6 +20,7 @@ import { h, render } from 'preact';
|
|
|
20
20
|
import { act } from 'preact/test-utils';
|
|
21
21
|
import { MobileHeader } from '@/client/components/mobile/mobile-main-view/Header';
|
|
22
22
|
import { SessionStateProvider } from '@/client/components/common/session-state-provider/index';
|
|
23
|
+
import { primeKabmoSettings } from '@/shared/lib/settings/client';
|
|
23
24
|
import { silenceRealtime, restoreRealtime } from '@/test-support/silent-socket';
|
|
24
25
|
|
|
25
26
|
const DOM_GLOBALS = [
|
|
@@ -51,6 +52,7 @@ afterAll(() => {
|
|
|
51
52
|
|
|
52
53
|
beforeEach(async () => {
|
|
53
54
|
silenceRealtime();
|
|
55
|
+
primeKabmoSettings({});
|
|
54
56
|
container = document.createElement('div');
|
|
55
57
|
document.body.appendChild(container);
|
|
56
58
|
await act(async () => {
|
|
@@ -76,6 +78,7 @@ afterEach(() => {
|
|
|
76
78
|
render(null, container);
|
|
77
79
|
container.remove();
|
|
78
80
|
}
|
|
81
|
+
primeKabmoSettings({});
|
|
79
82
|
restoreRealtime();
|
|
80
83
|
});
|
|
81
84
|
|
|
@@ -120,3 +123,43 @@ describe('phone session picker', () => {
|
|
|
120
123
|
expect(trigger().getAttribute('aria-expanded')).toBe('false');
|
|
121
124
|
});
|
|
122
125
|
});
|
|
126
|
+
|
|
127
|
+
describe('phone header visibility menu', () => {
|
|
128
|
+
const header = () => container.querySelector('header') as HTMLElement;
|
|
129
|
+
const menu = () => document.querySelector('[role="menu"][aria-label="Navbar visibility"]') as HTMLElement | null;
|
|
130
|
+
|
|
131
|
+
test('a right-click on the header opens the control switch', () => {
|
|
132
|
+
act(() => {
|
|
133
|
+
header().dispatchEvent(new win.MouseEvent('contextmenu', { bubbles: true, cancelable: true }) as unknown as Event);
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
const list = menu();
|
|
137
|
+
expect(list).not.toBeNull();
|
|
138
|
+
// The controls this header draws are offered; desktop-only furniture is not.
|
|
139
|
+
expect(list!.textContent).toContain('Right panel');
|
|
140
|
+
expect(list!.textContent).toContain('Reload page');
|
|
141
|
+
expect(list!.textContent).not.toContain('Editor layout');
|
|
142
|
+
expect(list!.textContent).not.toContain('Install app');
|
|
143
|
+
list!.parentElement?.remove();
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
test('switching a control off removes it from the row and keeps its row in the menu', () => {
|
|
147
|
+
act(() => {
|
|
148
|
+
header().dispatchEvent(new win.MouseEvent('contextmenu', { bubbles: true, cancelable: true }) as unknown as Event);
|
|
149
|
+
});
|
|
150
|
+
const list = menu() as HTMLElement;
|
|
151
|
+
const row = [...list.querySelectorAll('[role="menuitemcheckbox"]')].find(
|
|
152
|
+
(el) => el.textContent?.includes('Right panel'),
|
|
153
|
+
) as HTMLButtonElement;
|
|
154
|
+
expect(row).toBeDefined();
|
|
155
|
+
|
|
156
|
+
act(() => {
|
|
157
|
+
row.dispatchEvent(new win.MouseEvent('click', { bubbles: true }) as unknown as Event);
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
expect(container.querySelector('button[aria-label="Open Right Panel"]')).toBeNull();
|
|
161
|
+
// The row stays, unchecked: the menu is the only way back.
|
|
162
|
+
expect(row.getAttribute('aria-checked')).toBe('false');
|
|
163
|
+
list.parentElement?.remove();
|
|
164
|
+
});
|
|
165
|
+
});
|
|
@@ -9,6 +9,9 @@ import { StreamStatusDot } from '@/client/components/common/StreamStatusDot';
|
|
|
9
9
|
import { BrandWordmark } from '@/client/components/common/brand-wordmark';
|
|
10
10
|
import { HeaderControls } from '@/client/components/common/header-controls';
|
|
11
11
|
import { AnchoredMenu } from '@/client/components/common/anchored-menu';
|
|
12
|
+
import { VisibilityMenu } from '@/client/components/layout/VisibilityMenu';
|
|
13
|
+
import { NAVBAR_CONTROL, NAVBAR_CONTROLS, useNavbarControls } from '@/client/hooks/ui/navbar-controls';
|
|
14
|
+
import { useVisibilityMenuTrigger } from '@/client/hooks/ui/visibility-menu-trigger';
|
|
12
15
|
import { anchorRectOf, type AnchorRect } from '@/shared/lib/ui/menu-anchor';
|
|
13
16
|
import { titlebarPaddingLeft, titlebarPaddingRight } from '@/shared/lib/ui/titlebar';
|
|
14
17
|
import { dragRegionProps, titlebarInsetLeft } from '@/client/lib/desktop/titlebar';
|
|
@@ -51,6 +54,11 @@ export function MobileHeader({
|
|
|
51
54
|
// disagree about whether a rename is running.
|
|
52
55
|
const renaming = useSessionRenaming(activeSessionId);
|
|
53
56
|
const [pickerAnchor, setPickerAnchor] = useState<AnchorRect | null>(null);
|
|
57
|
+
// The phone's right-click: a long press on the header opens the same control
|
|
58
|
+
// switch the desktop navbar has, so a button the user never presses can be
|
|
59
|
+
// put away — and the menu keeps its row, which is the way back.
|
|
60
|
+
const { hidden, setHidden } = useNavbarControls();
|
|
61
|
+
const visibility = useVisibilityMenuTrigger();
|
|
54
62
|
|
|
55
63
|
// Recent sessions: archived rows are hidden. A session the user actually
|
|
56
64
|
// opened in this tab within the last 10 minutes ranks by that open time
|
|
@@ -92,6 +100,7 @@ export function MobileHeader({
|
|
|
92
100
|
<header
|
|
93
101
|
className={`flex-shrink-0 bg-canvas border-b border-ink/10 flex items-center justify-between ${CONTROL_CLUSTER_GAP} px-3 z-20 titlebar-drag-region select-none`}
|
|
94
102
|
{...dragRegionProps()}
|
|
103
|
+
{...visibility.surfaceProps}
|
|
95
104
|
style={{
|
|
96
105
|
height: 'calc(3.5rem + env(safe-area-inset-top, 0px))',
|
|
97
106
|
// The shell's own inset, not only the PWA's. `titlebarPaddingLeft` reads
|
|
@@ -231,7 +240,28 @@ export function MobileHeader({
|
|
|
231
240
|
sessionId={activeSessionId == null ? null : String(activeSessionId)}
|
|
232
241
|
showRightPanel={false}
|
|
233
242
|
onToggleRightPanel={onOpenRightSidebar}
|
|
243
|
+
hidden={hidden}
|
|
234
244
|
/>
|
|
245
|
+
|
|
246
|
+
{visibility.anchor ? (
|
|
247
|
+
<VisibilityMenu
|
|
248
|
+
anchor={visibility.anchor}
|
|
249
|
+
title="Navbar"
|
|
250
|
+
align="right"
|
|
251
|
+
// Only the controls this header actually draws: install, the editor
|
|
252
|
+
// toggle and the dev-only layout switch are desktop furniture, and a
|
|
253
|
+
// checkbox for one would hide nothing.
|
|
254
|
+
items={NAVBAR_CONTROLS.filter(
|
|
255
|
+
(item) =>
|
|
256
|
+
item.id !== NAVBAR_CONTROL.install &&
|
|
257
|
+
item.id !== NAVBAR_CONTROL.editor &&
|
|
258
|
+
item.id !== NAVBAR_CONTROL.mobile,
|
|
259
|
+
).map((item) => ({ ...item, removable: true }))}
|
|
260
|
+
hidden={hidden}
|
|
261
|
+
onToggle={setHidden}
|
|
262
|
+
onClose={visibility.close}
|
|
263
|
+
/>
|
|
264
|
+
) : null}
|
|
235
265
|
</header>
|
|
236
266
|
);
|
|
237
267
|
}
|
|
@@ -23,19 +23,23 @@ import type { ResolvedPanel } from '@/client/components/workspace/plugin-panel/c
|
|
|
23
23
|
import { PluginPanelBody } from '@/client/components/workspace/plugin-panel/resolve';
|
|
24
24
|
import type { PanelBodyProps } from '@/client/components/workspace/panels/builtin';
|
|
25
25
|
import { PanelChips } from '@/client/components/mobile/panel-chips';
|
|
26
|
+
import type { VisibilityMenuSurfaceProps } from '@/client/hooks/ui/visibility-menu-trigger';
|
|
26
27
|
|
|
27
28
|
/** The strip row, drawn under the drawer's title. */
|
|
28
29
|
export function MobileDockStrip({
|
|
29
30
|
panels,
|
|
30
31
|
activeId,
|
|
31
32
|
onSelect,
|
|
33
|
+
menuProps,
|
|
32
34
|
}: {
|
|
33
35
|
panels: readonly ResolvedPanel[];
|
|
34
36
|
activeId: string;
|
|
35
37
|
onSelect: (id: string) => void;
|
|
38
|
+
/** The strip is the phone's rail, so it carries the rail's right-click too. */
|
|
39
|
+
menuProps?: VisibilityMenuSurfaceProps;
|
|
36
40
|
}) {
|
|
37
41
|
return (
|
|
38
|
-
<div className="px-3 py-1.5 border-b border-ink/10 bg-canvas flex-shrink-0">
|
|
42
|
+
<div className="px-3 py-1.5 border-b border-ink/10 bg-canvas flex-shrink-0" {...menuProps}>
|
|
39
43
|
<PanelChips panels={panels} activeId={activeId} onSelect={onSelect} />
|
|
40
44
|
</div>
|
|
41
45
|
);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { X } from 'lucide-preact';
|
|
2
2
|
import { BrandWordmark } from '@/client/components/common/brand-wordmark';
|
|
3
3
|
import { ServerControl } from '@/client/components/common/server-control';
|
|
4
|
+
import type { VisibilityMenuSurfaceProps } from '@/client/hooks/ui/visibility-menu-trigger';
|
|
4
5
|
import { titlebarPaddingLeft, titlebarPaddingRight } from '@/shared/lib/ui/titlebar';
|
|
5
6
|
import { dragRegionProps, titlebarInsetLeft } from '@/client/lib/desktop/titlebar';
|
|
6
7
|
|
|
@@ -25,11 +26,21 @@ import { dragRegionProps, titlebarInsetLeft } from '@/client/lib/desktop/titleba
|
|
|
25
26
|
* `viewLabel` says what the drawer is showing (Sessions, or a panel's name), so
|
|
26
27
|
* the chip is available in every view the drawer has.
|
|
27
28
|
*/
|
|
28
|
-
export function MobileSessionHeader({
|
|
29
|
+
export function MobileSessionHeader({
|
|
30
|
+
onClose,
|
|
31
|
+
viewLabel = 'Sessions',
|
|
32
|
+
menuProps,
|
|
33
|
+
}: {
|
|
34
|
+
onClose: () => void;
|
|
35
|
+
viewLabel?: string;
|
|
36
|
+
/** The drawer's right-click surface: a long press opens the panel switch. */
|
|
37
|
+
menuProps?: VisibilityMenuSurfaceProps;
|
|
38
|
+
}) {
|
|
29
39
|
return (
|
|
30
40
|
<div
|
|
31
41
|
className="border-b border-ink/10 flex items-center justify-between px-3 flex-shrink-0 bg-canvas titlebar-drag-region select-none"
|
|
32
42
|
{...dragRegionProps()}
|
|
43
|
+
{...menuProps}
|
|
33
44
|
style={{
|
|
34
45
|
height: 'calc(3.5rem + env(safe-area-inset-top, 0px))',
|
|
35
46
|
// `px-3`, the toolbar's own inset: the wordmark above and the New
|
|
@@ -133,6 +133,19 @@ describe('PanelChips', () => {
|
|
|
133
133
|
expect(picked).toEqual(['plugin:demo:rightPanel']);
|
|
134
134
|
});
|
|
135
135
|
|
|
136
|
+
test('the active label is one line, and the chip refuses to shrink', async () => {
|
|
137
|
+
// A two-word label ("Pull Requests") wrapped inside the chip and made the
|
|
138
|
+
// active chip taller than the rest of the strip. The strip scrolls; it
|
|
139
|
+
// must never squeeze a chip into a wrap.
|
|
140
|
+
await mountStrip([panel('plugin:demo:rightPanel', { builtin: false, name: 'demo', label: 'Pull Requests' })], 'plugin:demo:rightPanel');
|
|
141
|
+
const chip = container.querySelector('button') as HTMLButtonElement;
|
|
142
|
+
const label = [...chip.querySelectorAll('span')].at(-1) as HTMLElement;
|
|
143
|
+
expect(label.textContent).toBe('Pull Requests');
|
|
144
|
+
expect(label.className).toContain('whitespace-nowrap');
|
|
145
|
+
expect(label.className).toContain('shrink-0');
|
|
146
|
+
expect(chip.className).toContain('shrink-0');
|
|
147
|
+
});
|
|
148
|
+
|
|
136
149
|
test('the Source Control dot is drawn only where it is asked for', async () => {
|
|
137
150
|
// The left catalog never holds a built-in view, so the left drawer passes
|
|
138
151
|
// nothing and must not grow a dot it can never mean.
|
|
@@ -133,7 +133,7 @@ export function PanelChips({ panels, activeId, onSelect, hasGitChanges = false }
|
|
|
133
133
|
// "Resources" after it — a control that renames itself when used is
|
|
134
134
|
// unusable to a screen reader and unfindable to a spec.
|
|
135
135
|
aria-label={panel.title}
|
|
136
|
-
className={`relative flex items-center transition-all cursor-pointer ${
|
|
136
|
+
className={`relative flex shrink-0 items-center transition-all cursor-pointer ${
|
|
137
137
|
active
|
|
138
138
|
? 'space-x-1.5 px-3 py-1.5 rounded-lg text-xs font-semibold bg-ink text-canvas shadow-sm'
|
|
139
139
|
: 'p-2 rounded-lg text-ink/70 hover:bg-ink/5'
|
|
@@ -150,7 +150,14 @@ export function PanelChips({ panels, activeId, onSelect, hasGitChanges = false }
|
|
|
150
150
|
size={PANEL_MARK_SIZE}
|
|
151
151
|
/>
|
|
152
152
|
{active && (
|
|
153
|
-
|
|
153
|
+
// One line, always: a two-word label ("Pull Requests") wrapped
|
|
154
|
+
// inside the chip and made the active chip taller than every
|
|
155
|
+
// other one on the strip. `shrink-0` keeps the flex row from
|
|
156
|
+
// squeezing the text into a wrap instead of letting the strip
|
|
157
|
+
// scroll.
|
|
158
|
+
<span className={`shrink-0 whitespace-nowrap ${panel.id === 'git' ? 'tracking-wide' : ''}`}>
|
|
159
|
+
{panel.label}
|
|
160
|
+
</span>
|
|
154
161
|
)}
|
|
155
162
|
{panel.id === 'git' && hasGitChanges && (
|
|
156
163
|
<span
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The "Last connect" cell.
|
|
8
|
+
*
|
|
9
|
+
* A paired device's row must answer two questions: is anything still using this
|
|
10
|
+
* pairing, and when exactly did it last connect? The relative label alone
|
|
11
|
+
* answers neither once it reads "3 d ago", so the cell carries the exact moment
|
|
12
|
+
* too. A device that never came back says "Never connected" rather than the
|
|
13
|
+
* useless "never" or an empty cell.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { afterAll, afterEach, beforeAll, expect, test } from 'bun:test';
|
|
17
|
+
import { Window } from 'happy-dom';
|
|
18
|
+
import { h, render } from 'preact';
|
|
19
|
+
import { act } from 'preact/test-utils';
|
|
20
|
+
|
|
21
|
+
import { DeviceTable } from '@/client/components/settings/categories/connect-settings/DeviceTable';
|
|
22
|
+
import type { PairedDevice } from '@/shared/lib/connect/types';
|
|
23
|
+
import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
|
|
24
|
+
|
|
25
|
+
let win: Window;
|
|
26
|
+
let container: HTMLElement | null = null;
|
|
27
|
+
|
|
28
|
+
beforeAll(() => {
|
|
29
|
+
win = new Window({ url: 'http://192.168.1.5:3000' });
|
|
30
|
+
installDomGlobals(win);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
afterEach(() => {
|
|
34
|
+
if (container) {
|
|
35
|
+
render(null, container);
|
|
36
|
+
container.remove();
|
|
37
|
+
}
|
|
38
|
+
container = null;
|
|
39
|
+
document.body.replaceChildren();
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
afterAll(() => {
|
|
43
|
+
restoreDomGlobals();
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
function device(overrides: Partial<PairedDevice> = {}): PairedDevice {
|
|
47
|
+
return {
|
|
48
|
+
id: 'device-1',
|
|
49
|
+
name: 'Phone',
|
|
50
|
+
platform: 'ios',
|
|
51
|
+
route: null,
|
|
52
|
+
rttMs: null,
|
|
53
|
+
lastSeenAt: null,
|
|
54
|
+
createdAt: new Date().toISOString(),
|
|
55
|
+
...overrides,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async function mount(devices: PairedDevice[]): Promise<void> {
|
|
60
|
+
const host = document.createElement('div');
|
|
61
|
+
document.body.appendChild(host);
|
|
62
|
+
container = host;
|
|
63
|
+
await act(async () => {
|
|
64
|
+
render(h(DeviceTable, { devices, busy: null, onRevoke: () => {}, onAdd: () => {} }), host);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
test('the column is named Last connect', async () => {
|
|
69
|
+
await mount([device()]);
|
|
70
|
+
const headers = [...document.querySelectorAll('th')].map((th) => th.textContent);
|
|
71
|
+
expect(headers).toContain('Last connect');
|
|
72
|
+
expect(headers).not.toContain('Last seen');
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
test('a device that never connected says so, in both layouts', async () => {
|
|
76
|
+
await mount([device()]);
|
|
77
|
+
const labels = [...document.querySelectorAll('td, li')].filter((node) =>
|
|
78
|
+
node.textContent?.includes('Never connected'),
|
|
79
|
+
);
|
|
80
|
+
// One desktop cell and one phone line.
|
|
81
|
+
expect(labels.length).toBe(2);
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
test('a connected device carries the relative and exact time', async () => {
|
|
85
|
+
const iso = new Date(Date.now() - 3 * 60 * 60 * 1000).toISOString();
|
|
86
|
+
await mount([device({ lastSeenAt: iso })]);
|
|
87
|
+
|
|
88
|
+
const times = [...document.querySelectorAll('time')];
|
|
89
|
+
expect(times.length).toBe(1);
|
|
90
|
+
expect(times[0]?.getAttribute('datetime')).toBe(iso);
|
|
91
|
+
expect(times[0]?.textContent).toContain('3 h ago ·');
|
|
92
|
+
});
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
* A table on a desktop, stacked rows on a phone. The columns are the same facts
|
|
16
16
|
* in both; only the arrangement changes, because a horizontally scrolling table
|
|
17
17
|
* on a phone hides the revoke button off-screen.
|
|
18
|
+
*
|
|
19
|
+
* "Last connect" is when the server last accepted this device's token, not when
|
|
20
|
+
* it paired. A phone left open for a week reads "just now"; a device that was
|
|
21
|
+
* paired but never came back reads "Never connected".
|
|
18
22
|
*/
|
|
19
23
|
|
|
20
24
|
import { Trash2 } from 'lucide-preact';
|
|
@@ -39,6 +43,19 @@ function relative(iso: string | null): string {
|
|
|
39
43
|
return `${Math.round(hours / 24)} d ago`;
|
|
40
44
|
}
|
|
41
45
|
|
|
46
|
+
/**
|
|
47
|
+
* "2 h ago · 18 Nov 2026, 14:32" — the recency at a glance, and the exact
|
|
48
|
+
* moment on record. A relative label on its own is unanswerable once it reads
|
|
49
|
+
* "3 d ago": the user checking whether a device connected today needs the date.
|
|
50
|
+
*/
|
|
51
|
+
function connectLabel(iso: string | null): string {
|
|
52
|
+
if (!iso) return 'Never connected';
|
|
53
|
+
const at = new Date(iso);
|
|
54
|
+
if (Number.isNaN(at.getTime())) return 'Never connected';
|
|
55
|
+
const exact = at.toLocaleString(undefined, { dateStyle: 'medium', timeStyle: 'short' });
|
|
56
|
+
return `${relative(iso)} · ${exact}`;
|
|
57
|
+
}
|
|
58
|
+
|
|
42
59
|
export interface DeviceTableProps {
|
|
43
60
|
devices: PairedDevice[];
|
|
44
61
|
busy: string | null;
|
|
@@ -77,7 +94,7 @@ export function DeviceTable({ devices, busy, onRevoke, onAdd }: DeviceTableProps
|
|
|
77
94
|
<th className="px-2 py-2 font-bold">Platform</th>
|
|
78
95
|
<th className="px-2 py-2 font-bold">Route</th>
|
|
79
96
|
<th className="px-2 py-2 font-bold">RTT</th>
|
|
80
|
-
<th className="px-2 py-2 font-bold">Last
|
|
97
|
+
<th className="px-2 py-2 font-bold">Last connect</th>
|
|
81
98
|
<th className="px-4 py-2" />
|
|
82
99
|
</tr>
|
|
83
100
|
</thead>
|
|
@@ -92,7 +109,9 @@ export function DeviceTable({ devices, busy, onRevoke, onAdd }: DeviceTableProps
|
|
|
92
109
|
<td className="px-2 py-2 font-mono text-[11px] tabular-nums text-ink/70">
|
|
93
110
|
{device.rttMs === null ? '—' : `${device.rttMs} ms`}
|
|
94
111
|
</td>
|
|
95
|
-
<td className="px-2 py-2 text-[11px] text-ink/60">
|
|
112
|
+
<td className="px-2 py-2 text-[11px] text-ink/60">
|
|
113
|
+
<time dateTime={device.lastSeenAt ?? undefined}>{connectLabel(device.lastSeenAt)}</time>
|
|
114
|
+
</td>
|
|
96
115
|
<td className="px-4 py-2 text-right">
|
|
97
116
|
<button
|
|
98
117
|
type="button"
|
|
@@ -119,7 +138,7 @@ export function DeviceTable({ devices, busy, onRevoke, onAdd }: DeviceTableProps
|
|
|
119
138
|
{device.platform}
|
|
120
139
|
{device.route ? ` · ${ROUTE_LABEL[device.route]}` : ''}
|
|
121
140
|
{device.rttMs === null ? '' : ` · ${device.rttMs} ms`}
|
|
122
|
-
{` · ${
|
|
141
|
+
{` · ${connectLabel(device.lastSeenAt)}`}
|
|
123
142
|
</div>
|
|
124
143
|
</div>
|
|
125
144
|
<button
|
|
@@ -81,6 +81,27 @@ describe('commit modal header', () => {
|
|
|
81
81
|
expect(graph.querySelector('button[aria-label="Graph view"]')?.getAttribute('aria-pressed')).toBe('true');
|
|
82
82
|
});
|
|
83
83
|
|
|
84
|
+
test('the phone drops the rect around the three header controls', async () => {
|
|
85
|
+
const el = await mount(false);
|
|
86
|
+
const switcher = el.querySelector('button[aria-label="History view"]')?.parentElement;
|
|
87
|
+
|
|
88
|
+
// The segmented-control plate and the refresh border are desktop-only: on
|
|
89
|
+
// the phone the row is icon-only, and only the active tab keeps a rect.
|
|
90
|
+
expect(switcher?.classList.contains('bg-ink/5')).toBe(false);
|
|
91
|
+
expect(switcher?.classList.contains('border')).toBe(false);
|
|
92
|
+
expect(switcher?.classList.contains('lg:bg-ink/5')).toBe(true);
|
|
93
|
+
|
|
94
|
+
const active = el.querySelector('button[aria-label="History view"]');
|
|
95
|
+
expect(active?.classList.contains('bg-ink/5')).toBe(true);
|
|
96
|
+
// Centred, so the glyph sits in the middle of the active rect instead of
|
|
97
|
+
// being pushed left by the (hidden) label's padding.
|
|
98
|
+
expect(active?.classList.contains('justify-center')).toBe(true);
|
|
99
|
+
|
|
100
|
+
const refresh = el.querySelector('button[aria-label="Refresh commit history"]');
|
|
101
|
+
expect(refresh?.classList.contains('border')).toBe(false);
|
|
102
|
+
expect(refresh?.classList.contains('lg:border')).toBe(true);
|
|
103
|
+
});
|
|
104
|
+
|
|
84
105
|
test('the filter and the close control have accessible names', async () => {
|
|
85
106
|
const el = await mount(false);
|
|
86
107
|
expect(el.querySelector('input[aria-label="Filter commits"]')).toBeTruthy();
|
|
@@ -67,18 +67,22 @@ export function Header({
|
|
|
67
67
|
|
|
68
68
|
{/* Action Controls on the Right */}
|
|
69
69
|
<div className="flex items-center gap-1.5 lg:gap-2 flex-shrink-0">
|
|
70
|
-
{/* Mode Switcher
|
|
71
|
-
|
|
70
|
+
{/* Mode Switcher. The phone drops the segmented-control plate: three
|
|
71
|
+
icon-only controls in a row read as one cluster, and the plate
|
|
72
|
+
plus the refresh border made them look like three separate
|
|
73
|
+
widgets. The active tab keeps its own rect, with the glyph
|
|
74
|
+
centred in it. */}
|
|
75
|
+
<div className="flex items-center text-xs lg:bg-ink/5 lg:p-0.5 lg:rounded-lg lg:border lg:border-ink/10">
|
|
72
76
|
<button
|
|
73
77
|
type="button"
|
|
74
78
|
onClick={() => onToggleMode(false)}
|
|
75
79
|
title="History view"
|
|
76
80
|
aria-label="History view"
|
|
77
81
|
aria-pressed={!isGraphMode}
|
|
78
|
-
className={`tap-target flex items-center gap-1.5
|
|
82
|
+
className={`tap-target flex items-center justify-center gap-1.5 p-2 rounded-md font-medium transition-colors cursor-pointer lg:px-2.5 lg:py-1 ${
|
|
79
83
|
!isGraphMode
|
|
80
|
-
? 'bg-
|
|
81
|
-
: 'text-ink/80 hover:text-ink hover:bg-ink/5'
|
|
84
|
+
? 'bg-ink/5 text-ink lg:bg-paper lg:shadow-xs'
|
|
85
|
+
: 'text-ink/80 lg:hover:text-ink lg:hover:bg-ink/5'
|
|
82
86
|
}`}
|
|
83
87
|
>
|
|
84
88
|
<History size={13} aria-hidden="true" />
|
|
@@ -90,10 +94,10 @@ export function Header({
|
|
|
90
94
|
title="Graph view"
|
|
91
95
|
aria-label="Graph view"
|
|
92
96
|
aria-pressed={isGraphMode}
|
|
93
|
-
className={`tap-target flex items-center gap-1.5
|
|
97
|
+
className={`tap-target flex items-center justify-center gap-1.5 p-2 rounded-md font-medium transition-colors cursor-pointer lg:px-2.5 lg:py-1 ${
|
|
94
98
|
isGraphMode
|
|
95
|
-
? 'bg-
|
|
96
|
-
: 'text-ink/80 hover:text-ink hover:bg-ink/5'
|
|
99
|
+
? 'bg-ink/5 text-ink lg:bg-paper lg:shadow-xs'
|
|
100
|
+
: 'text-ink/80 lg:hover:text-ink lg:hover:bg-ink/5'
|
|
97
101
|
}`}
|
|
98
102
|
>
|
|
99
103
|
<GitMerge size={13} aria-hidden="true" />
|
|
@@ -106,7 +110,7 @@ export function Header({
|
|
|
106
110
|
type="button"
|
|
107
111
|
onClick={onRefresh}
|
|
108
112
|
disabled={isRefreshing}
|
|
109
|
-
className="tap-target flex items-center gap-1.5 px-2.5 py-1.5
|
|
113
|
+
className="tap-target flex items-center justify-center gap-1.5 p-2 rounded-md text-ink/70 transition-colors cursor-pointer text-xs disabled:opacity-40 lg:px-2.5 lg:py-1.5 lg:border lg:border-ink/15 lg:hover:bg-ink/5 lg:hover:text-ink"
|
|
110
114
|
title="Refresh commit history"
|
|
111
115
|
aria-label="Refresh commit history"
|
|
112
116
|
>
|