@kabmo-labs/kabmo 0.59.0 → 0.60.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 +397 -397
- package/dist/client/static/js/{Body-jqq4654r.js → Body-p82s28sj.js} +3 -3
- package/dist/client/static/js/{CsvGrid-avw0taqb.js → CsvGrid-erc5mcvc.js} +2 -2
- package/dist/client/static/js/{DocxView-d221vr6g.js → DocxView-x3faj0jv.js} +3 -3
- package/dist/client/static/js/{DrawioView-gjsy7p01.js → DrawioView-t7fh3ens.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-949393v1.js → HtmlPreview-zy7x7jmm.js} +1 -1
- package/dist/client/static/js/ImageView-xc90jc1c.js +1 -0
- package/dist/client/static/js/LayoutWrapper-wyqe98kf.js +2 -0
- package/dist/client/static/js/MergeDiffView-bng34cpr.js +1 -0
- package/dist/client/static/js/Modal-89jk7wff.js +60 -0
- package/dist/client/static/js/{PdfView-dzj2s6rj.js → PdfView-kqx472q7.js} +1 -1
- package/dist/client/static/js/SessionsView-6bpz1faj.js +1 -0
- package/dist/client/static/js/{SheetView-jpc178g5.js → SheetView-0n9fze50.js} +9 -9
- package/dist/client/static/js/{SvgPreview-94fap32p.js → SvgPreview-6xc6ts46.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-a6eyfzrj.js → abnfDiagram-O67JEVCF-2xdkkqwg.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-sxrkxwbq.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-pgmyfncy.js → architectureDiagram-NJMV4G6O-ja8cx19z.js} +11 -11
- package/dist/client/static/js/{astro-ryr2ajmg.js → astro-yphdvdty.js} +1 -1
- package/dist/client/static/js/bash-bcbct9gc.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-rf51jyb2.js → blockDiagram-BEXU5L5S-ytf7s99c.js} +8 -8
- package/dist/client/static/js/c-fn9jz26e.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-0faj48jp.js → c4Diagram-YGBWAQC7-5a0kdx0z.js} +5 -5
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-bvzsws8x.js → classDiagram-v2-NBCMYWYE-hd98dvjw.js} +6 -6
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-j1amnd3m.js → cose-bilkent-JH36ORCC-man3fqcj.js} +1 -1
- package/dist/client/static/js/cpp-a1q64mke.js +1 -0
- package/dist/client/static/js/css-b92azee8.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-g1xwa8b9.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-f73w6zzz.js → cynefinDiagram-VND7K2PF-2f0kbbv2.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-a5vgvjsg.js → dagre-6A5THRUB-k7pyhgzn.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-6y9efamp.js → diagram-22UHCM2B-qx0afa2m.js} +15 -15
- package/dist/client/static/js/{diagram-3UASUU5V-2mycy7xm.js → diagram-3UASUU5V-ydpe77sv.js} +2 -2
- package/dist/client/static/js/{diagram-ATOU4E4O-10zgjb66.js → diagram-ATOU4E4O-e63v984n.js} +2 -2
- package/dist/client/static/js/{diagram-CDSNMT55-bewa52yf.js → diagram-CDSNMT55-8c765h3a.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-mh3b7gd3.js → diagram-MLGK6HIB-3pq0n7v8.js} +2 -2
- package/dist/client/static/js/{diagram-MPIPVDR6-gvdrbdm5.js → diagram-MPIPVDR6-638atzxz.js} +2 -2
- package/dist/client/static/js/{dockerfile-6bn19kg0.js → dockerfile-yehc914q.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-2prre93c.js → ebnfDiagram-ZINNZB2B-3gv43zvm.js} +1 -1
- package/dist/client/static/js/{elixir-fyxw6d70.js → elixir-3nwnd9yw.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-9t6t9kc6.js → elk-276RUBZZ-6s5pggfc.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-etcggr5n.js → erDiagram-OPXOYQCR-x7cqyb89.js} +3 -3
- package/dist/client/static/js/{erlang-97ayje6m.js → erlang-p5c4n3t0.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-05p61bka.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-7sn6nwjv.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-cdc4mwhs.js → ganttDiagram-FUAMR5RP-g97te4v1.js} +5 -5
- package/dist/client/static/js/gitGraph-4MIJSDKK-z1yehwys.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-55d0fa7x.js → gitGraphDiagram-X574FWY7-sw4f94tc.js} +14 -14
- package/dist/client/static/js/graphql-8d8bn59j.js +1 -0
- package/dist/client/static/js/html-6hdrwtz2.js +1 -0
- package/dist/client/static/js/{index-5e4e18tg.js → index-025s3fp8.js} +2 -2
- package/dist/client/static/js/{index-pgy7ree5.js → index-0ze5bwvw.js} +5 -5
- package/dist/client/static/js/{index-f13ern5e.js → index-111bq6rs.js} +1 -1
- package/dist/client/static/js/{index-8tzt0dek.js → index-11qn05g9.js} +2 -2
- package/dist/client/static/js/{index-np2rfq06.js → index-2dmew334.js} +2 -2
- package/dist/client/static/js/index-2n2evsg0.js +2 -0
- package/dist/client/static/js/{index-trq7bdvk.js → index-37apvxgj.js} +2 -2
- package/dist/client/static/js/{index-6bsez5n6.js → index-43gmn7yb.js} +1 -1
- package/dist/client/static/js/index-4h2zkrk1.js +2 -0
- package/dist/client/static/js/{index-xe447cw3.js → index-4xbc0j7t.js} +1 -1
- package/dist/client/static/js/index-5nm8hm4k.js +2 -0
- package/dist/client/static/js/{index-mx5y9vt9.js → index-6qn9kygb.js} +7 -7
- package/dist/client/static/js/{index-jpvng27a.js → index-8zct30zd.js} +1 -1
- package/dist/client/static/js/{index-eggbcdwx.js → index-95jfphx5.js} +197 -197
- package/dist/client/static/js/{index-yrwm437g.js → index-97sw4d9n.js} +2 -2
- package/dist/client/static/js/{index-8z9aqgf3.js → index-9pw441wc.js} +4 -4
- package/dist/client/static/js/{index-27gwghmp.js → index-9rz6kzsv.js} +1 -1
- package/dist/client/static/js/{index-y4cx8cqf.js → index-a145x0w2.js} +2 -2
- package/dist/client/static/js/{index-mhrkjbjq.js → index-bdtftrym.js} +2 -2
- package/dist/client/static/js/index-bjz54ht6.js +1 -0
- package/dist/client/static/js/{index-db6s66jr.js → index-bkn6jtn1.js} +2 -2
- package/dist/client/static/js/{index-rw84kefb.js → index-bpcg34jp.js} +2 -2
- package/dist/client/static/js/{index-f6t91mpp.js → index-bqapt2e8.js} +1 -1
- package/dist/client/static/js/{index-ndqtff48.js → index-ca6tmamh.js} +2 -2
- package/dist/client/static/js/{index-fyt8m8ah.js → index-cf69bhjx.js} +2 -2
- package/dist/client/static/js/{index-yh7gngsh.js → index-cfvc1zpk.js} +2 -2
- package/dist/client/static/js/{index-nnwcbp2d.js → index-ddkjgv5h.js} +2 -2
- package/dist/client/static/js/{index-60cxxnpk.js → index-dekvtt2a.js} +87 -87
- package/dist/client/static/js/{index-ax8gaayq.js → index-dv01prse.js} +2 -2
- package/dist/client/static/js/{index-sg65xdey.js → index-enm77k5z.js} +2 -2
- package/dist/client/static/js/{index-nf4hq5tg.js → index-excgtjhx.js} +14 -14
- package/dist/client/static/js/{index-51rbgeh9.js → index-fb2fjndj.js} +5 -5
- package/dist/client/static/js/index-fnwaxc6r.js +1 -0
- package/dist/client/static/js/{index-vs2y8gxr.js → index-fr6wsqk8.js} +2 -2
- package/dist/client/static/js/index-h65zrhva.js +1 -0
- package/dist/client/static/js/{index-fr91ghwb.js → index-hgfyx8dt.js} +2 -2
- package/dist/client/static/js/{index-gcad7b6g.js → index-hwdkxe4n.js} +2 -2
- package/dist/client/static/js/{index-69mnn71v.js → index-hwv7bfxc.js} +2 -2
- package/dist/client/static/js/index-hxsqw7sz.js +4 -0
- package/dist/client/static/js/{index-461ga40v.js → index-hxy1sadd.js} +2 -2
- package/dist/client/static/js/{index-c253x7vt.js → index-ja0ajnvq.js} +7 -7
- package/dist/client/static/js/{index-2f6afhze.js → index-jfqd838j.js} +2 -2
- package/dist/client/static/js/{index-d9sfavx1.js → index-mtav0rpf.js} +2 -2
- package/dist/client/static/js/{index-58z2hatp.js → index-n8r7r86r.js} +1 -1
- package/dist/client/static/js/{index-j1ksa4x2.js → index-pdgc9ccr.js} +1 -1
- package/dist/client/static/js/{index-s9ts6qbj.js → index-pdz6j2g2.js} +2 -2
- package/dist/client/static/js/{index-jct0jryd.js → index-qccydkze.js} +2 -2
- package/dist/client/static/js/{index-yg38s8t3.js → index-qkqkygrf.js} +1 -1
- package/dist/client/static/js/index-qkyy563e.js +1 -0
- package/dist/client/static/js/{index-92h38pwg.js → index-s4j2ghmx.js} +2 -2
- package/dist/client/static/js/{index-z82nd2bd.js → index-sx83ans2.js} +2 -2
- package/dist/client/static/js/index-t6nqy2n5.css +1 -0
- package/dist/client/static/js/{index-fsa18ns9.js → index-twwsn91p.js} +2 -2
- package/dist/client/static/js/{index-nwbr15b3.js → index-v88m5sva.js} +2 -2
- package/dist/client/static/js/{index-a5ecn5yx.js → index-vcq6zfxx.js} +6 -6
- package/dist/client/static/js/{index-3akjcs82.js → index-vec7m1yd.js} +2 -2
- package/dist/client/static/js/{index-mngpcca7.js → index-vejz38qt.js} +9 -9
- package/dist/client/static/js/{index-9rvjegmy.js → index-wrk99kks.js} +2 -2
- package/dist/client/static/js/{index-q3k8r0ms.js → index-wsy6y5em.js} +9 -9
- package/dist/client/static/js/{index-h1xbx74w.js → index-yfcy4cf6.js} +2 -2
- package/dist/client/static/js/{index-pa70qj4p.js → index-ywp0sd1e.js} +1 -1
- package/dist/client/static/js/{index-njhrm5qa.js → index-z8k42dwz.js} +9 -9
- package/dist/client/static/js/info-A6RAGUB7-dqyaxjc1.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-9xph6cr5.js → infoDiagram-VRGFBTTK-pw2qaa27.js} +1 -1
- package/dist/client/static/js/ini-g6a5xsaw.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-3gshs3v8.js → ishikawaDiagram-OU5B5YK6-d13jhvxy.js} +3 -3
- package/dist/client/static/js/java-n596am4c.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-fa8x56mf.js → journeyDiagram-ZHPQQLJL-20gb8a04.js} +4 -4
- package/dist/client/static/js/json-7k70qbkj.js +1 -0
- package/dist/client/static/js/jsx-sndenqrc.js +1 -0
- package/dist/client/static/js/{julia-agc5kfvg.js → julia-rpd1y9vh.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-fybp2hh4.js → kanban-definition-PNTS6WVX-s78e158c.js} +5 -5
- package/dist/client/static/js/lua-djd3g9q5.js +1 -0
- package/dist/client/static/js/markdown-r2tpvxpn.js +1 -0
- package/dist/client/static/js/{mermaid.core-jjh5ggp0.js → mermaid.core-xbm27k28.js} +6 -6
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-gtfbg619.js → mindmap-definition-NLK3R4M7-6y7xe2zm.js} +7 -7
- package/dist/client/static/js/one-dark-pro-7bgqnyhm.js +1 -0
- package/dist/client/static/js/one-light-47y6etng.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-7jxzax4z.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-1a51sbqv.js → pegDiagram-GJSIUBJH-dmvewetf.js} +1 -1
- package/dist/client/static/js/{perl-v5vbtzgf.js → perl-kmtz9dnv.js} +1 -1
- package/dist/client/static/js/{php-83qwy98t.js → php-bttrsbxy.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-wc9wxr7f.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-zd9svyyn.js → pieDiagram-5QR66LMP-1q9e7rcm.js} +2 -2
- package/dist/client/static/js/properties-brn72zdk.js +1 -0
- package/dist/client/static/js/python-g9mghwgm.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-5gtw2m6s.js → quadrantDiagram-O4NWA36T-mvrem3n6.js} +4 -4
- package/dist/client/static/js/r-e247x4mw.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-kwj5padj.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-h8sdx3w5.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-2wmwx246.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-h4cdgw3y.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-q7m0tfd0.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-3ccwpfzz.js → railroadDiagram-XR7U4H2S-axttcfhw.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-sasndrrp.js → requirementDiagram-PLB6GJNP-5qx7erta.js} +12 -12
- package/dist/client/static/js/{ruby-994n5j6e.js → ruby-dve3y59w.js} +1 -1
- package/dist/client/static/js/{rust-n9z2c9m3.js → rust-b3ckax3e.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-2ahb4sda.js → sankeyDiagram-IPEJSGJF-es87a3j6.js} +4 -4
- package/dist/client/static/js/{sass-p6g7qdv2.js → sass-emxqt5p2.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-bfj90kz1.js → sequenceDiagram-PO4LG4MO-dgpnjrtk.js} +21 -21
- package/dist/client/static/js/{sizeCapture-INFHLROL-5tygxmtc.js → sizeCapture-INFHLROL-kyw0p86n.js} +1 -1
- package/dist/client/static/js/sql-0kar81jy.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-533xw76e.js → stateDiagram-v2-GCMORJYK-vnsbw8y9.js} +3 -3
- package/dist/client/static/js/{svelte-bek3h1sz.js → svelte-dbsx1ehx.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-gd3d04pk.js → swimlanes-2SLR337P-060q1rep.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-y77g9dq0.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-fvqvgqvg.js → timeline-definition-EJHVYXUP-8a3yqmx0.js} +6 -6
- package/dist/client/static/js/treeView-Q6P3EWNA-yv9640h3.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-7kpzjg21.js +1 -0
- package/dist/client/static/js/typescript-bm89v3gk.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-tm1f0m4x.js → usecaseDiagram-POWQR4AR-18sp73v7.js} +51 -51
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-2vdvv1hd.js → vennDiagram-UO4OBE2U-gf4y1r3s.js} +5 -5
- package/dist/client/static/js/{vue-y44m889c.js → vue-hyr58df9.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-mggay64p.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-7avcjznx.js → wardleyDiagram-VNRHLVJA-q0kwmbzh.js} +5 -5
- package/dist/client/static/js/xml-b7824nx0.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-g39y526n.js → xychartDiagram-PMCCYNJV-y0gpmg6m.js} +6 -6
- package/dist/client/static/js/yaml-kqqktdv1.js +1 -0
- package/package.json +4 -4
- package/src/client/borders.css +28 -15
- package/src/client/components/common/Modal.tsx +10 -2
- package/src/client/components/common/Toast.tsx +8 -3
- package/src/client/components/common/anchored-menu/index.tsx +10 -3
- package/src/client/components/common/command-palette/index.tsx +9 -3
- package/src/client/components/common/fullscreen-viewer/index.tsx +1 -1
- package/src/client/components/common/header-controls/index.test.tsx +40 -3
- package/src/client/components/common/header-controls/index.tsx +106 -56
- package/src/client/components/common/search-select/search-select.test.tsx +10 -1
- package/src/client/components/common/session-row/TrailingSlot.tsx +8 -1
- package/src/client/components/common/session-row/index.tsx +4 -0
- package/src/client/components/common/session-row/session-row.test.tsx +5 -0
- package/src/client/components/common/workspace-mark/index.test.tsx +67 -0
- package/src/client/components/common/workspace-mark/index.tsx +48 -0
- package/src/client/components/layout/ActivityBar.test.ts +1 -1
- package/src/client/components/layout/ActivityBarDrag.test.ts +1 -1
- package/src/client/components/layout/LeftActivityBar.test.ts +48 -3
- package/src/client/components/layout/LeftDock.tsx +33 -14
- package/src/client/components/layout/PanelButton.test.tsx +119 -0
- package/src/client/components/layout/PanelButton.tsx +2 -4
- package/src/client/components/layout/activity-bar/Row.tsx +125 -0
- package/src/client/components/layout/{ActivityBar.tsx → activity-bar/index.tsx} +81 -20
- package/src/client/components/layout/controls-bar/index.tsx +183 -0
- package/src/client/components/layout/desktop-layout/BarSlot.tsx +18 -0
- package/src/client/components/layout/desktop-layout/LeftColumn.test.tsx +187 -0
- package/src/client/components/layout/desktop-layout/LeftColumn.tsx +81 -64
- package/src/client/components/layout/desktop-layout/LeftRail.tsx +60 -0
- package/src/client/components/layout/desktop-layout/LeftTabsColumn.tsx +91 -0
- package/src/client/components/layout/desktop-layout/ResizeHandle.tsx +19 -3
- package/src/client/components/layout/desktop-layout/RightColumn.test.tsx +60 -0
- package/src/client/components/layout/desktop-layout/RightColumn.tsx +77 -28
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +114 -104
- package/src/client/components/layout/desktop-layout/index.tsx +48 -45
- package/src/client/components/layout/desktop-layout/resizer/index.tsx +25 -83
- package/src/client/components/layout/desktop-layout/resizer/panel-motion.ts +61 -0
- package/src/client/components/layout/desktop-layout/resizer/panel.test.ts +40 -2
- package/src/client/components/layout/desktop-layout/resizer/separator.tsx +89 -0
- package/src/client/components/layout/left-bar/index.tsx +88 -0
- package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +5 -2
- package/src/client/components/layout/session-sidebar/Footer.tsx +28 -11
- package/src/client/components/layout/session-sidebar/FooterHost.tsx +167 -0
- package/src/client/components/layout/session-sidebar/SessionItem.tsx +2 -2
- package/src/client/components/layout/session-sidebar/about-modal/index.tsx +8 -3
- package/src/client/components/layout/session-sidebar/footer-host.test.tsx +133 -0
- package/src/client/components/layout/session-sidebar/modern/RevealRow.tsx +36 -5
- package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +5 -2
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +1 -0
- package/src/client/components/layout/session-sidebar/modern/reveal-row.test.tsx +28 -1
- package/src/client/components/layout/session-title-bar/index.tsx +199 -0
- package/src/client/components/layout/top-bars.test.tsx +338 -0
- package/src/client/components/mobile/LayoutWrapper.tsx +13 -2
- package/src/client/components/mobile/SessionSidebar.tsx +10 -8
- package/src/client/components/mobile/drawer-layout.test.tsx +67 -0
- package/src/client/components/mobile/drawer-strip.tsx +37 -14
- package/src/client/components/mobile/left-drawer-nav.test.tsx +19 -127
- package/src/client/components/settings/LazyModal.tsx +8 -2
- package/src/client/components/settings/Modal.tsx +6 -2
- package/src/client/components/settings/apply-side-effects.ts +5 -0
- package/src/client/components/settings/categories/AppearanceSettings.test.tsx +1 -0
- package/src/client/components/settings/categories/AppearanceSettings.tsx +2 -0
- package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.test.tsx +6 -5
- package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.tsx +2 -2
- package/src/client/components/settings/categories/appearance-settings/ChromeStyleSection.tsx +105 -0
- package/src/client/components/settings/categories/appearance-settings/groups.ts +3 -2
- package/src/client/components/settings/categories/mcp-settings/ImportModal.tsx +1 -1
- package/src/client/components/settings/categories/voice-settings/SpeechSettings.test.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/AiMessageFooterSheet.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/GeneratingIndicator.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/NewChatModal.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/UndoConfirmModal.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +8 -1
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.test.tsx +8 -1
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.test.tsx +9 -2
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +1 -25
- package/src/client/components/workspace/editor/SaveDeletedFileModal.tsx +1 -1
- package/src/client/components/workspace/editor/Tab.tsx +160 -0
- package/src/client/components/workspace/editor/Tabs.test.ts +40 -0
- package/src/client/components/workspace/editor/Tabs.tsx +52 -102
- package/src/client/components/workspace/editor/index.tsx +2 -0
- package/src/client/components/workspace/editor/props.ts +6 -0
- package/src/client/components/workspace/file-explorer/OutlineResize.test.tsx +225 -0
- package/src/client/components/workspace/file-explorer/OutlineSection.tsx +43 -3
- package/src/client/components/workspace/file-explorer/index.tsx +1 -1
- package/src/client/components/workspace/model-dropdown/CloseButton.tsx +2 -2
- package/src/client/components/workspace/model-dropdown/Fullscreen.tsx +2 -2
- package/src/client/components/workspace/model-dropdown/HarnessTabs.tsx +10 -1
- package/src/client/components/workspace/model-dropdown/Header.tsx +27 -20
- package/src/client/components/workspace/model-dropdown/Panel.tsx +2 -2
- package/src/client/components/workspace/model-dropdown/SpecsTooltip.tsx +1 -1
- package/src/client/components/workspace/model-dropdown/harness-tabs.test.tsx +18 -0
- package/src/client/components/workspace/model-dropdown/picker-close.test.tsx +34 -4
- package/src/client/components/workspace/panel-tabs/TabChip.tsx +48 -20
- package/src/client/components/workspace/panel-tabs/TabStrip.connected.test.tsx +163 -0
- package/src/client/components/workspace/panel-tabs/TabStrip.tsx +18 -9
- package/src/client/components/workspace/search-panel/Body.tsx +3 -3
- package/src/client/components/workspace/terminal-panel/RealtimeTerminalView.tsx +1 -1
- package/src/client/data/settings/omp-schema.json +205 -9
- package/src/client/floating.css +276 -0
- package/src/client/floating.test.ts +151 -0
- package/src/client/hooks/chat/timeline/session-pagination.ts +13 -9
- package/src/client/hooks/editor/use-outline-resize.ts +145 -0
- package/src/client/hooks/ui/border-style.test.ts +19 -7
- package/src/client/hooks/ui/border-style.ts +2 -3
- package/src/client/hooks/ui/chrome-style.test.ts +140 -0
- package/src/client/hooks/ui/chrome-style.ts +75 -0
- package/src/client/hooks/ui/media-query.ts +29 -0
- package/src/client/hooks/ui/presence.test.ts +104 -0
- package/src/client/hooks/ui/presence.ts +62 -0
- package/src/client/hooks/ui/style-attributes.test.ts +7 -6
- package/src/client/hooks/ui/surface-style.ts +2 -2
- package/src/client/hooks/ui/titlebar-inset.test.ts +56 -0
- package/src/client/hooks/ui/titlebar-inset.ts +31 -0
- package/src/client/hooks/workspace/available-width.ts +25 -1
- package/src/client/hooks/workspace/panel-peek.test.ts +124 -0
- package/src/client/hooks/workspace/panel-peek.ts +151 -0
- package/src/client/hooks/workspace/panel-rail.test.ts +86 -0
- package/src/client/hooks/workspace/panel-rail.ts +108 -0
- package/src/client/hooks/workspace/panel-resize.ts +8 -2
- package/src/client/hooks/workspace/rail-peek.test.ts +119 -0
- package/src/client/hooks/workspace/rail-peek.ts +68 -0
- package/src/client/hooks/workspace/right-panel-card.test.ts +71 -0
- package/src/client/hooks/workspace/right-panel-card.ts +69 -0
- package/src/client/hooks/workspace/right-panel-geometry.ts +172 -0
- package/src/client/hooks/workspace/right-side.ts +7 -0
- package/src/client/lib/desktop/titlebar.test.ts +6 -0
- package/src/client/lib/desktop/titlebar.ts +16 -0
- package/src/client/main.tsx +11 -0
- package/src/client/motion.test.ts +36 -0
- package/src/client/tailwind.css +67 -0
- package/src/server/lib/assets/shell-attributes.server.ts +14 -4
- package/src/server/lib/assets/shell-attributes.test.ts +35 -21
- package/src/server/lib/bundler/titlebar-css.test.ts +3 -2
- package/src/server/lib/realtime/topics/peer-relay.server.test.ts +19 -3
- package/src/server/lib/updates/omp.test.ts +40 -1
- package/src/server/lib/updates/omp.ts +29 -2
- package/src/server/plugins/ssr.ts +2 -0
- package/src/server/routes/settings/mcp.test.ts +16 -0
- package/src/server/routes/settings/mcp.ts +4 -0
- package/src/shared/lib/code/outline/resize.test.ts +57 -0
- package/src/shared/lib/code/outline/resize.ts +67 -0
- package/src/shared/lib/models/provider/glyph.test.ts +3 -1
- package/src/shared/lib/models/provider/glyph.ts +1 -0
- package/src/shared/lib/omp/config/schema-releases-19-4.test.ts +103 -3
- package/src/shared/lib/omp/config/schema.test.ts +9 -0
- package/src/shared/lib/omp/config/schema.ts +8 -0
- package/src/shared/lib/settings/defaults.ts +2 -0
- package/src/shared/lib/theme/border-style.test.ts +12 -14
- package/src/shared/lib/theme/border-style.ts +25 -18
- package/src/shared/lib/theme/chrome-style.test.ts +31 -0
- package/src/shared/lib/theme/chrome-style.ts +74 -0
- package/src/shared/lib/theme/surface-style.test.ts +4 -5
- package/src/shared/lib/theme/surface-style.ts +6 -5
- package/src/shared/lib/ui/motion.ts +29 -0
- package/src/shared/lib/workspace/floating-chrome.ts +23 -0
- package/src/shared/lib/workspace/session-state/store.ts +3 -0
- package/src/shared/lib/workspace/workspace-panel-widths.test.ts +73 -0
- package/src/shared/lib/workspace/workspace-panel-widths.ts +79 -17
- package/src/shared/types/settings/state.ts +10 -9
- package/src/test-support/left-drawer-harness.test-util.ts +169 -0
- package/src/test-support/peer-harness.ts +44 -36
- package/dist/client/static/js/ImageView-pan9pqtm.js +0 -1
- package/dist/client/static/js/LayoutWrapper-p0qmghgt.js +0 -2
- package/dist/client/static/js/MergeDiffView-swt467g7.js +0 -1
- package/dist/client/static/js/Modal-4spmcn44.js +0 -60
- package/dist/client/static/js/SessionsView-b6szjdg5.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-bwn1drdz.js +0 -1
- package/dist/client/static/js/bash-zknkkwkw.js +0 -1
- package/dist/client/static/js/c-0w02jkxb.js +0 -1
- package/dist/client/static/js/cpp-p5b4vean.js +0 -1
- package/dist/client/static/js/css-9jzbvdyz.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-jbc50ks8.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-b37ey01t.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-7c2ncsw7.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-mvqq7tcs.js +0 -1
- package/dist/client/static/js/graphql-xzykn0ba.js +0 -1
- package/dist/client/static/js/html-2zc3shky.js +0 -1
- package/dist/client/static/js/index-537m8a3x.js +0 -2
- package/dist/client/static/js/index-me0b6wkw.js +0 -1
- package/dist/client/static/js/index-mttx9327.css +0 -1
- package/dist/client/static/js/index-pe5f2gmn.js +0 -1
- package/dist/client/static/js/index-pzwf6hwe.js +0 -4
- package/dist/client/static/js/index-skvfxcd8.js +0 -1
- package/dist/client/static/js/index-sx2yz2wx.js +0 -1
- package/dist/client/static/js/index-wwyjzhgs.js +0 -2
- package/dist/client/static/js/index-y09de44h.js +0 -2
- package/dist/client/static/js/info-A6RAGUB7-zkv4crz7.js +0 -1
- package/dist/client/static/js/ini-62r3vxaf.js +0 -1
- package/dist/client/static/js/java-kacycary.js +0 -1
- package/dist/client/static/js/json-yrwpn6bd.js +0 -1
- package/dist/client/static/js/jsx-b40ag8q1.js +0 -1
- package/dist/client/static/js/lua-bk961f37.js +0 -1
- package/dist/client/static/js/markdown-b7rgzgd6.js +0 -1
- package/dist/client/static/js/one-dark-pro-vht9rv39.js +0 -1
- package/dist/client/static/js/one-light-arxc5whh.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-dgpge627.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-b8pgsqrd.js +0 -1
- package/dist/client/static/js/properties-k8gbzggp.js +0 -1
- package/dist/client/static/js/python-343tspad.js +0 -1
- package/dist/client/static/js/r-ycdwmv8g.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-fmfe5y27.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-b5tks4ce.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-0sf4m0ze.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-pjfy3pt7.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-nr8ngt42.js +0 -1
- package/dist/client/static/js/sql-kwpd5w07.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-xxmvdyg4.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-23r9fa68.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-mxxzdrj6.js +0 -1
- package/dist/client/static/js/typescript-4dchbnya.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-cbqtax1x.js +0 -1
- package/dist/client/static/js/xml-xs6qz3ya.js +0 -1
- package/dist/client/static/js/yaml-174nk5bn.js +0 -1
- package/src/client/components/layout/desktop-layout/TopNavbar.tsx +0 -238
- package/src/client/components/layout/session-sidebar/Header.test.ts +0 -98
- package/src/client/components/layout/session-sidebar/Header.tsx +0 -60
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The right column's geometry: which view it draws, how wide it is, and whether
|
|
8
|
+
* it is on screen — plus the rail's hover PREVIEW of another view.
|
|
9
|
+
*
|
|
10
|
+
* Extracted from `WorkspacePanels` for the repository's per-file ceiling, but
|
|
11
|
+
* it earns the boundary: these are one decision (the column's catalog entry,
|
|
12
|
+
* its width, its card, and the refusal that travels back to the navbar), and
|
|
13
|
+
* they were already a single block of arithmetic over measured and stored
|
|
14
|
+
* values. Keeping them here is also what lets the preview resolve through the
|
|
15
|
+
* SAME solver instead of growing a second width path.
|
|
16
|
+
*
|
|
17
|
+
* The preview is deliberately not a second "open": it draws a view at the width
|
|
18
|
+
* that view would take, with no separator and no persisted flag, and it is
|
|
19
|
+
* dropped when the group cannot hold it — a refused preview says nothing.
|
|
20
|
+
*/
|
|
21
|
+
import { useEffect, useRef } from 'preact/hooks';
|
|
22
|
+
import type { RefObject } from 'preact';
|
|
23
|
+
import type { ResolvedPanel } from '@/client/components/workspace/plugin-panel/catalog';
|
|
24
|
+
import { usePanelCatalog } from '@/client/components/workspace/plugin-panel/catalog';
|
|
25
|
+
import { usePanelSlotPlugins } from '@/client/components/workspace/plugin-panel/resolve';
|
|
26
|
+
import type { ResolvedPluginPanel } from '@/client/components/workspace/plugin-panel/resolve';
|
|
27
|
+
import { useAvailableWidth } from '@/client/hooks/workspace/available-width';
|
|
28
|
+
import { useSnapResize } from '@/client/hooks/workspace/panel-resize';
|
|
29
|
+
import type { RightPanelCard } from '@/client/hooks/workspace/right-panel-card';
|
|
30
|
+
import { resolveRightPanelCard, rightPanelChromeWidth } from '@/client/hooks/workspace/right-panel-card';
|
|
31
|
+
import { FLOATING_CARD_INSET_PX } from '@/shared/lib/workspace/floating-chrome';
|
|
32
|
+
import type { EditorWidthMode, PanelWidths } from '@/shared/lib/workspace/panel-widths';
|
|
33
|
+
import type { PanelNavStyle } from '@/shared/lib/workspace/panel-nav';
|
|
34
|
+
import { resolveWorkspacePanelWidths } from '@/shared/lib/workspace/workspace-panel-widths';
|
|
35
|
+
|
|
36
|
+
export interface RightPanelGeometryArgs {
|
|
37
|
+
panelWidths: PanelWidths;
|
|
38
|
+
editorWidthMode: EditorWidthMode;
|
|
39
|
+
showEditor: boolean;
|
|
40
|
+
showRightPanel: boolean;
|
|
41
|
+
showRightSide: boolean;
|
|
42
|
+
chatHidden: boolean;
|
|
43
|
+
/** The stored (or resolved) selection of the right column. */
|
|
44
|
+
activeRightPanel: string;
|
|
45
|
+
rightNav: PanelNavStyle;
|
|
46
|
+
/** The view a rail hover is previewing, or null when none is. */
|
|
47
|
+
preview: string | null;
|
|
48
|
+
/** The refusal that must reach the toggle's owner; see `useRightPanelPresence`. */
|
|
49
|
+
onSuppressed?: ((suppressed: boolean | null) => void) | undefined;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface RightPanelGeometry {
|
|
53
|
+
/** The measured group, for the resizer's own `onLayoutChanged`. */
|
|
54
|
+
groupRef: RefObject<HTMLDivElement>;
|
|
55
|
+
available: number | null;
|
|
56
|
+
/** The area is moving, so a panel follows instantly instead of animating. */
|
|
57
|
+
snapResize: boolean;
|
|
58
|
+
catalog: ResolvedPanel[];
|
|
59
|
+
editorPlugins: ResolvedPluginPanel[];
|
|
60
|
+
activePanel: ResolvedPanel | undefined;
|
|
61
|
+
shownRightPanel: string;
|
|
62
|
+
/** The catalog entry the preview draws, when the pointer names one. */
|
|
63
|
+
previewPanel: ResolvedPanel | undefined;
|
|
64
|
+
/** The preview fits and must be drawn; false collapses it back to the rail. */
|
|
65
|
+
previewShown: boolean;
|
|
66
|
+
editorWidth: number;
|
|
67
|
+
rightWidth: number;
|
|
68
|
+
rightPanelShown: boolean;
|
|
69
|
+
rightPanelMin: number;
|
|
70
|
+
editorMaxSize: number | undefined;
|
|
71
|
+
rightMaxSize: number | undefined;
|
|
72
|
+
handleCount: number;
|
|
73
|
+
rightCard: RightPanelCard;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function useRightPanelGeometry({
|
|
77
|
+
panelWidths,
|
|
78
|
+
editorWidthMode,
|
|
79
|
+
showEditor,
|
|
80
|
+
showRightPanel,
|
|
81
|
+
showRightSide,
|
|
82
|
+
chatHidden,
|
|
83
|
+
activeRightPanel,
|
|
84
|
+
rightNav,
|
|
85
|
+
preview,
|
|
86
|
+
onSuppressed,
|
|
87
|
+
}: RightPanelGeometryArgs): RightPanelGeometry {
|
|
88
|
+
// The group's own area: the base every stored fraction is a share of, and the
|
|
89
|
+
// budget the chat floor is subtracted from.
|
|
90
|
+
const groupRef = useRef<HTMLDivElement>(null);
|
|
91
|
+
const available = useAvailableWidth(groupRef);
|
|
92
|
+
// A panel follows the group instantly while the area or the width mode is
|
|
93
|
+
// moving, instead of re-targeting the 200ms transition on every tick.
|
|
94
|
+
const snapResize = useSnapResize(available, chatHidden);
|
|
95
|
+
|
|
96
|
+
const catalog = usePanelCatalog();
|
|
97
|
+
// A view moved to the LEFT falls back to the first view this column holds.
|
|
98
|
+
const allPanels = usePanelCatalog('all');
|
|
99
|
+
const movedToLeft = allPanels.some((panel) => panel.id === activeRightPanel && panel.side === 'left');
|
|
100
|
+
const activePanel = catalog.find((panel) => panel.id === activeRightPanel) ?? (movedToLeft ? catalog[0] : undefined);
|
|
101
|
+
const shownRightPanel = activePanel?.id ?? activeRightPanel;
|
|
102
|
+
const previewPanel = preview === null ? undefined : catalog.find((panel) => panel.id === preview);
|
|
103
|
+
|
|
104
|
+
// The EDITOR column's plugin slot: a takeover, so this rail is its only switch.
|
|
105
|
+
const editorPlugins = usePanelSlotPlugins();
|
|
106
|
+
|
|
107
|
+
// The rail lives INSIDE the right card, so its width is chrome the body does
|
|
108
|
+
// not get.
|
|
109
|
+
const rightChromeWidth = rightPanelChromeWidth(rightNav);
|
|
110
|
+
|
|
111
|
+
const {
|
|
112
|
+
editor: editorWidth,
|
|
113
|
+
right: rightWidth,
|
|
114
|
+
rightShown: rightPanelShown,
|
|
115
|
+
previewShown,
|
|
116
|
+
rightSuppressed,
|
|
117
|
+
editorMax: editorMaxSize,
|
|
118
|
+
rightMax: rightMaxSize,
|
|
119
|
+
rightMin: rightPanelMin,
|
|
120
|
+
handleCount,
|
|
121
|
+
} = resolveWorkspacePanelWidths({
|
|
122
|
+
available,
|
|
123
|
+
panelWidths,
|
|
124
|
+
editorWidthMode,
|
|
125
|
+
activeRightPanel: shownRightPanel,
|
|
126
|
+
activePanel,
|
|
127
|
+
previewPanel: previewPanel ?? null,
|
|
128
|
+
showEditor,
|
|
129
|
+
showRightPanel,
|
|
130
|
+
chatHidden,
|
|
131
|
+
rightChromeWidth,
|
|
132
|
+
editorChromeWidth: FLOATING_CARD_INSET_PX,
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
const rightCard = resolveRightPanelCard({
|
|
136
|
+
nav: rightNav,
|
|
137
|
+
sideShown: showRightSide,
|
|
138
|
+
suppressed: rightSuppressed,
|
|
139
|
+
shown: rightPanelShown,
|
|
140
|
+
width: rightWidth,
|
|
141
|
+
minWidth: rightPanelMin,
|
|
142
|
+
maxWidth: rightMaxSize,
|
|
143
|
+
previewWidth: previewShown ? rightWidth : null,
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
// The refusal travels up to the toggle's owner; `null` before measurement.
|
|
147
|
+
useEffect(() => {
|
|
148
|
+
// `0` is the pre-measurement area as much as `null` is: the observer reports
|
|
149
|
+
// it on the first frame, and the resolver answers "fits" for both.
|
|
150
|
+
onSuppressed?.(available == null || available <= 0 ? null : rightSuppressed);
|
|
151
|
+
}, [available, rightSuppressed, onSuppressed]);
|
|
152
|
+
|
|
153
|
+
return {
|
|
154
|
+
groupRef,
|
|
155
|
+
available,
|
|
156
|
+
snapResize,
|
|
157
|
+
catalog,
|
|
158
|
+
editorPlugins,
|
|
159
|
+
activePanel,
|
|
160
|
+
shownRightPanel,
|
|
161
|
+
previewPanel,
|
|
162
|
+
previewShown,
|
|
163
|
+
editorWidth,
|
|
164
|
+
rightWidth,
|
|
165
|
+
rightPanelShown,
|
|
166
|
+
rightPanelMin,
|
|
167
|
+
editorMaxSize,
|
|
168
|
+
rightMaxSize,
|
|
169
|
+
handleCount,
|
|
170
|
+
rightCard,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
|
|
33
33
|
import { useCallback, useState } from 'preact/hooks';
|
|
34
34
|
import { useSessionState } from '@/client/hooks/workspace/session-state';
|
|
35
|
+
import { usePresence } from '@/client/hooks/ui/presence';
|
|
36
|
+
import { PANEL_TRANSITION_MS } from '@/shared/lib/ui/motion';
|
|
35
37
|
import { useKabmoEvent } from '@/client/hooks/ui/window-event';
|
|
36
38
|
import type { SettingsState } from '@/shared/types';
|
|
37
39
|
import {
|
|
@@ -98,6 +100,8 @@ export interface RightSideLayout {
|
|
|
98
100
|
* the rest.
|
|
99
101
|
*/
|
|
100
102
|
hidden: boolean;
|
|
103
|
+
/** The side is running its close motion (the bar/rail stay until it lands). */
|
|
104
|
+
leaving: boolean;
|
|
101
105
|
/** The navbar's toggle: hide everything, or show everything back. */
|
|
102
106
|
toggleRightSide: () => void;
|
|
103
107
|
/** The panel's own close control: that column only. */
|
|
@@ -189,10 +193,13 @@ export function useRightSideLayout({
|
|
|
189
193
|
setHidden(false);
|
|
190
194
|
}, [hidden, editorWanted, rightPanelOpen, setHidden, setRightPanelOpen, setUserToggledEditor, editorHasContent]);
|
|
191
195
|
|
|
196
|
+
const leaving = usePresence(!hidden, PANEL_TRANSITION_MS).leaving;
|
|
197
|
+
|
|
192
198
|
return {
|
|
193
199
|
showRightPanel: rightPanelOpen && !hidden,
|
|
194
200
|
showEditor,
|
|
195
201
|
hidden,
|
|
202
|
+
leaving,
|
|
196
203
|
toggleRightSide,
|
|
197
204
|
closeRightPanel,
|
|
198
205
|
revealRightPanel,
|
|
@@ -66,6 +66,9 @@ describe('shell title-bar contract', () => {
|
|
|
66
66
|
expect(bar.overlayTitlebar()).toBe(false);
|
|
67
67
|
expect(bar.dragRegionProps()).toEqual({});
|
|
68
68
|
expect(bar.titlebarInsetLeft('1rem')).toBe('1rem');
|
|
69
|
+
// The floating card asks for the width itself; a browser's answer is the
|
|
70
|
+
// PWA's own overlay arithmetic, which reads `0px` where WCO is inactive.
|
|
71
|
+
expect(bar.shellTrafficInsetLeft()).toBe('env(titlebar-area-x, 0px)');
|
|
69
72
|
expect(bar.drawsWindowControls()).toBe(false);
|
|
70
73
|
});
|
|
71
74
|
|
|
@@ -74,6 +77,7 @@ describe('shell title-bar contract', () => {
|
|
|
74
77
|
const bar = await titlebar();
|
|
75
78
|
expect(bar.dragRegionProps()).toEqual({ 'data-drag-region': '' });
|
|
76
79
|
expect(bar.titlebarInsetLeft('1rem')).toBe('5rem');
|
|
80
|
+
expect(bar.shellTrafficInsetLeft()).toBe('5rem');
|
|
77
81
|
// The system owns the traffic lights: a page-drawn set would be a second one.
|
|
78
82
|
expect(bar.drawsWindowControls()).toBe(false);
|
|
79
83
|
});
|
|
@@ -84,6 +88,7 @@ describe('shell title-bar contract', () => {
|
|
|
84
88
|
expect(bar.dragRegionProps()).toEqual({ 'data-drag-region': '' });
|
|
85
89
|
// Nothing floats over the page on a borderless Windows window.
|
|
86
90
|
expect(bar.titlebarInsetLeft('1rem')).toBe('1rem');
|
|
91
|
+
expect(bar.shellTrafficInsetLeft()).toBe('env(titlebar-area-x, 0px)');
|
|
87
92
|
expect(bar.drawsWindowControls()).toBe(true);
|
|
88
93
|
});
|
|
89
94
|
|
|
@@ -93,6 +98,7 @@ describe('shell title-bar contract', () => {
|
|
|
93
98
|
const bar = await titlebar();
|
|
94
99
|
expect(bar.overlayTitlebar()).toBe(true);
|
|
95
100
|
expect(bar.titlebarInsetLeft('1rem')).toBe('1rem');
|
|
101
|
+
expect(bar.shellTrafficInsetLeft()).toBe('env(titlebar-area-x, 0px)');
|
|
96
102
|
expect(bar.drawsWindowControls()).toBe(false);
|
|
97
103
|
});
|
|
98
104
|
|
|
@@ -83,6 +83,22 @@ export function titlebarInsetLeft(resolved: string): string {
|
|
|
83
83
|
return shellInfo()?.trafficLightInset ?? resolved;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
/**
|
|
87
|
+
* The width the shell's controls occupy over the page's LEFT edge, as a CSS
|
|
88
|
+
* length.
|
|
89
|
+
*
|
|
90
|
+
* Different question from `titlebarInsetLeft`, which answers "how far in does
|
|
91
|
+
* this content start": a FLOATING CARD cannot hide its paper and border under
|
|
92
|
+
* the native buttons the way a flat bar's content does, so the stylesheet needs
|
|
93
|
+
* the width itself to move the card. A shell that reports nothing (Windows,
|
|
94
|
+
* Linux, an older macOS build) and a plain browser both fall back to the PWA's
|
|
95
|
+
* own Window Controls Overlay arithmetic, which is `0px` where WCO is inactive.
|
|
96
|
+
*/
|
|
97
|
+
export function shellTrafficInsetLeft(): string {
|
|
98
|
+
if (!overlayTitlebar()) return 'env(titlebar-area-x, 0px)';
|
|
99
|
+
return shellInfo()?.trafficLightInset ?? 'env(titlebar-area-x, 0px)';
|
|
100
|
+
}
|
|
101
|
+
|
|
86
102
|
/**
|
|
87
103
|
* True when the page must draw the window's own controls.
|
|
88
104
|
*
|
package/src/client/main.tsx
CHANGED
|
@@ -9,6 +9,7 @@ import { sanitizeCustomThemes } from '@/shared/lib/theme/custom';
|
|
|
9
9
|
import { initChatWidthMode } from '@/client/hooks/chat/timeline/width-mode';
|
|
10
10
|
import { initSurfaceStyle } from '@/client/hooks/ui/surface-style';
|
|
11
11
|
import { initBorderStyle } from '@/client/hooks/ui/border-style';
|
|
12
|
+
import { initChromeStyle } from '@/client/hooks/ui/chrome-style';
|
|
12
13
|
import { initIconStyle } from '@/client/hooks/ui/icon-style';
|
|
13
14
|
import { primeWindowChrome } from '@/client/hooks/ui/window-chrome';
|
|
14
15
|
import { installAuthFetchBridge, primeAuthState } from '@/client/hooks/ui/auth';
|
|
@@ -18,6 +19,7 @@ import { installScrollbarActivity } from '@/client/lib/scrollbar-activity';
|
|
|
18
19
|
import { installBackDispatcher } from '@/client/lib/native/back';
|
|
19
20
|
import { installPalettePublisher } from '@/client/lib/native/palette';
|
|
20
21
|
import { installShellTransport } from '@/client/lib/shell/transport';
|
|
22
|
+
import { applyTitlebarInset } from '@/client/hooks/ui/titlebar-inset';
|
|
21
23
|
import { installResumeDispatcher } from '@/client/lib/native/resume';
|
|
22
24
|
import { syncNativeNotificationWatch } from '@/client/lib/notifications/watch';
|
|
23
25
|
import { readNotificationGrant } from '@/client/lib/notifications/os';
|
|
@@ -31,6 +33,7 @@ import { restoreLastOpenedSession } from '@/client/hooks/shell/last-opened-sessi
|
|
|
31
33
|
import '@/client/tailwind.css';
|
|
32
34
|
import '@/client/glass.css';
|
|
33
35
|
import '@/client/borders.css';
|
|
36
|
+
import '@/client/floating.css';
|
|
34
37
|
import '@/shared/lib/markdown/katex-fonts.css';
|
|
35
38
|
import '@/shared/lib/markdown/fira-code-fonts.css';
|
|
36
39
|
import '@/shared/lib/fonts/nerd-symbols.css';
|
|
@@ -65,6 +68,7 @@ initChatWidthMode();
|
|
|
65
68
|
// re-render.
|
|
66
69
|
initSurfaceStyle();
|
|
67
70
|
initBorderStyle();
|
|
71
|
+
initChromeStyle();
|
|
68
72
|
initIconStyle();
|
|
69
73
|
|
|
70
74
|
// BEFORE the theme init, which writes the chrome meta: a phone that repainted
|
|
@@ -114,6 +118,13 @@ installPalettePublisher();
|
|
|
114
118
|
// desktop shells, which install `__kabmoCall` themselves.
|
|
115
119
|
installShellTransport();
|
|
116
120
|
|
|
121
|
+
// The native shell floats its own window controls over the page's left edge.
|
|
122
|
+
// A flat header only has to pad its content past them; a floating chrome card
|
|
123
|
+
// has to START there, or its paper and border are painted under the buttons.
|
|
124
|
+
// The width is published as a document property for `floating.css`, before the
|
|
125
|
+
// first render so a floating install never draws the card under the lights.
|
|
126
|
+
applyTitlebarInset();
|
|
127
|
+
|
|
117
128
|
// The native shell calls `window.__kabmoResume()` when its app returns to the
|
|
118
129
|
// foreground. A backgrounded Android WebView fires no `visibilitychange` and
|
|
119
130
|
// gets no `close` for a socket the server reaped, so the shell's own lifecycle
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { describe, expect, test } from 'bun:test';
|
|
7
|
+
import { readClientCss } from '@/test-support/glass-css';
|
|
8
|
+
import { OVERLAY_ENTER_MS, OVERLAY_EXIT_MS, PANEL_EASING, PANEL_TRANSITION_MS } from '@/shared/lib/ui/motion';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The CSS half of the motion table.
|
|
12
|
+
*
|
|
13
|
+
* The durations exist in two places by necessity — a TS timer and a stylesheet
|
|
14
|
+
* the browser reads before any JS runs — so this case is the seam that keeps
|
|
15
|
+
* them from drifting. It also holds the reduced-motion contract: a reader who
|
|
16
|
+
* asked for less motion must not get a 160ms fade from the classes that the
|
|
17
|
+
* components apply unconditionally.
|
|
18
|
+
*/
|
|
19
|
+
describe('motion contract', () => {
|
|
20
|
+
test('the overlay and panel durations are the ones the stylesheet states', async () => {
|
|
21
|
+
const css = await readClientCss('tailwind.css');
|
|
22
|
+
expect(css).toContain(`--presence-enter: ${OVERLAY_ENTER_MS}ms`);
|
|
23
|
+
expect(css).toContain(`--presence-exit: ${OVERLAY_EXIT_MS}ms`);
|
|
24
|
+
expect(css).toContain(`--panel-motion: ${PANEL_TRANSITION_MS}ms`);
|
|
25
|
+
// The panel easing is a literal in both the TS constant and the keyframe.
|
|
26
|
+
expect(css).toContain(PANEL_EASING);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
test('every presence class drops its motion under prefers-reduced-motion', async () => {
|
|
30
|
+
const css = await readClientCss('tailwind.css');
|
|
31
|
+
const reduced = css.slice(css.indexOf('@media (prefers-reduced-motion: reduce)'));
|
|
32
|
+
expect(reduced).toContain('.presence-enter');
|
|
33
|
+
expect(reduced).toContain('.presence-fade');
|
|
34
|
+
expect(reduced).toContain('.presence-leaving');
|
|
35
|
+
});
|
|
36
|
+
});
|
package/src/client/tailwind.css
CHANGED
|
@@ -1330,6 +1330,73 @@ html[data-theme-variant='dark'] .brand-wordmark-glow {
|
|
|
1330
1330
|
}
|
|
1331
1331
|
}
|
|
1332
1332
|
|
|
1333
|
+
/* ---------------------------------------------------------------------------
|
|
1334
|
+
* Presence: one open/close vocabulary for overlays.
|
|
1335
|
+
*
|
|
1336
|
+
* Enter is a keyframe ANIMATION because a node that was just inserted has no
|
|
1337
|
+
* previous value to transition from. Exit is a class the owner keeps for
|
|
1338
|
+
* `OVERLAY_EXIT_MS` through `usePresence`; the enter class must be REMOVED
|
|
1339
|
+
* while leaving, or the animation's `both` fill would outrank the fade.
|
|
1340
|
+
*
|
|
1341
|
+
* The numbers are the TS table in `shared/lib/ui/motion.ts`; `motion.test.ts`
|
|
1342
|
+
* keeps the two equal.
|
|
1343
|
+
* ------------------------------------------------------------------------- */
|
|
1344
|
+
:root {
|
|
1345
|
+
--presence-enter: 160ms;
|
|
1346
|
+
--presence-exit: 160ms;
|
|
1347
|
+
--panel-motion: 200ms;
|
|
1348
|
+
--panel-easing: cubic-bezier(0.22, 1, 0.36, 1);
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
@keyframes presence-enter {
|
|
1352
|
+
from {
|
|
1353
|
+
opacity: 0;
|
|
1354
|
+
transform: translateY(4px) scale(0.99);
|
|
1355
|
+
}
|
|
1356
|
+
to {
|
|
1357
|
+
opacity: 1;
|
|
1358
|
+
transform: none;
|
|
1359
|
+
}
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
@keyframes presence-fade {
|
|
1363
|
+
from {
|
|
1364
|
+
opacity: 0;
|
|
1365
|
+
}
|
|
1366
|
+
to {
|
|
1367
|
+
opacity: 1;
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
.presence-enter {
|
|
1372
|
+
animation: presence-enter var(--presence-enter) var(--panel-easing) both;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
/* A full-viewport root must fade, not scale: a transform on `inset-0` shrinks
|
|
1376
|
+
* the backdrop and exposes a strip of the app behind it. */
|
|
1377
|
+
.presence-fade {
|
|
1378
|
+
animation: presence-fade var(--presence-enter) ease-out both;
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
.presence-leaving {
|
|
1382
|
+
opacity: 0;
|
|
1383
|
+
transform: translateY(4px) scale(0.99);
|
|
1384
|
+
transition:
|
|
1385
|
+
opacity var(--presence-exit) ease-in,
|
|
1386
|
+
transform var(--presence-exit) ease-in;
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1390
|
+
.presence-enter,
|
|
1391
|
+
.presence-fade {
|
|
1392
|
+
animation: none;
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
.presence-leaving {
|
|
1396
|
+
transition: none;
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1333
1400
|
/* Indeterminate progress for a blocking tool call (`wait`).
|
|
1334
1401
|
*
|
|
1335
1402
|
* A `wait` reports a duration but often no completion percentage — a `bash`
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
* emitting `data-surface="classic"` here would make the server and the client
|
|
26
26
|
* disagree about the document's own state — and every CSS rule keys on the
|
|
27
27
|
* value, not on its absence. This is NOT the same test as `DEFAULT_*`: the
|
|
28
|
-
* defaults are `
|
|
29
|
-
*
|
|
30
|
-
*
|
|
28
|
+
* defaults are `classic` / `color` / `borderless`, so the first must be
|
|
29
|
+
* omitted while the other two are emitted and the first frame already has its
|
|
30
|
+
* colour and its detached chrome.
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
33
|
import type { ThemePalette } from '@kabmo-labs/kabmo-app-contracts/theme';
|
|
@@ -48,6 +48,11 @@ import {
|
|
|
48
48
|
BORDER_STYLE_WITHOUT_ATTRIBUTE,
|
|
49
49
|
resolveBorderStyle,
|
|
50
50
|
} from '@/shared/lib/theme/border-style';
|
|
51
|
+
import {
|
|
52
|
+
CHROME_ATTRIBUTE,
|
|
53
|
+
CHROME_STYLE_WITHOUT_ATTRIBUTE,
|
|
54
|
+
resolveChromeStyle,
|
|
55
|
+
} from '@/shared/lib/theme/chrome-style';
|
|
51
56
|
|
|
52
57
|
export interface ShellDocumentFacts {
|
|
53
58
|
palette: ThemePalette;
|
|
@@ -56,6 +61,8 @@ export interface ShellDocumentFacts {
|
|
|
56
61
|
surfaceStyle: unknown;
|
|
57
62
|
/** The stored hairline set, same rule. */
|
|
58
63
|
borderStyle: unknown;
|
|
64
|
+
/** The stored desktop chrome arrangement, same rule. */
|
|
65
|
+
chromeStyle?: unknown;
|
|
59
66
|
iconStyle: unknown;
|
|
60
67
|
/** The `<meta name="theme-color">` value for this request. */
|
|
61
68
|
chromeColor: string;
|
|
@@ -72,13 +79,16 @@ export function styleAttributes(
|
|
|
72
79
|
iconStyle: unknown,
|
|
73
80
|
palette?: ThemePalette,
|
|
74
81
|
borderStyle?: unknown,
|
|
82
|
+
chromeStyle?: unknown,
|
|
75
83
|
): string {
|
|
76
84
|
const surface = resolveSurfaceStyle(surfaceStyle);
|
|
77
85
|
const icon = resolveIconStyle(iconStyle);
|
|
78
86
|
const border = resolveBorderStyle(borderStyle);
|
|
87
|
+
const chrome = resolveChromeStyle(chromeStyle);
|
|
79
88
|
const parts: string[] = [];
|
|
80
89
|
if (surface !== SURFACE_STYLE_WITHOUT_ATTRIBUTE) parts.push(`${SURFACE_ATTRIBUTE}="${surface}"`);
|
|
81
90
|
if (border !== BORDER_STYLE_WITHOUT_ATTRIBUTE) parts.push(`${BORDER_ATTRIBUTE}="${border}"`);
|
|
91
|
+
if (chrome !== CHROME_STYLE_WITHOUT_ATTRIBUTE) parts.push(`${CHROME_ATTRIBUTE}="${chrome}"`);
|
|
82
92
|
if (icon !== ICON_STYLE_WITHOUT_ATTRIBUTE) parts.push(`${ICON_STYLE_ATTRIBUTE}="${icon}"`);
|
|
83
93
|
// The paper bucket is written for EVERY light palette, including the default
|
|
84
94
|
// one, because it is not a preference: without it the first frame paints the
|
|
@@ -99,7 +109,7 @@ export function applyShellDocumentFacts(html: string, facts: ShellDocumentFacts)
|
|
|
99
109
|
return html
|
|
100
110
|
.replace(
|
|
101
111
|
TEMPLATE_THEME,
|
|
102
|
-
`data-theme="${facts.palette.id}"${styleAttributes(facts.surfaceStyle, facts.iconStyle, facts.palette, facts.borderStyle)}`,
|
|
112
|
+
`data-theme="${facts.palette.id}"${styleAttributes(facts.surfaceStyle, facts.iconStyle, facts.palette, facts.borderStyle, facts.chromeStyle)}`,
|
|
103
113
|
)
|
|
104
114
|
.replace(TEMPLATE_VARIANT, `data-theme-variant="${facts.palette.variant}"`)
|
|
105
115
|
.replace(TEMPLATE_META, `<meta name="theme-color" content="${facts.chromeColor}" />`);
|
|
@@ -7,13 +7,14 @@
|
|
|
7
7
|
* The first frame's `<html>` attributes.
|
|
8
8
|
*
|
|
9
9
|
* The rule worth pinning is the ASYMMETRY: the palette is always written, and
|
|
10
|
-
* the
|
|
11
|
-
* paints with no attribute (`classic` / `monochrome`) — because the
|
|
12
|
-
* writers REMOVE the attribute for exactly those values, and a server
|
|
13
|
-
* emitted `data-surface="classic"` would leave a document the client thinks
|
|
14
|
-
* "explicitly classic" and a reload flipping between two spellings of the
|
|
15
|
-
* state. The shipped DEFAULTS (`
|
|
16
|
-
*
|
|
10
|
+
* the presentation styles are written only when they are not the style CSS
|
|
11
|
+
* paints with no attribute (`classic` / `monochrome` / `hairline`) — because the
|
|
12
|
+
* client's writers REMOVE the attribute for exactly those values, and a server
|
|
13
|
+
* that emitted `data-surface="classic"` would leave a document the client thinks
|
|
14
|
+
* is "explicitly classic" and a reload flipping between two spellings of the
|
|
15
|
+
* same state. The shipped DEFAULTS (`classic` / `color` / `borderless` /
|
|
16
|
+
* `floating`) therefore emit everything except the surface, so the first frame
|
|
17
|
+
* already has its colour, its detached chrome and its rules off.
|
|
17
18
|
*/
|
|
18
19
|
|
|
19
20
|
import { describe, expect, test } from 'bun:test';
|
|
@@ -38,29 +39,40 @@ const dark = THEMES.find((theme) => theme.variant === 'dark')!;
|
|
|
38
39
|
|
|
39
40
|
describe('styleAttributes', () => {
|
|
40
41
|
test('the styles CSS paints with no attribute add nothing', () => {
|
|
41
|
-
expect(styleAttributes('classic', 'monochrome')).toBe('');
|
|
42
|
+
expect(styleAttributes('classic', 'monochrome', undefined, 'hairline', 'classic')).toBe('');
|
|
42
43
|
});
|
|
43
44
|
|
|
44
|
-
test('the shipped defaults are emitted so the first frame is
|
|
45
|
-
const defaults = ' data-
|
|
45
|
+
test('the shipped defaults are emitted so the first frame is borderless and floating', () => {
|
|
46
|
+
const defaults = ' data-borders="borderless" data-chrome="floating" data-icon-style="color"';
|
|
46
47
|
expect(styleAttributes(undefined, undefined)).toBe(defaults);
|
|
47
48
|
expect(styleAttributes('nonsense', 'nonsense')).toBe(defaults);
|
|
48
|
-
expect(styleAttributes('
|
|
49
|
+
expect(styleAttributes('classic', 'color')).toBe(defaults);
|
|
49
50
|
});
|
|
50
51
|
|
|
51
52
|
test('each style contributes its own attribute independently', () => {
|
|
52
|
-
expect(styleAttributes('glass', 'monochrome')).toBe(
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
expect(styleAttributes('glass', 'monochrome', undefined, 'hairline', 'classic')).toBe(
|
|
54
|
+
' data-surface="glass"',
|
|
55
|
+
);
|
|
56
|
+
expect(styleAttributes('classic', 'color', undefined, 'hairline', 'classic')).toBe(
|
|
57
|
+
' data-icon-style="color"',
|
|
58
|
+
);
|
|
59
|
+
expect(styleAttributes('glass', 'color', undefined, 'hairline', 'classic')).toBe(
|
|
60
|
+
' data-surface="glass" data-icon-style="color"',
|
|
61
|
+
);
|
|
62
|
+
expect(styleAttributes('classic', 'color', undefined, 'borderless', 'floating')).toBe(
|
|
63
|
+
' data-borders="borderless" data-chrome="floating" data-icon-style="color"',
|
|
64
|
+
);
|
|
55
65
|
});
|
|
56
66
|
|
|
57
67
|
test('borderless is written, hairline is the absence of the attribute', () => {
|
|
58
68
|
// `hairline` IS what CSS paints with no attribute, so emitting
|
|
59
69
|
// `data-borders="hairline"` would make the served document disagree with
|
|
60
70
|
// the one the client's own writer produces.
|
|
61
|
-
expect(styleAttributes('classic', 'monochrome', undefined, 'hairline')).toBe('');
|
|
62
|
-
expect(styleAttributes('classic', 'monochrome', undefined, 'borderless')).toBe(
|
|
63
|
-
|
|
71
|
+
expect(styleAttributes('classic', 'monochrome', undefined, 'hairline', 'classic')).toBe('');
|
|
72
|
+
expect(styleAttributes('classic', 'monochrome', undefined, 'borderless', 'classic')).toBe(
|
|
73
|
+
' data-borders="borderless"',
|
|
74
|
+
);
|
|
75
|
+
expect(styleAttributes('glass', 'color', undefined, 'borderless', 'classic')).toBe(
|
|
64
76
|
' data-surface="glass" data-borders="borderless" data-icon-style="color"',
|
|
65
77
|
);
|
|
66
78
|
});
|
|
@@ -69,9 +81,11 @@ describe('styleAttributes', () => {
|
|
|
69
81
|
// Not a preference: without it the first frame paints the `deep` tone table
|
|
70
82
|
// on a `mid` paper, one step darker than the palette allows, and the client's
|
|
71
83
|
// `applyIconPaper` then visibly corrects it.
|
|
72
|
-
expect(styleAttributes('classic', 'monochrome', light)).toBe(
|
|
84
|
+
expect(styleAttributes('classic', 'monochrome', light, 'hairline', 'classic')).toBe(
|
|
85
|
+
' data-icon-paper="mid"',
|
|
86
|
+
);
|
|
73
87
|
// A dark palette has one band, so it states nothing.
|
|
74
|
-
expect(styleAttributes('classic', 'monochrome', dark)).toBe('');
|
|
88
|
+
expect(styleAttributes('classic', 'monochrome', dark, 'hairline', 'classic')).toBe('');
|
|
75
89
|
});
|
|
76
90
|
});
|
|
77
91
|
|
|
@@ -86,7 +100,7 @@ describe('applyShellDocumentFacts', () => {
|
|
|
86
100
|
});
|
|
87
101
|
|
|
88
102
|
expect(html).toContain(
|
|
89
|
-
`<html lang="en" data-theme="${light.id}" data-
|
|
103
|
+
`<html lang="en" data-theme="${light.id}" data-borders="borderless" data-chrome="floating" data-icon-style="color" data-icon-paper="mid" data-theme-variant="${light.variant}">`,
|
|
90
104
|
);
|
|
91
105
|
expect(html).toContain('<meta name="theme-color" content="#123456" />');
|
|
92
106
|
});
|
|
@@ -101,7 +115,7 @@ describe('applyShellDocumentFacts', () => {
|
|
|
101
115
|
});
|
|
102
116
|
|
|
103
117
|
expect(html).toContain(
|
|
104
|
-
`<html lang="en" data-theme="${light.id}" data-surface="glass" data-icon-style="color" data-icon-paper="mid" data-theme-variant="${light.variant}">`,
|
|
118
|
+
`<html lang="en" data-theme="${light.id}" data-surface="glass" data-borders="borderless" data-chrome="floating" data-icon-style="color" data-icon-paper="mid" data-theme-variant="${light.variant}">`,
|
|
105
119
|
);
|
|
106
120
|
});
|
|
107
121
|
|
|
@@ -60,8 +60,9 @@ describe('window-drag contract', () => {
|
|
|
60
60
|
*/
|
|
61
61
|
test('every title-bar header carries data-drag-region', () => {
|
|
62
62
|
for (const path of [
|
|
63
|
-
'src/client/components/layout/
|
|
64
|
-
'src/client/components/layout/session-
|
|
63
|
+
'src/client/components/layout/left-bar/index.tsx',
|
|
64
|
+
'src/client/components/layout/session-title-bar/index.tsx',
|
|
65
|
+
'src/client/components/layout/controls-bar/index.tsx',
|
|
65
66
|
'src/client/components/mobile/mobile-main-view/Header.tsx',
|
|
66
67
|
'src/client/components/mobile/mobile-session-sidebar/Header.tsx',
|
|
67
68
|
// The right drawer's chrome moved out of `RightSidebar` when that file
|
|
@@ -33,6 +33,10 @@ import {
|
|
|
33
33
|
} from '@/server/lib/realtime/hub.server';
|
|
34
34
|
import { attachPeerSession } from '@/server/lib/realtime/topics/peer-relay.server';
|
|
35
35
|
import { sessionDescriptor } from '@/server/lib/realtime/topics/session.server';
|
|
36
|
+
import { listInstanceRecords } from '@/server/lib/lifecycle/instance';
|
|
37
|
+
import { sessionLeasePath } from '@/server/lib/omp/session/ownership.server';
|
|
38
|
+
import { fileHolderPid } from '@kabmo-labs/kabmo-omp/session-runtime/lease-holder.server';
|
|
39
|
+
import { isProcessAlive, processParentPid } from '@kabmo-labs/kabmo-process/probe/identity';
|
|
36
40
|
import { sessionTopic } from '@/shared/lib/realtime/protocol';
|
|
37
41
|
import {
|
|
38
42
|
holdLeaseInForeignProcess,
|
|
@@ -197,7 +201,7 @@ describe('peer session relay', () => {
|
|
|
197
201
|
// matches the lease holder's PARENT against that record's pid — so the
|
|
198
202
|
// record names the pid the harness reports, not a guessed `1`.
|
|
199
203
|
const holder = await holdLeaseInForeignProcess(sessionId);
|
|
200
|
-
foreignChildren.push(holder.pid);
|
|
204
|
+
foreignChildren.push(holder.pid, holder.parentPid);
|
|
201
205
|
mkdirSync(join(roots.dataRoot, 'run'), { recursive: true });
|
|
202
206
|
writeFileSync(
|
|
203
207
|
join(roots.dataRoot, 'run', `${ownerServer.port}.json`),
|
|
@@ -206,7 +210,19 @@ describe('peer session relay', () => {
|
|
|
206
210
|
|
|
207
211
|
try {
|
|
208
212
|
const value = (await sessionDescriptor(sessionId).resolve(topic)) as { running?: boolean };
|
|
209
|
-
|
|
213
|
+
// The failure message carries every step the guard took: a passing
|
|
214
|
+
// resolve with an empty `ownerCalls` means the fetch, not the lookup.
|
|
215
|
+
const lease = sessionLeasePath(sessionId);
|
|
216
|
+
const holderPid = fileHolderPid(lease);
|
|
217
|
+
const parentPid = holderPid === null ? null : processParentPid(holderPid);
|
|
218
|
+
expect(ownerCalls, JSON.stringify({
|
|
219
|
+
holder,
|
|
220
|
+
self: process.pid,
|
|
221
|
+
holderPid,
|
|
222
|
+
parentPid,
|
|
223
|
+
parentAlive: parentPid === null ? null : isProcessAlive(parentPid),
|
|
224
|
+
records: listInstanceRecords().map((record) => ({ pid: record.pid, port: record.port })),
|
|
225
|
+
})).toEqual([`/api/agent/${sessionId}`]);
|
|
210
226
|
expect(value.running).toBe(true);
|
|
211
227
|
} finally {
|
|
212
228
|
ownerServer.stop(true);
|
|
@@ -229,7 +245,7 @@ describe('peer session relay', () => {
|
|
|
229
245
|
await waitUntil(() => peer !== null && peer.subscriptions.length === 0);
|
|
230
246
|
// Only NOW does the owner appear — after the first lookup found nothing.
|
|
231
247
|
const holder = await holdLeaseInForeignProcess(sessionId);
|
|
232
|
-
foreignChildren.push(holder.pid);
|
|
248
|
+
foreignChildren.push(holder.pid, holder.parentPid);
|
|
233
249
|
// The owner must be placeable once it claims the session: the guard
|
|
234
250
|
// matches the holder's PARENT against an instance record, so the record
|
|
235
251
|
// names the pid the harness reported rather than a guessed `1`.
|