@kabmo-labs/kabmo 0.39.1 → 0.41.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 +364 -363
- package/dist/client/static/js/{CsvGrid-7synegzg.js → CsvGrid-60njj97j.js} +2 -2
- package/dist/client/static/js/{DocxView-v5d9n5yw.js → DocxView-rsv0j46a.js} +5 -5
- package/dist/client/static/js/{DrawioView-ww7y98tt.js → DrawioView-n2g5df3a.js} +2 -2
- package/dist/client/static/js/ImageView-t330jx6y.js +1 -0
- package/dist/client/static/js/LayoutWrapper-qp6nsw65.js +2 -0
- package/dist/client/static/js/{Modal-qj39shgb.js → Modal-sbya4ahp.js} +17 -17
- package/dist/client/static/js/{PdfView-t9v4datp.js → PdfView-1r7a0qkp.js} +1 -1
- package/dist/client/static/js/SessionsView-yqs5m8tj.js +1 -0
- package/dist/client/static/js/{SheetView-6zkxbjd4.js → SheetView-bt5pp042.js} +24 -24
- package/dist/client/static/js/{SvgPreview-7rt2p1y1.js → SvgPreview-vfmqgmrx.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-888zn5zg.js → abnfDiagram-O67JEVCF-8k5hk1yx.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-1wqga929.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-b04e26rb.js → architectureDiagram-NJMV4G6O-7jcb7fgy.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-32ph2m52.js → blockDiagram-BEXU5L5S-04sbtdth.js} +5 -5
- package/dist/client/static/js/c-67jyc7sg.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-hwnaa333.js → c4Diagram-YGBWAQC7-vwac9za0.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-2kg7dqeb.js → classDiagram-v2-NBCMYWYE-18cc0bsb.js} +5 -5
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-tj2sbtyv.js → cose-bilkent-JH36ORCC-dk683zvp.js} +1 -1
- package/dist/client/static/js/cpp-crfbnwv8.js +1 -0
- package/dist/client/static/js/css-2re5mbea.js +1 -0
- package/dist/client/static/js/css-983fbv00.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-j2dpdgkh.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-wx2y8dhm.js → cynefinDiagram-VND7K2PF-m2sx8d8s.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-5v3rzdxd.js → dagre-6A5THRUB-qf3pr59p.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-7er2jwy1.js → diagram-22UHCM2B-twnz23mt.js} +11 -11
- package/dist/client/static/js/{diagram-3UASUU5V-2b7nmdha.js → diagram-3UASUU5V-417bas6t.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-yf61ftn0.js → diagram-ATOU4E4O-n63cpdnx.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-cn3rs9xn.js → diagram-CDSNMT55-v86p14dd.js} +3 -3
- package/dist/client/static/js/{diagram-MLGK6HIB-7kvtsj6c.js → diagram-MLGK6HIB-7a0h1hs3.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-g3zg3r5e.js → diagram-MPIPVDR6-w75bftmd.js} +2 -2
- package/dist/client/static/js/{dockerfile-f9j396wm.js → dockerfile-g5qbaeq3.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-ft02nzne.js → ebnfDiagram-ZINNZB2B-vdzm3tsv.js} +1 -1
- package/dist/client/static/js/{elixir-v9bbxsgg.js → elixir-gpez1k9m.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-87fvkn2k.js → elk-276RUBZZ-2fsbb484.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-gh9mp6j8.js → erDiagram-OPXOYQCR-vnkztq7d.js} +5 -5
- package/dist/client/static/js/{erlang-55r0skxa.js → erlang-jqqa3ehb.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-xjvjawd3.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-j21f2bfg.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-227xs61z.js → ganttDiagram-FUAMR5RP-pbvcch52.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-r0zbk95f.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-4671gdym.js → gitGraphDiagram-X574FWY7-dkvktvzr.js} +2 -2
- package/dist/client/static/js/graphql-npbd9fdx.js +1 -0
- package/dist/client/static/js/html-1cpe2xc8.js +1 -0
- package/dist/client/static/js/{index-enmh3w27.js → index-0c6vpk89.js} +2 -2
- package/dist/client/static/js/{index-35mh9kbs.js → index-0xaz2eyv.js} +3 -3
- package/dist/client/static/js/{index-668chrpq.js → index-1sw00wm0.js} +1 -1
- package/dist/client/static/js/index-2z9wrb46.js +2 -0
- package/dist/client/static/js/{index-qbnd827h.js → index-3rymer2w.js} +1 -1
- package/dist/client/static/js/{index-f1nqk6z6.js → index-4jk8ngjg.js} +2 -2
- package/dist/client/static/js/index-55hq7tnj.js +1 -0
- package/dist/client/static/js/{index-8egjccbq.js → index-6fx2t6y7.js} +52 -52
- package/dist/client/static/js/{index-8xasfxf3.js → index-7fwppdkn.js} +1 -1
- package/dist/client/static/js/{index-28a5kf88.js → index-7w3gqw2b.js} +1 -1
- package/dist/client/static/js/{index-c1be3rva.js → index-9dnkfpx4.js} +2 -2
- package/dist/client/static/js/{index-s80x8d58.js → index-9fnzcg2x.js} +2 -2
- package/dist/client/static/js/{index-h8rr48px.js → index-a4ed3mks.js} +4 -4
- package/dist/client/static/js/{index-j2g39xq7.js → index-ae91g8ka.js} +5 -5
- package/dist/client/static/js/{index-xrp2zv8z.js → index-agdbjh5k.js} +2 -2
- package/dist/client/static/js/{index-2rs03vfy.js → index-ajjq0b8y.js} +2 -2
- package/dist/client/static/js/{index-xfr6r539.js → index-amawahyh.js} +2 -2
- package/dist/client/static/js/{index-y5ymgp20.js → index-b6cyn4hr.js} +50 -50
- package/dist/client/static/js/index-c6kx7s6a.js +2 -0
- package/dist/client/static/js/{index-k7sdsmgv.js → index-ce4vytm6.js} +2 -2
- package/dist/client/static/js/{index-b08hx4tw.js → index-cytks03p.js} +2 -2
- package/dist/client/static/js/{index-cfnxda13.js → index-djv15k5s.js} +2 -2
- package/dist/client/static/js/{index-kkfbd1db.js → index-ds6a2cx7.js} +5 -5
- package/dist/client/static/js/{index-tmnnafht.js → index-e6qjfcz9.js} +1 -1
- package/dist/client/static/js/{index-442mbhwb.js → index-e7yf273s.js} +2 -2
- package/dist/client/static/js/{index-f73v86a3.js → index-efn233xp.js} +4 -4
- package/dist/client/static/js/index-esx3zwnt.js +1 -0
- package/dist/client/static/js/{index-d3prrt2q.js → index-f8pq132s.js} +1 -1
- package/dist/client/static/js/index-fbbp5cwj.js +2 -0
- package/dist/client/static/js/{index-drjtwfp5.js → index-fg965t62.js} +2 -2
- package/dist/client/static/js/{index-xnk1500f.js → index-g1cggqgx.js} +12 -12
- package/dist/client/static/js/index-ghsdzs4m.js +1 -0
- package/dist/client/static/js/{index-4wvtar0v.js → index-gn92c6hp.js} +2 -2
- package/dist/client/static/js/{index-4c2zcvem.js → index-gs7ytgdw.js} +180 -180
- package/dist/client/static/js/{index-q0bph5x0.js → index-haaz8t7e.js} +2 -2
- package/dist/client/static/js/{index-t6gznaxm.js → index-hz177dr2.js} +2 -2
- package/dist/client/static/js/{index-7qc2avfy.js → index-j5ram1ve.js} +2 -2
- package/dist/client/static/js/{index-cst843zs.css → index-jqs23cc7.css} +1 -1
- package/dist/client/static/js/{index-y91j4t1q.js → index-ne131hmw.js} +2 -2
- package/dist/client/static/js/{index-1sgad84m.js → index-ngk9h0v9.js} +2 -2
- package/dist/client/static/js/{index-4wtr5wjp.js → index-ntcqyqd5.js} +2 -2
- package/dist/client/static/js/{index-m847wafq.js → index-pbsm2vw7.js} +2 -2
- package/dist/client/static/js/{index-vb3srfyc.js → index-pfbyfab5.js} +2 -2
- package/dist/client/static/js/{index-qsrw5c67.js → index-pn91shfp.js} +2 -2
- package/dist/client/static/js/{index-6rs8e8ng.js → index-qjsy6p86.js} +1 -1
- package/dist/client/static/js/{index-fjnkzk12.js → index-qsw5edtk.js} +5 -5
- package/dist/client/static/js/{index-72289dgx.js → index-rc8wrs2a.js} +2 -2
- package/dist/client/static/js/{index-w0rbyw47.js → index-rdqn92tc.js} +2 -2
- package/dist/client/static/js/{index-phm1zb8m.js → index-re1xz433.js} +1 -1
- package/dist/client/static/js/{index-mtadrbxt.js → index-rebnv57p.js} +2 -2
- 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-87qandgr.js → index-tgper3yy.js} +2 -2
- package/dist/client/static/js/index-x2kb1kx5.js +3 -0
- package/dist/client/static/js/{index-0j518hqm.js → index-xf36nmbm.js} +2 -2
- package/dist/client/static/js/{index-hdd8nqz8.js → index-xfa5hswh.js} +1 -1
- package/dist/client/static/js/{index-9gepbvdt.js → index-yq9vnd1y.js} +2 -2
- package/dist/client/static/js/{index-y3qxrs90.js → index-yzg9mbsv.js} +2 -2
- package/dist/client/static/js/{index-wgvysmnr.js → index-zfykeg7x.js} +10 -10
- package/dist/client/static/js/{index-rj81xrvw.js → index-zye9309h.js} +2 -2
- package/dist/client/static/js/info-A6RAGUB7-a8xap43w.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-k1jnhhbp.js → infoDiagram-VRGFBTTK-mh6yks62.js} +1 -1
- package/dist/client/static/js/ini-df5bw23e.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-ar94x2gr.js → ishikawaDiagram-OU5B5YK6-hnfqppnv.js} +2 -2
- package/dist/client/static/js/java-8j33rj1p.js +1 -0
- package/dist/client/static/js/javascript-zegm06a1.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-ntfp0w54.js → journeyDiagram-ZHPQQLJL-s4nv1f3q.js} +3 -3
- package/dist/client/static/js/json-g5ggnd94.js +1 -0
- package/dist/client/static/js/jsx-f6p72qpc.js +1 -0
- package/dist/client/static/js/{julia-jhe2vd4f.js → julia-yre4bxb9.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-q5rsr6j3.js → kanban-definition-PNTS6WVX-t8kbfefp.js} +8 -8
- package/dist/client/static/js/lua-bahx6qze.js +1 -0
- package/dist/client/static/js/markdown-9dhg1fax.js +1 -0
- package/dist/client/static/js/{mermaid.core-0gafsqrm.js → mermaid.core-0784021p.js} +7 -7
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-jgz6nyhk.js → mindmap-definition-NLK3R4M7-swkkze8c.js} +8 -8
- package/dist/client/static/js/one-dark-pro-h5tmw145.js +1 -0
- package/dist/client/static/js/one-light-x7vj1pxr.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-b5bvg6v1.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-b3e9ma2c.js → pegDiagram-GJSIUBJH-jqayzh7z.js} +1 -1
- package/dist/client/static/js/{perl-qhj6tk7k.js → perl-weeskn1v.js} +1 -1
- package/dist/client/static/js/{php-arycc4w7.js → php-vf3045p9.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-77ee73zg.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-66mn2qnt.js → pieDiagram-5QR66LMP-w03a65ky.js} +2 -2
- package/dist/client/static/js/properties-49mfnee4.js +1 -0
- package/dist/client/static/js/python-qb69wp1s.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-n7warg0e.js → quadrantDiagram-O4NWA36T-2j7sfa9s.js} +3 -3
- package/dist/client/static/js/r-s3mf2tch.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-cp79xtvb.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-dcpgqhcb.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-qasqv686.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-e46908rd.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-7009t6bk.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-k8j43rxj.js → railroadDiagram-XR7U4H2S-jtkkgy34.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-ef2v7nyq.js → requirementDiagram-PLB6GJNP-t85ckjdb.js} +3 -3
- package/dist/client/static/js/{ruby-fb6zzevm.js → ruby-1a2ryzy6.js} +1 -1
- package/dist/client/static/js/{rust-jvkbr060.js → rust-736r0f0v.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-3njbd1yd.js → sankeyDiagram-IPEJSGJF-5pfkw8ne.js} +3 -3
- package/dist/client/static/js/{sass-fzs6a0kr.js → sass-tq4vw7hd.js} +1 -1
- package/dist/client/static/js/{scss-gdb52d0c.js → scss-x7ddw6gb.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-k2wqc0qt.js → sequenceDiagram-PO4LG4MO-55vs9zv5.js} +7 -7
- package/dist/client/static/js/{sizeCapture-INFHLROL-cpnd12ee.js → sizeCapture-INFHLROL-pzqqd7f4.js} +1 -1
- package/dist/client/static/js/sql-aczp05f2.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-1ydpxaeg.js → stateDiagram-v2-GCMORJYK-6nhrph8n.js} +3 -3
- package/dist/client/static/js/{svelte-8s3k6qjd.js → svelte-0hv6pak2.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-4md43da2.js → swimlanes-2SLR337P-6tcnxfbv.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-7xrkrkpa.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-sp32bf3e.js → timeline-definition-EJHVYXUP-1dz46nt5.js} +4 -4
- package/dist/client/static/js/treeView-Q6P3EWNA-tpn62q8j.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-w910f1g4.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-p2ssettn.js → usecaseDiagram-POWQR4AR-b3jfveq6.js} +28 -28
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-ejqq8b82.js → vennDiagram-UO4OBE2U-dnc3jqvp.js} +3 -3
- package/dist/client/static/js/{vue-k3f3chre.js → vue-zccj3qa5.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-pt9tq808.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-tkk79rsn.js → wardleyDiagram-VNRHLVJA-466m8400.js} +3 -3
- package/dist/client/static/js/xml-wr1dxav5.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-zhgrsqpb.js → xychartDiagram-PMCCYNJV-kryrpqp1.js} +3 -3
- package/dist/client/static/js/yaml-0y9fdskg.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/layout/desktop-layout/LeftColumn.tsx +7 -0
- package/src/client/components/layout/session-sidebar/SessionsView.tsx +2 -1
- package/src/client/components/layout/session-sidebar/about-modal/index.test.tsx +1 -1
- 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 +29 -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/chat-timeline/MessageList.test.ts +19 -19
- 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/commands/use-command-runtime.ts +15 -0
- package/src/client/hooks/ui/touch-device.ts +8 -3
- package/src/client/hooks/ui/updates/check-request.ts +41 -0
- package/src/client/hooks/ui/updates/index.ts +13 -5
- 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/native/run-command.test.ts +95 -0
- package/src/client/lib/native/run-command.ts +52 -0
- package/src/client/lib/router/open-session.test.ts +26 -1
- package/src/client/lib/router/open-session.ts +21 -0
- package/src/client/lib/ui/soft-keyboard.test.ts +103 -0
- package/src/client/lib/ui/soft-keyboard.ts +90 -0
- package/src/client/main.tsx +9 -0
- package/src/server/lib/auth/guard.ts +8 -2
- package/src/server/lib/changes/capture-shell.test.ts +253 -0
- package/src/server/lib/changes/capture-targets.test.ts +83 -0
- package/src/server/lib/changes/capture-targets.ts +51 -0
- package/src/server/lib/changes/capture-write.server.ts +2 -2
- package/src/server/lib/changes/capture.server.ts +14 -29
- package/src/server/lib/changes/capture.test.ts +69 -149
- package/src/server/lib/changes/patch-paths.ts +37 -0
- 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/routes/connect/devices.ts +5 -4
- package/src/shared/lib/commands/catalog.test.ts +36 -0
- package/src/shared/lib/commands/catalog.ts +16 -0
- package/src/shared/lib/connect/types.ts +1 -0
- package/src/shared/lib/updates/popup-state.ts +11 -0
- package/dist/client/static/js/ImageView-t3rkypzs.js +0 -1
- package/dist/client/static/js/LayoutWrapper-th2pd4yt.js +0 -2
- package/dist/client/static/js/SessionsView-yqy0a1xg.js +0 -1
- 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-6gc6gd1d.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-4ry8kz8h.js +0 -3
- package/dist/client/static/js/index-fjqp03xe.js +0 -2
- package/dist/client/static/js/index-fs3pbqwn.js +0 -1
- package/dist/client/static/js/index-jze0zg3z.js +0 -2
- package/dist/client/static/js/index-w0xvdda9.js +0 -1
- package/dist/client/static/js/index-wfcgqjzr.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-n0as47q7.js +0 -1
- package/dist/client/static/js/one-light-05nw3mzj.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-d48g5gjf.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
|
@@ -24,7 +24,9 @@ import { PluginBootstrap } from '@/client/lib/plugins/bootstrap';
|
|
|
24
24
|
import { mobileEditorFileFrom, mobileProbeTabs, type MobileEditorFile } from '@/client/components/mobile/open-file-payload';
|
|
25
25
|
import { useLeftDock } from '@/client/hooks/workspace/left-dock';
|
|
26
26
|
import { useSessionStateContext } from '@/client/hooks/workspace/session-state/context';
|
|
27
|
-
import { setSessionKey } from '@/shared/lib/workspace/session-state/store';
|
|
27
|
+
import { setSessionKey, getSessionValue } from '@/shared/lib/workspace/session-state/store';
|
|
28
|
+
import { DEFAULT_RIGHT_PANEL_TYPE } from '@/shared/lib/workspace/right-panels';
|
|
29
|
+
import { armTerminalSoftKeyboard } from '@/client/components/workspace/terminal-panel/soft-keyboard';
|
|
28
30
|
import { startWorktreeSession } from '@/client/components/mobile/worktree-session';
|
|
29
31
|
import { OPEN_PANEL_EVENT, phoneDrawerForPanel, type OpenPanelDetail } from '@/shared/lib/workspace/panel-open';
|
|
30
32
|
|
|
@@ -161,6 +163,12 @@ export function MobileLayoutWrapper({ onDesktopToggle, appSettings = {} }: Mobil
|
|
|
161
163
|
if (!panelKey) return;
|
|
162
164
|
const drawer = phoneDrawerForPanel(panelKey, dock);
|
|
163
165
|
if (!drawer) return;
|
|
166
|
+
// Same gesture rule as the header's button: arm the keyboard before the
|
|
167
|
+
// terminal mounts, but never for the view already on screen (it is focused).
|
|
168
|
+
const stored = getSessionValue<string>(stateSessionId, 'layout.mobileRightPanel');
|
|
169
|
+
if (drawer === 'right' && (currentScreen !== 'right' || stored !== panelKey)) {
|
|
170
|
+
armTerminalSoftKeyboard(panelKey);
|
|
171
|
+
}
|
|
164
172
|
// The phone's two drawers are SCREENS, not columns: the session screen
|
|
165
173
|
// draws the left dock and the right screen draws the panel drawer.
|
|
166
174
|
setSessionKey(stateSessionId, drawer === 'left' ? 'layout.mobileLeftPanel' : 'layout.mobileRightPanel', panelKey);
|
|
@@ -227,6 +235,15 @@ export function MobileLayoutWrapper({ onDesktopToggle, appSettings = {} }: Mobil
|
|
|
227
235
|
if (next) setMobileEditorFile(next);
|
|
228
236
|
}, [activeProjectPath]);
|
|
229
237
|
|
|
238
|
+
// The right drawer is a SCREEN: opening it is the tap that can summon the
|
|
239
|
+
// keyboard, but the terminal mounts after it. Arm it for the tab the drawer
|
|
240
|
+
// will open on; the drawer releases it if another view resolves.
|
|
241
|
+
const handleOpenRightSidebar = useCallback(() => {
|
|
242
|
+
const stored = getSessionValue<string>(stateSessionId, 'layout.mobileRightPanel') ?? DEFAULT_RIGHT_PANEL_TYPE;
|
|
243
|
+
armTerminalSoftKeyboard(stored);
|
|
244
|
+
setCurrentScreen('right');
|
|
245
|
+
}, [stateSessionId]);
|
|
246
|
+
|
|
230
247
|
return (
|
|
231
248
|
<div
|
|
232
249
|
data-testid="app-root"
|
|
@@ -258,7 +275,7 @@ export function MobileLayoutWrapper({ onDesktopToggle, appSettings = {} }: Mobil
|
|
|
258
275
|
onSelectSession={handleSelectSession}
|
|
259
276
|
onNewSession={handleNewSession}
|
|
260
277
|
onOpenSessionSidebar={() => setCurrentScreen('session')}
|
|
261
|
-
onOpenRightSidebar={
|
|
278
|
+
onOpenRightSidebar={handleOpenRightSidebar}
|
|
262
279
|
appSettings={appSettings}
|
|
263
280
|
/>
|
|
264
281
|
</div>
|
|
@@ -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
|
|
@@ -11,6 +11,7 @@ import { useWaitingDispatch } from '@/client/hooks/chat/waiting/dispatch';
|
|
|
11
11
|
import { useUpdates } from '@/client/hooks/ui/updates';
|
|
12
12
|
import { useSidebarStyle } from '@/client/hooks/workspace/sidebar-style';
|
|
13
13
|
import { UPDATE_REQUEST_EVENT } from '@/shared/lib/updates/popup-state';
|
|
14
|
+
import { useUpdateCheckRequest } from '@/client/hooks/ui/updates/check-request';
|
|
14
15
|
import { openKeyBindingHelp } from '@/client/lib/commands/overlays';
|
|
15
16
|
import { updateOutcomeTone } from '@/shared/lib/ui/toast-duration';
|
|
16
17
|
import { useScheduledTaskCount } from '@/client/hooks/workspace/scheduled-tasks';
|
|
@@ -20,6 +21,8 @@ import { MobileDrawerDialogs } from '@/client/components/mobile/mobile-session-s
|
|
|
20
21
|
import { useDrawerState } from '@/client/components/mobile/mobile-session-sidebar/use-drawer';
|
|
21
22
|
import { archiveOutcomeMessage } from '@/client/hooks/workspace/batch-archive';
|
|
22
23
|
import { BatchActionBar } from '@/client/components/common/batch-selection/BatchActionBar';
|
|
24
|
+
import { VisibilityMenu } from '@/client/components/layout/VisibilityMenu';
|
|
25
|
+
import { usePanelVisibilityMenu } from '@/client/hooks/workspace/panel-visibility-menu';
|
|
23
26
|
import type { SessionSidebarVariantProps } from '@/client/components/layout/session-sidebar/variant-props';
|
|
24
27
|
|
|
25
28
|
/**
|
|
@@ -103,6 +106,12 @@ export function MobileSessionSidebar({
|
|
|
103
106
|
const { selection, deleteRun, archiveRun, binding: batchBinding, scopeFolder, available, selected } = batch;
|
|
104
107
|
const sidebarStyle = useSidebarStyle();
|
|
105
108
|
|
|
109
|
+
// The phone's right-click: a long press on the drawer's title or its chip
|
|
110
|
+
// strip opens the same panel switch the desktop left rail has. The strip IS
|
|
111
|
+
// the rail here, so the menu lists exactly what the rail can draw — the
|
|
112
|
+
// session list pinned, plus every placed panel, off or on.
|
|
113
|
+
const panelMenu = usePanelVisibilityMenu('left');
|
|
114
|
+
|
|
106
115
|
// Modals state (matching desktop)
|
|
107
116
|
const [newWorkspaceOpen, setNewWorkspaceOpen] = useState(false);
|
|
108
117
|
const [schedulerOpen, setSchedulerOpen] = useState(false);
|
|
@@ -129,6 +138,9 @@ export function MobileSessionSidebar({
|
|
|
129
138
|
});
|
|
130
139
|
});
|
|
131
140
|
|
|
141
|
+
// The same native row as the desktop's: one check, one verdict, drawer stays.
|
|
142
|
+
useUpdateCheckRequest(updates, pushToast);
|
|
143
|
+
|
|
132
144
|
const handleNewSessionAndClose = () => {
|
|
133
145
|
onNewSession();
|
|
134
146
|
onClose();
|
|
@@ -210,6 +222,7 @@ export function MobileSessionSidebar({
|
|
|
210
222
|
<MobileSessionHeader
|
|
211
223
|
onClose={onClose}
|
|
212
224
|
viewLabel={dock.showingSessions ? 'Sessions' : dock.activePanel?.label ?? 'Panel'}
|
|
225
|
+
menuProps={panelMenu.surfaceProps}
|
|
213
226
|
/>
|
|
214
227
|
|
|
215
228
|
{/* The strip is the phone's RAIL, so it follows the switch: with the rail
|
|
@@ -217,7 +230,22 @@ export function MobileSessionSidebar({
|
|
|
217
230
|
always holds Sessions). Requiring a second destination made the
|
|
218
231
|
Settings switch a no-op on a phone with nothing placed. */}
|
|
219
232
|
{phoneLeftStripVisible(dock.enabled) ? (
|
|
220
|
-
<MobileDockStrip
|
|
233
|
+
<MobileDockStrip
|
|
234
|
+
panels={dock.catalog}
|
|
235
|
+
activeId={dock.activeView}
|
|
236
|
+
onSelect={dock.setActiveView}
|
|
237
|
+
menuProps={panelMenu.surfaceProps}
|
|
238
|
+
/>
|
|
239
|
+
) : null}
|
|
240
|
+
|
|
241
|
+
{panelMenu.anchor ? (
|
|
242
|
+
<VisibilityMenu
|
|
243
|
+
anchor={panelMenu.anchor}
|
|
244
|
+
items={panelMenu.items}
|
|
245
|
+
hidden={panelMenu.hidden}
|
|
246
|
+
onToggle={panelMenu.toggle}
|
|
247
|
+
onClose={panelMenu.close}
|
|
248
|
+
/>
|
|
221
249
|
) : null}
|
|
222
250
|
|
|
223
251
|
{/* 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
|