@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,199 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The session title bar: the app name while the left panel is hidden, the
|
|
8
|
+
* title, its in-place rename and its action menu.
|
|
9
|
+
*
|
|
10
|
+
* It spans the CHAT TIMELINE's width (`data-session-title=""`), so the title is
|
|
11
|
+
* centred over the conversation it names rather than over the whole window.
|
|
12
|
+
* Nothing here is part of the control cluster: the two bars are separate cards.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { Loader2, MoreHorizontal, PanelLeft, PanelRight } from 'lucide-preact';
|
|
16
|
+
import type { NavbarSessionMenu } from '@/client/hooks/workspace/navbar-session-actions';
|
|
17
|
+
import { SessionActionsMenu, useRowMenu } from '@/client/components/common/session-actions-menu';
|
|
18
|
+
import { BrandWordmark } from '@/client/components/common/brand-wordmark';
|
|
19
|
+
import { WorkspaceMark } from '@/client/components/common/workspace-mark';
|
|
20
|
+
import { StreamStatusDot } from '@/client/components/common/StreamStatusDot';
|
|
21
|
+
import { useInlineRename } from '@/client/hooks/ui/inline-rename';
|
|
22
|
+
import { useSessionRenaming } from '@/client/hooks/workspace/renaming-sessions';
|
|
23
|
+
import { dragRegionProps, titlebarInsetLeft } from '@/client/lib/desktop/titlebar';
|
|
24
|
+
import { titlebarPaddingLeft } from '@/shared/lib/ui/titlebar';
|
|
25
|
+
import { CONTROL_BOX, CONTROL_BOX_PX, railAlignedInset } from '@/client/lib/ui/control-plate';
|
|
26
|
+
import { withChord } from '@/client/lib/ui/with-chord';
|
|
27
|
+
import type { AgentStreamStatus } from '@/shared/lib/chat/omp/status';
|
|
28
|
+
import { useChromeStyle } from '@/client/hooks/ui/chrome-style';
|
|
29
|
+
import type { WorkspaceFolderData } from '@/shared/types';
|
|
30
|
+
|
|
31
|
+
export function SessionTitleBar({
|
|
32
|
+
sessionTitle,
|
|
33
|
+
folder,
|
|
34
|
+
sessionId,
|
|
35
|
+
sessionActions,
|
|
36
|
+
streamStatus,
|
|
37
|
+
sidebarOpen,
|
|
38
|
+
leftBarVisible,
|
|
39
|
+
onExpandSidebar,
|
|
40
|
+
rightSideHidden,
|
|
41
|
+
onToggleRightSide,
|
|
42
|
+
}: {
|
|
43
|
+
sessionTitle: string | null;
|
|
44
|
+
/** The workspace folder the session belongs to, drawn before the title:
|
|
45
|
+
* `FOLDER / Session title`, so two chats with the same name are told apart. */
|
|
46
|
+
folder?: WorkspaceFolderData | null;
|
|
47
|
+
sessionId?: string | null;
|
|
48
|
+
sessionActions?: NavbarSessionMenu;
|
|
49
|
+
/** The live channel dot beside the wordmark. */
|
|
50
|
+
streamStatus?: AgentStreamStatus;
|
|
51
|
+
/** The left column is on screen. */
|
|
52
|
+
sidebarOpen: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* The left column's own bar is on screen, even when the panel is closed to
|
|
55
|
+
* its rail. It carries the sidebar toggle, so this bar must not draw a second
|
|
56
|
+
* one beside the wordmark.
|
|
57
|
+
*/
|
|
58
|
+
leftBarVisible: boolean;
|
|
59
|
+
onExpandSidebar: () => void;
|
|
60
|
+
/** The right side is put away. This bar then owns its toggle, because the
|
|
61
|
+
* controls bar that normally carries it is inside the hidden right column. */
|
|
62
|
+
rightSideHidden: boolean;
|
|
63
|
+
onToggleRightSide: () => void;
|
|
64
|
+
}) {
|
|
65
|
+
// The FLOATING shell is the exception: it moves the controls bar out of the
|
|
66
|
+
// collapsed column and onto this row, so that card owns the toggle and a
|
|
67
|
+
// second one here would be a duplicate control. Same document attribute the
|
|
68
|
+
// stylesheet paints from, so the two cannot disagree about the arrangement.
|
|
69
|
+
const floatingChrome = useChromeStyle() === 'floating';
|
|
70
|
+
const toggleInTitle = rightSideHidden && !floatingChrome;
|
|
71
|
+
// The title is renamed in place here, the way a sidebar row is: the overflow
|
|
72
|
+
// menu offers Rename and the bar swaps its label for the field.
|
|
73
|
+
const rename = useInlineRename(sessionTitle ?? '', sessionActions?.onRename);
|
|
74
|
+
const menu = useRowMenu();
|
|
75
|
+
// The title menu's "Rename with AI" acts on the session on screen, whose
|
|
76
|
+
// sidebar row may be scrolled out of view — so the bar says the wait is
|
|
77
|
+
// happening even when the row that started it is not on screen.
|
|
78
|
+
const renaming = useSessionRenaming(sessionId);
|
|
79
|
+
const hasSessionActions = Boolean(
|
|
80
|
+
sessionActions && (sessionActions.onRename || sessionActions.onRenameWithAi || sessionActions.onArchive || sessionActions.onDelete),
|
|
81
|
+
);
|
|
82
|
+
// The left bar normally carries the toggle. Only a fully collapsed column
|
|
83
|
+
// (no rail, width 0) hides that bar, and then this one owns the way back.
|
|
84
|
+
const leftToggleInTitle = !sidebarOpen && !leftBarVisible;
|
|
85
|
+
|
|
86
|
+
return (
|
|
87
|
+
<div
|
|
88
|
+
data-session-title=""
|
|
89
|
+
className={`relative flex h-10 items-center gap-2 pl-6 ${toggleInTitle ? 'pr-10' : 'pr-4'} titlebar-drag-region select-none`}
|
|
90
|
+
style={leftToggleInTitle ? { paddingLeft: titlebarInsetLeft(titlebarPaddingLeft('0.75rem')) } : undefined}
|
|
91
|
+
{...dragRegionProps()}
|
|
92
|
+
>
|
|
93
|
+
{toggleInTitle ? (
|
|
94
|
+
<button
|
|
95
|
+
type="button"
|
|
96
|
+
onClick={onToggleRightSide}
|
|
97
|
+
// The same axis as the rail's marks and the controls bar's toggle:
|
|
98
|
+
// the column's right edge, inset by half the rail/box difference.
|
|
99
|
+
style={{ right: railAlignedInset(CONTROL_BOX_PX.desktop) }}
|
|
100
|
+
className={`${CONTROL_BOX.desktop} absolute hover:bg-ink/10 transition-colors text-ink/60 hover:text-ink cursor-pointer titlebar-no-drag`}
|
|
101
|
+
title={withChord('toggleRightPanel', 'Show Right Side')}
|
|
102
|
+
aria-label={withChord('toggleRightPanel', 'Show Right Side')}
|
|
103
|
+
>
|
|
104
|
+
<PanelRight size={16} />
|
|
105
|
+
</button>
|
|
106
|
+
) : null}
|
|
107
|
+
{leftToggleInTitle ? (
|
|
108
|
+
<button
|
|
109
|
+
type="button"
|
|
110
|
+
onClick={onExpandSidebar}
|
|
111
|
+
className={`${CONTROL_BOX.desktop} flex-shrink-0 hover:bg-ink/10 transition-colors text-ink/60 hover:text-ink cursor-pointer titlebar-no-drag`}
|
|
112
|
+
title={withChord('toggleSidebar', 'Expand Sidebar')}
|
|
113
|
+
aria-label={withChord('toggleSidebar', 'Expand Sidebar')}
|
|
114
|
+
>
|
|
115
|
+
<PanelLeft size={16} />
|
|
116
|
+
</button>
|
|
117
|
+
) : null}
|
|
118
|
+
{/* While the left panel is hidden, its 44px bar has no room for the app
|
|
119
|
+
name, so the wordmark leads the session title here. Open, the name
|
|
120
|
+
stays in the left bar above the dock. */}
|
|
121
|
+
{sidebarOpen ? null : (
|
|
122
|
+
<>
|
|
123
|
+
<span className="relative flex flex-shrink-0 items-center titlebar-no-drag">
|
|
124
|
+
<BrandWordmark glow />
|
|
125
|
+
<span className="absolute -top-0.5 -right-1.5 flex">
|
|
126
|
+
<StreamStatusDot status={streamStatus} />
|
|
127
|
+
</span>
|
|
128
|
+
</span>
|
|
129
|
+
<span className="shrink-0 text-xs text-ink/35" aria-hidden="true">/</span>
|
|
130
|
+
</>
|
|
131
|
+
)}
|
|
132
|
+
<div className="flex min-w-0 items-center gap-1.5 titlebar-no-drag">
|
|
133
|
+
{rename.isEditing ? (
|
|
134
|
+
<input
|
|
135
|
+
ref={rename.inputRef}
|
|
136
|
+
autoFocus
|
|
137
|
+
value={rename.draft}
|
|
138
|
+
onInput={(e) => rename.setDraft(e.currentTarget.value)}
|
|
139
|
+
onKeyDown={rename.handleKeyDown}
|
|
140
|
+
onBlur={rename.handleBlur}
|
|
141
|
+
className="w-48 min-w-0 bg-paper border border-ink/25 rounded px-1.5 py-0.5 text-xs text-ink font-semibold outline-none focus:border-ink/50"
|
|
142
|
+
title="Session title"
|
|
143
|
+
aria-label="Session title"
|
|
144
|
+
/>
|
|
145
|
+
) : (
|
|
146
|
+
<>
|
|
147
|
+
<span className="session-title-label flex min-w-0 items-center gap-1.5 font-semibold text-xs text-ink">
|
|
148
|
+
{sessionTitle && folder ? (
|
|
149
|
+
<>
|
|
150
|
+
<WorkspaceMark folder={folder} size={12} className="text-ink/50" />
|
|
151
|
+
<span className="min-w-0 max-w-[45%] truncate uppercase tracking-wide text-ink/45" title={folder.name}>
|
|
152
|
+
{folder.name}
|
|
153
|
+
</span>
|
|
154
|
+
<span className="shrink-0 text-ink/35" aria-hidden="true">/</span>
|
|
155
|
+
</>
|
|
156
|
+
) : null}
|
|
157
|
+
<span className="min-w-0 truncate">
|
|
158
|
+
{sessionTitle ? sessionTitle.charAt(0).toUpperCase() + sessionTitle.slice(1) : 'No session selected'}
|
|
159
|
+
</span>
|
|
160
|
+
</span>
|
|
161
|
+
{renaming && (
|
|
162
|
+
<Loader2
|
|
163
|
+
size={12}
|
|
164
|
+
className="animate-spin text-ink/50 shrink-0"
|
|
165
|
+
role="status"
|
|
166
|
+
aria-label="Generating a session name…"
|
|
167
|
+
/>
|
|
168
|
+
)}
|
|
169
|
+
{hasSessionActions && (
|
|
170
|
+
<button
|
|
171
|
+
type="button"
|
|
172
|
+
onClick={menu.openBelow}
|
|
173
|
+
title="Session actions"
|
|
174
|
+
aria-label="Session actions"
|
|
175
|
+
aria-haspopup="menu"
|
|
176
|
+
aria-expanded={menu.anchor !== null}
|
|
177
|
+
className="p-1 rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer flex-shrink-0"
|
|
178
|
+
>
|
|
179
|
+
<MoreHorizontal size={14} />
|
|
180
|
+
</button>
|
|
181
|
+
)}
|
|
182
|
+
</>
|
|
183
|
+
)}
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
{menu.anchor && sessionActions && (
|
|
187
|
+
<SessionActionsMenu
|
|
188
|
+
anchor={menu.anchor}
|
|
189
|
+
isArchived={sessionActions.isArchived}
|
|
190
|
+
onRename={sessionActions.onRename ? rename.startRename : undefined}
|
|
191
|
+
onRenameWithAi={sessionActions.onRenameWithAi}
|
|
192
|
+
onArchive={sessionActions.onArchive}
|
|
193
|
+
onDelete={sessionActions.onDelete}
|
|
194
|
+
onClose={menu.close}
|
|
195
|
+
/>
|
|
196
|
+
)}
|
|
197
|
+
</div>
|
|
198
|
+
);
|
|
199
|
+
}
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The three top bars are separate surfaces over three DIFFERENT columns:
|
|
8
|
+
*
|
|
9
|
+
* APP bar → the left panel's width
|
|
10
|
+
* TITLE bar → the chat timeline's width
|
|
11
|
+
* CONTROLS bar → the right panel's width
|
|
12
|
+
*
|
|
13
|
+
* The bug this pins is the old shared header: the title and the control
|
|
14
|
+
* cluster sat in one row, so the cluster decided how much of the title
|
|
15
|
+
* survived, and there was no bar that could be "as wide as the chat". Each
|
|
16
|
+
* component is the whole bar here, and each carries its own marker.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { afterAll, afterEach, beforeAll, describe, expect, test } from 'bun:test';
|
|
20
|
+
import { Window } from 'happy-dom';
|
|
21
|
+
import { h, render } from 'preact';
|
|
22
|
+
import { act } from 'preact/test-utils';
|
|
23
|
+
|
|
24
|
+
import { LeftBar } from '@/client/components/layout/left-bar';
|
|
25
|
+
import { SessionTitleBar } from '@/client/components/layout/session-title-bar';
|
|
26
|
+
import { ControlsBar } from '@/client/components/layout/controls-bar';
|
|
27
|
+
import { SessionStateProvider } from '@/client/components/common/session-state-provider/index';
|
|
28
|
+
import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
|
|
29
|
+
import { primeKabmoSettings } from '@/shared/lib/settings/client';
|
|
30
|
+
import { primeAuthState } from '@/client/hooks/ui/auth';
|
|
31
|
+
import { CONTROL_BOX_PX, railAlignedInset } from '@/client/lib/ui/control-plate';
|
|
32
|
+
import type { WorkspaceFolderData } from '@/shared/types';
|
|
33
|
+
|
|
34
|
+
const WORKSPACE: WorkspaceFolderData = {
|
|
35
|
+
id: 1,
|
|
36
|
+
name: 'kabmo',
|
|
37
|
+
isExpanded: true,
|
|
38
|
+
sessions: [],
|
|
39
|
+
hasMore: false,
|
|
40
|
+
totalSessions: 0,
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
let container: HTMLElement;
|
|
44
|
+
|
|
45
|
+
beforeAll(() => {
|
|
46
|
+
installDomGlobals(new Window({ url: 'http://localhost' }));
|
|
47
|
+
primeKabmoSettings({});
|
|
48
|
+
primeAuthState(true, false);
|
|
49
|
+
globalThis.fetch = Object.assign(
|
|
50
|
+
async () =>
|
|
51
|
+
new Response(
|
|
52
|
+
JSON.stringify({
|
|
53
|
+
sessionId: 'session-1',
|
|
54
|
+
state: {},
|
|
55
|
+
panels: [],
|
|
56
|
+
marketplaces: [],
|
|
57
|
+
errors: [],
|
|
58
|
+
plugins: [],
|
|
59
|
+
catalog: [],
|
|
60
|
+
disabledPanels: [],
|
|
61
|
+
gitStatus: {},
|
|
62
|
+
autoUpdate: false,
|
|
63
|
+
syncBlocked: {},
|
|
64
|
+
registries: [],
|
|
65
|
+
ready: true,
|
|
66
|
+
}),
|
|
67
|
+
{ status: 200 },
|
|
68
|
+
),
|
|
69
|
+
{ preconnect: async () => {} },
|
|
70
|
+
);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
afterAll(() => {
|
|
74
|
+
restoreDomGlobals();
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
afterEach(() => {
|
|
78
|
+
if (container) render(null, container);
|
|
79
|
+
container?.remove();
|
|
80
|
+
document.documentElement.removeAttribute('data-chrome');
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
async function mount(node: any) {
|
|
84
|
+
container = document.createElement('div');
|
|
85
|
+
document.body.appendChild(container);
|
|
86
|
+
await act(async () => {
|
|
87
|
+
render(node, container);
|
|
88
|
+
});
|
|
89
|
+
for (let i = 0; i < 4; i += 1) await act(async () => {});
|
|
90
|
+
return container;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
describe('top bars', () => {
|
|
94
|
+
test('the left bar carries the sidebar toggle', async () => {
|
|
95
|
+
let toggles = 0;
|
|
96
|
+
const el = await mount(
|
|
97
|
+
h(LeftBar, { showLeftPanel: true, onToggleLeftPanel: () => { toggles += 1; } }),
|
|
98
|
+
);
|
|
99
|
+
const bar = el.querySelector('[data-float-bar="app"]');
|
|
100
|
+
// Open, the app name leads this bar above the dock — and marks the bar, so
|
|
101
|
+
// floating chrome can start that card after the shell's window controls.
|
|
102
|
+
expect(bar?.textContent).toContain('Kabmo');
|
|
103
|
+
expect(bar?.hasAttribute('data-app-name')).toBe(true);
|
|
104
|
+
const toggle = [...(bar?.querySelectorAll('button') ?? [])].find((button) =>
|
|
105
|
+
/Collapse Sidebar/.test(button.getAttribute('aria-label') ?? ''),
|
|
106
|
+
);
|
|
107
|
+
expect(toggle).toBeDefined();
|
|
108
|
+
await act(async () => { toggle?.click(); });
|
|
109
|
+
expect(toggles).toBe(1);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
test('a collapsed left bar keeps the toggle but drops the app name', async () => {
|
|
113
|
+
let toggles = 0;
|
|
114
|
+
const el = await mount(
|
|
115
|
+
h(LeftBar, { showLeftPanel: false, onToggleLeftPanel: () => { toggles += 1; } }),
|
|
116
|
+
);
|
|
117
|
+
const bar = el.querySelector('[data-float-bar="app"]');
|
|
118
|
+
expect(bar?.textContent).not.toContain('Kabmo');
|
|
119
|
+
// No name, no card offset: this bar is narrower than the shell's controls.
|
|
120
|
+
expect(bar?.hasAttribute('data-app-name')).toBe(false);
|
|
121
|
+
const toggle = [...(bar?.querySelectorAll('button') ?? [])].find((button) =>
|
|
122
|
+
/Expand Sidebar/.test(button.getAttribute('aria-label') ?? ''),
|
|
123
|
+
);
|
|
124
|
+
expect(toggle).toBeDefined();
|
|
125
|
+
await act(async () => { toggle?.click(); });
|
|
126
|
+
expect(toggles).toBe(1);
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
test('the title bar is its own card, and the controls are not in it', async () => {
|
|
130
|
+
const el = await mount(h(SessionTitleBar, {
|
|
131
|
+
sessionTitle: 'Fix auth flow',
|
|
132
|
+
sessionId: 'session-1',
|
|
133
|
+
sidebarOpen: true,
|
|
134
|
+
leftBarVisible: true,
|
|
135
|
+
onExpandSidebar: () => {},
|
|
136
|
+
rightSideHidden: false,
|
|
137
|
+
onToggleRightSide: () => {},
|
|
138
|
+
}));
|
|
139
|
+
const title = el.querySelector('[data-session-title]');
|
|
140
|
+
// The left panel is open, so the app name stays in its own bar.
|
|
141
|
+
expect(title?.textContent).not.toContain('Kabmo');
|
|
142
|
+
expect(title?.textContent).toContain('Fix auth flow');
|
|
143
|
+
expect(el.querySelector('[data-float-bar="controls"]')).toBeNull();
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
test('the title leads with the workspace mark and its uppercase name', async () => {
|
|
147
|
+
const el = await mount(h(SessionTitleBar, {
|
|
148
|
+
sessionTitle: 'Fix auth flow',
|
|
149
|
+
folder: WORKSPACE,
|
|
150
|
+
sessionId: 'session-1',
|
|
151
|
+
sidebarOpen: true,
|
|
152
|
+
leftBarVisible: true,
|
|
153
|
+
onExpandSidebar: () => {},
|
|
154
|
+
rightSideHidden: false,
|
|
155
|
+
onToggleRightSide: () => {},
|
|
156
|
+
}));
|
|
157
|
+
const title = el.querySelector('[data-session-title]');
|
|
158
|
+
expect(title?.textContent).toMatch(/kabmo\s*\/\s*Fix auth flow/);
|
|
159
|
+
// The project's glyph, in the one slot before the label.
|
|
160
|
+
expect(title?.querySelectorAll('svg')).toHaveLength(1);
|
|
161
|
+
const folderName = [...(title?.querySelectorAll('span') ?? [])].find((span) => span.textContent === 'kabmo');
|
|
162
|
+
expect(folderName?.className).toContain('uppercase');
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
test('a custom workspace icon replaces the glyph', async () => {
|
|
166
|
+
const el = await mount(h(SessionTitleBar, {
|
|
167
|
+
sessionTitle: 'Fix auth flow',
|
|
168
|
+
folder: { ...WORKSPACE, customIconUrl: 'https://example.test/icon.png' },
|
|
169
|
+
sessionId: 'session-1',
|
|
170
|
+
sidebarOpen: true,
|
|
171
|
+
leftBarVisible: true,
|
|
172
|
+
onExpandSidebar: () => {},
|
|
173
|
+
rightSideHidden: false,
|
|
174
|
+
onToggleRightSide: () => {},
|
|
175
|
+
}));
|
|
176
|
+
const title = el.querySelector('[data-session-title]');
|
|
177
|
+
expect(title?.querySelector('img')?.getAttribute('src')).toBe('https://example.test/icon.png');
|
|
178
|
+
expect(title?.querySelector('svg')).toBeNull();
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
test('without a workspace folder the title draws no separator', async () => {
|
|
182
|
+
const el = await mount(h(SessionTitleBar, {
|
|
183
|
+
sessionTitle: 'Fix auth flow',
|
|
184
|
+
sessionId: 'session-1',
|
|
185
|
+
sidebarOpen: true,
|
|
186
|
+
leftBarVisible: true,
|
|
187
|
+
onExpandSidebar: () => {},
|
|
188
|
+
rightSideHidden: false,
|
|
189
|
+
onToggleRightSide: () => {},
|
|
190
|
+
}));
|
|
191
|
+
const title = el.querySelector('[data-session-title]');
|
|
192
|
+
expect(title?.textContent).not.toContain('/');
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
test('a collapsed left column separates the app name from the folder and title', async () => {
|
|
196
|
+
const el = await mount(h(SessionTitleBar, {
|
|
197
|
+
sessionTitle: 'Fix auth flow',
|
|
198
|
+
folder: WORKSPACE,
|
|
199
|
+
sessionId: 'session-1',
|
|
200
|
+
sidebarOpen: false,
|
|
201
|
+
leftBarVisible: false,
|
|
202
|
+
onExpandSidebar: () => {},
|
|
203
|
+
rightSideHidden: false,
|
|
204
|
+
onToggleRightSide: () => {},
|
|
205
|
+
}));
|
|
206
|
+
const bar = el.querySelector('[data-session-title]');
|
|
207
|
+
expect(bar?.textContent).toMatch(/Kabmo\s*\/\s*kabmo\s*\/\s*Fix auth flow/);
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
test('a collapsed left column hands the expand control to the title bar', async () => {
|
|
211
|
+
let expanded = 0;
|
|
212
|
+
const el = await mount(
|
|
213
|
+
h(SessionTitleBar, {
|
|
214
|
+
sessionTitle: 'Fix auth flow',
|
|
215
|
+
sessionId: 'session-1',
|
|
216
|
+
sidebarOpen: false,
|
|
217
|
+
leftBarVisible: false,
|
|
218
|
+
onExpandSidebar: () => { expanded += 1; },
|
|
219
|
+
rightSideHidden: false,
|
|
220
|
+
onToggleRightSide: () => {},
|
|
221
|
+
}),
|
|
222
|
+
);
|
|
223
|
+
const bar = el.querySelector('[data-session-title]');
|
|
224
|
+
const toggle = [...(bar?.querySelectorAll('button') ?? [])].find((button) =>
|
|
225
|
+
/Expand Sidebar/.test(button.getAttribute('aria-label') ?? ''),
|
|
226
|
+
);
|
|
227
|
+
expect(toggle).toBeDefined();
|
|
228
|
+
await act(async () => { toggle?.click(); });
|
|
229
|
+
expect(expanded).toBe(1);
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
test('a rail-only left column keeps its toggle in the left bar, not the title', async () => {
|
|
233
|
+
const el = await mount(
|
|
234
|
+
h(SessionTitleBar, {
|
|
235
|
+
sessionTitle: 'Fix auth flow',
|
|
236
|
+
sessionId: 'session-1',
|
|
237
|
+
sidebarOpen: false,
|
|
238
|
+
leftBarVisible: true,
|
|
239
|
+
onExpandSidebar: () => {},
|
|
240
|
+
rightSideHidden: false,
|
|
241
|
+
onToggleRightSide: () => {},
|
|
242
|
+
}),
|
|
243
|
+
);
|
|
244
|
+
const bar = el.querySelector('[data-session-title]');
|
|
245
|
+
// The left panel is hidden, so the app name lives beside the title here.
|
|
246
|
+
expect(bar?.textContent).toContain('Kabmo');
|
|
247
|
+
expect(
|
|
248
|
+
[...(bar?.querySelectorAll('button') ?? [])].some((button) =>
|
|
249
|
+
/Expand Sidebar/.test(button.getAttribute('aria-label') ?? ''),
|
|
250
|
+
),
|
|
251
|
+
).toBe(false);
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
test('an open left column draws no expand control in the title bar', async () => {
|
|
255
|
+
const el = await mount(
|
|
256
|
+
h(SessionTitleBar, {
|
|
257
|
+
sessionTitle: 'Fix auth flow',
|
|
258
|
+
sessionId: 'session-1',
|
|
259
|
+
sidebarOpen: true,
|
|
260
|
+
leftBarVisible: true,
|
|
261
|
+
onExpandSidebar: () => {},
|
|
262
|
+
rightSideHidden: false,
|
|
263
|
+
onToggleRightSide: () => {},
|
|
264
|
+
}),
|
|
265
|
+
);
|
|
266
|
+
const bar = el.querySelector('[data-session-title]');
|
|
267
|
+
expect(bar?.textContent).not.toContain('Kabmo');
|
|
268
|
+
expect(
|
|
269
|
+
[...(bar?.querySelectorAll('button') ?? [])].some((button) =>
|
|
270
|
+
/Expand Sidebar/.test(button.getAttribute('aria-label') ?? ''),
|
|
271
|
+
),
|
|
272
|
+
).toBe(false);
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
test('a hidden right side hands its toggle to the title bar', async () => {
|
|
276
|
+
let toggles = 0;
|
|
277
|
+
const el = await mount(
|
|
278
|
+
h(SessionTitleBar, {
|
|
279
|
+
sessionTitle: 'Fix auth flow',
|
|
280
|
+
sessionId: 'session-1',
|
|
281
|
+
sidebarOpen: true,
|
|
282
|
+
leftBarVisible: true,
|
|
283
|
+
onExpandSidebar: () => {},
|
|
284
|
+
rightSideHidden: true,
|
|
285
|
+
onToggleRightSide: () => { toggles += 1; },
|
|
286
|
+
}),
|
|
287
|
+
);
|
|
288
|
+
const bar = el.querySelector('[data-session-title]');
|
|
289
|
+
const toggle = [...(bar?.querySelectorAll('button') ?? [])].find((button) =>
|
|
290
|
+
/Show Right Side/.test(button.getAttribute('aria-label') ?? ''),
|
|
291
|
+
);
|
|
292
|
+
expect(toggle).toBeDefined();
|
|
293
|
+
// The fallback control must sit on the rail's axis, not at a flat 4px:
|
|
294
|
+
// otherwise the toggle jumps when the side is shown and the controls bar
|
|
295
|
+
// (inset by the same rule) takes over.
|
|
296
|
+
expect(toggle?.getAttribute('style')).toContain(`right: ${railAlignedInset(CONTROL_BOX_PX.desktop)}`);
|
|
297
|
+
await act(async () => { toggle?.click(); });
|
|
298
|
+
expect(toggles).toBe(1);
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
test('a floating shell leaves the hidden side’s toggle to its controls card', async () => {
|
|
302
|
+
// The floating chrome moves the controls bar out of the collapsed column
|
|
303
|
+
// and onto this row, so a fallback toggle here would be a second control
|
|
304
|
+
// for one action.
|
|
305
|
+
document.documentElement.setAttribute('data-chrome', 'floating');
|
|
306
|
+
let toggles = 0;
|
|
307
|
+
const el = await mount(
|
|
308
|
+
h(SessionTitleBar, {
|
|
309
|
+
sessionTitle: 'Fix auth flow',
|
|
310
|
+
sessionId: 'session-1',
|
|
311
|
+
sidebarOpen: true,
|
|
312
|
+
leftBarVisible: true,
|
|
313
|
+
onExpandSidebar: () => {},
|
|
314
|
+
rightSideHidden: true,
|
|
315
|
+
onToggleRightSide: () => { toggles += 1; },
|
|
316
|
+
}),
|
|
317
|
+
);
|
|
318
|
+
const bar = el.querySelector('[data-session-title]');
|
|
319
|
+
expect(bar?.querySelectorAll('button').length).toBe(0);
|
|
320
|
+
expect(toggles).toBe(0);
|
|
321
|
+
});
|
|
322
|
+
|
|
323
|
+
test('the controls bar is its own card', async () => {
|
|
324
|
+
const el = await mount(
|
|
325
|
+
h(SessionStateProvider, {
|
|
326
|
+
sessionId: 'session-1',
|
|
327
|
+
children: h(ControlsBar, { sessionId: 'session-1', showRightSide: true, onToggleRightSide: () => {} }),
|
|
328
|
+
}),
|
|
329
|
+
);
|
|
330
|
+
const bar = el.querySelector('[data-float-bar="controls"]');
|
|
331
|
+
expect(bar).toBeTruthy();
|
|
332
|
+
expect(bar?.textContent).not.toContain('Fix auth flow');
|
|
333
|
+
// The bar shares its right edge with the 44px activity rail below it, so
|
|
334
|
+
// its last control is inset by half the difference — the same axis every
|
|
335
|
+
// rail mark sits on.
|
|
336
|
+
expect((bar as HTMLElement).style.paddingRight).toContain(railAlignedInset(CONTROL_BOX_PX.desktop));
|
|
337
|
+
});
|
|
338
|
+
});
|
|
@@ -3,6 +3,8 @@ import { useSearchParams } from '@/client/lib/router/search-params';
|
|
|
3
3
|
import { clearBranchParams, newSessionParams } from '@/client/lib/router/branch-params';
|
|
4
4
|
import { useMobileWorkspacePanels } from '@/client/hooks/workspace/mobile-workspace-panels';
|
|
5
5
|
import { useKabmoEvent } from '@/client/hooks/ui/window-event';
|
|
6
|
+
import { usePresence } from '@/client/hooks/ui/presence';
|
|
7
|
+
import { OVERLAY_EXIT_MS } from '@/shared/lib/ui/motion';
|
|
6
8
|
import { useMobileBackStack } from '@/client/hooks/workspace/mobile-back';
|
|
7
9
|
import { useMobileDrawerReveals, type MobileScreen } from '@/client/components/mobile/mobile-drawer-reveals';
|
|
8
10
|
import type { JournalDiffRef, SettingsCategoryId } from '@/shared/types';
|
|
@@ -51,6 +53,11 @@ export function MobileLayoutWrapper({ onDesktopToggle, appSettings = {} }: Mobil
|
|
|
51
53
|
// request was a header REVEAL (which must show a view, not the catalog). One
|
|
52
54
|
// hook, because a named open and a header press are the same two facts.
|
|
53
55
|
const drawers = useMobileDrawerReveals({ dock, sessionId: stateSessionId, currentScreen, setCurrentScreen });
|
|
56
|
+
// The right drawer is a SCREEN, so it still unmounts with the screen — but
|
|
57
|
+
// only after its exit: the panels cost real CPU, and keeping them alive
|
|
58
|
+
// behind the chat is what the mount rule exists to avoid. The extra 160ms is
|
|
59
|
+
// the animation, not a second lifetime.
|
|
60
|
+
const rightScreen = usePresence(currentScreen === 'right', OVERLAY_EXIT_MS);
|
|
54
61
|
const [mobileEditorFile, setMobileEditorFile] = useState<MobileEditorFile | null>(null);
|
|
55
62
|
const [mobileDiff, setMobileDiff] = useState<{ path: string; status?: string; staged?: boolean; repo?: string; root?: string; journal?: JournalDiffRef } | null>(null);
|
|
56
63
|
// Bumped whenever a write lands so the workspace panels (explorer, git,
|
|
@@ -277,8 +284,12 @@ export function MobileLayoutWrapper({ onDesktopToggle, appSettings = {} }: Mobil
|
|
|
277
284
|
session screen above stays mounted on purpose: its status-ack effect
|
|
278
285
|
must run even while the drawer is closed, and its stream poll is
|
|
279
286
|
already inert when nothing is running. */}
|
|
280
|
-
{
|
|
281
|
-
<div
|
|
287
|
+
{rightScreen.mounted && (
|
|
288
|
+
<div
|
|
289
|
+
className={`flex-1 min-h-0 w-full ${rightScreen.leaving ? 'presence-leaving pointer-events-none' : 'presence-fade'}`}
|
|
290
|
+
data-presence={rightScreen.leaving ? 'leaving' : 'open'}
|
|
291
|
+
inert={rightScreen.leaving}
|
|
292
|
+
>
|
|
282
293
|
<MobileRightSidebar
|
|
283
294
|
enabled={hasContext}
|
|
284
295
|
rootPath={activeProjectPath ?? undefined}
|
|
@@ -257,15 +257,17 @@ export function MobileSessionSidebar({
|
|
|
257
257
|
tabs={tabHandle}
|
|
258
258
|
pinned={SESSIONS_VIEW_ID}
|
|
259
259
|
homeTitle="Panel kiri"
|
|
260
|
-
// The strip is
|
|
261
|
-
//
|
|
262
|
-
// the notch
|
|
263
|
-
//
|
|
264
|
-
|
|
265
|
-
// handle and a phone put the chips under the status bar.
|
|
266
|
-
stripProps={drawerStripProps(panelMenu.surfaceProps)}
|
|
260
|
+
// The strip is an INTERIOR row here: the wordmark header above keeps
|
|
261
|
+
// the window contract (drag region, notch, close control), so the
|
|
262
|
+
// strip must not repeat the notch/56px title bar — that was the gap
|
|
263
|
+
// above the chips on a phone with a safe area.
|
|
264
|
+
stripProps={drawerStripProps(panelMenu.surfaceProps, { titleBar: false })}
|
|
267
265
|
>
|
|
268
|
-
|
|
266
|
+
{/* A flex COLUMN, not a bare h-full box: the body is a list that
|
|
267
|
+
scrolls (`flex-1`) between a toolbar and the batch bar, and in a
|
|
268
|
+
block parent its `flex-1` is inert — it grew to its content and
|
|
269
|
+
painted over the drawer footer below. */}
|
|
270
|
+
<div className="flex h-full w-full min-h-0 flex-col">{drawerBody}</div>
|
|
269
271
|
</PanelTabsColumn>
|
|
270
272
|
</div>
|
|
271
273
|
) : null}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The tabbed phone drawer's LAYOUT, as a contract rather than a picture.
|
|
8
|
+
*
|
|
9
|
+
* Two defects lived here and happy-dom cannot lay out, so the behaviour suite
|
|
10
|
+
* next door asserted neither:
|
|
11
|
+
*
|
|
12
|
+
* - the tab body was a plain `h-full` block, so the session list's `flex-1` was
|
|
13
|
+
* inert, the list grew to its content and painted over the drawer footer;
|
|
14
|
+
* - the strip took the MOBILE title-bar density under a header that already owns
|
|
15
|
+
* the title bar, adding a second 56px band and a second safe-area inset.
|
|
16
|
+
*
|
|
17
|
+
* The class contract is what this suite can hold; `mobile-dock.e2e.ts` measures
|
|
18
|
+
* the pixels on a Pixel-7 viewport with an overflowing list.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, test } from 'bun:test';
|
|
22
|
+
import {
|
|
23
|
+
disposeDrawerHarness,
|
|
24
|
+
installDrawerHarness,
|
|
25
|
+
mountDrawer,
|
|
26
|
+
resetDrawerHarness,
|
|
27
|
+
teardownDrawerHarness,
|
|
28
|
+
} from '@/test-support/left-drawer-harness.test-util';
|
|
29
|
+
|
|
30
|
+
let container: HTMLElement;
|
|
31
|
+
|
|
32
|
+
beforeAll(installDrawerHarness);
|
|
33
|
+
afterAll(teardownDrawerHarness);
|
|
34
|
+
beforeEach(() => {
|
|
35
|
+
container = resetDrawerHarness();
|
|
36
|
+
});
|
|
37
|
+
afterEach(disposeDrawerHarness);
|
|
38
|
+
|
|
39
|
+
describe('the tabs chrome is bounded', () => {
|
|
40
|
+
test('the body is a flex column, so the list cannot cover the footer', async () => {
|
|
41
|
+
await mountDrawer(container, 'tabs');
|
|
42
|
+
const strip = container.querySelector('[role="tablist"]') as HTMLElement;
|
|
43
|
+
// `PanelTabsColumn` draws strip → body scroller → its mounted-body box →
|
|
44
|
+
// the caller's body box.
|
|
45
|
+
const body = strip.nextElementSibling?.firstElementChild?.firstElementChild as HTMLElement | null;
|
|
46
|
+
expect(body).not.toBeNull();
|
|
47
|
+
// A bare `h-full` block left the list's `flex-1` inert: it grew to its
|
|
48
|
+
// content and painted over the footer below. The fix is the same shape the
|
|
49
|
+
// `classic` chrome gets from the drawer's own flex column.
|
|
50
|
+
expect(body?.className).toContain('flex-col');
|
|
51
|
+
expect(body?.className).toContain('min-h-0');
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
test('the strip is an interior 40px row under the wordmark header', async () => {
|
|
55
|
+
await mountDrawer(container, 'tabs');
|
|
56
|
+
const strip = container.querySelector('[role="tablist"]') as HTMLElement;
|
|
57
|
+
// The header above owns the window contract (drag region, notch, 56px
|
|
58
|
+
// title bar). A strip that repeated it pushed the chips a second notch
|
|
59
|
+
// down and cost another 56px — the reported "tabs too far from the top".
|
|
60
|
+
expect(strip.style.height).toBe('2.5rem');
|
|
61
|
+
expect(strip.style.paddingTop).toBe('0px');
|
|
62
|
+
// The chip itself keeps its 36px touch height; only the ROW loses the
|
|
63
|
+
// title bar.
|
|
64
|
+
const chip = container.querySelector('[role="tab"]') as HTMLElement;
|
|
65
|
+
expect(chip.className).toContain('h-9');
|
|
66
|
+
});
|
|
67
|
+
});
|