@kabmo-labs/kabmo 0.59.1 → 0.61.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-5yedtmnk.js → Body-ab8wswhm.js} +3 -3
- package/dist/client/static/js/{CsvGrid-39m8pp1c.js → CsvGrid-czssywvz.js} +2 -2
- package/dist/client/static/js/{DocxView-vd99cv12.js → DocxView-ke0dwdmt.js} +3 -3
- package/dist/client/static/js/{DrawioView-6nq4412n.js → DrawioView-a1whhy84.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-cs51gszy.js → HtmlPreview-dr32dwjy.js} +1 -1
- package/dist/client/static/js/ImageView-zf4kh5wp.js +1 -0
- package/dist/client/static/js/LayoutWrapper-dncbzcea.js +2 -0
- package/dist/client/static/js/MergeDiffView-btdx9yb9.js +1 -0
- package/dist/client/static/js/Modal-5cxfw2rv.js +60 -0
- package/dist/client/static/js/{PdfView-0zab721q.js → PdfView-2kdn91f9.js} +1 -1
- package/dist/client/static/js/SessionsView-vbn0nvx4.js +1 -0
- package/dist/client/static/js/{SheetView-2wdn5hkd.js → SheetView-ettr9pdw.js} +9 -9
- package/dist/client/static/js/{SvgPreview-fmrfxd7z.js → SvgPreview-hzcejjry.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-41scfh9v.js → abnfDiagram-O67JEVCF-kdmv4y72.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-sxrkxwbq.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-fp6etjvt.js → architectureDiagram-NJMV4G6O-qyrwaq0x.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-pespk9mt.js → blockDiagram-BEXU5L5S-tszxy2g7.js} +8 -8
- package/dist/client/static/js/c-fn9jz26e.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-rt4z91dx.js → c4Diagram-YGBWAQC7-0ye36hhv.js} +5 -5
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-6bzaq8sd.js → classDiagram-v2-NBCMYWYE-szgk1shv.js} +6 -6
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-z3fhgcba.js → cose-bilkent-JH36ORCC-0s9s4mmv.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-8endeh4p.js → cynefinDiagram-VND7K2PF-664g28ze.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-2a2f32dv.js → dagre-6A5THRUB-ga4rp1jx.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-wgbyr6b7.js → diagram-22UHCM2B-aagj46ty.js} +15 -15
- package/dist/client/static/js/{diagram-3UASUU5V-5122b41x.js → diagram-3UASUU5V-20qk6whk.js} +2 -2
- package/dist/client/static/js/{diagram-ATOU4E4O-1gt9fr7e.js → diagram-ATOU4E4O-1vg1tfca.js} +2 -2
- package/dist/client/static/js/{diagram-CDSNMT55-v6hs59jb.js → diagram-CDSNMT55-90d6jrqs.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-yey2m5nm.js → diagram-MLGK6HIB-8je4z8m1.js} +2 -2
- package/dist/client/static/js/{diagram-MPIPVDR6-hg4f3q4d.js → diagram-MPIPVDR6-0kzpexsj.js} +2 -2
- package/dist/client/static/js/{dockerfile-56tfnp5r.js → dockerfile-5nrbr0ef.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-2mhc9aar.js → ebnfDiagram-ZINNZB2B-47yg36zx.js} +1 -1
- package/dist/client/static/js/{elixir-fyxw6d70.js → elixir-3nwnd9yw.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-wedtvz9y.js → elk-276RUBZZ-5hqp6r2d.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-1kysnby9.js → erDiagram-OPXOYQCR-bt9te7r0.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-500fcx2a.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-j4g65rpm.js → ganttDiagram-FUAMR5RP-kzc13swm.js} +5 -5
- package/dist/client/static/js/gitGraph-4MIJSDKK-z1yehwys.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-vcwmj4b3.js → gitGraphDiagram-X574FWY7-bjf8aa3j.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-jaf968hx.js → index-0kcnghxn.js} +4 -4
- package/dist/client/static/js/{index-8tzt0dek.js → index-11qn05g9.js} +2 -2
- package/dist/client/static/js/{index-sqyvj03y.js → index-1fmjhm2d.js} +9 -9
- package/dist/client/static/js/{index-42q5gg7t.js → index-24a40rw8.js} +1 -1
- package/dist/client/static/js/{index-np2rfq06.js → index-2dmew334.js} +2 -2
- package/dist/client/static/js/{index-wkxsypj1.js → index-2zhmmtye.js} +2 -2
- package/dist/client/static/js/{index-m62sf9wn.js → index-3x7cbxwq.js} +1 -1
- package/dist/client/static/js/{index-fg0ne74z.js → index-475dc6h9.js} +2 -2
- package/dist/client/static/js/{index-1mkn5fbf.js → index-4vtc4xct.js} +197 -197
- package/dist/client/static/js/{index-spnrx2c0.js → index-5srvxsht.js} +1 -1
- package/dist/client/static/js/{index-tz5ewsza.js → index-653x8zdq.js} +9 -9
- package/dist/client/static/js/index-6c1s0v4b.js +1 -0
- package/dist/client/static/js/{index-hgzf4ask.js → index-776n5n29.js} +5 -5
- package/dist/client/static/js/{index-a70sk36c.js → index-85jfn1fz.js} +2 -2
- package/dist/client/static/js/{index-yrwm437g.js → index-97sw4d9n.js} +2 -2
- package/dist/client/static/js/{index-csxnqgzw.js → index-9g2nzgpx.js} +6 -6
- 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-db6s66jr.js → index-bkn6jtn1.js} +2 -2
- package/dist/client/static/js/{index-kt77dwsg.js → index-bq9f0mxp.js} +7 -7
- package/dist/client/static/js/{index-ndqtff48.js → index-ca6tmamh.js} +2 -2
- package/dist/client/static/js/index-cvm2ha01.js +1 -0
- package/dist/client/static/js/index-d11mbz2q.js +4 -0
- package/dist/client/static/js/{index-3kedv94b.js → index-dabnbvbc.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-fen0x3qh.js +1 -0
- package/dist/client/static/js/{index-vs2y8gxr.js → index-fr6wsqk8.js} +2 -2
- package/dist/client/static/js/{index-xqz7bqcn.js → index-gwgh27h3.js} +87 -87
- package/dist/client/static/js/{index-2h7xh93h.js → index-h7agc069.js} +1 -1
- package/dist/client/static/js/{index-69mnn71v.js → index-hwv7bfxc.js} +2 -2
- package/dist/client/static/js/{index-461ga40v.js → index-hxy1sadd.js} +2 -2
- package/dist/client/static/js/{index-s7p2wdr1.js → index-jz4012t5.js} +1 -1
- package/dist/client/static/js/{index-gajpd90b.js → index-k9yf2txw.js} +2 -2
- package/dist/client/static/js/{index-dw9epydj.js → index-kj70d2q9.js} +2 -2
- package/dist/client/static/js/{index-7enfdvh0.js → index-krdz5vby.js} +2 -2
- package/dist/client/static/js/{index-42k78whj.js → index-kyr612aa.js} +1 -1
- package/dist/client/static/js/{index-fvphmwkf.js → index-m24sebb0.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-pg87cgpy.js +2 -0
- package/dist/client/static/js/{index-r42f3r1p.js → index-q1a40v20.js} +2 -2
- package/dist/client/static/js/{index-jct0jryd.js → index-qccydkze.js} +2 -2
- package/dist/client/static/js/index-qmvstmvh.js +1 -0
- package/dist/client/static/js/{index-pn0ja904.js → index-r38e0rya.js} +2 -2
- package/dist/client/static/js/{index-92h38pwg.js → index-s4j2ghmx.js} +2 -2
- package/dist/client/static/js/index-sr14vwn5.js +2 -0
- 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-qc3de995.js → index-vgcw01yk.js} +1 -1
- package/dist/client/static/js/{index-pr8wsq24.js → index-vn59zz0k.js} +2 -2
- package/dist/client/static/js/{index-hrez92pw.js → index-wf5j0009.js} +7 -7
- package/dist/client/static/js/{index-q3k8r0ms.js → index-wsy6y5em.js} +9 -9
- package/dist/client/static/js/{index-d201jvs9.js → index-xy0m8te9.js} +1 -1
- package/dist/client/static/js/index-y6zbkh4p.js +2 -0
- package/dist/client/static/js/{index-h1xbx74w.js → index-yfcy4cf6.js} +2 -2
- package/dist/client/static/js/{index-y5pkqrga.js → index-z5s9tmj8.js} +2 -2
- package/dist/client/static/js/{index-vs3g6njv.js → index-zr3965k9.js} +1 -1
- package/dist/client/static/js/info-A6RAGUB7-dqyaxjc1.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-7craq9x2.js → infoDiagram-VRGFBTTK-jy5zvvj8.js} +1 -1
- package/dist/client/static/js/ini-g6a5xsaw.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-ncjty2re.js → ishikawaDiagram-OU5B5YK6-pfky1nnf.js} +3 -3
- package/dist/client/static/js/java-n596am4c.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-yx222bzt.js → journeyDiagram-ZHPQQLJL-mvaf7rfh.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-a2f84qmn.js → kanban-definition-PNTS6WVX-hw2xwe6e.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-9vfwthw3.js → mermaid.core-hsw87hmq.js} +6 -6
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-fsxysg6f.js → mindmap-definition-NLK3R4M7-wfe4d846.js} +7 -7
- package/dist/client/static/js/one-dark-pro-ckq5capv.js +1 -0
- package/dist/client/static/js/one-light-a908z398.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-7jxzax4z.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-77wxmp9g.js → pegDiagram-GJSIUBJH-cvnmxgst.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-gvgfhez0.js → pieDiagram-5QR66LMP-0n3gz7sv.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-9zkbt5h8.js → quadrantDiagram-O4NWA36T-9qqh6xvv.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-w55bsyw6.js → railroadDiagram-XR7U4H2S-5f3x3762.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-828s1e5g.js → requirementDiagram-PLB6GJNP-a68bv6kh.js} +12 -12
- package/dist/client/static/js/{ruby-994n5j6e.js → ruby-dve3y59w.js} +1 -1
- package/dist/client/static/js/{rust-csv5f258.js → rust-qjhdt4b0.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-34f3fyvg.js → sankeyDiagram-IPEJSGJF-ry7xcphh.js} +4 -4
- package/dist/client/static/js/{sass-p6g7qdv2.js → sass-emxqt5p2.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-nnta2hn0.js → sequenceDiagram-PO4LG4MO-mekzzhet.js} +21 -21
- package/dist/client/static/js/{sizeCapture-INFHLROL-gpcramga.js → sizeCapture-INFHLROL-pvc16ame.js} +1 -1
- package/dist/client/static/js/sql-0kar81jy.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-3f2en220.js → stateDiagram-v2-GCMORJYK-3ytxby83.js} +3 -3
- package/dist/client/static/js/{svelte-bek3h1sz.js → svelte-dbsx1ehx.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-jgqt12z9.js → swimlanes-2SLR337P-c2zfp416.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-9gm67sq4.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-sgchcs11.js → timeline-definition-EJHVYXUP-xtvv4za2.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-znkg9pkq.js → usecaseDiagram-POWQR4AR-sz6b7bnv.js} +51 -51
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-dncg96ej.js → vennDiagram-UO4OBE2U-56q0qs51.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-77xz2d49.js → wardleyDiagram-VNRHLVJA-xvtyvde9.js} +5 -5
- package/dist/client/static/js/xml-b7824nx0.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-40j1aqyf.js → xychartDiagram-PMCCYNJV-jcs20s84.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/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/WorkspaceHeader.tsx +5 -2
- 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/Panel.tsx +1 -1
- package/src/client/components/workspace/model-dropdown/SpecsTooltip.tsx +1 -1
- package/src/client/components/workspace/panel-tabs/TabChip.tsx +50 -20
- package/src/client/components/workspace/panel-tabs/TabStrip.connected.test.tsx +172 -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-nc2n0w6s.js +0 -1
- package/dist/client/static/js/LayoutWrapper-j7786frq.js +0 -2
- package/dist/client/static/js/MergeDiffView-0rn5zsy5.js +0 -1
- package/dist/client/static/js/Modal-7ag7a9qq.js +0 -60
- package/dist/client/static/js/SessionsView-t9rhx472.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-vd4z6bvy.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-6vbra7p9.js +0 -1
- package/dist/client/static/js/index-9mgpbwfr.js +0 -1
- package/dist/client/static/js/index-c5401dqs.js +0 -4
- package/dist/client/static/js/index-dbsy29gn.js +0 -2
- package/dist/client/static/js/index-e39m185a.js +0 -2
- package/dist/client/static/js/index-fnaq8baz.js +0 -1
- package/dist/client/static/js/index-mttx9327.css +0 -1
- package/dist/client/static/js/index-n7bmqeqz.js +0 -1
- package/dist/client/static/js/index-skp6991n.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-7v4by00h.js +0 -1
- package/dist/client/static/js/one-light-5rfzh8p4.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-xx1z57df.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
|
@@ -61,10 +61,29 @@ export interface WorkspacePanelWidthsArgs {
|
|
|
61
61
|
activeRightPanel: string;
|
|
62
62
|
/** The active view's own defaults and floor, when it has them. */
|
|
63
63
|
activePanel?: { defaultFraction?: number; defaultWidth?: number; minWidth?: number };
|
|
64
|
+
/**
|
|
65
|
+
* A rail hover preview: draw this view in the right column without opening
|
|
66
|
+
* it. Ignored while the panel is actually requested, and never reported as a
|
|
67
|
+
* suppression — a preview that does not fit simply does not happen.
|
|
68
|
+
*/
|
|
69
|
+
previewPanel?: { id: string; defaultFraction?: number; defaultWidth?: number; minWidth?: number } | null;
|
|
64
70
|
showEditor: boolean;
|
|
65
71
|
showRightPanel: boolean;
|
|
66
72
|
/** The chat column is collapsed, so it holds no floor and no pair share. */
|
|
67
73
|
chatHidden: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Pixels inside the right panel's outer box that are NOT the view body: the
|
|
76
|
+
* activity rail when it lives in the card, plus the floating card's two
|
|
77
|
+
* gutters. The view's own floor and default grow by this much so the BODY
|
|
78
|
+
* keeps the width the view declared.
|
|
79
|
+
*/
|
|
80
|
+
rightChromeWidth?: number;
|
|
81
|
+
/**
|
|
82
|
+
* Pixels inside the editor panel's outer box that are NOT the document: the
|
|
83
|
+
* floating card's two gutters. The editor's floor grows by this much so the
|
|
84
|
+
* DOCUMENT keeps the 320px it declares.
|
|
85
|
+
*/
|
|
86
|
+
editorChromeWidth?: number;
|
|
68
87
|
}
|
|
69
88
|
|
|
70
89
|
export interface WorkspacePanelWidths {
|
|
@@ -77,6 +96,12 @@ export interface WorkspacePanelWidths {
|
|
|
77
96
|
* rail beside a panel that is not there.
|
|
78
97
|
*/
|
|
79
98
|
rightShown: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* A hover preview is on screen in the right column. Separate from
|
|
101
|
+
* `rightShown` because the preview draws no separator and must not be
|
|
102
|
+
* reported as the panel being open.
|
|
103
|
+
*/
|
|
104
|
+
previewShown: boolean;
|
|
80
105
|
/**
|
|
81
106
|
* The right panel was ASKED for and there is no room for it. The caller says
|
|
82
107
|
* so (a refusal names its reason) instead of leaving a toggle that flips a
|
|
@@ -130,19 +155,48 @@ export function rightPanelFits(args: {
|
|
|
130
155
|
}
|
|
131
156
|
|
|
132
157
|
export function resolveWorkspacePanelWidths(args: WorkspacePanelWidthsArgs): WorkspacePanelWidths {
|
|
133
|
-
const {
|
|
158
|
+
const {
|
|
159
|
+
available,
|
|
160
|
+
panelWidths,
|
|
161
|
+
editorWidthMode,
|
|
162
|
+
activeRightPanel,
|
|
163
|
+
activePanel,
|
|
164
|
+
showEditor,
|
|
165
|
+
showRightPanel,
|
|
166
|
+
chatHidden,
|
|
167
|
+
rightChromeWidth = 0,
|
|
168
|
+
editorChromeWidth = 0,
|
|
169
|
+
} = args;
|
|
134
170
|
|
|
135
|
-
|
|
171
|
+
// A hover preview draws in place of the request, never beside it: the pointer
|
|
172
|
+
// can only be on one rail, and a preview must not fight a panel the user
|
|
173
|
+
// already opened.
|
|
174
|
+
const preview = showRightPanel ? null : args.previewPanel ?? null;
|
|
175
|
+
// The rail and the floating card's gutters sit inside this panel, so the
|
|
176
|
+
// view's floor/default are lifted by them. The stored width is already an
|
|
177
|
+
// OUTER width; the body is the part that gives way when the mode changes.
|
|
178
|
+
const rightMin = (activePanel?.minWidth ?? MIN_EDITOR_PANEL_WIDTH) + rightChromeWidth;
|
|
179
|
+
const previewMin = (preview?.minWidth ?? MIN_EDITOR_PANEL_WIDTH) + rightChromeWidth;
|
|
180
|
+
const baseHandleCount = showEditor && !chatHidden ? 1 : 0;
|
|
136
181
|
// The fit question is asked with the handles the row WOULD have, because the
|
|
137
182
|
// answer decides whether one of them exists.
|
|
138
|
-
const requestedHandleCount =
|
|
183
|
+
const requestedHandleCount = baseHandleCount + 1;
|
|
139
184
|
const rightFits =
|
|
140
185
|
showRightPanel && rightPanelFits({ available, showEditor, chatHidden, rightMin, handleCount: requestedHandleCount });
|
|
186
|
+
// A preview is not draggable, so it adds no separator: it must fit with the
|
|
187
|
+
// handles the row already has.
|
|
188
|
+
const previewFits =
|
|
189
|
+
preview !== null &&
|
|
190
|
+
rightPanelFits({ available, showEditor, chatHidden, rightMin: previewMin, handleCount: baseHandleCount });
|
|
141
191
|
// The separator before the editor is gone while the chat is collapsed: there
|
|
142
192
|
// is nothing on its left to transfer width to, and the drag's neighbour walk
|
|
143
193
|
// skips a collapsed panel, so it would render a handle that does nothing.
|
|
144
|
-
const handleCount =
|
|
194
|
+
const handleCount = baseHandleCount + (rightFits ? 1 : 0);
|
|
145
195
|
const showRight = rightFits;
|
|
196
|
+
// What actually occupies the column's width this render: the open panel, or
|
|
197
|
+
// the preview. The editor reserves it either way, or a preview would make the
|
|
198
|
+
// row overflow and flexbox would squeeze both panels.
|
|
199
|
+
const rightOccupies = showRight || previewFits;
|
|
146
200
|
|
|
147
201
|
// The editor and the right panel are a COUPLED pair: the right panel is
|
|
148
202
|
// resolved first, reserving the editor's WANTED share (the editor has no
|
|
@@ -152,16 +206,22 @@ export function resolveWorkspacePanelWidths(args: WorkspacePanelWidthsArgs): Wor
|
|
|
152
206
|
const editorFraction = panelFraction(panelWidths[editorWidthMode], DEFAULT_EDITOR_FRACTIONS[editorWidthMode], available);
|
|
153
207
|
const editorReservePx = available != null && available > 0 ? Math.round(editorFraction * available) : 0;
|
|
154
208
|
|
|
155
|
-
|
|
209
|
+
// Whichever view the column DRAWS is the one whose slot, defaults and floor
|
|
210
|
+
// apply — the open panel's, or the preview's.
|
|
211
|
+
const drawnPanel = preview ?? activePanel;
|
|
212
|
+
const drawnId = preview?.id ?? activeRightPanel;
|
|
213
|
+
const drawnMin = preview ? previewMin : rightMin;
|
|
214
|
+
|
|
215
|
+
const right = rightOccupies
|
|
156
216
|
? resolvePanelWidth({
|
|
157
|
-
stored: panelWidths.right?.[
|
|
158
|
-
defaultFraction:
|
|
159
|
-
defaultPx:
|
|
217
|
+
stored: panelWidths.right?.[drawnId],
|
|
218
|
+
defaultFraction: drawnPanel?.defaultFraction ?? DEFAULT_RIGHT_PANEL_FRACTION,
|
|
219
|
+
defaultPx: (drawnPanel?.defaultWidth ?? MIN_EDITOR_PANEL_WIDTH) + rightChromeWidth,
|
|
160
220
|
available,
|
|
161
|
-
min:
|
|
221
|
+
min: drawnMin,
|
|
162
222
|
pairReservePx: showEditor ? editorReservePx : 0,
|
|
163
223
|
// The editor has not been resolved yet, so only its floor can be reserved.
|
|
164
|
-
siblingWidth: showEditor ? MIN_EDITOR_PANEL_WIDTH : 0,
|
|
224
|
+
siblingWidth: showEditor ? MIN_EDITOR_PANEL_WIDTH + editorChromeWidth : 0,
|
|
165
225
|
handleCount,
|
|
166
226
|
chatHidden,
|
|
167
227
|
})
|
|
@@ -171,11 +231,12 @@ export function resolveWorkspacePanelWidths(args: WorkspacePanelWidthsArgs): Wor
|
|
|
171
231
|
// separators do not. Resolving from its remembered FRACTION would leave the
|
|
172
232
|
// freed width as an empty gap, which is the opposite of what the mode
|
|
173
233
|
// promises; the remembered width is untouched, so leaving restores it.
|
|
234
|
+
const editorFloor = MIN_EDITOR_PANEL_WIDTH + editorChromeWidth;
|
|
174
235
|
const editor = chatHidden
|
|
175
236
|
? Math.max(
|
|
176
|
-
|
|
237
|
+
editorFloor,
|
|
177
238
|
available != null && available > 0
|
|
178
|
-
? Math.floor(available - (
|
|
239
|
+
? Math.floor(available - (rightOccupies ? right : 0) - handleCount * HANDLE_WIDTH)
|
|
179
240
|
: DEFAULT_EDITOR_WIDTHS[editorWidthMode],
|
|
180
241
|
)
|
|
181
242
|
: resolvePanelWidth({
|
|
@@ -183,9 +244,9 @@ export function resolveWorkspacePanelWidths(args: WorkspacePanelWidthsArgs): Wor
|
|
|
183
244
|
defaultFraction: DEFAULT_EDITOR_FRACTIONS[editorWidthMode],
|
|
184
245
|
defaultPx: DEFAULT_EDITOR_WIDTHS[editorWidthMode],
|
|
185
246
|
available,
|
|
186
|
-
min:
|
|
187
|
-
pairReservePx:
|
|
188
|
-
siblingWidth:
|
|
247
|
+
min: editorFloor,
|
|
248
|
+
pairReservePx: rightOccupies ? right : 0,
|
|
249
|
+
siblingWidth: rightOccupies ? right : 0,
|
|
189
250
|
handleCount,
|
|
190
251
|
});
|
|
191
252
|
|
|
@@ -193,13 +254,14 @@ export function resolveWorkspacePanelWidths(args: WorkspacePanelWidthsArgs): Wor
|
|
|
193
254
|
right,
|
|
194
255
|
editor,
|
|
195
256
|
rightShown: showRight,
|
|
257
|
+
previewShown: previewFits,
|
|
196
258
|
rightSuppressed: showRightPanel && !showRight,
|
|
197
259
|
// `resolvePanelWidth` caps what it HANDS to `defaultSize`, but a separator
|
|
198
260
|
// drag bypasses it — the resizer transfers pixels between two panels clamped
|
|
199
261
|
// only by their own `maxSize`. Each max is its own cap and the pair total
|
|
200
262
|
// minus the sibling's FLOOR (it gives way down to its minimum mid-drag).
|
|
201
|
-
editorMax: pairMaxSize({ available, siblingMin:
|
|
202
|
-
rightMax: pairMaxSize({ available, siblingMin: MIN_EDITOR_PANEL_WIDTH, siblingOpen: showEditor, chatHidden }),
|
|
263
|
+
editorMax: pairMaxSize({ available, siblingMin: drawnMin, siblingOpen: rightOccupies, chatHidden }),
|
|
264
|
+
rightMax: pairMaxSize({ available, siblingMin: MIN_EDITOR_PANEL_WIDTH + editorChromeWidth, siblingOpen: showEditor, chatHidden }),
|
|
203
265
|
handleCount,
|
|
204
266
|
rightMin,
|
|
205
267
|
};
|
|
@@ -8,6 +8,7 @@ import type { RightSideHiddenScope } from '@/shared/lib/workspace/right-side-hid
|
|
|
8
8
|
import type { ComposerStyle } from '@/shared/lib/chat/composer/style';
|
|
9
9
|
import type { SurfaceStyle } from '@/shared/lib/theme/surface-style';
|
|
10
10
|
import type { BorderStyle } from '@/shared/lib/theme/border-style';
|
|
11
|
+
import type { ChromeStyle } from '@/shared/lib/theme/chrome-style';
|
|
11
12
|
import type { IconStyle } from '@/shared/lib/theme/icon-style';
|
|
12
13
|
import type { TrayIconStyle } from '@/shared/lib/theme/tray-icon-style';
|
|
13
14
|
import type { SettingsSection } from '@/shared/lib/settings/sections';
|
|
@@ -266,10 +267,8 @@ export interface SettingsState {
|
|
|
266
267
|
mobileRightPanelNav: MobilePanelNav;
|
|
267
268
|
/**
|
|
268
269
|
* How the chat composer is drawn (`classic` | `calm` | `console` | `stage`).
|
|
269
|
-
* A PRESENTATION choice
|
|
270
|
-
*
|
|
271
|
-
* send, the `@`/`/` picker — and only their ORDER and frame change. The
|
|
272
|
-
* table lives in `shared/lib/chat/composer/style.ts`.
|
|
270
|
+
* A PRESENTATION choice: every style renders the same controls, and only
|
|
271
|
+
* their ORDER and frame change. The table lives in `shared/lib/chat/composer/style.ts`.
|
|
273
272
|
*
|
|
274
273
|
* Global and shared by desktop and phone, like the chat width and the tool
|
|
275
274
|
* style. `classic` is the default so an upgrade rearranges nothing.
|
|
@@ -287,13 +286,15 @@ export interface SettingsState {
|
|
|
287
286
|
* call site each. `classic` is the default so an upgrade restyles nothing.
|
|
288
287
|
*/
|
|
289
288
|
surfaceStyle: SurfaceStyle;
|
|
289
|
+
/** How the desktop chrome is arranged (`classic` | `floating`); pixels in `src/client/floating.css`. */
|
|
290
|
+
chromeStyle: ChromeStyle;
|
|
290
291
|
/**
|
|
291
292
|
* How the app's HAIRLINES are drawn (`hairline` | `borderless`). A
|
|
292
|
-
* presentation choice over one shell: both
|
|
293
|
-
*
|
|
294
|
-
*
|
|
295
|
-
* ring, because those are facts and affordances rather than decoration.
|
|
296
|
-
* table lives in `shared/lib/theme/border-style.ts`; the pixels are the
|
|
293
|
+
* presentation choice over one shell: both draw the same panels and rows, and
|
|
294
|
+
* `borderless` removes only the 1px rules between layout regions — never a
|
|
295
|
+
* badge's or a control's own edge, a validation colour, a drop zone or a
|
|
296
|
+
* focus ring, because those are facts and affordances rather than decoration.
|
|
297
|
+
* The table lives in `shared/lib/theme/border-style.ts`; the pixels are the
|
|
297
298
|
* `[data-borders="borderless"]` block in `src/client/borders.css`.
|
|
298
299
|
*
|
|
299
300
|
* It reaches the document as `data-borders` on `<html>`, for the same reason
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The mounted phone LEFT drawer, shared by its behaviour and layout suites.
|
|
8
|
+
*
|
|
9
|
+
* Both suites start the same tree — real provider, real drawer — and a second
|
|
10
|
+
* copy of the DOM globals, the fetch stub and the mount would let one suite
|
|
11
|
+
* assert against a harness the other no longer runs. The hooks themselves stay
|
|
12
|
+
* in each test file (`beforeAll(installDrawerHarness)`): `bun test` scopes them
|
|
13
|
+
* per file, and a module that registers them would attach them to whichever
|
|
14
|
+
* file imported it first.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { Window } from 'happy-dom';
|
|
18
|
+
import { h, render } from 'preact';
|
|
19
|
+
import { act } from 'preact/test-utils';
|
|
20
|
+
import { MobileSessionSidebar } from '@/client/components/mobile/SessionSidebar';
|
|
21
|
+
import { SessionStateProvider } from '@/client/components/common/session-state-provider/index';
|
|
22
|
+
import { primeKabmoSettings } from '@/shared/lib/settings/client';
|
|
23
|
+
import { resetSessionStateStore } from '@/shared/lib/workspace/session-state/store';
|
|
24
|
+
import { writeLeftDock } from '@/shared/lib/workspace/left-dock';
|
|
25
|
+
import { silenceRealtime, restoreRealtime } from '@/test-support/silent-socket';
|
|
26
|
+
|
|
27
|
+
const DOM_GLOBALS = [
|
|
28
|
+
'window', 'document', 'navigator', 'Node', 'Element', 'HTMLElement',
|
|
29
|
+
'Event', 'MouseEvent', 'KeyboardEvent',
|
|
30
|
+
] as const;
|
|
31
|
+
const nativeGlobals: Partial<Record<(typeof DOM_GLOBALS)[number], unknown>> = {};
|
|
32
|
+
|
|
33
|
+
let win: Window | undefined;
|
|
34
|
+
let container: HTMLElement | undefined;
|
|
35
|
+
let realFetch: typeof fetch | undefined;
|
|
36
|
+
|
|
37
|
+
/** Counts the workspace-refresh requests the drawer makes. */
|
|
38
|
+
export const refreshCalls = { count: 0 };
|
|
39
|
+
|
|
40
|
+
/** A built-in view placed on the dock, so the catalog has something to open. */
|
|
41
|
+
const PLACED = 'files';
|
|
42
|
+
|
|
43
|
+
export function installDrawerHarness(): void {
|
|
44
|
+
realFetch = globalThis.fetch;
|
|
45
|
+
// Answers EVERY endpoint with an empty JSON object: the drawer reads the
|
|
46
|
+
// session blob, and opening its catalog triggers the update flow's own read.
|
|
47
|
+
// A single canned body is enough for both, and one stub keeps a missing
|
|
48
|
+
// endpoint from failing as an unrelated `undefined` deeper in a hook.
|
|
49
|
+
globalThis.fetch = (async () =>
|
|
50
|
+
new Response(JSON.stringify({ state: {}, kabmo: {}, omp: {} }), {
|
|
51
|
+
status: 200,
|
|
52
|
+
})) as unknown as typeof fetch;
|
|
53
|
+
win = new Window({ url: 'http://localhost' });
|
|
54
|
+
const target = globalThis as unknown as Record<string, unknown>;
|
|
55
|
+
for (const key of DOM_GLOBALS) {
|
|
56
|
+
if (!(key in nativeGlobals)) nativeGlobals[key] = target[key];
|
|
57
|
+
target[key] = (win as unknown as Record<string, unknown>)[key];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export async function teardownDrawerHarness(): Promise<void> {
|
|
62
|
+
await act(async () => {
|
|
63
|
+
await Bun.sleep(60);
|
|
64
|
+
});
|
|
65
|
+
if (realFetch) globalThis.fetch = realFetch;
|
|
66
|
+
const target = globalThis as unknown as Record<string, unknown>;
|
|
67
|
+
for (const key of DOM_GLOBALS) {
|
|
68
|
+
const value = nativeGlobals[key];
|
|
69
|
+
if (value === undefined) delete target[key];
|
|
70
|
+
else target[key] = value;
|
|
71
|
+
}
|
|
72
|
+
win = undefined;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Start a case: a fresh container, a clean store and a silent socket. */
|
|
76
|
+
export function resetDrawerHarness(): HTMLElement {
|
|
77
|
+
silenceRealtime();
|
|
78
|
+
refreshCalls.count = 0;
|
|
79
|
+
// The store is a module singleton: a tab set left by one test would seed the
|
|
80
|
+
// next one's drawer.
|
|
81
|
+
resetSessionStateStore();
|
|
82
|
+
container = document.createElement('div');
|
|
83
|
+
document.body.appendChild(container);
|
|
84
|
+
primeKabmoSettings({});
|
|
85
|
+
return container;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export async function disposeDrawerHarness(): Promise<void> {
|
|
89
|
+
const target = container;
|
|
90
|
+
if (target) {
|
|
91
|
+
await act(() => {
|
|
92
|
+
render(null, target);
|
|
93
|
+
});
|
|
94
|
+
target.remove();
|
|
95
|
+
container = undefined;
|
|
96
|
+
}
|
|
97
|
+
restoreRealtime();
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** Mount the drawer with a given style and rail state. */
|
|
101
|
+
export async function mountDrawer(
|
|
102
|
+
mountInto: HTMLElement,
|
|
103
|
+
style: 'classic' | 'tabs',
|
|
104
|
+
railEnabled = true,
|
|
105
|
+
): Promise<void> {
|
|
106
|
+
primeKabmoSettings({ mobileLeftPanelNav: style });
|
|
107
|
+
// The rail switch and the placement are ONE global setting
|
|
108
|
+
// (`omp_left_panels`), read through `useLeftDock`. Writing them before the
|
|
109
|
+
// mount is what the user's Settings click and a drop do. A placed panel is
|
|
110
|
+
// what gives the catalog a second card to open.
|
|
111
|
+
writeLeftDock({ enabled: railEnabled, panels: [PLACED] });
|
|
112
|
+
await act(async () => {
|
|
113
|
+
render(
|
|
114
|
+
h(SessionStateProvider, {
|
|
115
|
+
sessionId: 'session-left-drawer-nav',
|
|
116
|
+
children: h(MobileSessionSidebar, {
|
|
117
|
+
activeSessionId: null,
|
|
118
|
+
onSelectSession: () => {},
|
|
119
|
+
onNewSession: () => {},
|
|
120
|
+
onNewSessionForFolder: () => {},
|
|
121
|
+
onOpenWorkspacePanels: () => {},
|
|
122
|
+
onClose: () => {},
|
|
123
|
+
// The drawer's `onRefresh` is the WORKSPACE refresh the layout hands
|
|
124
|
+
// down (`LayoutWrapper` passes `handleWorkspaceChanged`), so counting
|
|
125
|
+
// it is how these suites tell the two refreshes apart.
|
|
126
|
+
onRefresh: () => {
|
|
127
|
+
refreshCalls.count += 1;
|
|
128
|
+
},
|
|
129
|
+
}),
|
|
130
|
+
}),
|
|
131
|
+
mountInto,
|
|
132
|
+
);
|
|
133
|
+
});
|
|
134
|
+
await settleDrawer(mountInto);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** Deferred commit + provider load. Polls instead of a fixed 40ms sleep: the
|
|
138
|
+
* sleep made this suite order-dependent (the header was sometimes not drawn
|
|
139
|
+
* yet, failing "the strip draws no second close control" about once per two
|
|
140
|
+
* full runs). Waits for the row BOTH chromes draw. */
|
|
141
|
+
export async function settleDrawer(mountInto: HTMLElement): Promise<void> {
|
|
142
|
+
const deadline = Date.now() + 2000;
|
|
143
|
+
while (Date.now() < deadline) {
|
|
144
|
+
await act(async () => {
|
|
145
|
+
await Bun.sleep(10);
|
|
146
|
+
});
|
|
147
|
+
if (mountInto.querySelector('button[aria-label="Close sidebar"]')) return;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export function stripChips(mountInto: HTMLElement): (string | undefined)[] {
|
|
152
|
+
return [...mountInto.querySelectorAll('[role="tablist"] [role="tab"]')].map((chip) =>
|
|
153
|
+
chip.textContent?.trim(),
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* The dock's chip row, identified by what only it draws: a pressed chip that
|
|
159
|
+
* names a VIEW. The session list's own filter chips ("All", "Running",
|
|
160
|
+
* "Archived") are also `aria-pressed`, so a bare count would be measuring the
|
|
161
|
+
* list rather than the chrome.
|
|
162
|
+
*/
|
|
163
|
+
export function dockChips(mountInto: HTMLElement): HTMLElement[] {
|
|
164
|
+
return [...mountInto.querySelectorAll('[aria-pressed][aria-label]')].filter((chip) =>
|
|
165
|
+
['Sessions', 'Files', 'GIT', 'Search', 'Terminal'].some((name) =>
|
|
166
|
+
chip.getAttribute('aria-label')?.startsWith(name),
|
|
167
|
+
),
|
|
168
|
+
) as HTMLElement[];
|
|
169
|
+
}
|
|
@@ -12,19 +12,20 @@
|
|
|
12
12
|
* (`globalThis`), so an in-process "owner" would share it with the relay
|
|
13
13
|
* under test and could exercise nothing; a raw socket is the only way to be
|
|
14
14
|
* genuinely other.
|
|
15
|
-
* - a lease holder in a SEPARATE,
|
|
16
|
-
* treats a lease held by this very process —
|
|
17
|
-
* spawned — as "our own", so a foreign holder has
|
|
15
|
+
* - a lease holder in a SEPARATE process, parented by a wrapper that stays
|
|
16
|
+
* alive. The ownership guard treats a lease held by this very process —
|
|
17
|
+
* and a child this process spawned — as "our own", so a foreign holder has
|
|
18
|
+
* to be one generation further down.
|
|
18
19
|
*/
|
|
19
20
|
|
|
20
|
-
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
21
|
+
import { mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
21
22
|
import { tmpdir } from 'node:os';
|
|
22
23
|
import { join } from 'node:path';
|
|
23
24
|
|
|
24
25
|
import type { RealtimeConnection } from '@/server/lib/realtime/hub.server';
|
|
25
26
|
import { sessionLeasePath } from '@/server/lib/omp/session/ownership.server';
|
|
26
27
|
import { leaseHeldByAnother } from '@kabmo-labs/kabmo-omp/session-runtime/lease-probe.server';
|
|
27
|
-
import {
|
|
28
|
+
import { processParentPid } from '@kabmo-labs/kabmo-process/probe/identity';
|
|
28
29
|
import type { RealtimeServerFrame } from '@/shared/lib/realtime/protocol';
|
|
29
30
|
|
|
30
31
|
/** Spin the event loop until `condition` holds, up to `timeoutMs`. */
|
|
@@ -186,22 +187,19 @@ export interface ForeignLease {
|
|
|
186
187
|
}
|
|
187
188
|
|
|
188
189
|
/**
|
|
189
|
-
* Hold `sessionId`'s lease from a SEPARATE
|
|
190
|
-
*
|
|
190
|
+
* Hold `sessionId`'s lease from a SEPARATE process — the shape a real second
|
|
191
|
+
* Kabmo instance's omp child has.
|
|
191
192
|
*
|
|
192
193
|
* A lease held by this very process is deliberately NOT a conflict (the local
|
|
193
194
|
* registry already answers for it), and a directly-spawned child is "our own
|
|
194
|
-
* child" by the guard's parent rule — so the holder
|
|
195
|
-
*
|
|
196
|
-
* portable way to get a foreign holder (macOS ships no `setsid`).
|
|
195
|
+
* child" by the guard's parent rule — so the holder is spawned as the wrapper
|
|
196
|
+
* shell's child, one generation down.
|
|
197
197
|
*
|
|
198
|
-
* The
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
* one-shot `resolve` ran, so no record matched and the topic answered locally
|
|
204
|
-
* instead of forwarding to the owner (`ownerCalls` was `[]`).
|
|
198
|
+
* The wrapper STAYS ALIVE (`wait`) for as long as the holder runs, so
|
|
199
|
+
* `parentPid` is a stable, live pid the instance record can name. The previous
|
|
200
|
+
* wrapper exited at once and left `bun` under the kernel's reaper — on the Linux
|
|
201
|
+
* gate that was pid 1, and a record naming init did not match (`ownerCalls` was
|
|
202
|
+
* `[]`, measured on `43568904108` and again on `47286715621`).
|
|
205
203
|
*/
|
|
206
204
|
export async function holdLeaseInForeignProcess(sessionId: string): Promise<ForeignLease> {
|
|
207
205
|
const lease = sessionLeasePath(sessionId);
|
|
@@ -212,28 +210,38 @@ export async function holdLeaseInForeignProcess(sessionId: string): Promise<Fore
|
|
|
212
210
|
await Promise.withResolvers().promise;
|
|
213
211
|
`;
|
|
214
212
|
const inner = `exec ${JSON.stringify(process.execPath)} -e '${script.replace(/'/g, `'\\''`)}' '${lease}'`;
|
|
215
|
-
|
|
216
|
-
|
|
213
|
+
// The wrapper STAYS ALIVE as the holder's parent, and it does so without
|
|
214
|
+
// `wait`: a shell's job table is not something this harness should bet the
|
|
215
|
+
// guard's parent lookup on (the Linux gate had the wrapper gone by resolve
|
|
216
|
+
// time, leaving the holder under init). `exec sleep` keeps the SAME pid —
|
|
217
|
+
// now sleeping — for the rest of the test; the callers kill it with the
|
|
218
|
+
// holder.
|
|
219
|
+
//
|
|
220
|
+
// The child pid arrives through a FILE, not stdout: a live wrapper never
|
|
221
|
+
// closes its stdout pipe, so reading it to EOF would hang until the holder
|
|
222
|
+
// died.
|
|
223
|
+
const pidFile = join(tmpdir(), `kabmo-holder-${process.pid}-${Date.now()}-${Math.random().toString(16).slice(2)}.pid`);
|
|
224
|
+
const child = Bun.spawn(['sh', '-c', `${inner} >/dev/null 2>&1 & echo $! > '${pidFile}' ; exec sleep 3600`], {
|
|
225
|
+
stdout: 'ignore',
|
|
217
226
|
stderr: 'ignore',
|
|
218
227
|
env: { ...Bun.env },
|
|
219
228
|
});
|
|
220
|
-
|
|
221
|
-
await waitUntil(() => leaseHeldByAnother(lease) === true);
|
|
222
|
-
// Held AND reparented: until the wrapper exits, the holder's parent is the
|
|
223
|
-
// wrapper itself, which no instance record can name.
|
|
224
|
-
//
|
|
225
|
-
// "Reparented" means the parent ALIVE and UNCHANGED across two polls, not
|
|
226
|
-
// merely different from the wrapper: a caller writes an instance record naming
|
|
227
|
-
// this pid, and the guard drops a record whose pid is dead — so reading a
|
|
228
|
-
// parent that is about to be replaced is the difference between a forwarded
|
|
229
|
-
// resolve and a local answer.
|
|
230
|
-
let settled: number | null = null;
|
|
229
|
+
let pid = 0;
|
|
231
230
|
await waitUntil(() => {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
231
|
+
try {
|
|
232
|
+
pid = Number(readFileSync(pidFile, 'utf8').trim());
|
|
233
|
+
} catch {
|
|
234
|
+
return false;
|
|
235
|
+
}
|
|
236
|
+
return Number.isInteger(pid) && pid > 0;
|
|
236
237
|
});
|
|
237
|
-
|
|
238
|
-
|
|
238
|
+
rmSync(pidFile, { force: true });
|
|
239
|
+
await waitUntil(() => leaseHeldByAnother(lease) === true);
|
|
240
|
+
// The guard matches the holder's PARENT against an instance record, so the
|
|
241
|
+
// parent must really be this wrapper — a reparented holder would leave the
|
|
242
|
+
// record naming a pid nobody is running.
|
|
243
|
+
if (processParentPid(pid) !== child.pid) {
|
|
244
|
+
throw new Error(`the lease holder left its wrapper (parent ${processParentPid(pid)}, expected ${child.pid})`);
|
|
245
|
+
}
|
|
246
|
+
return { pid, parentPid: child.pid };
|
|
239
247
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e,p,jr}from"./index-1mkn5fbf.js";import{$i}from"./index-jaf968hx.js";import{Uu}from"./index-hrez92pw.js";function g({source:t,name:r,revision:s=0}){let{url:i,loading:m,error:o}=Uu(t,s);if(o)return e(jr,{name:r,message:o});if(m||!i)return e("div",{className:"flex flex-1 items-center justify-center gap-2 text-xs text-ink/40",children:[e(p,{size:14,className:"animate-spin"}),e("span",{children:"Loading image…"})]});return e($i,{src:i,name:r,className:"flex-1 min-h-0"})}export{g as ImageView};
|