@kabmo-labs/kabmo 0.61.0 → 0.62.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/README.md +53 -49
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +1157 -825
- package/dist/client/static/js/{Body-ab8wswhm.js → Body-z6kstvk6.js} +3 -3
- package/dist/client/static/js/{CsvGrid-czssywvz.js → CsvGrid-f73c0s4e.js} +2 -2
- package/dist/client/static/js/{DocxView-ke0dwdmt.js → DocxView-a1pb7nsb.js} +3 -3
- package/dist/client/static/js/{DrawioView-a1whhy84.js → DrawioView-r61gcg24.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-dr32dwjy.js → HtmlPreview-vt7j0b05.js} +1 -1
- package/dist/client/static/js/ImageView-4nhr5dtm.js +1 -0
- package/dist/client/static/js/LayoutWrapper-vwhy0vhj.js +2 -0
- package/dist/client/static/js/MergeDiffView-f4h9ss71.js +1 -0
- package/dist/client/static/js/Modal-cadmjkak.js +60 -0
- package/dist/client/static/js/{PdfView-2kdn91f9.js → PdfView-mppt2gkd.js} +1 -1
- package/dist/client/static/js/SessionsView-vvsaw9f0.js +1 -0
- package/dist/client/static/js/{SheetView-ettr9pdw.js → SheetView-5s9zfx9g.js} +9 -9
- package/dist/client/static/js/{SvgPreview-hzcejjry.js → SvgPreview-ff78xn3e.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-kdmv4y72.js → abnfDiagram-O67JEVCF-p29sh3w2.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-83w3kytq.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-qyrwaq0x.js → architectureDiagram-NJMV4G6O-nbpdyea3.js} +3 -3
- package/dist/client/static/js/{astro-yphdvdty.js → astro-qtfmc8x7.js} +1 -1
- package/dist/client/static/js/bash-wcy12qjx.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-tszxy2g7.js → blockDiagram-BEXU5L5S-t8xbexa6.js} +6 -6
- package/dist/client/static/js/c-vvantfth.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-0ye36hhv.js → c4Diagram-YGBWAQC7-9fwf2zxk.js} +3 -3
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-szgk1shv.js → classDiagram-v2-NBCMYWYE-nbapgqbs.js} +4 -4
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-0s9s4mmv.js → cose-bilkent-JH36ORCC-k54mmydp.js} +1 -1
- package/dist/client/static/js/cpp-5x63r6g0.js +1 -0
- package/dist/client/static/js/css-j2j6f03w.js +1 -0
- package/dist/client/static/js/css-qk59j6rj.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-80z02zrj.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-664g28ze.js → cynefinDiagram-VND7K2PF-qdg32wah.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-ga4rp1jx.js → dagre-6A5THRUB-qzshg1vs.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-aagj46ty.js → diagram-22UHCM2B-197hemfa.js} +11 -11
- package/dist/client/static/js/{diagram-3UASUU5V-20qk6whk.js → diagram-3UASUU5V-236gnjr6.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-1vg1tfca.js → diagram-ATOU4E4O-vjgpyaaq.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-90d6jrqs.js → diagram-CDSNMT55-ywvzcx7z.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-8je4z8m1.js → diagram-MLGK6HIB-9ey7ev7j.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-0kzpexsj.js → diagram-MPIPVDR6-vrqbb6r7.js} +2 -2
- package/dist/client/static/js/{dockerfile-5nrbr0ef.js → dockerfile-4nked309.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-47yg36zx.js → ebnfDiagram-ZINNZB2B-hvnkevqy.js} +1 -1
- package/dist/client/static/js/{elixir-3nwnd9yw.js → elixir-3jvh6v4k.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-5hqp6r2d.js → elk-276RUBZZ-nej6yy1c.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-bt9te7r0.js → erDiagram-OPXOYQCR-ww453xcy.js} +5 -5
- package/dist/client/static/js/{erlang-p5c4n3t0.js → erlang-4fz73a1q.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-y9pq2709.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-e6v7513q.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-kzc13swm.js → ganttDiagram-FUAMR5RP-abc5wy70.js} +3 -3
- package/dist/client/static/js/gitGraph-4MIJSDKK-fzaf9azs.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-bjf8aa3j.js → gitGraphDiagram-X574FWY7-4acqzj2h.js} +7 -7
- package/dist/client/static/js/graphql-hpkvdvk7.js +1 -0
- package/dist/client/static/js/html-x12gb1wk.js +1 -0
- package/dist/client/static/js/{index-v88m5sva.js → index-0g82ph6h.js} +2 -2
- package/dist/client/static/js/{index-1fmjhm2d.js → index-0w1jzang.js} +5 -5
- package/dist/client/static/js/{index-kj70d2q9.js → index-1svt0cdw.js} +2 -2
- package/dist/client/static/js/{index-m24sebb0.js → index-1tb4py5v.js} +2 -2
- package/dist/client/static/js/index-2gt9krtj.js +4 -0
- package/dist/client/static/js/index-2x9m7s1a.js +1 -0
- package/dist/client/static/js/index-3fvqmz3m.js +4 -0
- package/dist/client/static/js/{index-k9yf2txw.js → index-42wvbkm5.js} +2 -2
- package/dist/client/static/js/index-477vtt51.js +2 -0
- package/dist/client/static/js/{index-ca6tmamh.js → index-4px56qaz.js} +2 -2
- package/dist/client/static/js/{index-excgtjhx.js → index-5anvw7xg.js} +36 -36
- package/dist/client/static/js/index-5nb9k2ph.js +1 -0
- package/dist/client/static/js/{index-97sw4d9n.js → index-615je3km.js} +2 -2
- package/dist/client/static/js/{index-jz4012t5.js → index-66qxrh5n.js} +1 -1
- package/dist/client/static/js/{index-a145x0w2.js → index-7kct1sz1.js} +2 -2
- package/dist/client/static/js/{index-hwv7bfxc.js → index-8e0d8y30.js} +2 -2
- package/dist/client/static/js/{index-s4j2ghmx.js → index-90bq56xw.js} +2 -2
- package/dist/client/static/js/{index-wsy6y5em.js → index-b1gzh60t.js} +11 -11
- package/dist/client/static/js/{index-10vzyga1.js → index-bypkmjrz.js} +2 -2
- package/dist/client/static/js/{index-n8r7r86r.js → index-c1vd63yd.js} +2 -2
- package/dist/client/static/js/index-c9f0hejv.js +3 -0
- package/dist/client/static/js/{index-2dmew334.js → index-cgqj15g0.js} +2 -2
- package/dist/client/static/js/{index-mtav0rpf.js → index-cts5re1t.js} +2 -2
- package/dist/client/static/js/index-dxc14kmm.js +1 -0
- package/dist/client/static/js/{index-krdz5vby.js → index-dxyjxhm1.js} +2 -2
- package/dist/client/static/js/{index-zr3965k9.js → index-edpyqz9f.js} +1 -1
- package/dist/client/static/js/{index-h7agc069.js → index-eesepb70.js} +2 -2
- package/dist/client/static/js/{index-r38e0rya.js → index-evh437bz.js} +2 -2
- package/dist/client/static/js/index-ey6v4t5b.js +1 -0
- package/dist/client/static/js/{index-025s3fp8.js → index-fsd7n336.js} +2 -2
- package/dist/client/static/js/{index-yfcy4cf6.js → index-h7a7fqag.js} +2 -2
- package/dist/client/static/js/{index-11qn05g9.js → index-hffgwnvz.js} +2 -2
- package/dist/client/static/js/index-j734ev6q.js +482 -0
- package/dist/client/static/js/{index-9g2nzgpx.js → index-jcbp1d9d.js} +6 -6
- package/dist/client/static/js/index-jg5h18sm.js +2 -0
- package/dist/client/static/js/{index-bq9f0mxp.js → index-jtdve6xw.js} +7 -7
- package/dist/client/static/js/{index-kyr612aa.js → index-k0bqrb1y.js} +1 -1
- package/dist/client/static/js/{index-bdtftrym.js → index-kegevd10.js} +2 -2
- package/dist/client/static/js/{index-fr6wsqk8.js → index-kqcfxkch.js} +2 -2
- package/dist/client/static/js/{index-sr14vwn5.js → index-kv1xnem9.js} +2 -2
- package/dist/client/static/js/{index-xy0m8te9.js → index-m54ctmxr.js} +1 -1
- package/dist/client/static/js/index-mgzbypt5.js +314 -0
- package/dist/client/static/js/{index-85jfn1fz.js → index-mh52531j.js} +2 -2
- package/dist/client/static/js/{index-776n5n29.js → index-mhz5ywa4.js} +5 -5
- package/dist/client/static/js/{index-3j2he86h.js → index-nnwdbg3t.js} +2 -2
- package/dist/client/static/js/{index-3x7cbxwq.js → index-nxd6z7f9.js} +2 -2
- package/dist/client/static/js/{index-dabnbvbc.js → index-pjrbt77c.js} +2 -2
- package/dist/client/static/js/index-r7h4pm42.js +2 -0
- package/dist/client/static/js/index-ratrdgc9.js +2 -0
- package/dist/client/static/js/{index-475dc6h9.js → index-rhmvh9w5.js} +2 -2
- package/dist/client/static/js/{index-twwsn91p.js → index-sqzjwy9h.js} +2 -2
- package/dist/client/static/js/{index-z5s9tmj8.js → index-tckzkw0f.js} +2 -2
- package/dist/client/static/js/index-tza9h3q6.css +1 -0
- package/dist/client/static/js/{index-qccydkze.js → index-vhjfr093.js} +2 -2
- package/dist/client/static/js/{index-653x8zdq.js → index-w0j96eyy.js} +8 -8
- package/dist/client/static/js/{index-24a40rw8.js → index-ws04kxy9.js} +1 -1
- package/dist/client/static/js/{index-a3bpmw2r.js → index-x1yqmzpr.js} +2 -2
- package/dist/client/static/js/{index-fb2fjndj.js → index-x2f7wykb.js} +6 -6
- package/dist/client/static/js/index-y8405hdg.js +10 -0
- package/dist/client/static/js/{index-sx83ans2.js → index-yxk7dgnb.js} +2 -2
- package/dist/client/static/js/{index-bkn6jtn1.js → index-zavecxak.js} +2 -2
- package/dist/client/static/js/{index-vn59zz0k.js → index-zg7q3kcb.js} +2 -2
- package/dist/client/static/js/{index-enm77k5z.js → index-zhn9vv3z.js} +2 -2
- package/dist/client/static/js/{index-vgcw01yk.js → index-zy963qbh.js} +1 -1
- package/dist/client/static/js/info-A6RAGUB7-t7pbg7rt.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-jy5zvvj8.js → infoDiagram-VRGFBTTK-9pe7w3r5.js} +2 -2
- package/dist/client/static/js/ini-522adp5a.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-pfky1nnf.js → ishikawaDiagram-OU5B5YK6-38arfrx5.js} +2 -2
- package/dist/client/static/js/java-z0rgs7v6.js +1 -0
- package/dist/client/static/js/javascript-fv87f565.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-mvaf7rfh.js → journeyDiagram-ZHPQQLJL-kcwzjgtz.js} +4 -4
- package/dist/client/static/js/json-1czq1ped.js +1 -0
- package/dist/client/static/js/jsx-1fch2jyr.js +1 -0
- package/dist/client/static/js/{julia-rpd1y9vh.js → julia-pzzxbptm.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-hw2xwe6e.js → kanban-definition-PNTS6WVX-nmegwy9w.js} +15 -15
- package/dist/client/static/js/lua-nn8bpjev.js +1 -0
- package/dist/client/static/js/markdown-38tqrgkn.js +1 -0
- package/dist/client/static/js/{mermaid.core-hsw87hmq.js → mermaid.core-3aae27b9.js} +7 -7
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-wfe4d846.js → mindmap-definition-NLK3R4M7-zsaq4e65.js} +12 -12
- package/dist/client/static/js/one-dark-pro-trnff03z.js +1 -0
- package/dist/client/static/js/one-light-ck31ptqs.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-rwac7scq.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-cvnmxgst.js → pegDiagram-GJSIUBJH-2b6whj1p.js} +1 -1
- package/dist/client/static/js/{perl-kmtz9dnv.js → perl-zdkbbjd2.js} +1 -1
- package/dist/client/static/js/{php-bttrsbxy.js → php-ktaxff6g.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-gjz20apz.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-0n3gz7sv.js → pieDiagram-5QR66LMP-y09ar7vz.js} +3 -3
- package/dist/client/static/js/properties-kncqeqhn.js +1 -0
- package/dist/client/static/js/python-gx8ggmyh.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-9qqh6xvv.js → quadrantDiagram-O4NWA36T-mapfzs06.js} +3 -3
- package/dist/client/static/js/r-x8rftkm3.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-akwdknab.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-m5v4rfhx.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-k2gmqcjb.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-1zdsfjf4.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-e98evqb6.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-5f3x3762.js → railroadDiagram-XR7U4H2S-70qy7qdh.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-a68bv6kh.js → requirementDiagram-PLB6GJNP-2vb2gp3e.js} +3 -3
- package/dist/client/static/js/{ruby-dve3y59w.js → ruby-ytqv3pqz.js} +1 -1
- package/dist/client/static/js/{rust-qjhdt4b0.js → rust-6sddyxnt.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-ry7xcphh.js → sankeyDiagram-IPEJSGJF-9jd8ebrn.js} +3 -3
- package/dist/client/static/js/{sass-emxqt5p2.js → sass-dvbra5b6.js} +1 -1
- package/dist/client/static/js/{scss-4j4t3r6y.js → scss-sy7w8916.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-mekzzhet.js → sequenceDiagram-PO4LG4MO-w7z84f80.js} +7 -7
- package/dist/client/static/js/{sizeCapture-INFHLROL-pvc16ame.js → sizeCapture-INFHLROL-q8w7ehgx.js} +1 -1
- package/dist/client/static/js/sql-99y0qnag.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-3ytxby83.js → stateDiagram-v2-GCMORJYK-4978hapr.js} +3 -3
- package/dist/client/static/js/{svelte-dbsx1ehx.js → svelte-xvs3fkza.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-c2zfp416.js → swimlanes-2SLR337P-eshg5fjy.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-914e28hd.js +8 -0
- package/dist/client/static/js/timeline-definition-EJHVYXUP-5h5q357k.js +120 -0
- package/dist/client/static/js/treeView-Q6P3EWNA-fkm3a7gx.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-hm4ktxjf.js +1 -0
- package/dist/client/static/js/tsx-phngprp0.js +1 -0
- package/dist/client/static/js/typescript-m62a7zr2.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-sz6b7bnv.js → usecaseDiagram-POWQR4AR-4j69y3zx.js} +20 -20
- package/dist/client/static/js/vennDiagram-UO4OBE2U-pa9p5jpw.js +34 -0
- package/dist/client/static/js/{vue-hyr58df9.js → vue-p4g4avm3.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-3y2rvdmy.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-xvtyvde9.js → wardleyDiagram-VNRHLVJA-hjddd656.js} +3 -3
- package/dist/client/static/js/xml-59n0cjn6.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-jcs20s84.js → xychartDiagram-PMCCYNJV-8ng5m849.js} +4 -4
- package/dist/client/static/js/yaml-9fw908s4.js +1 -0
- package/dist/client/tailwindcss-oxide.linux-x64-gnu-c0fa36dv.node +0 -0
- package/dist/client/tailwindcss-oxide.linux-x64-musl-kr04sh0e.node +0 -0
- package/marketplace/plugins/command-runner/package.json +2 -2
- package/marketplace/plugins/command-runner/src/app.tsx +2 -5
- package/marketplace/plugins/command-runner/src/panel/CustomForm.tsx +35 -52
- package/marketplace/plugins/command-runner/src/panel/Groups.tsx +6 -5
- package/marketplace/plugins/command-runner/src/panel/Header.tsx +18 -54
- package/marketplace/plugins/command-runner/src/panel/Output.tsx +3 -7
- package/marketplace/plugins/command-runner/src/panel/Row.tsx +19 -38
- package/marketplace/plugins/command-runner/src/panel/index.tsx +1 -4
- package/marketplace/plugins/git-forge/package.json +2 -2
- package/marketplace/plugins/git-forge/src/app.tsx +2 -0
- package/marketplace/plugins/git-forge/src/panel/Credential.tsx +8 -15
- package/marketplace/plugins/git-forge/src/panel/Header.tsx +35 -66
- package/marketplace/plugins/git-forge/src/panel/ItemView.tsx +7 -13
- package/marketplace/plugins/git-forge/src/panel/List.tsx +28 -56
- package/marketplace/plugins/git-forge/src/panel/Row.tsx +7 -9
- package/marketplace/plugins/git-forge/src/panel/Sidebar.tsx +21 -31
- package/marketplace/plugins/git-forge/src/panel/Write.tsx +26 -40
- package/marketplace/plugins/git-forge/src/panel/index.tsx +0 -1
- package/marketplace/plugins/github-actions/package.json +2 -2
- package/marketplace/plugins/github-actions/src/app.tsx +2 -0
- package/marketplace/plugins/github-actions/src/panel/Actions.tsx +9 -17
- package/marketplace/plugins/github-actions/src/panel/LogView.tsx +4 -13
- package/marketplace/plugins/github-actions/src/panel/Row.tsx +4 -5
- package/marketplace/plugins/github-actions/src/panel/RunView.tsx +8 -15
- package/marketplace/plugins/github-actions/src/panel/index.test.tsx +3 -2
- package/marketplace/plugins/github-actions/src/panel/index.tsx +31 -37
- package/marketplace/plugins/kanban/package.json +2 -2
- package/marketplace/plugins/kanban/src/app.tsx +2 -0
- package/marketplace/plugins/kanban/src/panel/CardSheet.tsx +88 -98
- package/marketplace/plugins/kanban/src/panel/CardTile.tsx +6 -10
- package/marketplace/plugins/kanban/src/panel/StageColumn.tsx +22 -18
- package/marketplace/plugins/kanban/src/panel/StageSheet.tsx +59 -70
- package/marketplace/plugins/kanban/src/panel/index.tsx +37 -52
- package/marketplace/plugins/kanban/src/panel/use-board.ts +2 -0
- package/marketplace/plugins/session-info/package.json +2 -2
- package/marketplace/plugins/session-info/src/app.tsx +6 -3
- package/marketplace/plugins/stats/package.json +2 -2
- package/marketplace/plugins/stats/src/KillConfirm.test.tsx +6 -4
- package/marketplace/plugins/stats/src/KillConfirm.tsx +26 -76
- package/marketplace/plugins/stats/src/ProcessTable.tsx +8 -6
- package/marketplace/plugins/stats/src/RefreshButton.tsx +7 -5
- package/marketplace/plugins/stats/src/app.tsx +11 -9
- package/package.json +10 -10
- package/src/cli/lib/commands/plugin.js +8 -5
- package/src/client/bootstrap.d.ts +5 -0
- package/src/client/chat-title-overlay.test.ts +53 -0
- package/src/client/components/auth/login-screen/index.tsx +31 -3
- package/src/client/components/common/SignOutButton.tsx +4 -5
- package/src/client/components/common/account-badge/index.tsx +31 -0
- package/src/client/components/common/footer-version/index.tsx +40 -0
- package/src/client/components/common/fullscreen-viewer/fullscreen-viewer.test.tsx +24 -0
- package/src/client/components/common/fullscreen-viewer/index.tsx +22 -31
- package/src/client/components/common/header-controls/MoreMenu.tsx +5 -56
- package/src/client/components/common/header-controls/index.test.tsx +2 -6
- package/src/client/components/common/header-controls/index.tsx +9 -25
- package/src/client/components/common/header-controls/phone-row.test.tsx +3 -16
- package/src/client/components/common/shell-update-button/index.tsx +2 -2
- package/src/client/components/common/zoom-pan-stage/index.tsx +54 -50
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +4 -5
- package/src/client/components/layout/desktop-layout/index.tsx +2 -4
- package/src/client/components/layout/left-bar/index.tsx +25 -3
- package/src/client/components/layout/rail-toggle.test.tsx +112 -0
- package/src/client/components/layout/session-sidebar/CategoryHeader.accent.test.tsx +81 -0
- package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +11 -3
- package/src/client/components/layout/session-sidebar/Footer.test.tsx +36 -0
- package/src/client/components/layout/session-sidebar/Footer.tsx +42 -61
- package/src/client/components/layout/session-sidebar/FooterHost.tsx +5 -1
- package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +30 -10
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +4 -0
- package/src/client/components/layout/session-sidebar/modern/index.tsx +8 -1
- package/src/client/components/layout/session-sidebar/modern/workspace-header.test.tsx +25 -4
- package/src/client/components/layout/session-title-bar/index.tsx +13 -5
- package/src/client/components/layout/top-bars.test.tsx +4 -2
- package/src/client/components/mobile/LayoutWrapper.tsx +3 -1
- package/src/client/components/mobile/RightSidebar.tsx +12 -3
- package/src/client/components/mobile/SessionSidebar.tsx +6 -2
- package/src/client/components/mobile/drawer-layout.test.tsx +7 -3
- package/src/client/components/mobile/drawer-strip.tsx +9 -2
- package/src/client/components/mobile/mobile-main-view/Header.test.tsx +29 -9
- package/src/client/components/mobile/mobile-main-view/Header.tsx +43 -12
- package/src/client/components/mobile/mobile-right-sidebar/Chrome.tsx +12 -1
- package/src/client/components/mobile/mobile-right-sidebar/FullDiff.tsx +9 -2
- package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +1 -0
- package/src/client/components/mobile/mobile-right-sidebar/Header.tsx +9 -1
- package/src/client/components/mobile/mobile-right-sidebar/StatusBar.tsx +4 -2
- package/src/client/components/mobile/mobile-session-sidebar/Body.tsx +1 -1
- package/src/client/components/mobile/mobile-session-sidebar/Footer.tsx +48 -46
- package/src/client/components/mobile/mobile-session-sidebar/Header.tsx +18 -1
- package/src/client/components/mobile/mobile-session-sidebar/Item.test.tsx +4 -0
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +4 -6
- package/src/client/components/mobile/right-drawer-nav.test.tsx +53 -1
- package/src/client/components/settings/Band.tsx +5 -2
- package/src/client/components/settings/Modal.tsx +8 -5
- package/src/client/components/settings/Sidebar.tsx +5 -3
- package/src/client/components/settings/apply-side-effects.ts +5 -0
- package/src/client/components/settings/categories/AccountSettings.tsx +266 -0
- package/src/client/components/settings/categories/ProjectSettings.tsx +2 -0
- package/src/client/components/settings/categories/account-settings/Dialogs.tsx +223 -0
- package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.test.tsx +3 -4
- package/src/client/components/settings/categories/appearance-settings/ChromeStyleSection.tsx +66 -39
- package/src/client/components/settings/categories/connect-settings/DeviceTable.tsx +7 -4
- package/src/client/components/settings/categories/project-settings/DetailsForm.tsx +14 -1
- package/src/client/components/settings/categories/project-settings/ProjectSharing.tsx +130 -0
- package/src/client/components/settings/categories/project-settings/SidebarList.tsx +5 -0
- package/src/client/components/settings/category-content.tsx +3 -0
- package/src/client/components/workspace/chat-timeline/AiMessageFooterSheet.tsx +3 -1
- package/src/client/components/workspace/chat-timeline/ComposerDockFrame.tsx +2 -1
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +3 -1
- package/src/client/components/workspace/chat-timeline/SessionSkeleton.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +9 -2
- package/src/client/components/workspace/chat-timeline/chat-input/expansion.test.ts +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/expansion.ts +2 -1
- package/src/client/components/workspace/chat-timeline/chat-input/narrow.test.tsx +34 -0
- package/src/client/components/workspace/chat-timeline/composer-dock-frame.test.tsx +9 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/styles.test.tsx +4 -1
- package/src/client/components/workspace/editor/Tab.tsx +19 -26
- package/src/client/components/workspace/editor/Tabs.test.ts +13 -7
- package/src/client/components/workspace/git-panel/commit-modal/Header.tsx +1 -0
- package/src/client/components/workspace/git-panel/commit-modal/floating.test.ts +46 -0
- package/src/client/components/workspace/git-panel/commit-modal/index.tsx +2 -0
- package/src/client/components/workspace/model-dropdown/Fullscreen.tsx +4 -5
- package/src/client/components/workspace/panel-tabs/TabChip.tsx +40 -39
- package/src/client/components/workspace/panel-tabs/TabStrip.connected.test.tsx +76 -58
- package/src/client/components/workspace/panel-tabs/TabStrip.test.tsx +9 -9
- package/src/client/components/workspace/panel-tabs/TabStrip.tsx +14 -1
- package/src/client/components/workspace/panel-tabs/index.tsx +1 -1
- package/src/client/components/workspace/plugin-panel/catalog.tsx +22 -5
- package/src/client/components/workspace/plugin-panel/chrome.test.tsx +89 -0
- package/src/client/components/workspace/plugin-panel/chrome.tsx +62 -0
- package/src/client/data/settings/omp-schema.json +40 -4
- package/src/client/floating-phone.test.ts +189 -0
- package/src/client/floating.css +205 -2
- package/src/client/floating.test.ts +43 -0
- package/src/client/glass.css +47 -0
- package/src/client/hooks/chat/omp/index.ts +6 -5
- package/src/client/hooks/chat/omp/prompt-send.test.ts +18 -0
- package/src/client/hooks/chat/omp/prompt-send.ts +26 -8
- package/src/client/hooks/chat/omp/session-list.tsx +20 -8
- package/src/client/hooks/chat/timeline/deferred-model.ts +13 -5
- package/src/client/hooks/chat/timeline/index.ts +2 -0
- package/src/client/hooks/chat/timeline/send-props.ts +14 -0
- package/src/client/hooks/chat/timeline/send-steer.test.ts +11 -2
- package/src/client/hooks/chat/timeline/send-switch.test.ts +92 -0
- package/src/client/hooks/chat/timeline/send.test-util.ts +37 -7
- package/src/client/hooks/chat/timeline/send.test.ts +11 -2
- package/src/client/hooks/chat/timeline/send.ts +62 -42
- package/src/client/hooks/editor/image-generation.ts +24 -0
- package/src/client/hooks/editor/resolve-viewer.test.ts +26 -20
- package/src/client/hooks/editor/resolve-viewer.ts +14 -5
- package/src/client/hooks/editor/use-file-editor.test.ts +34 -0
- package/src/client/hooks/editor/use-file-editor.ts +6 -2
- package/src/client/hooks/settings/accounts.ts +162 -0
- package/src/client/hooks/ui/auth.ts +58 -3
- package/src/client/hooks/ui/border-style.test.ts +5 -4
- package/src/client/hooks/ui/border-style.ts +3 -2
- package/src/client/hooks/ui/mobile-chrome-style.ts +68 -0
- package/src/client/hooks/ui/navbar-controls.test.ts +1 -2
- package/src/client/hooks/ui/navbar-controls.ts +0 -3
- package/src/client/hooks/ui/zoom-gesture.ts +104 -0
- package/src/client/lib/desktop/titlebar.test.ts +21 -0
- package/src/client/lib/desktop/titlebar.ts +34 -0
- package/src/client/lib/plugins/bootstrap.test.ts +20 -0
- package/src/client/lib/plugins/bootstrap.tsx +10 -15
- package/src/client/lib/plugins/kit-components.test.tsx +119 -0
- package/src/client/lib/plugins/kit-components.tsx +79 -0
- package/src/client/lib/plugins/kit.ts +8 -0
- package/src/client/lib/plugins/slots.test.ts +34 -0
- package/src/client/lib/plugins/slots.ts +31 -4
- package/src/client/lib/plugins/stylesheets.ts +10 -11
- package/src/client/lib/ui/pinch.test.ts +74 -0
- package/src/client/lib/ui/pinch.ts +104 -0
- package/src/client/lib/ui/safe-area.test.ts +25 -0
- package/src/client/lib/ui/safe-area.ts +23 -0
- package/src/client/main.tsx +8 -1
- package/src/client/tailwind.css +54 -1
- package/src/server/index.ts +2 -0
- package/src/server/lib/assets/shell-attributes.server.ts +12 -4
- package/src/server/lib/assets/shell-attributes.test.ts +19 -18
- package/src/server/lib/auth/client-address.test.ts +2 -2
- package/src/server/lib/auth/guard.test.ts +2 -2
- package/src/server/lib/auth/guard.ts +81 -97
- package/src/server/lib/auth/handover-guard.test.ts +1 -1
- package/src/server/lib/auth/rate-limit.test.ts +2 -2
- package/src/server/lib/auth/token.test.ts +1 -1
- package/src/server/lib/auth/workspace-gate.server.ts +34 -0
- package/src/server/lib/bundler/css.test.ts +16 -0
- package/src/server/lib/connect/devices.server.test.ts +12 -0
- package/src/server/lib/connect/devices.server.ts +63 -19
- package/src/server/lib/connect/pairing.server.ts +5 -3
- package/src/server/lib/connect/status.server.ts +2 -2
- package/src/server/lib/db/schema.test.ts +3 -3
- package/src/server/lib/db/schema.ts +6 -0
- package/src/server/lib/harness/update-spawn.server.test.ts +97 -0
- package/src/server/lib/harness/update-spawn.server.ts +10 -0
- package/src/server/lib/models/provider-icon-override.server.test.ts +140 -0
- package/src/server/lib/models/provider-icon-override.server.ts +197 -0
- package/src/server/lib/models/provider-icon-store.server.ts +8 -0
- package/src/server/lib/models/provider-icon.server.ts +31 -6
- package/src/server/lib/omp/session/artifacts.server.test.ts +11 -7
- package/src/server/lib/omp/session/artifacts.server.ts +21 -17
- package/src/server/lib/panels/build.server.ts +19 -2
- package/src/server/lib/panels/css.server.test.ts +141 -0
- package/src/server/lib/panels/css.server.ts +255 -0
- package/src/server/lib/panels/plugin-ui-contract.test.ts +64 -0
- package/src/server/lib/panels/registry-stylesheet.server.test.ts +69 -0
- package/src/server/lib/panels/scan.server.ts +13 -7
- package/src/server/lib/panels/source-warnings.server.test.ts +65 -0
- package/src/server/lib/panels/source-warnings.server.ts +71 -0
- package/src/server/lib/realtime/topics/catalog.server.ts +3 -0
- package/src/server/lib/realtime/topics.server.ts +14 -0
- package/src/server/lib/sessions/last-opened-client.server.ts +1 -1
- package/src/server/lib/workspace/access.server.ts +108 -0
- package/src/server/lib/workspace/project-patch.server.ts +4 -2
- package/src/server/lib/workspace/register-folder.server.ts +19 -5
- package/src/server/lib/workspace/session-access.server.ts +55 -0
- package/src/server/lib/workspace/tenancy-schema.server.ts +40 -0
- package/src/server/plugins/ssr.ts +19 -3
- package/src/server/routes/accounts/index.ts +8 -0
- package/src/server/routes/accounts/management.test.ts +174 -0
- package/src/server/routes/accounts/management.ts +166 -0
- package/src/server/routes/auth/login.ts +22 -8
- package/src/server/routes/auth/logout.ts +1 -1
- package/src/server/routes/auth/password.ts +40 -33
- package/src/server/routes/auth/revoke.test.ts +1 -1
- package/src/server/routes/auth/revoke.ts +26 -8
- package/src/server/routes/auth/routes.test.ts +3 -3
- package/src/server/routes/auth/state.ts +14 -7
- package/src/server/routes/connect/devices.ts +7 -4
- package/src/server/routes/connect/pair.ts +4 -3
- package/src/server/routes/connect/status.ts +4 -2
- package/src/server/routes/connect/tunnels.ts +2 -1
- package/src/server/routes/folders/batch-delete.ts +12 -0
- package/src/server/routes/folders/clone.ts +7 -2
- package/src/server/routes/folders/create.ts +3 -1
- package/src/server/routes/folders/folder.ts +44 -4
- package/src/server/routes/folders/index.ts +3 -0
- package/src/server/routes/folders/shares.ts +62 -0
- package/src/server/routes/index.ts +2 -0
- package/src/server/routes/panels/build.ts +1 -1
- package/src/server/routes/panels/css.test.ts +22 -0
- package/src/server/routes/panels/css.ts +5 -7
- package/src/server/routes/realtime/ws.ts +16 -1
- package/src/server/routes/sessions/list.ts +3 -2
- package/src/server/routes/settings/projects.ts +46 -7
- package/src/server/routes/settings/provider-icon.ts +18 -0
- package/src/shared/lib/chat/timeline/tool-render-mode.test.ts +2 -2
- package/src/shared/lib/chat/timeline/tool-render-mode.ts +6 -3
- package/src/shared/lib/icons/tint-hues.generated.ts +38 -37
- package/src/shared/lib/omp/config/schema-releases-19-4.test.ts +27 -1
- package/src/shared/lib/omp/session/prewarm-misc.test.ts +1 -1
- package/src/shared/lib/realtime/protocol.ts +16 -0
- package/src/shared/lib/settings/defaults.ts +2 -1
- package/src/shared/lib/settings/sections.ts +1 -1
- package/src/shared/lib/theme/border-style.test.ts +11 -9
- package/src/shared/lib/theme/border-style.ts +7 -7
- package/src/shared/lib/theme/chrome-style.test.ts +15 -0
- package/src/shared/lib/theme/chrome-style.ts +16 -1
- package/src/shared/types/index.ts +1 -0
- package/src/shared/types/settings/state.ts +6 -5
- package/src/test-support/file-editor.test-util.ts +25 -6
- package/tsconfig.json +21 -0
- package/dist/client/static/js/ImageView-zf4kh5wp.js +0 -1
- package/dist/client/static/js/LayoutWrapper-dncbzcea.js +0 -2
- package/dist/client/static/js/MergeDiffView-btdx9yb9.js +0 -1
- package/dist/client/static/js/Modal-5cxfw2rv.js +0 -60
- package/dist/client/static/js/SessionsView-vbn0nvx4.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-sxrkxwbq.js +0 -1
- package/dist/client/static/js/bash-bcbct9gc.js +0 -1
- package/dist/client/static/js/c-fn9jz26e.js +0 -1
- package/dist/client/static/js/cpp-a1q64mke.js +0 -1
- package/dist/client/static/js/css-b92azee8.js +0 -1
- package/dist/client/static/js/css-sn00sq6v.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-g1xwa8b9.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-05p61bka.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-500fcx2a.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-z1yehwys.js +0 -1
- package/dist/client/static/js/graphql-8d8bn59j.js +0 -1
- package/dist/client/static/js/html-6hdrwtz2.js +0 -1
- package/dist/client/static/js/index-0kcnghxn.js +0 -4
- package/dist/client/static/js/index-2zhmmtye.js +0 -2
- package/dist/client/static/js/index-4vtc4xct.js +0 -481
- package/dist/client/static/js/index-5srvxsht.js +0 -2
- package/dist/client/static/js/index-6c1s0v4b.js +0 -1
- package/dist/client/static/js/index-cvm2ha01.js +0 -1
- package/dist/client/static/js/index-d11mbz2q.js +0 -4
- package/dist/client/static/js/index-fen0x3qh.js +0 -1
- package/dist/client/static/js/index-gwgh27h3.js +0 -314
- package/dist/client/static/js/index-hxy1sadd.js +0 -2
- package/dist/client/static/js/index-pg87cgpy.js +0 -2
- package/dist/client/static/js/index-q1a40v20.js +0 -3
- package/dist/client/static/js/index-qmvstmvh.js +0 -1
- package/dist/client/static/js/index-t6nqy2n5.css +0 -1
- package/dist/client/static/js/index-wf5j0009.js +0 -10
- package/dist/client/static/js/index-y6zbkh4p.js +0 -2
- package/dist/client/static/js/info-A6RAGUB7-dqyaxjc1.js +0 -1
- package/dist/client/static/js/ini-g6a5xsaw.js +0 -1
- package/dist/client/static/js/java-n596am4c.js +0 -1
- package/dist/client/static/js/javascript-zc1qnyyp.js +0 -1
- package/dist/client/static/js/json-7k70qbkj.js +0 -1
- package/dist/client/static/js/jsx-sndenqrc.js +0 -1
- package/dist/client/static/js/lua-djd3g9q5.js +0 -1
- package/dist/client/static/js/markdown-r2tpvxpn.js +0 -1
- package/dist/client/static/js/one-dark-pro-ckq5capv.js +0 -1
- package/dist/client/static/js/one-light-a908z398.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-7jxzax4z.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-wc9wxr7f.js +0 -1
- package/dist/client/static/js/properties-brn72zdk.js +0 -1
- package/dist/client/static/js/python-g9mghwgm.js +0 -1
- package/dist/client/static/js/r-e247x4mw.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-kwj5padj.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-h8sdx3w5.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-2wmwx246.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-h4cdgw3y.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-q7m0tfd0.js +0 -1
- package/dist/client/static/js/sql-0kar81jy.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-9gm67sq4.js +0 -8
- package/dist/client/static/js/timeline-definition-EJHVYXUP-xtvv4za2.js +0 -120
- package/dist/client/static/js/treeView-Q6P3EWNA-yv9640h3.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-7kpzjg21.js +0 -1
- package/dist/client/static/js/tsx-gjxfjnbk.js +0 -1
- package/dist/client/static/js/typescript-bm89v3gk.js +0 -1
- package/dist/client/static/js/vennDiagram-UO4OBE2U-56q0qs51.js +0 -34
- package/dist/client/static/js/wardley-WFR3VGLG-mggay64p.js +0 -1
- package/dist/client/static/js/xml-b7824nx0.js +0 -1
- package/dist/client/static/js/yaml-kqqktdv1.js +0 -1
- package/src/server/lib/auth/client-address.ts +0 -89
- package/src/server/lib/auth/config.ts +0 -133
- package/src/server/lib/auth/rate-limit.ts +0 -146
- package/src/server/lib/auth/token.ts +0 -220
|
@@ -96,7 +96,7 @@ export function ShellUpdateButton({ download, variant }: ShellUpdateButtonProps)
|
|
|
96
96
|
className={variant === 'icon' ? ICON_CLASS : LABEL_CLASS}
|
|
97
97
|
>
|
|
98
98
|
<Download size={variant === 'icon' ? 16 : LABEL_ICON_SIZE} />
|
|
99
|
-
{variant === 'label' && <span>{shellDownloadShortLabel(download)}</span>}
|
|
99
|
+
{variant === 'label' && <span className="hidden @[600px]:inline">{shellDownloadShortLabel(download)}</span>}
|
|
100
100
|
</a>
|
|
101
101
|
);
|
|
102
102
|
}
|
|
@@ -124,7 +124,7 @@ export function ShellUpdateButton({ download, variant }: ShellUpdateButtonProps)
|
|
|
124
124
|
) : (
|
|
125
125
|
<Download size={variant === 'icon' ? 16 : LABEL_ICON_SIZE} />
|
|
126
126
|
)}
|
|
127
|
-
{variant === 'label' && <span>{shellDownloadShortLabel(download)}</span>}
|
|
127
|
+
{variant === 'label' && <span className="hidden @[600px]:inline">{shellDownloadShortLabel(download)}</span>}
|
|
128
128
|
</button>
|
|
129
129
|
|
|
130
130
|
{open &&
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
23
|
import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'preact/hooks';
|
|
24
|
-
import type { ComponentChildren,
|
|
24
|
+
import type { ComponentChildren, TargetedWheelEvent } from 'preact';
|
|
25
|
+
import { useZoomGesture } from '@/client/hooks/ui/zoom-gesture';
|
|
26
|
+
import type { PinchFrame } from '@/client/lib/ui/pinch';
|
|
25
27
|
|
|
26
28
|
const MIN_SCALE = 0.1;
|
|
27
29
|
const MAX_SCALE = 16;
|
|
@@ -43,17 +45,19 @@ export interface ZoomPanStageProps {
|
|
|
43
45
|
children: ComponentChildren;
|
|
44
46
|
}
|
|
45
47
|
|
|
46
|
-
interface Drag {
|
|
47
|
-
pointerId: number;
|
|
48
|
-
x: number;
|
|
49
|
-
y: number;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
48
|
interface Size {
|
|
53
49
|
width: number;
|
|
54
50
|
height: number;
|
|
55
51
|
}
|
|
56
52
|
|
|
53
|
+
interface View {
|
|
54
|
+
scale: number;
|
|
55
|
+
x: number;
|
|
56
|
+
y: number;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const clampScale = (scale: number) => Math.min(MAX_SCALE, Math.max(MIN_SCALE, scale));
|
|
60
|
+
|
|
57
61
|
export function ZoomPanStage({
|
|
58
62
|
measureKey,
|
|
59
63
|
caption,
|
|
@@ -63,12 +67,9 @@ export function ZoomPanStage({
|
|
|
63
67
|
}: ZoomPanStageProps) {
|
|
64
68
|
const stageRef = useRef<HTMLDivElement>(null);
|
|
65
69
|
const contentRef = useRef<HTMLDivElement>(null);
|
|
66
|
-
const dragRef = useRef<Drag | null>(null);
|
|
67
70
|
|
|
68
71
|
const [size, setSize] = useState<Size | null>(null);
|
|
69
|
-
const [
|
|
70
|
-
const [offset, setOffset] = useState({ x: 0, y: 0 });
|
|
71
|
-
const [dragging, setDragging] = useState(false);
|
|
72
|
+
const [view, setView] = useState<View>({ scale: 1, x: 0, y: 0 });
|
|
72
73
|
/**
|
|
73
74
|
* Whether the user has moved the view themselves.
|
|
74
75
|
*
|
|
@@ -118,8 +119,7 @@ export function ZoomPanStage({
|
|
|
118
119
|
(stage.width - FIT_MARGIN) / size.width,
|
|
119
120
|
(stage.height - FIT_MARGIN) / size.height,
|
|
120
121
|
);
|
|
121
|
-
|
|
122
|
-
setOffset({ x: 0, y: 0 });
|
|
122
|
+
setView({ scale: clampScale(fit), x: 0, y: 0 });
|
|
123
123
|
userAdjustedRef.current = false;
|
|
124
124
|
}, [size]);
|
|
125
125
|
|
|
@@ -131,7 +131,7 @@ export function ZoomPanStage({
|
|
|
131
131
|
|
|
132
132
|
const zoomBy = useCallback((factor: number) => {
|
|
133
133
|
userAdjustedRef.current = true;
|
|
134
|
-
|
|
134
|
+
setView((current) => ({ ...current, scale: clampScale(current.scale * factor) }));
|
|
135
135
|
}, []);
|
|
136
136
|
|
|
137
137
|
// The stage's own size is a fit input too: a panel that grows must re-fit a
|
|
@@ -156,40 +156,44 @@ export function ZoomPanStage({
|
|
|
156
156
|
[zoomBy],
|
|
157
157
|
);
|
|
158
158
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
159
|
+
/**
|
|
160
|
+
* A pinch frame: the two contacts' distance ratio scales the view and their
|
|
161
|
+
* midpoint both anchors that scale and pans the content with the fingers.
|
|
162
|
+
* `x`/`y` are stage-centre-relative exactly like the wheel zoom, so a pinch
|
|
163
|
+
* grows around the fingers rather than around the middle of the panel.
|
|
164
|
+
*/
|
|
165
|
+
const applyPinch = useCallback((frame: PinchFrame) => {
|
|
166
|
+
setView((current) => {
|
|
167
|
+
const stage = stageRef.current?.getBoundingClientRect();
|
|
168
|
+
const next = clampScale(current.scale * frame.scale);
|
|
169
|
+
const px = stage ? frame.x - (stage.left + stage.width / 2) : 0;
|
|
170
|
+
const py = stage ? frame.y - (stage.top + stage.height / 2) : 0;
|
|
171
|
+
const k = next / current.scale;
|
|
172
|
+
return {
|
|
173
|
+
scale: next,
|
|
174
|
+
x: px - (px - current.x) * k + frame.dx,
|
|
175
|
+
y: py - (py - current.y) * k + frame.dy,
|
|
176
|
+
};
|
|
177
|
+
});
|
|
178
178
|
}, []);
|
|
179
179
|
|
|
180
|
-
const
|
|
181
|
-
|
|
182
|
-
dragRef.current = null;
|
|
183
|
-
setDragging(false);
|
|
180
|
+
const panBy = useCallback((dx: number, dy: number) => {
|
|
181
|
+
setView((current) => ({ ...current, x: current.x + dx, y: current.y + dy }));
|
|
184
182
|
}, []);
|
|
185
183
|
|
|
184
|
+
const { dragging, onPointerDown, onPointerMove, onPointerUp, onPointerCancel } = useZoomGesture({
|
|
185
|
+
canDrag: size !== null,
|
|
186
|
+
onStart: () => {
|
|
187
|
+
userAdjustedRef.current = true;
|
|
188
|
+
},
|
|
189
|
+
onPan: panBy,
|
|
190
|
+
onPinch: applyPinch,
|
|
191
|
+
});
|
|
192
|
+
|
|
186
193
|
const handleDoubleClick = useCallback(() => {
|
|
187
|
-
if (Math.abs(scale - 1) < 0.01) fitToView();
|
|
188
|
-
else {
|
|
189
|
-
|
|
190
|
-
setOffset({ x: 0, y: 0 });
|
|
191
|
-
}
|
|
192
|
-
}, [scale, fitToView]);
|
|
194
|
+
if (Math.abs(view.scale - 1) < 0.01) fitToView();
|
|
195
|
+
else setView({ scale: 1, x: 0, y: 0 });
|
|
196
|
+
}, [view.scale, fitToView]);
|
|
193
197
|
|
|
194
198
|
useEffect(() => {
|
|
195
199
|
const onKeyDown = (event: globalThis.KeyboardEvent) => {
|
|
@@ -207,7 +211,7 @@ export function ZoomPanStage({
|
|
|
207
211
|
return () => window.removeEventListener('keydown', onKeyDown);
|
|
208
212
|
}, [zoomBy, fitToView]);
|
|
209
213
|
|
|
210
|
-
const percent = Math.round(scale * 100);
|
|
214
|
+
const percent = Math.round(view.scale * 100);
|
|
211
215
|
const dimensions = size ? `${size.width} × ${size.height} px` : '';
|
|
212
216
|
|
|
213
217
|
return (
|
|
@@ -216,19 +220,19 @@ export function ZoomPanStage({
|
|
|
216
220
|
ref={stageRef}
|
|
217
221
|
tabIndex={-1}
|
|
218
222
|
onWheel={handleWheel}
|
|
219
|
-
onPointerDown={
|
|
220
|
-
onPointerMove={
|
|
221
|
-
onPointerUp={
|
|
222
|
-
onPointerCancel={
|
|
223
|
+
onPointerDown={onPointerDown}
|
|
224
|
+
onPointerMove={onPointerMove}
|
|
225
|
+
onPointerUp={onPointerUp}
|
|
226
|
+
onPointerCancel={onPointerCancel}
|
|
223
227
|
onDblClick={handleDoubleClick}
|
|
224
|
-
className={`relative flex-1 overflow-hidden outline-none ${dragging ? 'cursor-grabbing' : 'cursor-grab'}`}
|
|
228
|
+
className={`relative flex-1 touch-none overflow-hidden overscroll-contain outline-none ${dragging ? 'cursor-grabbing' : 'cursor-grab'}`}
|
|
225
229
|
>
|
|
226
230
|
<div className="absolute inset-0 flex items-center justify-center">
|
|
227
231
|
<div
|
|
228
232
|
ref={contentRef}
|
|
229
233
|
className="shrink-0"
|
|
230
234
|
style={{
|
|
231
|
-
transform: `translate3d(${
|
|
235
|
+
transform: `translate3d(${view.x}px, ${view.y}px, 0) scale(${view.scale})`,
|
|
232
236
|
visibility: size ? 'visible' : 'hidden',
|
|
233
237
|
}}
|
|
234
238
|
>
|
|
@@ -231,11 +231,10 @@ export function WorkspacePanels(props: WorkspacePanelsProps) {
|
|
|
231
231
|
})}
|
|
232
232
|
>
|
|
233
233
|
<div data-float-stack className="relative flex h-full w-full flex-col">
|
|
234
|
-
{/* The title overlays the transcript
|
|
235
|
-
|
|
236
|
-
the
|
|
237
|
-
|
|
238
|
-
instead of running under it. `z-30` beats the later grip (`z-10`) and rail (`z-20`). */}
|
|
234
|
+
{/* The title overlays the transcript, whose `[data-chat-scroller]` pads by the
|
|
235
|
+
bar's height; the bar's SIBLING is the hidden right side's controls card, so
|
|
236
|
+
the title is the flex column that gives way and a long session name truncates
|
|
237
|
+
before it. `z-30` beats the later grip (`z-10`) and rail (`z-20`). */}
|
|
239
238
|
<div className="chat-title-overlay pointer-events-none absolute inset-x-0 top-0 z-30 flex">
|
|
240
239
|
<div className="min-w-0 flex-1">{chatTopBar}</div>
|
|
241
240
|
{floatingChrome && !showRightSide && !rightSideLeaving ? (
|
|
@@ -208,10 +208,7 @@ export function DesktopLayout({ sessionId, onMobileToggle, appSettings = {} }: D
|
|
|
208
208
|
setActiveEditorPanelKey(panelKey);
|
|
209
209
|
rightSide.revealEditor();
|
|
210
210
|
},
|
|
211
|
-
onRight: (panelKey) => {
|
|
212
|
-
requestRightPanel(panelKey);
|
|
213
|
-
rightSide.revealRightPanel();
|
|
214
|
-
},
|
|
211
|
+
onRight: (panelKey) => { requestRightPanel(panelKey); rightSide.revealRightPanel(); },
|
|
215
212
|
});
|
|
216
213
|
|
|
217
214
|
return (
|
|
@@ -263,6 +260,7 @@ export function DesktopLayout({ sessionId, onMobileToggle, appSettings = {} }: D
|
|
|
263
260
|
topBar={
|
|
264
261
|
<LeftBar
|
|
265
262
|
showLeftPanel={sidebarOpen}
|
|
263
|
+
chatHidden={editorView.chatHidden}
|
|
266
264
|
streamStatus={streamStatus}
|
|
267
265
|
onToggleLeftPanel={() => handleToggleLeftPanel(!sidebarOpen)}
|
|
268
266
|
/>
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
*
|
|
17
17
|
* Collapsed, this bar is only the rail's width, so the app name moves to the
|
|
18
18
|
* left of the session title (`SessionTitleBar`) and the toggle is the whole bar.
|
|
19
|
+
* Under a native shell whose own window controls sit over the page's left edge
|
|
20
|
+
* the rail is NARROWER than those controls, so the toggle moves to that title
|
|
21
|
+
* row (`railToggleBelongsToTitle`) and this bar becomes an empty slot: a card
|
|
22
|
+
* or a button under the close/minimise/maximise buttons is unclickable.
|
|
19
23
|
*/
|
|
20
24
|
|
|
21
25
|
import { PanelLeft } from 'lucide-preact';
|
|
@@ -23,27 +27,45 @@ import { BrandWordmark } from '@/client/components/common/brand-wordmark';
|
|
|
23
27
|
import { StreamStatusDot } from '@/client/components/common/StreamStatusDot';
|
|
24
28
|
import type { AgentStreamStatus } from '@/shared/lib/chat/omp/status';
|
|
25
29
|
import { withChord } from '@/client/lib/ui/with-chord';
|
|
26
|
-
import { dragRegionProps } from '@/client/lib/desktop/titlebar';
|
|
30
|
+
import { dragRegionProps, railToggleBelongsToTitle } from '@/client/lib/desktop/titlebar';
|
|
31
|
+
import { BarSlot } from '@/client/components/layout/desktop-layout/BarSlot';
|
|
32
|
+
import { useChromeStyle } from '@/client/hooks/ui/chrome-style';
|
|
27
33
|
|
|
28
34
|
export function LeftBar({
|
|
29
35
|
showLeftPanel,
|
|
36
|
+
chatHidden,
|
|
30
37
|
streamStatus,
|
|
31
38
|
onToggleLeftPanel,
|
|
32
39
|
}: {
|
|
33
40
|
/** The panel is open, so the bar has room for the wordmark and an active mark. */
|
|
34
41
|
showLeftPanel: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* The chat is hidden behind the editor, so the title row is collapsed with
|
|
44
|
+
* it. The rail then keeps its own toggle: handing it to a row that is not on
|
|
45
|
+
* screen would leave the column with no way back.
|
|
46
|
+
*/
|
|
47
|
+
chatHidden: boolean;
|
|
35
48
|
streamStatus?: AgentStreamStatus;
|
|
36
49
|
onToggleLeftPanel: () => void;
|
|
37
50
|
}) {
|
|
38
51
|
const label = withChord('toggleSidebar', showLeftPanel ? 'Collapse Sidebar' : 'Expand Sidebar');
|
|
52
|
+
// Only the FLOATING chrome gives the slot a height (`floating.css`); in the
|
|
53
|
+
// flat chrome the bar keeps its own toggle and the rail keeps its row.
|
|
54
|
+
const floatingChrome = useChromeStyle() === 'floating';
|
|
55
|
+
|
|
56
|
+
// A closed rail in a native shell hands the toggle to the title row; this
|
|
57
|
+
// component then draws the bar's invisible box so the card below keeps its
|
|
58
|
+
// line, and the title row owns the control.
|
|
59
|
+
if (floatingChrome && railToggleBelongsToTitle(!showLeftPanel && !chatHidden)) return <BarSlot />;
|
|
39
60
|
|
|
40
61
|
return (
|
|
41
62
|
<div
|
|
42
63
|
data-float-bar="app"
|
|
43
64
|
// The app name is the one content a FLOATING card cannot share with the
|
|
44
65
|
// shell's own window controls: `floating.css` starts the card after them
|
|
45
|
-
// only while this bar carries the name.
|
|
46
|
-
//
|
|
66
|
+
// only while this bar carries the name. With no name the narrow bar is
|
|
67
|
+
// either kept whole (flat chrome) or replaced by the slot above, rather
|
|
68
|
+
// than offset into an impossible width.
|
|
47
69
|
{...(showLeftPanel ? { 'data-app-name': '' } : {})}
|
|
48
70
|
className={`flex h-10 items-center titlebar-drag-region select-none ${
|
|
49
71
|
// Open, the toggle takes the right edge of the card. The sidebar's
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The closed rail's expand toggle, moved out from under a native shell's own
|
|
8
|
+
* window controls.
|
|
9
|
+
*
|
|
10
|
+
* The rail is 44px wide; macOS reserves 76px for its traffic lights, so the
|
|
11
|
+
* bar's toggle was painted UNDER the close/minimise/maximise buttons and could
|
|
12
|
+
* not be clicked. The takeover is asserted on the rendered tree because the
|
|
13
|
+
* failure is a missing control in a state a stylesheet cannot fix:
|
|
14
|
+
*
|
|
15
|
+
* - the BAR becomes an invisible slot, so the card below keeps its line;
|
|
16
|
+
* - the TITLE row draws the toggle at its leading edge (the app-name position);
|
|
17
|
+
* - a hidden chat keeps the BAR's toggle, because that title row is collapsed
|
|
18
|
+
* with the chat and a control there would be invisible.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import { afterAll, afterEach, beforeAll, describe, expect, test } from 'bun:test';
|
|
22
|
+
import { Window } from 'happy-dom';
|
|
23
|
+
import { h, render } from 'preact';
|
|
24
|
+
import type { ComponentChildren } from 'preact';
|
|
25
|
+
import { act } from 'preact/test-utils';
|
|
26
|
+
import { LeftBar } from '@/client/components/layout/left-bar';
|
|
27
|
+
import { SessionTitleBar } from '@/client/components/layout/session-title-bar';
|
|
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
|
+
|
|
32
|
+
let container: HTMLElement;
|
|
33
|
+
|
|
34
|
+
beforeAll(() => {
|
|
35
|
+
installDomGlobals(new Window({ url: 'http://localhost' }));
|
|
36
|
+
primeKabmoSettings({});
|
|
37
|
+
primeAuthState(true, false);
|
|
38
|
+
// The REAL macOS shell shape: the traffic lights are 76px wide and float over
|
|
39
|
+
// the page. An identity is what tells the layout to move the control.
|
|
40
|
+
window.__kabmoDesktop = { platform: 'macos', shellVersion: '0.1.0', overlayTitlebar: true, trafficLightInset: '5rem' };
|
|
41
|
+
// The floating chrome is what gives the invisible bar slot its height.
|
|
42
|
+
document.documentElement.setAttribute('data-chrome', 'floating');
|
|
43
|
+
window.__kabmoCall = async () => null;
|
|
44
|
+
window.webkit = { messageHandlers: { kabmo: { postMessage: () => {} } } };
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
afterAll(() => {
|
|
48
|
+
restoreDomGlobals();
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
afterEach(() => {
|
|
52
|
+
if (container) render(null, container);
|
|
53
|
+
container?.remove();
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
async function mount(node: ComponentChildren) {
|
|
57
|
+
container = document.createElement('div');
|
|
58
|
+
document.body.appendChild(container);
|
|
59
|
+
await act(async () => {
|
|
60
|
+
render(node, container);
|
|
61
|
+
});
|
|
62
|
+
for (let i = 0; i < 4; i += 1) await act(async () => {});
|
|
63
|
+
return container;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function expandToggle(root: Element) {
|
|
67
|
+
return [...root.querySelectorAll('button')].find((button) =>
|
|
68
|
+
/Expand Sidebar/.test(button.getAttribute('aria-label') ?? ''),
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
describe('closed rail under native window controls', () => {
|
|
73
|
+
test('the bar becomes an empty slot, not a control under the shell buttons', async () => {
|
|
74
|
+
const el = await mount(
|
|
75
|
+
h(LeftBar, { showLeftPanel: false, chatHidden: false, onToggleLeftPanel: () => {} }),
|
|
76
|
+
);
|
|
77
|
+
expect(el.querySelector('[data-float-bar="app"]')).toBeNull();
|
|
78
|
+
expect(el.querySelector('[data-float-bar="slot"]')).toBeTruthy();
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
test('a hidden chat keeps the toggle in the bar', async () => {
|
|
82
|
+
const el = await mount(
|
|
83
|
+
h(LeftBar, { showLeftPanel: false, chatHidden: true, onToggleLeftPanel: () => {} }),
|
|
84
|
+
);
|
|
85
|
+
const bar = el.querySelector('[data-float-bar="app"]');
|
|
86
|
+
expect(bar).toBeTruthy();
|
|
87
|
+
expect(expandToggle(bar!)).toBeDefined();
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
test('the title row draws the control at its leading edge', async () => {
|
|
91
|
+
let expanded = 0;
|
|
92
|
+
const el = await mount(
|
|
93
|
+
h(SessionTitleBar, {
|
|
94
|
+
sessionTitle: 'Fix auth flow',
|
|
95
|
+
sessionId: 'session-1',
|
|
96
|
+
sidebarOpen: false,
|
|
97
|
+
leftBarVisible: true,
|
|
98
|
+
onExpandSidebar: () => { expanded += 1; },
|
|
99
|
+
rightSideHidden: false,
|
|
100
|
+
onToggleRightSide: () => {},
|
|
101
|
+
}),
|
|
102
|
+
);
|
|
103
|
+
const bar = el.querySelector('[data-session-title]');
|
|
104
|
+
const toggle = expandToggle(bar!);
|
|
105
|
+
expect(toggle).toBeDefined();
|
|
106
|
+
// The row already starts after the rail, so it keeps its own `pl-6` — the
|
|
107
|
+
// app-name position — instead of re-applying the shell's inset.
|
|
108
|
+
expect(bar?.hasAttribute('style')).toBe(false);
|
|
109
|
+
await act(async () => { toggle?.click(); });
|
|
110
|
+
expect(expanded).toBe(1);
|
|
111
|
+
});
|
|
112
|
+
});
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The classic workspace header's folder action.
|
|
8
|
+
*
|
|
9
|
+
* It opens the SAME workspace the row names, so its glyph must carry the
|
|
10
|
+
* workspace's picked accent (`--project-accent`) rather than the generated hue
|
|
11
|
+
* for `FolderOpen` — the colour mode painted it 330 (pink) regardless of the
|
|
12
|
+
* project, which is the reported "warna folder workspace" defect.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { afterAll, afterEach, beforeAll, describe, expect, test } from 'bun:test';
|
|
16
|
+
import { Window } from 'happy-dom';
|
|
17
|
+
import { h, render } from 'preact';
|
|
18
|
+
|
|
19
|
+
import { CategoryHeader } from '@/client/components/layout/session-sidebar/CategoryHeader';
|
|
20
|
+
import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
|
|
21
|
+
import type { WorkspaceFolderData } from '@/shared/types';
|
|
22
|
+
|
|
23
|
+
let host: HTMLElement | null = null;
|
|
24
|
+
|
|
25
|
+
beforeAll(() => {
|
|
26
|
+
installDomGlobals(new Window({ url: 'http://localhost' }));
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
afterEach(() => {
|
|
30
|
+
if (host) render(null, host);
|
|
31
|
+
host?.remove();
|
|
32
|
+
host = null;
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
afterAll(() => {
|
|
36
|
+
restoreDomGlobals();
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const folder: WorkspaceFolderData = {
|
|
40
|
+
id: 7,
|
|
41
|
+
name: 'kabmo',
|
|
42
|
+
accentColor: '#38bdf8',
|
|
43
|
+
isExpanded: true,
|
|
44
|
+
hasMore: false,
|
|
45
|
+
totalSessions: 0,
|
|
46
|
+
sessions: [],
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
function mount(): HTMLElement {
|
|
50
|
+
host = document.body.appendChild(document.createElement('div'));
|
|
51
|
+
render(
|
|
52
|
+
h(CategoryHeader, {
|
|
53
|
+
folder,
|
|
54
|
+
isOpen: true,
|
|
55
|
+
onToggleFolder: () => {},
|
|
56
|
+
checkbox: null,
|
|
57
|
+
batchActive: false,
|
|
58
|
+
showMenu: false,
|
|
59
|
+
onToggleMenu: () => {},
|
|
60
|
+
onCloseMenu: () => {},
|
|
61
|
+
onNewSession: () => {},
|
|
62
|
+
onOpenWorkspacePanels: () => {},
|
|
63
|
+
confirmDelete: false,
|
|
64
|
+
onPin: () => {},
|
|
65
|
+
onDelete: () => {},
|
|
66
|
+
onRequestDelete: () => {},
|
|
67
|
+
onCancelDelete: () => {},
|
|
68
|
+
}),
|
|
69
|
+
host,
|
|
70
|
+
);
|
|
71
|
+
return host;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
describe('classic workspace header folder action', () => {
|
|
75
|
+
test('it carries the workspace accent', () => {
|
|
76
|
+
const workspace = mount().querySelector('button[aria-label="Open workspace panels for kabmo"]') as HTMLElement;
|
|
77
|
+
const svg = workspace.querySelector('svg') as SVGElement;
|
|
78
|
+
expect(svg.getAttribute('class')).toContain('project-accent-mark');
|
|
79
|
+
expect(svg.getAttribute('style')).toContain('--project-accent');
|
|
80
|
+
});
|
|
81
|
+
});
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { useRef, useState } from 'preact/hooks';
|
|
18
|
-
import { ChevronRight, FolderOpen, MoreHorizontal, Pin, Plus } from 'lucide-preact';
|
|
18
|
+
import { ChevronRight, FolderOpen, MoreHorizontal, Pin, Plus, Users } from 'lucide-preact';
|
|
19
19
|
import { AnchoredMenu } from '@/client/components/common/anchored-menu';
|
|
20
20
|
import { anchorRectOf, type AnchorRect } from '@/shared/lib/ui/menu-anchor';
|
|
21
21
|
import { NewWorktreeModal } from '@/client/components/workspace/worktree-modal/index';
|
|
@@ -83,6 +83,7 @@ export function CategoryHeader({
|
|
|
83
83
|
onCancelDelete,
|
|
84
84
|
}: CategoryHeaderProps) {
|
|
85
85
|
const ProjectIcon = getProjectIcon(folder.icon);
|
|
86
|
+
const accentStyle = projectAccentStyle(folder.accentColor) as unknown as Record<string, string>;
|
|
86
87
|
// The dialog lives here rather than in the page: the row that opens it is this
|
|
87
88
|
// one, and the folder it belongs to is what the dialog needs.
|
|
88
89
|
const [worktreeDialogOpen, setWorktreeDialogOpen] = useState(false);
|
|
@@ -131,7 +132,7 @@ export function CategoryHeader({
|
|
|
131
132
|
<ProjectIcon
|
|
132
133
|
size={15}
|
|
133
134
|
className="project-accent-mark text-ink/75"
|
|
134
|
-
style={
|
|
135
|
+
style={accentStyle}
|
|
135
136
|
/>
|
|
136
137
|
)}
|
|
137
138
|
</span>
|
|
@@ -147,6 +148,13 @@ export function CategoryHeader({
|
|
|
147
148
|
)}
|
|
148
149
|
{folder.isPinned && <Pin size={11} className="text-ink/60 shrink-0 mr-1.5" />}
|
|
149
150
|
<span className="truncate text-[13px] font-semibold tracking-tight">{folder.name}</span>
|
|
151
|
+
{folder.isShared && (
|
|
152
|
+
<Users
|
|
153
|
+
size={10}
|
|
154
|
+
className="shrink-0 text-ink/40"
|
|
155
|
+
aria-label={`Shared by ${folder.ownerName ?? 'another account'}`}
|
|
156
|
+
/>
|
|
157
|
+
)}
|
|
150
158
|
</div>
|
|
151
159
|
|
|
152
160
|
{/* Workspace Actions — always drawn, matching the drawer's folder header.
|
|
@@ -166,7 +174,7 @@ export function CategoryHeader({
|
|
|
166
174
|
}`}
|
|
167
175
|
onClick={(e) => { e.stopPropagation(); onOpenWorkspacePanels(); }}
|
|
168
176
|
>
|
|
169
|
-
<FolderOpen size={12} />
|
|
177
|
+
<FolderOpen size={12} className="project-accent-mark" style={accentStyle} />
|
|
170
178
|
</button>
|
|
171
179
|
|
|
172
180
|
{/* `aria-label` as well as `title`, like the phone's row: the button
|
|
@@ -20,6 +20,7 @@ import { act } from 'preact/test-utils';
|
|
|
20
20
|
|
|
21
21
|
import packageJson from '@/../package.json';
|
|
22
22
|
import { SessionSidebarFooter } from '@/client/components/layout/session-sidebar/Footer';
|
|
23
|
+
import { primeAuthState } from '@/client/hooks/ui/auth';
|
|
23
24
|
|
|
24
25
|
const DOM_GLOBALS = ['window', 'document', 'navigator', 'Node', 'Element', 'HTMLElement', 'HTMLInputElement', 'Event', 'MouseEvent', 'KeyboardEvent'] as const;
|
|
25
26
|
const nativeGlobals: Partial<Record<(typeof DOM_GLOBALS)[number], unknown>> = {};
|
|
@@ -60,18 +61,53 @@ async function mount(node: preact.ComponentChild) {
|
|
|
60
61
|
const noop = () => {};
|
|
61
62
|
|
|
62
63
|
describe('desktop session sidebar footer', () => {
|
|
64
|
+
test('shows the account and sign out, and keeps version right when only root exists', async () => {
|
|
65
|
+
primeAuthState(true, true, { id: 'root', name: 'Owner', role: 'root' }, 1);
|
|
66
|
+
const el = await mount(h(SessionSidebarFooter, { onSettings: noop, onKeyBindings: noop, onInfo: noop }));
|
|
67
|
+
expect(el.textContent).toContain('Owner');
|
|
68
|
+
expect(el.querySelector('button[aria-label="Sign out"]')).toBeTruthy();
|
|
69
|
+
const text = el.textContent ?? '';
|
|
70
|
+
expect(text.indexOf('Owner')).toBeLessThan(text.indexOf(`v${packageJson.version}`));
|
|
71
|
+
primeAuthState(true, false);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
test('moves version and update beside About when a member account exists', async () => {
|
|
75
|
+
primeAuthState(true, true, { id: 'root', name: 'Owner', role: 'root' }, 2);
|
|
76
|
+
const el = await mount(h(SessionSidebarFooter, {
|
|
77
|
+
onSettings: noop, onKeyBindings: noop, onInfo: noop, updateAvailable: true, onUpdateClick: noop,
|
|
78
|
+
}));
|
|
79
|
+
const text = el.textContent ?? '';
|
|
80
|
+
expect(text.indexOf(`v${packageJson.version}`)).toBeLessThan(text.indexOf('Owner'));
|
|
81
|
+
primeAuthState(true, false);
|
|
82
|
+
});
|
|
83
|
+
|
|
63
84
|
test('draws the build version with no update pending', async () => {
|
|
64
85
|
const el = await mount(h(SessionSidebarFooter, { onSettings: noop, onKeyBindings: noop, onInfo: noop }));
|
|
65
86
|
expect(el.textContent).toContain(`v${packageJson.version}`);
|
|
66
87
|
expect(el.textContent).not.toContain('update');
|
|
67
88
|
});
|
|
68
89
|
|
|
90
|
+
test('stays one icon-first row instead of wrapping', async () => {
|
|
91
|
+
primeAuthState(true, true, { id: 'root', name: 'Owner', role: 'root' }, 2);
|
|
92
|
+
const el = await mount(h(SessionSidebarFooter, { onSettings: noop, onKeyBindings: noop, onInfo: noop }));
|
|
93
|
+
const row = el.firstElementChild as HTMLElement;
|
|
94
|
+
expect(row.className).toContain('@container');
|
|
95
|
+
expect(row.className).toContain('flex-nowrap');
|
|
96
|
+
expect(row.className).not.toContain('flex-wrap');
|
|
97
|
+
// The name is the fallback that hides first; the icon stays.
|
|
98
|
+
expect(el.textContent).toContain('Owner');
|
|
99
|
+
expect((el.firstElementChild?.textContent ?? '').length).toBeGreaterThan(0);
|
|
100
|
+
primeAuthState(true, false);
|
|
101
|
+
});
|
|
102
|
+
|
|
69
103
|
test('keeps the version beside the update pill', async () => {
|
|
70
104
|
const el = await mount(
|
|
71
105
|
h(SessionSidebarFooter, { onSettings: noop, onKeyBindings: noop, onInfo: noop, updateAvailable: true, onUpdateClick: noop }),
|
|
72
106
|
);
|
|
73
107
|
expect(el.textContent).toContain(`v${packageJson.version}`);
|
|
74
108
|
expect(el.textContent).toContain('update');
|
|
109
|
+
// The narrow form is the same control; only the word is hidden by CSS.
|
|
110
|
+
expect(el.querySelector('button[aria-label="Update available"]')).toBeTruthy();
|
|
75
111
|
});
|
|
76
112
|
|
|
77
113
|
// The layout switch lives in the footer on BOTH layouts: the phone draws
|