@kabmo-labs/kabmo 0.60.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-p82s28sj.js → Body-z6kstvk6.js} +3 -3
- package/dist/client/static/js/{CsvGrid-erc5mcvc.js → CsvGrid-f73c0s4e.js} +2 -2
- package/dist/client/static/js/{DocxView-x3faj0jv.js → DocxView-a1pb7nsb.js} +3 -3
- package/dist/client/static/js/{DrawioView-t7fh3ens.js → DrawioView-r61gcg24.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-zy7x7jmm.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-kqx472q7.js → PdfView-mppt2gkd.js} +1 -1
- package/dist/client/static/js/SessionsView-vvsaw9f0.js +1 -0
- package/dist/client/static/js/{SheetView-0n9fze50.js → SheetView-5s9zfx9g.js} +9 -9
- package/dist/client/static/js/{SvgPreview-6xc6ts46.js → SvgPreview-ff78xn3e.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-2xdkkqwg.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-ja8cx19z.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-ytf7s99c.js → blockDiagram-BEXU5L5S-t8xbexa6.js} +6 -6
- package/dist/client/static/js/c-vvantfth.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-5a0kdx0z.js → c4Diagram-YGBWAQC7-9fwf2zxk.js} +3 -3
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-hd98dvjw.js → classDiagram-v2-NBCMYWYE-nbapgqbs.js} +4 -4
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-man3fqcj.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-2f0kbbv2.js → cynefinDiagram-VND7K2PF-qdg32wah.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-k7pyhgzn.js → dagre-6A5THRUB-qzshg1vs.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-qx0afa2m.js → diagram-22UHCM2B-197hemfa.js} +11 -11
- package/dist/client/static/js/{diagram-3UASUU5V-ydpe77sv.js → diagram-3UASUU5V-236gnjr6.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-e63v984n.js → diagram-ATOU4E4O-vjgpyaaq.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-8c765h3a.js → diagram-CDSNMT55-ywvzcx7z.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-3pq0n7v8.js → diagram-MLGK6HIB-9ey7ev7j.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-638atzxz.js → diagram-MPIPVDR6-vrqbb6r7.js} +2 -2
- package/dist/client/static/js/{dockerfile-yehc914q.js → dockerfile-4nked309.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-3gv43zvm.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-6s5pggfc.js → elk-276RUBZZ-nej6yy1c.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-x7cqyb89.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-g97te4v1.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-sw4f94tc.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-vejz38qt.js → index-0w1jzang.js} +5 -5
- package/dist/client/static/js/{index-bpcg34jp.js → index-1svt0cdw.js} +2 -2
- package/dist/client/static/js/{index-hgfyx8dt.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-pdz6j2g2.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-111bq6rs.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-hwdkxe4n.js → index-dxyjxhm1.js} +2 -2
- package/dist/client/static/js/{index-43gmn7yb.js → index-edpyqz9f.js} +1 -1
- package/dist/client/static/js/{index-pdgc9ccr.js → index-eesepb70.js} +2 -2
- package/dist/client/static/js/{index-vec7m1yd.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-vcq6zfxx.js → index-jcbp1d9d.js} +6 -6
- package/dist/client/static/js/index-jg5h18sm.js +2 -0
- package/dist/client/static/js/{index-6qn9kygb.js → index-jtdve6xw.js} +7 -7
- package/dist/client/static/js/{index-4xbc0j7t.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-2n2evsg0.js → index-kv1xnem9.js} +2 -2
- package/dist/client/static/js/{index-8zct30zd.js → index-m54ctmxr.js} +1 -1
- package/dist/client/static/js/index-mgzbypt5.js +314 -0
- package/dist/client/static/js/{index-cf69bhjx.js → index-mh52531j.js} +2 -2
- package/dist/client/static/js/{index-0ze5bwvw.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-9rz6kzsv.js → index-nxd6z7f9.js} +2 -2
- package/dist/client/static/js/{index-jfqd838j.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-cfvc1zpk.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-37apvxgj.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-z8k42dwz.js → index-w0j96eyy.js} +8 -8
- package/dist/client/static/js/{index-qkqkygrf.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-dv01prse.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-ywp0sd1e.js → index-zy963qbh.js} +1 -1
- package/dist/client/static/js/info-A6RAGUB7-t7pbg7rt.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-pw2qaa27.js → infoDiagram-VRGFBTTK-9pe7w3r5.js} +2 -2
- package/dist/client/static/js/ini-522adp5a.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-d13jhvxy.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-20gb8a04.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-s78e158c.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-xbm27k28.js → mermaid.core-3aae27b9.js} +7 -7
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-6y7xe2zm.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-dmvewetf.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-1q9e7rcm.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-mvrem3n6.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-axttcfhw.js → railroadDiagram-XR7U4H2S-70qy7qdh.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-5qx7erta.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-b3ckax3e.js → rust-6sddyxnt.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-es87a3j6.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-dgpnjrtk.js → sequenceDiagram-PO4LG4MO-w7z84f80.js} +7 -7
- package/dist/client/static/js/{sizeCapture-INFHLROL-kyw0p86n.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-vnsbw8y9.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-060q1rep.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-18sp73v7.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-q0kwmbzh.js → wardleyDiagram-VNRHLVJA-hjddd656.js} +3 -3
- package/dist/client/static/js/xml-59n0cjn6.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-y0gpmg6m.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 -37
- package/src/client/components/workspace/panel-tabs/TabStrip.connected.test.tsx +76 -49
- 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-xc90jc1c.js +0 -1
- package/dist/client/static/js/LayoutWrapper-wyqe98kf.js +0 -2
- package/dist/client/static/js/MergeDiffView-bng34cpr.js +0 -1
- package/dist/client/static/js/Modal-89jk7wff.js +0 -60
- package/dist/client/static/js/SessionsView-6bpz1faj.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-7sn6nwjv.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-4h2zkrk1.js +0 -2
- package/dist/client/static/js/index-5nm8hm4k.js +0 -2
- package/dist/client/static/js/index-95jfphx5.js +0 -481
- package/dist/client/static/js/index-9pw441wc.js +0 -4
- package/dist/client/static/js/index-bjz54ht6.js +0 -1
- package/dist/client/static/js/index-bqapt2e8.js +0 -2
- package/dist/client/static/js/index-ddkjgv5h.js +0 -2
- package/dist/client/static/js/index-dekvtt2a.js +0 -314
- package/dist/client/static/js/index-fnwaxc6r.js +0 -1
- package/dist/client/static/js/index-h65zrhva.js +0 -1
- package/dist/client/static/js/index-hxsqw7sz.js +0 -4
- package/dist/client/static/js/index-hxy1sadd.js +0 -2
- package/dist/client/static/js/index-ja0ajnvq.js +0 -10
- package/dist/client/static/js/index-qkyy563e.js +0 -1
- package/dist/client/static/js/index-t6nqy2n5.css +0 -1
- package/dist/client/static/js/index-wrk99kks.js +0 -3
- 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-7bgqnyhm.js +0 -1
- package/dist/client/static/js/one-light-47y6etng.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-y77g9dq0.js +0 -8
- package/dist/client/static/js/timeline-definition-EJHVYXUP-8a3yqmx0.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-gf4y1r3s.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
|
@@ -16,6 +16,7 @@ import { useHarnesses } from '@/client/hooks/models/use-harnesses';
|
|
|
16
16
|
import { CategoryContent } from '@/client/components/settings/category-content';
|
|
17
17
|
import type { CatalogTab } from '@/client/components/settings/categories/SkillCatalogSettings';
|
|
18
18
|
import { SettingsBand } from '@/client/components/settings/Band';
|
|
19
|
+
import { SAFE_BOTTOM } from '@/client/lib/ui/safe-area';
|
|
19
20
|
import { SettingsDrillProvider, useSettingsDrillState } from '@/client/components/settings/drill';
|
|
20
21
|
|
|
21
22
|
export interface SettingsModalProps {
|
|
@@ -147,12 +148,14 @@ export function SettingsModal({
|
|
|
147
148
|
|
|
148
149
|
return (
|
|
149
150
|
<div
|
|
151
|
+
data-mobile-settings=""
|
|
150
152
|
className={`fixed inset-0 modal-scrim backdrop-blur-[2px] z-50 flex items-center justify-center p-0 md:p-6 ${leaving ? 'presence-leaving' : 'presence-fade'}`}
|
|
151
153
|
data-presence={leaving ? 'leaving' : 'open'}
|
|
152
154
|
onClick={onClose}
|
|
153
155
|
>
|
|
154
156
|
<div
|
|
155
157
|
ref={panelRef}
|
|
158
|
+
data-mobile-settings-card=""
|
|
156
159
|
role="dialog"
|
|
157
160
|
aria-modal="true"
|
|
158
161
|
aria-label="Settings"
|
|
@@ -185,7 +188,7 @@ export function SettingsModal({
|
|
|
185
188
|
opened, and the drilled pane's own label when a category registers
|
|
186
189
|
one (`settings/drill.tsx`). The back control appears only when there
|
|
187
190
|
is somewhere to go. */}
|
|
188
|
-
<div className="md:hidden flex-shrink-0 bg-canvas">
|
|
191
|
+
<div data-mobile-settings-band="" className="md:hidden flex-shrink-0 bg-canvas">
|
|
189
192
|
<SettingsBand
|
|
190
193
|
root={!isMobileDrilled || drill === null}
|
|
191
194
|
label={!isMobileDrilled ? 'Settings' : drill?.label ?? currentCategoryDef.label}
|
|
@@ -206,7 +209,7 @@ export function SettingsModal({
|
|
|
206
209
|
that band; on a desktop the band is the detail column's own, naming
|
|
207
210
|
the category (both panes are visible, so there is no screen to
|
|
208
211
|
leave). */}
|
|
209
|
-
<div className={`flex-1 flex-col h-full overflow-hidden min-w-0 ${isMobileDrilled ? 'flex' : 'hidden md:flex'}`}>
|
|
212
|
+
<div data-mobile-settings-detail="" className={`flex-1 flex-col h-full overflow-hidden min-w-0 ${isMobileDrilled ? 'flex' : 'hidden md:flex'}`}>
|
|
210
213
|
<div className="hidden md:block flex-shrink-0">
|
|
211
214
|
<SettingsBand
|
|
212
215
|
label={currentCategoryDef.label}
|
|
@@ -221,7 +224,7 @@ export function SettingsModal({
|
|
|
221
224
|
padding here would inset only the detail pane. */}
|
|
222
225
|
<div
|
|
223
226
|
className={`flex-1 scrollbar-overlay-container w-full ${['appearance', 'voice', 'projects', 'providers', 'agents', 'behavior', 'commands', 'mcp', 'plugins', 'skills', 'skills-catalog', 'usage', 'panel-plugins', 'chats'].includes(activeCategory) ? 'p-0 flex flex-col' : 'p-6 md:p-8 flex flex-col'}`}
|
|
224
|
-
style={{ paddingBottom:
|
|
227
|
+
style={{ paddingBottom: SAFE_BOTTOM }}
|
|
225
228
|
>
|
|
226
229
|
<div className="w-full h-full flex-1 flex flex-col">
|
|
227
230
|
<CategoryContent
|
|
@@ -242,10 +245,10 @@ export function SettingsModal({
|
|
|
242
245
|
|
|
243
246
|
{/* MOBILE CATEGORY LIST VIEW (When not drilled into detail). Under the
|
|
244
247
|
same one band, so the root screen is a list, not a second header. */}
|
|
245
|
-
<div className={`flex-1 flex-col h-full bg-canvas md:hidden min-h-0 ${isMobileDrilled ? 'hidden' : 'flex'}`}>
|
|
248
|
+
<div data-mobile-settings-list="" className={`flex-1 flex-col h-full bg-canvas md:hidden min-h-0 ${isMobileDrilled ? 'hidden' : 'flex'}`}>
|
|
246
249
|
<div
|
|
247
250
|
className="flex-1 overflow-hidden"
|
|
248
|
-
style={{ paddingBottom:
|
|
251
|
+
style={{ paddingBottom: SAFE_BOTTOM }}
|
|
249
252
|
>
|
|
250
253
|
<SettingsSidebar
|
|
251
254
|
activeCategory={activeCategory}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LucideIcon } from 'lucide-preact';
|
|
2
|
-
import { AudioLines, BarChart3, Bell, BookOpen, Bot, Boxes, Cloud, Coins, Cpu, FolderGit, GitBranch, Keyboard, Library, MessageSquare, Palette, Plug, Power, Puzzle, Radio, RefreshCw, Search, Sliders, Terminal, Waypoints, X } from 'lucide-preact';
|
|
2
|
+
import { AudioLines, BarChart3, Bell, BookOpen, Bot, Boxes, Cloud, Coins, Cpu, FolderGit, GitBranch, Keyboard, Library, MessageSquare, Palette, Plug, Power, Puzzle, Radio, RefreshCw, Search, Sliders, Terminal, Users, Waypoints, X } from 'lucide-preact';
|
|
3
3
|
import { HarnessGlyph } from '@/client/components/common/harness-glyph';
|
|
4
4
|
import type { SettingsCategoryId } from '@/shared/types';
|
|
5
5
|
import { SETTINGS_SECTIONS, type SettingsSection } from '@/shared/lib/settings/sections';
|
|
@@ -30,6 +30,8 @@ export const SETTINGS_CATEGORIES: CategoryDef[] = [
|
|
|
30
30
|
{ id: 'usage', label: 'Usage', icon: BarChart3, section: 'KABMO', description: 'Build minutes quota, storage, and general usage.' },
|
|
31
31
|
{ id: 'token-usage', label: 'Token Usage', icon: Coins, section: 'KABMO', description: 'Token telemetry, cache, and cost breakdown.' },
|
|
32
32
|
{ id: 'panel-plugins', label: 'Plugins Kabmo', icon: Puzzle, section: 'KABMO', description: 'Plugins installed into Kabmo: panels, background services, and the MCP servers they register.' },
|
|
33
|
+
// ACCOUNTS
|
|
34
|
+
{ id: 'accounts', label: 'Accounts', icon: Users, section: 'ACCOUNTS', description: 'Sign-in accounts, their names, passwords and workspace access.' },
|
|
33
35
|
// CONNECT
|
|
34
36
|
{ id: 'connect', label: 'Connect', icon: Radio, section: 'CONNECT', description: 'Tunnels, addresses, and the devices paired to this server.' },
|
|
35
37
|
// WORKSPACE
|
|
@@ -128,7 +130,7 @@ export function SettingsSidebar({
|
|
|
128
130
|
|
|
129
131
|
|
|
130
132
|
return (
|
|
131
|
-
<div className={`flex flex-col h-full bg-canvas border-r border-ink/10 text-ink select-none ${className}`}>
|
|
133
|
+
<div data-mobile-settings-sidebar="" className={`flex flex-col h-full bg-canvas border-r border-ink/10 text-ink select-none ${className}`}>
|
|
132
134
|
{/* Search Bar, in the sheet's one band height so the rule under it meets
|
|
133
135
|
the detail header's across the modal. */}
|
|
134
136
|
<div className={`${SETTINGS_BAND} px-3`} style={{ height: SETTINGS_BAND_HEIGHT }}>
|
|
@@ -215,7 +217,7 @@ export function SettingsSidebar({
|
|
|
215
217
|
</div>
|
|
216
218
|
|
|
217
219
|
{/* Bottom Actions: Reload OMP + Restart Kabmo */}
|
|
218
|
-
<div className="p-2 border-t border-ink/10 flex-shrink-0 bg-canvas flex items-center gap-0.5">
|
|
220
|
+
<div data-mobile-settings-footer="" className="p-2 border-t border-ink/10 flex-shrink-0 bg-canvas flex items-center gap-0.5">
|
|
219
221
|
<button
|
|
220
222
|
type="button"
|
|
221
223
|
onClick={onReloadOmp}
|
|
@@ -44,6 +44,7 @@ import { applyComposerStyle } from '@/client/hooks/chat/composer/style';
|
|
|
44
44
|
import { applySurfaceStyle } from '@/client/hooks/ui/surface-style';
|
|
45
45
|
import { applyBorderStyle } from '@/client/hooks/ui/border-style';
|
|
46
46
|
import { applyChromeStyle } from '@/client/hooks/ui/chrome-style';
|
|
47
|
+
import { applyMobileChromeStyle } from '@/client/hooks/ui/mobile-chrome-style';
|
|
47
48
|
import { applyIconStyle } from '@/client/hooks/ui/icon-style';
|
|
48
49
|
import { EDITOR_FONT_CHANGED_EVENT } from '@/client/hooks/editor/font';
|
|
49
50
|
import { EDITOR_THEME_CHANGED_EVENT } from '@/client/hooks/editor/theme';
|
|
@@ -172,6 +173,10 @@ export function applySettingsSideEffects(previous: SettingsState, next: Settings
|
|
|
172
173
|
applyChromeStyle(next.chromeStyle);
|
|
173
174
|
}
|
|
174
175
|
|
|
176
|
+
if (next.mobileChromeStyle !== previous.mobileChromeStyle) {
|
|
177
|
+
applyMobileChromeStyle(next.mobileChromeStyle);
|
|
178
|
+
}
|
|
179
|
+
|
|
175
180
|
if (next.iconStyle !== previous.iconStyle) {
|
|
176
181
|
applyIconStyle(next.iconStyle);
|
|
177
182
|
}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Settings → Accounts. Root manages the roster; a member sees only itself.
|
|
8
|
+
*
|
|
9
|
+
* The list and detail use the shared settings master/detail shell, so a phone
|
|
10
|
+
* gets the same one-band drill every other two-pane category has.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { useEffect, useMemo, useState } from 'preact/hooks';
|
|
14
|
+
import { KeyRound, Loader2, Plus, Trash2, UserRound } from 'lucide-preact';
|
|
15
|
+
import { SettingsMasterDetail } from '@/client/components/settings/master-detail';
|
|
16
|
+
import { useSettingsMasterDetail } from '@/client/hooks/settings/master-detail';
|
|
17
|
+
import { useAccounts } from '@/client/hooks/settings/accounts';
|
|
18
|
+
import { useAccount, setAccount } from '@/client/hooks/ui/auth';
|
|
19
|
+
import { useToasts } from '@/client/hooks/ui/toasts';
|
|
20
|
+
import type { AccountListItem } from '@kabmo-labs/kabmo-auth/account';
|
|
21
|
+
import {
|
|
22
|
+
AddAccountDialog,
|
|
23
|
+
DeleteAccountDialog,
|
|
24
|
+
ResetPasswordDialog,
|
|
25
|
+
} from '@/client/components/settings/categories/account-settings/Dialogs';
|
|
26
|
+
|
|
27
|
+
const INPUT_CLASS =
|
|
28
|
+
'w-full bg-paper border border-ink/20 rounded-md px-3 py-2 text-xs font-medium text-ink outline-none focus:border-ink/60 transition-colors shadow-2xs disabled:opacity-60';
|
|
29
|
+
|
|
30
|
+
function RoleBadge({ role }: { role: AccountListItem['role'] }) {
|
|
31
|
+
return (
|
|
32
|
+
<span className="shrink-0 rounded bg-ink/10 px-1.5 py-0.5 font-mono text-[10px] font-medium uppercase text-ink/60">
|
|
33
|
+
{role}
|
|
34
|
+
</span>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function AccountNameField({ account, onCommit, disabled }: {
|
|
39
|
+
account: AccountListItem;
|
|
40
|
+
onCommit: (name: string) => void;
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
}) {
|
|
43
|
+
const [draft, setDraft] = useState(account.name);
|
|
44
|
+
useEffect(() => setDraft(account.name), [account.name]);
|
|
45
|
+
const commit = () => {
|
|
46
|
+
const next = draft.trim();
|
|
47
|
+
if (!next || next === account.name) {
|
|
48
|
+
setDraft(account.name);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
onCommit(next);
|
|
52
|
+
};
|
|
53
|
+
return (
|
|
54
|
+
<div className="space-y-2">
|
|
55
|
+
<label htmlFor="account-name-input" className="block text-xs font-semibold text-ink">Display name</label>
|
|
56
|
+
<input
|
|
57
|
+
id="account-name-input"
|
|
58
|
+
className={INPUT_CLASS}
|
|
59
|
+
value={draft}
|
|
60
|
+
disabled={disabled}
|
|
61
|
+
onInput={(event) => setDraft(event.currentTarget.value)}
|
|
62
|
+
onBlur={commit}
|
|
63
|
+
onKeyDown={(event) => {
|
|
64
|
+
if (event.key === 'Enter') { event.preventDefault(); event.currentTarget.blur(); }
|
|
65
|
+
if (event.key === 'Escape') { setDraft(account.name); event.currentTarget.blur(); }
|
|
66
|
+
}}
|
|
67
|
+
/>
|
|
68
|
+
<p className="text-[11px] text-ink/50">Shown on the login screen and in the sidebar footer.</p>
|
|
69
|
+
</div>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function AccountSettings() {
|
|
74
|
+
const state = useAccounts();
|
|
75
|
+
const masterDetail = useSettingsMasterDetail();
|
|
76
|
+
const { pushToast } = useToasts();
|
|
77
|
+
const signedIn = useAccount();
|
|
78
|
+
const isRoot = signedIn?.role === 'root';
|
|
79
|
+
const [selectedId, setSelectedId] = useState<string>('');
|
|
80
|
+
const [addOpen, setAddOpen] = useState(false);
|
|
81
|
+
const [resetTarget, setResetTarget] = useState<AccountListItem | null>(null);
|
|
82
|
+
const [deleteTarget, setDeleteTarget] = useState<AccountListItem | null>(null);
|
|
83
|
+
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
if (selectedId && state.accounts.some((entry) => entry.id === selectedId)) return;
|
|
86
|
+
setSelectedId(state.currentAccountId || state.accounts[0]?.id || '');
|
|
87
|
+
}, [selectedId, state.accounts, state.currentAccountId]);
|
|
88
|
+
|
|
89
|
+
const selected = useMemo(
|
|
90
|
+
() => state.accounts.find((entry) => entry.id === selectedId) ?? state.accounts[0] ?? null,
|
|
91
|
+
[selectedId, state.accounts],
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
const refreshIdentity = (name: string) => {
|
|
95
|
+
const account = signedIn;
|
|
96
|
+
if (!account || account.id !== selected?.id) return;
|
|
97
|
+
setAccount({ ...account, name }, Math.max(1, state.accounts.length));
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const rename = async (name: string) => {
|
|
101
|
+
if (!selected) return;
|
|
102
|
+
try {
|
|
103
|
+
await state.rename(selected.id, name);
|
|
104
|
+
refreshIdentity(name);
|
|
105
|
+
pushToast('Account name saved', 'success');
|
|
106
|
+
} catch (error) {
|
|
107
|
+
pushToast(error instanceof Error ? error.message : String(error), 'error');
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
if (state.isLoading) {
|
|
112
|
+
return (
|
|
113
|
+
<div className="flex h-full items-center justify-center text-xs text-ink/50">
|
|
114
|
+
<Loader2 size={14} className="animate-spin" /> Loading accounts…
|
|
115
|
+
</div>
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (!state.enabled) {
|
|
120
|
+
return (
|
|
121
|
+
<div className="p-6 md:p-8">
|
|
122
|
+
<div className="max-w-xl rounded-xl border border-ink/15 bg-paper px-4 py-3">
|
|
123
|
+
<h2 className="text-sm font-semibold text-ink">Authentication is off</h2>
|
|
124
|
+
<p className="mt-1 text-[11.5px] leading-relaxed text-ink/60">
|
|
125
|
+
This instance has no login. Accounts can only be used when Kabmo is started with
|
|
126
|
+
<code className="mx-1 rounded bg-ink/5 px-1 py-0.5 font-mono text-[10px]">--ui-password</code>.
|
|
127
|
+
</p>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const canManage = isRoot && selected !== null;
|
|
134
|
+
|
|
135
|
+
return (
|
|
136
|
+
<div className="w-full h-full flex flex-col overflow-hidden bg-paper text-ink">
|
|
137
|
+
<SettingsMasterDetail
|
|
138
|
+
pane={masterDetail.pane}
|
|
139
|
+
onBack={masterDetail.back}
|
|
140
|
+
listLabel="Accounts"
|
|
141
|
+
detailLabel={selected?.name ?? 'Account'}
|
|
142
|
+
detailDescription={selected ? `${selected.ownedWorkspaces} owned · ${selected.sharedWorkspaces} shared` : undefined}
|
|
143
|
+
list={
|
|
144
|
+
<div className="w-full md:w-64 md:border-r border-ink/10 h-full flex flex-col bg-paper/50 flex-shrink-0">
|
|
145
|
+
<div className="h-10 px-3.5 border-b border-ink/10 flex items-center justify-between">
|
|
146
|
+
<span className="text-xs font-semibold text-ink">{state.accounts.length} account{state.accounts.length === 1 ? '' : 's'}</span>
|
|
147
|
+
{isRoot && (
|
|
148
|
+
<button type="button" onClick={() => setAddOpen(true)} aria-label="Add account" title="Add account" className="p-1 rounded text-ink/60 hover:text-ink hover:bg-ink/5 cursor-pointer">
|
|
149
|
+
<Plus size={15} />
|
|
150
|
+
</button>
|
|
151
|
+
)}
|
|
152
|
+
</div>
|
|
153
|
+
<div className="flex-1 scrollbar-overlay-container p-1.5 space-y-0.5">
|
|
154
|
+
{state.loadError && <p className="px-2 py-2 text-[11px] text-error-text">{state.loadError}</p>}
|
|
155
|
+
{state.accounts.map((account) => (
|
|
156
|
+
<button
|
|
157
|
+
key={account.id}
|
|
158
|
+
type="button"
|
|
159
|
+
onClick={() => { setSelectedId(account.id); masterDetail.openDetail(); }}
|
|
160
|
+
className={`w-full text-left px-2.5 py-2 rounded-lg transition-colors cursor-pointer ${account.id === selected?.id ? 'bg-ink/10' : 'hover:bg-ink/5'}`}
|
|
161
|
+
>
|
|
162
|
+
<span className="flex items-center justify-between gap-2">
|
|
163
|
+
<span className="flex min-w-0 items-center gap-1.5">
|
|
164
|
+
<UserRound size={14} className="shrink-0 text-ink/50" />
|
|
165
|
+
<span className="truncate text-[11.5px] font-medium text-ink">{account.name}</span>
|
|
166
|
+
</span>
|
|
167
|
+
<RoleBadge role={account.role} />
|
|
168
|
+
</span>
|
|
169
|
+
<span className="mt-0.5 block pl-5 text-[10.5px] text-ink/45">
|
|
170
|
+
{account.ownedWorkspaces} owned · {account.sharedWorkspaces} shared
|
|
171
|
+
</span>
|
|
172
|
+
</button>
|
|
173
|
+
))}
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
}
|
|
177
|
+
detail={
|
|
178
|
+
selected ? (
|
|
179
|
+
<div className="flex-1 min-h-0 scrollbar-overlay-container p-6 md:p-8 space-y-7">
|
|
180
|
+
<div className="flex items-start justify-between gap-4 border-b border-ink/10 pb-4">
|
|
181
|
+
<div className="min-w-0">
|
|
182
|
+
<h2 className="truncate text-xl font-bold tracking-tight text-ink">{selected.name}</h2>
|
|
183
|
+
<p className="mt-0.5 text-[11px] text-ink/50">{selected.role === 'root' ? 'Primary account' : 'Member account'}</p>
|
|
184
|
+
</div>
|
|
185
|
+
<RoleBadge role={selected.role} />
|
|
186
|
+
</div>
|
|
187
|
+
|
|
188
|
+
<AccountNameField account={selected} disabled={!canManage && selected.id !== signedIn?.id} onCommit={(name) => void rename(name)} />
|
|
189
|
+
|
|
190
|
+
<div className="space-y-2">
|
|
191
|
+
<h3 className="text-xs font-semibold text-ink">Password</h3>
|
|
192
|
+
{selected.role === 'root' ? (
|
|
193
|
+
<div className="space-y-1.5">
|
|
194
|
+
<button
|
|
195
|
+
type="button"
|
|
196
|
+
onClick={() => setResetTarget(selected)}
|
|
197
|
+
disabled={selected.id !== signedIn?.id}
|
|
198
|
+
className="inline-flex items-center gap-1.5 rounded-md border border-ink/20 px-2.5 py-1.5 text-[11px] font-medium text-ink hover:border-ink/40 disabled:opacity-40"
|
|
199
|
+
>
|
|
200
|
+
<KeyRound size={12} /> Change password for this run
|
|
201
|
+
</button>
|
|
202
|
+
<p className="text-[11px] leading-relaxed text-ink/55">
|
|
203
|
+
Root's next start takes <code className="font-mono">--ui-password</code> again.
|
|
204
|
+
</p>
|
|
205
|
+
</div>
|
|
206
|
+
) : (
|
|
207
|
+
<button
|
|
208
|
+
type="button"
|
|
209
|
+
onClick={() => setResetTarget(selected)}
|
|
210
|
+
disabled={!canManage && selected.id !== signedIn?.id}
|
|
211
|
+
className="inline-flex items-center gap-1.5 rounded-md border border-ink/20 px-2.5 py-1.5 text-[11px] font-medium text-ink hover:border-ink/40 disabled:opacity-40"
|
|
212
|
+
>
|
|
213
|
+
<KeyRound size={12} /> Reset password
|
|
214
|
+
</button>
|
|
215
|
+
)}
|
|
216
|
+
</div>
|
|
217
|
+
|
|
218
|
+
<div className="space-y-2">
|
|
219
|
+
<h3 className="text-xs font-semibold text-ink">Workspaces</h3>
|
|
220
|
+
<p className="text-[11.5px] text-ink/60">{selected.ownedWorkspaces} owned · {selected.sharedWorkspaces} shared with this account</p>
|
|
221
|
+
</div>
|
|
222
|
+
|
|
223
|
+
{canManage && selected.role !== 'root' && (
|
|
224
|
+
<div className="space-y-2 border-t border-ink/10 pt-5">
|
|
225
|
+
<h3 className="text-xs font-semibold text-ink">Danger zone</h3>
|
|
226
|
+
<button type="button" onClick={() => setDeleteTarget(selected)} className="inline-flex items-center gap-1.5 rounded-md border border-error/30 px-2.5 py-1.5 text-[11px] font-medium text-error-text hover:bg-error/5">
|
|
227
|
+
<Trash2 size={12} /> Delete account
|
|
228
|
+
</button>
|
|
229
|
+
</div>
|
|
230
|
+
)}
|
|
231
|
+
</div>
|
|
232
|
+
) : (
|
|
233
|
+
<div className="flex flex-1 items-center justify-center text-xs text-ink/50">No account selected.</div>
|
|
234
|
+
)
|
|
235
|
+
}
|
|
236
|
+
/>
|
|
237
|
+
|
|
238
|
+
<AddAccountDialog
|
|
239
|
+
open={addOpen}
|
|
240
|
+
onClose={() => setAddOpen(false)}
|
|
241
|
+
onSubmit={async (name, password) => {
|
|
242
|
+
await state.create(name, password);
|
|
243
|
+
setAccount(signedIn, Math.max(1, state.accounts.length + 1));
|
|
244
|
+
}}
|
|
245
|
+
/>
|
|
246
|
+
<ResetPasswordDialog
|
|
247
|
+
account={resetTarget}
|
|
248
|
+
requiresCurrent={resetTarget?.id === signedIn?.id}
|
|
249
|
+
onClose={() => setResetTarget(null)}
|
|
250
|
+
onSubmit={(newPassword, currentPassword) => (
|
|
251
|
+
resetTarget?.id === signedIn?.id
|
|
252
|
+
? state.changeOwnPassword(currentPassword ?? '', newPassword)
|
|
253
|
+
: state.resetPassword(resetTarget!.id, newPassword, currentPassword)
|
|
254
|
+
)}
|
|
255
|
+
/>
|
|
256
|
+
<DeleteAccountDialog
|
|
257
|
+
account={deleteTarget}
|
|
258
|
+
onClose={() => setDeleteTarget(null)}
|
|
259
|
+
onSubmit={async () => {
|
|
260
|
+
await state.remove(deleteTarget!.id, 'root');
|
|
261
|
+
setAccount(signedIn, Math.max(1, state.accounts.length - 1));
|
|
262
|
+
}}
|
|
263
|
+
/>
|
|
264
|
+
</div>
|
|
265
|
+
);
|
|
266
|
+
}
|
|
@@ -119,6 +119,8 @@ export function ProjectSettings() {
|
|
|
119
119
|
setDeleteError(null);
|
|
120
120
|
setDeleteTarget(selected);
|
|
121
121
|
}}
|
|
122
|
+
onSharingChanged={() => state.refresh()}
|
|
123
|
+
onError={(message) => pushToast(message, 'error')}
|
|
122
124
|
/>
|
|
123
125
|
{/* Worktrees belong to the PROJECT, not to a session: a create here
|
|
124
126
|
has no chat, and the next chat picks it from the composer. */}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/** The three destructive/identity dialogs Settings → Accounts needs. */
|
|
7
|
+
|
|
8
|
+
import { useEffect, useState } from 'preact/hooks';
|
|
9
|
+
import { Loader2, Lock, Trash2, UserPlus } from 'lucide-preact';
|
|
10
|
+
import { Modal } from '@/client/components/common/Modal';
|
|
11
|
+
import type { AccountListItem } from '@kabmo-labs/kabmo-auth/account';
|
|
12
|
+
|
|
13
|
+
const INPUT_CLASS =
|
|
14
|
+
'w-full bg-paper border border-ink/20 rounded-md px-3 py-2 text-xs text-ink outline-none focus:border-ink/60 transition-colors';
|
|
15
|
+
|
|
16
|
+
function footer(cancel: () => void, submit: () => void, busy: boolean, label: string) {
|
|
17
|
+
return (
|
|
18
|
+
<div className="flex items-center justify-end gap-2 px-5 py-3.5 border-t border-ink/10">
|
|
19
|
+
<button
|
|
20
|
+
type="button"
|
|
21
|
+
onClick={cancel}
|
|
22
|
+
disabled={busy}
|
|
23
|
+
className="px-3.5 py-1.5 rounded-md border border-ink/20 text-xs font-medium text-ink hover:bg-ink/5 transition-colors cursor-pointer disabled:opacity-50"
|
|
24
|
+
>
|
|
25
|
+
Cancel
|
|
26
|
+
</button>
|
|
27
|
+
<button
|
|
28
|
+
type="button"
|
|
29
|
+
onClick={submit}
|
|
30
|
+
disabled={busy}
|
|
31
|
+
className="px-3.5 py-1.5 rounded-md bg-ink text-canvas text-xs font-medium hover:opacity-90 transition-opacity cursor-pointer disabled:opacity-50 inline-flex items-center gap-1.5"
|
|
32
|
+
>
|
|
33
|
+
{busy && <Loader2 size={13} className="animate-spin" />}
|
|
34
|
+
<span>{busy ? 'Saving…' : label}</span>
|
|
35
|
+
</button>
|
|
36
|
+
</div>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function AddAccountDialog({
|
|
41
|
+
open,
|
|
42
|
+
onClose,
|
|
43
|
+
onSubmit,
|
|
44
|
+
}: {
|
|
45
|
+
open: boolean;
|
|
46
|
+
onClose: () => void;
|
|
47
|
+
onSubmit: (name: string, password: string) => Promise<void>;
|
|
48
|
+
}) {
|
|
49
|
+
const [name, setName] = useState('');
|
|
50
|
+
const [password, setPassword] = useState('');
|
|
51
|
+
const [busy, setBusy] = useState(false);
|
|
52
|
+
const [error, setError] = useState<string | null>(null);
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (!open) return;
|
|
55
|
+
setName('');
|
|
56
|
+
setPassword('');
|
|
57
|
+
setError(null);
|
|
58
|
+
}, [open]);
|
|
59
|
+
if (!open) return null;
|
|
60
|
+
|
|
61
|
+
const submit = async () => {
|
|
62
|
+
if (!name.trim()) return setError('Enter a name.');
|
|
63
|
+
if (password.length < 8) return setError('Password must be at least 8 characters.');
|
|
64
|
+
setBusy(true);
|
|
65
|
+
setError(null);
|
|
66
|
+
try {
|
|
67
|
+
await onSubmit(name.trim(), password);
|
|
68
|
+
onClose();
|
|
69
|
+
} catch (cause) {
|
|
70
|
+
setError(cause instanceof Error ? cause.message : String(cause));
|
|
71
|
+
} finally {
|
|
72
|
+
setBusy(false);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<Modal
|
|
78
|
+
onClose={busy ? () => {} : onClose}
|
|
79
|
+
ariaLabel="Add account"
|
|
80
|
+
maxWidthClass="max-w-[480px]"
|
|
81
|
+
header={<div><h2 className="text-sm font-semibold text-ink">Add account</h2><p className="text-[11px] text-ink/50">A separate sign-in with its own workspace list.</p></div>}
|
|
82
|
+
footer={footer(onClose, () => void submit(), busy, 'Add account')}
|
|
83
|
+
>
|
|
84
|
+
<div className="px-5 py-4 space-y-4">
|
|
85
|
+
<label className="block space-y-1.5">
|
|
86
|
+
<span className="text-xs font-semibold text-ink">Name</span>
|
|
87
|
+
<input className={INPUT_CLASS} value={name} onInput={(event) => setName(event.currentTarget.value)} placeholder="e.g. Alice" autoFocus />
|
|
88
|
+
<span className="block text-[11px] text-ink/50">Shown on the login screen and in the footer.</span>
|
|
89
|
+
</label>
|
|
90
|
+
<label className="block space-y-1.5">
|
|
91
|
+
<span className="text-xs font-semibold text-ink">Password</span>
|
|
92
|
+
<input className={INPUT_CLASS} type="password" value={password} onInput={(event) => setPassword(event.currentTarget.value)} placeholder="At least 8 characters" />
|
|
93
|
+
</label>
|
|
94
|
+
<p className="flex items-start gap-2 rounded-md border border-ink/10 bg-ink/[0.03] px-3 py-2 text-[11px] text-ink/60">
|
|
95
|
+
<UserPlus size={13} className="mt-0.5 shrink-0" />
|
|
96
|
+
The account starts with an empty workspace list. Share one from Settings → Projects.
|
|
97
|
+
</p>
|
|
98
|
+
{error && <p className="text-[11px] text-error-text">{error}</p>}
|
|
99
|
+
</div>
|
|
100
|
+
</Modal>
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function ResetPasswordDialog({
|
|
105
|
+
account,
|
|
106
|
+
onClose,
|
|
107
|
+
onSubmit,
|
|
108
|
+
requiresCurrent,
|
|
109
|
+
}: {
|
|
110
|
+
account: AccountListItem | null;
|
|
111
|
+
onClose: () => void;
|
|
112
|
+
onSubmit: (newPassword: string, currentPassword?: string) => Promise<void>;
|
|
113
|
+
requiresCurrent: boolean;
|
|
114
|
+
}) {
|
|
115
|
+
const [current, setCurrent] = useState('');
|
|
116
|
+
const [next, setNext] = useState('');
|
|
117
|
+
const [confirm, setConfirm] = useState('');
|
|
118
|
+
const [busy, setBusy] = useState(false);
|
|
119
|
+
const [error, setError] = useState<string | null>(null);
|
|
120
|
+
useEffect(() => {
|
|
121
|
+
setCurrent('');
|
|
122
|
+
setNext('');
|
|
123
|
+
setConfirm('');
|
|
124
|
+
setError(null);
|
|
125
|
+
}, [account?.id]);
|
|
126
|
+
if (!account) return null;
|
|
127
|
+
|
|
128
|
+
const submit = async () => {
|
|
129
|
+
if (next.length < 8) return setError('Password must be at least 8 characters.');
|
|
130
|
+
if (next !== confirm) return setError('Passwords do not match.');
|
|
131
|
+
setBusy(true);
|
|
132
|
+
setError(null);
|
|
133
|
+
try {
|
|
134
|
+
await onSubmit(next, requiresCurrent ? current : undefined);
|
|
135
|
+
onClose();
|
|
136
|
+
} catch (cause) {
|
|
137
|
+
setError(cause instanceof Error ? cause.message : String(cause));
|
|
138
|
+
} finally {
|
|
139
|
+
setBusy(false);
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
return (
|
|
144
|
+
<Modal
|
|
145
|
+
onClose={busy ? () => {} : onClose}
|
|
146
|
+
ariaLabel={`Reset password for ${account.name}`}
|
|
147
|
+
header={<div><h2 className="text-sm font-semibold text-ink">Reset password</h2><p className="text-[11px] text-ink/50">{account.name}</p></div>}
|
|
148
|
+
footer={footer(onClose, () => void submit(), busy, 'Reset password')}
|
|
149
|
+
>
|
|
150
|
+
<div className="px-5 py-4 space-y-3.5">
|
|
151
|
+
{requiresCurrent && (
|
|
152
|
+
<label className="block space-y-1.5">
|
|
153
|
+
<span className="text-xs font-semibold text-ink">Current password</span>
|
|
154
|
+
<input className={INPUT_CLASS} type="password" value={current} onInput={(e) => setCurrent(e.currentTarget.value)} autoFocus />
|
|
155
|
+
</label>
|
|
156
|
+
)}
|
|
157
|
+
<label className="block space-y-1.5">
|
|
158
|
+
<span className="text-xs font-semibold text-ink">New password</span>
|
|
159
|
+
<input className={INPUT_CLASS} type="password" value={next} onInput={(e) => setNext(e.currentTarget.value)} autoFocus={!requiresCurrent} />
|
|
160
|
+
</label>
|
|
161
|
+
<label className="block space-y-1.5">
|
|
162
|
+
<span className="text-xs font-semibold text-ink">Confirm new password</span>
|
|
163
|
+
<input className={INPUT_CLASS} type="password" value={confirm} onInput={(e) => setConfirm(e.currentTarget.value)} />
|
|
164
|
+
</label>
|
|
165
|
+
<p className="flex items-start gap-2 text-[11px] text-ink/55"><Lock size={12} className="mt-0.5 shrink-0" />Resetting signs out this account's other sessions.</p>
|
|
166
|
+
{error && <p className="text-[11px] text-error-text">{error}</p>}
|
|
167
|
+
</div>
|
|
168
|
+
</Modal>
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export function DeleteAccountDialog({
|
|
173
|
+
account,
|
|
174
|
+
onClose,
|
|
175
|
+
onSubmit,
|
|
176
|
+
}: {
|
|
177
|
+
account: AccountListItem | null;
|
|
178
|
+
onClose: () => void;
|
|
179
|
+
onSubmit: () => Promise<void>;
|
|
180
|
+
}) {
|
|
181
|
+
const [busy, setBusy] = useState(false);
|
|
182
|
+
const [error, setError] = useState<string | null>(null);
|
|
183
|
+
useEffect(() => setError(null), [account?.id]);
|
|
184
|
+
if (!account) return null;
|
|
185
|
+
|
|
186
|
+
const submit = async () => {
|
|
187
|
+
setBusy(true);
|
|
188
|
+
setError(null);
|
|
189
|
+
try {
|
|
190
|
+
await onSubmit();
|
|
191
|
+
onClose();
|
|
192
|
+
} catch (cause) {
|
|
193
|
+
setError(cause instanceof Error ? cause.message : String(cause));
|
|
194
|
+
} finally {
|
|
195
|
+
setBusy(false);
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
return (
|
|
200
|
+
<Modal
|
|
201
|
+
onClose={busy ? () => {} : onClose}
|
|
202
|
+
zClass="z-[70]"
|
|
203
|
+
ariaLabel="Delete account"
|
|
204
|
+
maxWidthClass="max-w-[440px]"
|
|
205
|
+
header={<div className="flex items-center gap-3"><Trash2 size={16} className="text-error-text" /><div><h2 className="text-sm font-semibold text-ink">Delete account?</h2><p className="text-[11px] text-ink/50">{account.name}</p></div></div>}
|
|
206
|
+
footer={
|
|
207
|
+
<div className="flex items-center justify-end gap-2 px-5 py-3.5 border-t border-ink/10">
|
|
208
|
+
<button type="button" onClick={onClose} disabled={busy} className="px-3.5 py-1.5 rounded-md border border-ink/20 text-xs font-medium text-ink hover:bg-ink/5">Cancel</button>
|
|
209
|
+
<button type="button" onClick={() => void submit()} disabled={busy} className="px-3.5 py-1.5 rounded-md bg-error text-error-on text-xs font-medium inline-flex items-center gap-1.5 disabled:opacity-50">
|
|
210
|
+
{busy && <Loader2 size={13} className="animate-spin" />}
|
|
211
|
+
{busy ? 'Deleting…' : 'Delete account'}
|
|
212
|
+
</button>
|
|
213
|
+
</div>
|
|
214
|
+
}
|
|
215
|
+
>
|
|
216
|
+
<div className="px-5 py-4 space-y-3 text-[11.5px] leading-relaxed text-ink/70">
|
|
217
|
+
<p>This account is signed out everywhere and removed from every shared workspace.</p>
|
|
218
|
+
<p>Owned workspaces ({account.ownedWorkspaces}) transfer to the root account. The directories and chat transcripts stay on disk.</p>
|
|
219
|
+
{error && <p className="text-error-text">{error}</p>}
|
|
220
|
+
</div>
|
|
221
|
+
</Modal>
|
|
222
|
+
);
|
|
223
|
+
}
|
package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.test.tsx
CHANGED
|
@@ -59,7 +59,7 @@ function mount(
|
|
|
59
59
|
const cards = (el: HTMLElement) => [...el.querySelectorAll('button[aria-pressed]')] as HTMLButtonElement[];
|
|
60
60
|
|
|
61
61
|
describe('border style section', () => {
|
|
62
|
-
test('both styles are offered,
|
|
62
|
+
test('both styles are offered, with the shipped one selected by default', () => {
|
|
63
63
|
const el = mount('hairline');
|
|
64
64
|
const found = cards(el);
|
|
65
65
|
|
|
@@ -74,11 +74,10 @@ describe('border style section', () => {
|
|
|
74
74
|
expect(found[1].getAttribute('aria-pressed')).toBe('true');
|
|
75
75
|
});
|
|
76
76
|
|
|
77
|
-
test('an unknown stored value falls to
|
|
77
|
+
test('an unknown stored value falls to hairline rather than leaving both unpressed', () => {
|
|
78
78
|
const found = cards(mount('naked'));
|
|
79
79
|
|
|
80
|
-
expect(found[0].getAttribute('aria-pressed')).toBe('
|
|
81
|
-
expect(found[1].getAttribute('aria-pressed')).toBe('true');
|
|
80
|
+
expect(found[0].getAttribute('aria-pressed')).toBe('true');
|
|
82
81
|
});
|
|
83
82
|
|
|
84
83
|
test('clicking a card asks for that style, even when it is already active', () => {
|