@kabmo-labs/kabmo 0.46.1 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +439 -435
- package/dist/client/static/js/{CsvGrid-qdkmv8bj.js → CsvGrid-vfgttmym.js} +2 -2
- package/dist/client/static/js/{DocxView-k84ns803.js → DocxView-dc41t6rp.js} +2 -2
- package/dist/client/static/js/{DrawioView-r1n717f7.js → DrawioView-wpwr38d9.js} +2 -2
- package/dist/client/static/js/HtmlPreview-23n7t5cs.js +1 -0
- package/dist/client/static/js/ImageView-mvjb3qh1.js +1 -0
- package/dist/client/static/js/LayoutWrapper-eenx0hp2.js +2 -0
- package/dist/client/static/js/{Modal-xe6h99jn.js → Modal-dsqhas10.js} +13 -13
- package/dist/client/static/js/{PdfView-ffg4mccg.js → PdfView-cpvsbfk0.js} +1 -1
- package/dist/client/static/js/{SessionsView-cdcbsee9.js → SessionsView-s0crtcm8.js} +1 -1
- package/dist/client/static/js/{SheetView-89sscpz6.js → SheetView-n6mst0hq.js} +13 -13
- package/dist/client/static/js/{SvgPreview-68c0ccbv.js → SvgPreview-g2aqq812.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-h3a5s259.js → abnfDiagram-O67JEVCF-3vac8sq4.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-b5w9mnn5.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-983p0jgn.js → architectureDiagram-NJMV4G6O-1nh4htz2.js} +3 -3
- package/dist/client/static/js/{astro-hyj5wege.js → astro-63zcysj7.js} +1 -1
- package/dist/client/static/js/bash-hv3167gh.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-16pse5mh.js → blockDiagram-BEXU5L5S-62z6kaar.js} +2 -2
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-mvnb00zt.js → c4Diagram-YGBWAQC7-rts5zgx4.js} +3 -3
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-kmpd91xb.js → classDiagram-v2-NBCMYWYE-tnpww186.js} +1 -1
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-3ek5r5se.js → cose-bilkent-JH36ORCC-8vsjbzwa.js} +1 -1
- package/dist/client/static/js/cpp-v2mqp8j7.js +1 -0
- package/dist/client/static/js/css-x7gyc3ta.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-kdj8rjc1.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-jkbh84zn.js → cynefinDiagram-VND7K2PF-005gc8km.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-4fdc0sgn.js → dagre-6A5THRUB-41zsteyd.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-hbk61nq9.js → diagram-22UHCM2B-prsm18a1.js} +3 -3
- package/dist/client/static/js/{diagram-3UASUU5V-hfpbr9qh.js → diagram-3UASUU5V-5nx9wf04.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-fn0nt71a.js → diagram-ATOU4E4O-k3d4z3aq.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-ssswxjeb.js → diagram-CDSNMT55-x2c5x5j2.js} +2 -2
- package/dist/client/static/js/{diagram-MLGK6HIB-whnzxv6f.js → diagram-MLGK6HIB-nvr76jqh.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-hk1chzxk.js → diagram-MPIPVDR6-v1jpzp9p.js} +1 -1
- package/dist/client/static/js/{dockerfile-zmsj8r4g.js → dockerfile-vz6va73h.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-q1vkg5mr.js → ebnfDiagram-ZINNZB2B-0v4tqr9v.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-kt98vg8j.js → elk-276RUBZZ-qfn4r7xj.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-ey3avsn9.js → erDiagram-OPXOYQCR-cd667n9f.js} +4 -4
- package/dist/client/static/js/{erlang-814e8qy5.js → erlang-vk66vt7q.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-m57b7ytw.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-fasj2gxy.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-a9k1at43.js → ganttDiagram-FUAMR5RP-ps0h3drm.js} +1 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-wvzsc4ph.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-gnekjfym.js → gitGraphDiagram-X574FWY7-fts23jer.js} +2 -2
- package/dist/client/static/js/graphql-a4gbqpj9.js +1 -0
- package/dist/client/static/js/{index-xq5f3nxa.js → index-0dkc6z8e.js} +2 -2
- package/dist/client/static/js/{index-m4k054wz.js → index-1d8bxjsz.js} +3 -3
- package/dist/client/static/js/{index-kty4ncsr.js → index-1whzs9kb.js} +2 -2
- package/dist/client/static/js/{index-qfxn7yh5.js → index-396r53n0.js} +2 -2
- package/dist/client/static/js/{index-kbhrvep8.js → index-39d8zbkx.js} +3 -3
- package/dist/client/static/js/{index-dn7hg4em.js → index-3nsrnyqr.js} +2 -2
- package/dist/client/static/js/{index-1ax52p0q.js → index-4jzsr1ky.js} +2 -2
- package/dist/client/static/js/{index-2a6qp9y6.js → index-4wnzs76g.js} +1 -1
- package/dist/client/static/js/{index-hgzntg2j.js → index-4x9p7hf9.js} +2 -2
- package/dist/client/static/js/{index-fzngzhww.js → index-52nd4hgm.js} +1 -1
- package/dist/client/static/js/{index-pavvxrsz.js → index-54mkp2r2.js} +1 -1
- package/dist/client/static/js/{index-abs635a1.js → index-56rtb871.js} +25 -25
- package/dist/client/static/js/{index-dxvtjn6a.js → index-5f4b44ay.js} +2 -2
- package/dist/client/static/js/{index-q9ytjey8.js → index-6009v8jf.js} +1 -1
- package/dist/client/static/js/{index-e9cxje00.js → index-62jgcgfd.js} +5 -5
- package/dist/client/static/js/{index-nw5mvcaj.js → index-64p1dncg.js} +2 -2
- package/dist/client/static/js/{index-fj5rsp5v.js → index-6d6hxwb5.js} +2 -2
- package/dist/client/static/js/{index-19x11s5w.js → index-70g527sb.js} +2 -2
- package/dist/client/static/js/{index-ykm7a3cp.js → index-7zeah164.js} +2 -2
- package/dist/client/static/js/{index-z25ss7xj.js → index-7zedprz3.js} +1 -1
- package/dist/client/static/js/{index-g7s0wsag.js → index-9ab6xaxd.js} +2 -2
- package/dist/client/static/js/index-9vqkyj58.js +3 -0
- package/dist/client/static/js/{index-60v30k5h.js → index-9xsf8162.js} +35 -35
- package/dist/client/static/js/{index-3x7h2eqj.js → index-a4h5np9r.js} +2 -2
- package/dist/client/static/js/{index-9vv7wr1n.js → index-an2wv33f.js} +2 -2
- package/dist/client/static/js/{index-64sqfr4a.js → index-c5hjht5e.js} +2 -2
- package/dist/client/static/js/{index-84fyq5a6.js → index-c63qyysm.js} +1 -1
- package/dist/client/static/js/{index-atq9q1s7.js → index-ccgzzydx.js} +1 -1
- package/dist/client/static/js/{index-b5dfvget.js → index-cra9mgkq.js} +4 -4
- package/dist/client/static/js/index-cvyqp8nz.css +1 -0
- package/dist/client/static/js/index-d2xtbabt.js +2 -0
- package/dist/client/static/js/{index-wrcdc9vz.js → index-dxkefysk.js} +1 -1
- package/dist/client/static/js/index-dxp2yvy7.js +2 -0
- package/dist/client/static/js/{index-vjmg7kn5.js → index-dyc886cc.js} +1 -1
- package/dist/client/static/js/{index-5wz0y88c.js → index-dzeyd153.js} +2 -2
- package/dist/client/static/js/{index-qf3y3ahx.js → index-e5j5gc4h.js} +2 -2
- package/dist/client/static/js/{index-2ks0m8ss.js → index-evmcc5qh.js} +2 -2
- package/dist/client/static/js/{index-b2e5pwx7.js → index-f2ahkev0.js} +5 -5
- package/dist/client/static/js/{index-65afr75v.js → index-fjex1y0t.js} +2 -2
- package/dist/client/static/js/{index-kb14dhrx.js → index-fxd8dfj4.js} +2 -2
- package/dist/client/static/js/{index-trvqvb1v.js → index-g4kkapka.js} +2 -2
- package/dist/client/static/js/{index-561gkvve.js → index-gzkzwgzv.js} +2 -2
- package/dist/client/static/js/{index-yf93db65.js → index-n1yr4khe.js} +1 -1
- package/dist/client/static/js/{index-d23eacf2.js → index-nkahe229.js} +2 -2
- package/dist/client/static/js/{index-dt6q3rws.js → index-p6s3fz6b.js} +11 -11
- package/dist/client/static/js/{index-hnb66d3s.js → index-q4ke39rh.js} +2 -2
- package/dist/client/static/js/index-qtd0e38d.js +1 -0
- package/dist/client/static/js/{index-x9r7zfp4.js → index-tqgj7rd9.js} +2 -2
- package/dist/client/static/js/{index-wbws16ag.js → index-x0xspam4.js} +2 -2
- package/dist/client/static/js/{index-4cag7w6k.js → index-x2v1zmth.js} +185 -185
- package/dist/client/static/js/{index-amsa0tfs.js → index-x9hfvbz6.js} +1 -1
- package/dist/client/static/js/{index-8g7q8mz4.js → index-xk1cqjkn.js} +3 -3
- package/dist/client/static/js/{index-c9e417cs.js → index-y6ke70e6.js} +2 -2
- package/dist/client/static/js/{index-bsr7wmj2.js → index-zhjjpvcc.js} +1 -1
- package/dist/client/static/js/info-A6RAGUB7-ym2xevn8.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-r1p25738.js → infoDiagram-VRGFBTTK-88qbtpq5.js} +1 -1
- package/dist/client/static/js/ini-80p6sp79.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-afgrqdrt.js → ishikawaDiagram-OU5B5YK6-s8bagk00.js} +1 -1
- package/dist/client/static/js/java-mm2b3s9b.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-hepa4wk7.js → journeyDiagram-ZHPQQLJL-hz8z0b9x.js} +2 -2
- package/dist/client/static/js/json-fzy76fkw.js +1 -0
- package/dist/client/static/js/jsx-c7v2f8s7.js +1 -0
- package/dist/client/static/js/{julia-yv2j8qd0.js → julia-dm0j9apa.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-jysft8ya.js → kanban-definition-PNTS6WVX-sjjnjb51.js} +1 -1
- package/dist/client/static/js/lua-ppfdxrmv.js +1 -0
- package/dist/client/static/js/markdown-xed7y3ds.js +1 -0
- package/dist/client/static/js/{mermaid.core-0m90b0s8.js → mermaid.core-zvwygxbh.js} +7 -7
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-x2rrzpvr.js → mindmap-definition-NLK3R4M7-kgj8enan.js} +2 -2
- package/dist/client/static/js/one-dark-pro-mq6sn6a2.js +1 -0
- package/dist/client/static/js/one-light-pt6t6vax.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-01vcsy6x.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-z7vb7f1z.js → pegDiagram-GJSIUBJH-gxzw1qwa.js} +1 -1
- package/dist/client/static/js/{perl-917pjq5a.js → perl-4jcm2jxv.js} +1 -1
- package/dist/client/static/js/{php-hwz75qzt.js → php-q32mec74.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-053gzkmh.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-jqv6v4e6.js → pieDiagram-5QR66LMP-pdqwyqcm.js} +1 -1
- package/dist/client/static/js/properties-8ysbq2n2.js +1 -0
- package/dist/client/static/js/python-4ysexc8s.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-w2h8yxrv.js → quadrantDiagram-O4NWA36T-yx2t364p.js} +1 -1
- package/dist/client/static/js/r-hrsw5arc.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-bkpby8am.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-67bxrjgw.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-xj9ymacg.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-2xxpbnf6.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-78w88znz.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-nd09yac3.js → railroadDiagram-XR7U4H2S-800fdzkr.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-t61zxh5v.js → requirementDiagram-PLB6GJNP-vc5rpgtm.js} +1 -1
- package/dist/client/static/js/{ruby-er7ayhte.js → ruby-npmpb290.js} +1 -1
- package/dist/client/static/js/{rust-avnkhh0p.js → rust-waks43wh.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-2f7h2cmw.js → sankeyDiagram-IPEJSGJF-ccjk8zgn.js} +2 -2
- package/dist/client/static/js/{sass-n47tt136.js → sass-502a4r7y.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-kfb5d7zd.js → sequenceDiagram-PO4LG4MO-c0tk7gfn.js} +6 -6
- package/dist/client/static/js/{sizeCapture-INFHLROL-amfg19se.js → sizeCapture-INFHLROL-fma9p1vy.js} +1 -1
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-k5hx7btx.js → stateDiagram-v2-GCMORJYK-d8f24b7j.js} +2 -2
- package/dist/client/static/js/{svelte-2pmz35vx.js → svelte-c15d0421.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-wv3rp8kk.js → swimlanes-2SLR337P-sdt7qy36.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-rz309qrx.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-0re95wtn.js → timeline-definition-EJHVYXUP-rv8qyr8b.js} +2 -2
- package/dist/client/static/js/treeView-Q6P3EWNA-g2bkjr4z.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-pj7yw9rw.js +1 -0
- package/dist/client/static/js/tsx-xjp2ds8g.js +1 -0
- package/dist/client/static/js/typescript-yg97da8h.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-yrje14qp.js → usecaseDiagram-POWQR4AR-w6ew1red.js} +2 -2
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-jxkmrfy5.js → vennDiagram-UO4OBE2U-p9axw7ch.js} +1 -1
- package/dist/client/static/js/{vue-d5gpjfgn.js → vue-xpemy62d.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-c7ekf8r2.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-d3v2m9b1.js → wardleyDiagram-VNRHLVJA-5ewc8s4p.js} +1 -1
- package/dist/client/static/js/xml-nrb23phz.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-9a1s1rjt.js → xychartDiagram-PMCCYNJV-7n4gn7k6.js} +2 -2
- package/dist/client/static/js/yaml-sqs6pjpx.js +1 -0
- package/marketplace/marketplace.json +34 -7
- package/marketplace/plugins/kanban/README.md +143 -0
- package/marketplace/plugins/kanban/icon.svg +5 -0
- package/marketplace/plugins/kanban/package.json +30 -0
- package/marketplace/plugins/kanban/src/app.tsx +34 -0
- package/marketplace/plugins/kanban/src/mcp-tools.ts +296 -0
- package/marketplace/plugins/kanban/src/mcp.test.ts +199 -0
- package/marketplace/plugins/kanban/src/mcp.ts +148 -0
- package/marketplace/plugins/kanban/src/panel/CardSheet.tsx +319 -0
- package/marketplace/plugins/kanban/src/panel/CardTile.tsx +97 -0
- package/marketplace/plugins/kanban/src/panel/StageColumn.tsx +116 -0
- package/marketplace/plugins/kanban/src/panel/StageSheet.tsx +249 -0
- package/marketplace/plugins/kanban/src/panel/catalogs.ts +114 -0
- package/marketplace/plugins/kanban/src/panel/index.tsx +327 -0
- package/marketplace/plugins/kanban/src/panel/panel.test.ts +219 -0
- package/marketplace/plugins/kanban/src/panel/start-work.ts +132 -0
- package/marketplace/plugins/kanban/src/panel/use-board.ts +148 -0
- package/marketplace/plugins/kanban/src/panel/use-card-detail.ts +70 -0
- package/marketplace/plugins/kanban/src/panel/use-writes.ts +123 -0
- package/marketplace/plugins/kanban/src/protocol.ts +180 -0
- package/marketplace/plugins/kanban/src/server.test.ts +113 -0
- package/marketplace/plugins/kanban/src/server.ts +227 -0
- package/marketplace/plugins/kanban/src/store/board.test.ts +311 -0
- package/marketplace/plugins/kanban/src/store/board.ts +147 -0
- package/marketplace/plugins/kanban/src/store/cards.ts +228 -0
- package/marketplace/plugins/kanban/src/store/fs.ts +159 -0
- package/marketplace/plugins/kanban/src/store/ops.ts +245 -0
- package/marketplace/plugins/kanban/src/store/resolve.test.ts +82 -0
- package/marketplace/plugins/kanban/src/store/resolve.ts +135 -0
- package/marketplace/plugins/kanban/tsconfig.json +26 -0
- package/package.json +2 -2
- package/src/client/components/common/file-icon/index.tsx +1 -1
- package/src/client/components/layout/desktop-layout/LeftColumn.tsx +12 -3
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +34 -7
- package/src/client/components/layout/desktop-layout/index.tsx +17 -22
- package/src/client/components/mobile/mobile-right-sidebar/EditorSurface.tsx +2 -0
- package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +11 -3
- package/src/client/components/settings/categories/appearance-settings/EditorThemeSection.test.tsx +21 -0
- package/src/client/components/settings/categories/appearance-settings/EditorThemeSection.tsx +8 -4
- package/src/client/components/settings/categories/appearance-settings/ThemeCard.tsx +8 -2
- package/src/client/components/settings/categories/appearance-settings/ThemeGrid.tsx +15 -4
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +21 -0
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +7 -1
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +3 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.tsx +1 -1
- package/src/client/components/workspace/editor/FilePane.tsx +4 -2
- package/src/client/components/workspace/editor/Tabs.tsx +7 -1
- package/src/client/components/workspace/editor/Toolbar.tsx +7 -1
- package/src/client/components/workspace/editor/chrome-rows.test.tsx +126 -0
- package/src/client/components/workspace/editor/viewers/HtmlPreview.test.tsx +94 -0
- package/src/client/components/workspace/editor/viewers/HtmlPreview.tsx +71 -0
- package/src/client/components/workspace/editor/viewers/bytes.ts +1 -1
- package/src/client/components/workspace/editor/viewers/dispatch.tsx +18 -2
- package/src/client/components/workspace/editor/viewers/viewers.test.ts +14 -1
- package/src/client/components/workspace/panel-header/index.test.tsx +2 -1
- package/src/client/components/workspace/panel-header/index.tsx +6 -4
- package/src/client/hooks/editor/resolve-viewer.ts +1 -1
- package/src/client/hooks/editor/use-editor-drop.ts +14 -0
- package/src/client/hooks/editor/use-editor-tab-state.ts +5 -4
- package/src/client/hooks/ui/media-query.ts +27 -0
- package/src/client/hooks/workspace/file-tabs.ts +10 -0
- package/src/client/hooks/workspace/right-panel-presence.test.ts +152 -0
- package/src/client/hooks/workspace/right-panel-presence.ts +119 -0
- package/src/client/lib/router/search-params.test.ts +83 -0
- package/src/client/lib/router/search-params.ts +14 -3
- package/src/server/lib/mcp/session-mcp.test.ts +64 -1
- package/src/server/lib/mcp/session-overlay.server.ts +7 -4
- package/src/server/lib/omp/rpc/constants.test.ts +31 -0
- package/src/server/lib/omp/rpc/constants.ts +19 -0
- package/src/server/lib/omp/rpc/session-new.ts +78 -0
- package/src/server/lib/omp/rpc/session-registry.ts +22 -49
- package/src/server/lib/omp/rpc/spawn-mcp.ts +8 -1
- package/src/server/lib/omp/session/blobs.server.ts +2 -1
- package/src/server/lib/plugins/e2e.test.ts +71 -2
- package/src/server/lib/plugins/loader.server.ts +20 -1
- package/src/server/lib/plugins/module-import.server.ts +45 -0
- package/src/server/routes/agent/new-prompt.test.ts +81 -0
- package/src/server/routes/agent/new.ts +78 -4
- package/src/server/routes/fs/raw.test.ts +12 -0
- package/src/server/routes/fs/raw.ts +2 -6
- package/src/server/routes/wiki/asset.ts +1 -1
- package/src/shared/lib/fs/document-kind.test.ts +39 -2
- package/src/shared/lib/fs/document-kind.ts +49 -1
- package/src/shared/lib/fs/file-kind.test.ts +30 -3
- package/src/shared/lib/fs/file-kind.ts +7 -104
- package/src/shared/lib/fs/mime.ts +159 -0
- package/src/shared/lib/workspace/sidebar-width.test.ts +34 -0
- package/src/shared/lib/workspace/sidebar-width.ts +33 -0
- package/src/shared/lib/workspace/workspace-panel-widths.test.ts +124 -0
- package/src/shared/lib/workspace/workspace-panel-widths.ts +115 -18
- package/dist/client/static/js/ImageView-jkrdrq8v.js +0 -1
- package/dist/client/static/js/LayoutWrapper-sh634350.js +0 -2
- package/dist/client/static/js/architecture-7GRP2DOG-pvb4d65d.js +0 -1
- package/dist/client/static/js/bash-8d8z8zrg.js +0 -1
- package/dist/client/static/js/cpp-620mvjkk.js +0 -1
- package/dist/client/static/js/css-bt76kxbq.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-gmx4vean.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-vrnheyh7.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-7gvtpn3d.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-n6wnc8st.js +0 -1
- package/dist/client/static/js/graphql-j1a6zp7m.js +0 -1
- package/dist/client/static/js/index-5ka2tyf9.js +0 -3
- package/dist/client/static/js/index-83rkg916.js +0 -2
- package/dist/client/static/js/index-dpy3ewrn.css +0 -1
- package/dist/client/static/js/index-vkqb4dnt.js +0 -1
- package/dist/client/static/js/index-xwjbq003.js +0 -2
- package/dist/client/static/js/info-A6RAGUB7-1xtdxjz2.js +0 -1
- package/dist/client/static/js/ini-5f4zqtqr.js +0 -1
- package/dist/client/static/js/java-jj41mty3.js +0 -1
- package/dist/client/static/js/json-rnh2h17x.js +0 -1
- package/dist/client/static/js/jsx-4gecrt29.js +0 -1
- package/dist/client/static/js/lua-zszaw2f7.js +0 -1
- package/dist/client/static/js/markdown-nm6gw4v4.js +0 -1
- package/dist/client/static/js/one-dark-pro-09d8p5vy.js +0 -1
- package/dist/client/static/js/one-light-g3ednt6p.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-zm1r82x5.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-sqa7321j.js +0 -1
- package/dist/client/static/js/properties-rkptax7r.js +0 -1
- package/dist/client/static/js/python-qf1se1mj.js +0 -1
- package/dist/client/static/js/r-ms0cygq2.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-z3z82syp.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-z6swcqq2.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-33km6py4.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-1zbf1xmq.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-wte1xzzy.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-6y8zdbm4.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-pvgx6n22.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-3n9zm628.js +0 -1
- package/dist/client/static/js/tsx-gx7td06z.js +0 -1
- package/dist/client/static/js/typescript-1a808spn.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-7m07ewc4.js +0 -1
- package/dist/client/static/js/xml-3117mxd9.js +0 -1
- package/dist/client/static/js/yaml-dmvh8vyt.js +0 -1
|
@@ -61,7 +61,8 @@ import { useUpdates } from '@/client/hooks/ui/updates';
|
|
|
61
61
|
import { UPDATE_REQUEST_EVENT } from '@/shared/lib/updates/popup-state';
|
|
62
62
|
import { useUpdateCheckRequest } from '@/client/hooks/ui/updates/check-request';
|
|
63
63
|
import { openKeyBindingHelp } from '@/client/lib/commands/overlays';
|
|
64
|
-
import { MAX_LEFT_PANEL_WIDTH } from '@/shared/lib/workspace/sidebar-width';
|
|
64
|
+
import { MAX_LEFT_PANEL_WIDTH, sidebarWidthForViewport } from '@/shared/lib/workspace/sidebar-width';
|
|
65
|
+
import { useViewportWidth } from '@/client/hooks/ui/media-query';
|
|
65
66
|
import { updateOutcomeTone } from '@/shared/lib/ui/toast-duration';
|
|
66
67
|
import type { AgentStreamStatus } from '@/shared/lib/chat/omp/status';
|
|
67
68
|
|
|
@@ -213,14 +214,22 @@ export function LeftColumn({
|
|
|
213
214
|
// not.
|
|
214
215
|
useUpdateCheckRequest(updates, pushToast);
|
|
215
216
|
|
|
217
|
+
// The stored width is a CHOICE, the rendered one is a choice that fits THIS
|
|
218
|
+
// window: a 414px column on a 768px window leaves the chat 148px (measured),
|
|
219
|
+
// so the column gives way as a share of the viewport and the chosen width
|
|
220
|
+
// comes back on a wider window (`sidebarWidthForViewport`). The separator's
|
|
221
|
+
// ceiling follows, or a drag would push straight back past the cap.
|
|
222
|
+
const viewportWidth = useViewportWidth();
|
|
223
|
+
const renderedWidth = sidebarWidthForViewport(width, viewportWidth);
|
|
224
|
+
|
|
216
225
|
return (
|
|
217
226
|
<>
|
|
218
227
|
<Panel
|
|
219
228
|
panelRef={panelRef}
|
|
220
229
|
id="left-panel"
|
|
221
|
-
defaultSize={
|
|
230
|
+
defaultSize={renderedWidth}
|
|
222
231
|
minSize={minWidth}
|
|
223
|
-
maxSize={MAX_LEFT_PANEL_WIDTH}
|
|
232
|
+
maxSize={Math.max(minWidth, sidebarWidthForViewport(MAX_LEFT_PANEL_WIDTH, viewportWidth))}
|
|
224
233
|
collapsed={!open}
|
|
225
234
|
>
|
|
226
235
|
{/* The column is three ROWS, and the order is what makes it read as one
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useRef } from 'preact/hooks';
|
|
1
|
+
import { useEffect, useRef } from 'preact/hooks';
|
|
2
2
|
import { lazy } from 'preact/compat';
|
|
3
3
|
import type { RefObject } from 'preact/compat';
|
|
4
4
|
import { Group, Panel, type PanelImperativeHandle } from '@/client/components/layout/desktop-layout/resizer';
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
type EditorWidthMode,
|
|
21
21
|
type PanelWidths,
|
|
22
22
|
} from '@/shared/lib/workspace/panel-widths';
|
|
23
|
-
import { resolveWorkspacePanelWidths } from '@/shared/lib/workspace/workspace-panel-widths';
|
|
23
|
+
import { railShown, resolveWorkspacePanelWidths } from '@/shared/lib/workspace/workspace-panel-widths';
|
|
24
24
|
|
|
25
25
|
const Editor = lazy(() => import('@/client/components/workspace/editor/index').then((m) => ({ default: m.Editor })));
|
|
26
26
|
|
|
@@ -85,6 +85,14 @@ interface WorkspacePanelsProps {
|
|
|
85
85
|
onHideEditor: () => void;
|
|
86
86
|
onSessionTitle: (title: string | null) => void;
|
|
87
87
|
onPanelWidths: (patch: PanelWidths) => void;
|
|
88
|
+
/**
|
|
89
|
+
* The right panel is asked for but the group has no room for it.
|
|
90
|
+
*
|
|
91
|
+
* Reported upward because the CONTROL that asked lives in the navbar: a
|
|
92
|
+
* toggle that flips a flag this layout ignores reads as a dead button, so the
|
|
93
|
+
* owner of the flag is the one that has to explain the refusal.
|
|
94
|
+
*/
|
|
95
|
+
onRightPanelSuppressed?: (suppressed: boolean | null) => void;
|
|
88
96
|
}
|
|
89
97
|
|
|
90
98
|
export function WorkspacePanels(props: WorkspacePanelsProps) {
|
|
@@ -123,6 +131,7 @@ export function WorkspacePanels(props: WorkspacePanelsProps) {
|
|
|
123
131
|
onHideEditor,
|
|
124
132
|
onSessionTitle,
|
|
125
133
|
onPanelWidths,
|
|
134
|
+
onRightPanelSuppressed,
|
|
126
135
|
} = props;
|
|
127
136
|
|
|
128
137
|
/**
|
|
@@ -174,6 +183,8 @@ export function WorkspacePanels(props: WorkspacePanelsProps) {
|
|
|
174
183
|
const {
|
|
175
184
|
editor: editorWidth,
|
|
176
185
|
right: rightWidth,
|
|
186
|
+
rightShown: rightPanelShown,
|
|
187
|
+
rightSuppressed,
|
|
177
188
|
editorMax: editorMaxSize,
|
|
178
189
|
rightMax: rightMaxSize,
|
|
179
190
|
rightMin: rightPanelMin,
|
|
@@ -189,6 +200,16 @@ export function WorkspacePanels(props: WorkspacePanelsProps) {
|
|
|
189
200
|
chatHidden,
|
|
190
201
|
});
|
|
191
202
|
|
|
203
|
+
// The owner of the flag is the navbar's toggle, so the refusal travels up:
|
|
204
|
+
// a click that changes nothing visible is the defect this exists to prevent.
|
|
205
|
+
// `null` before the group is measured, so the first suppression of a load can
|
|
206
|
+
// be told apart from a panel being taken away.
|
|
207
|
+
useEffect(() => {
|
|
208
|
+
// `0` is the pre-measurement area as much as `null` is: the observer reports
|
|
209
|
+
// it on the first frame, and the resolver answers "fits" for both.
|
|
210
|
+
onRightPanelSuppressed?.(available == null || available <= 0 ? null : rightSuppressed);
|
|
211
|
+
}, [available, rightSuppressed, onRightPanelSuppressed]);
|
|
212
|
+
|
|
192
213
|
/**
|
|
193
214
|
* Widths of the fixed panels as they are right now, keyed by slot: the
|
|
194
215
|
* editor (source or diff, whichever is showing) and the right panel under
|
|
@@ -243,7 +264,7 @@ export function WorkspacePanels(props: WorkspacePanelsProps) {
|
|
|
243
264
|
available,
|
|
244
265
|
reservedPx:
|
|
245
266
|
(showEditor ? editorWidth : 0) +
|
|
246
|
-
(
|
|
267
|
+
(rightPanelShown ? rightWidth : 0) +
|
|
247
268
|
handleCount * HANDLE_WIDTH,
|
|
248
269
|
})}
|
|
249
270
|
>
|
|
@@ -289,10 +310,10 @@ export function WorkspacePanels(props: WorkspacePanelsProps) {
|
|
|
289
310
|
</div>
|
|
290
311
|
</Panel>
|
|
291
312
|
|
|
292
|
-
{
|
|
313
|
+
{rightPanelShown && <ResizeHandle />}
|
|
293
314
|
<RightColumn
|
|
294
315
|
panelRef={rightPanelRef}
|
|
295
|
-
open={
|
|
316
|
+
open={rightPanelShown}
|
|
296
317
|
width={rightWidth}
|
|
297
318
|
minWidth={rightPanelMin}
|
|
298
319
|
maxWidth={rightMaxSize}
|
|
@@ -312,8 +333,14 @@ export function WorkspacePanels(props: WorkspacePanelsProps) {
|
|
|
312
333
|
/>
|
|
313
334
|
</Group>
|
|
314
335
|
|
|
315
|
-
{
|
|
316
|
-
|
|
336
|
+
{/* The rail is how a view is CHOSEN, so it goes only where choosing one
|
|
337
|
+
can still put something on screen: a rail beside a SUPPRESSED panel is
|
|
338
|
+
a column of marks that switches nothing (and 44px the chat cannot
|
|
339
|
+
spare). A panel closed by its own control is not suppressed — the rail
|
|
340
|
+
is then the way back, and hiding it with the column left the column
|
|
341
|
+
unreachable except through the navbar's chord. */}
|
|
342
|
+
{railShown({ sideShown: showRightSide, nav: rightNav, rightSuppressed }) && (
|
|
343
|
+
<ActivityBar side="right" activePanel={shownRightPanel} onChangePanel={onChangeRightPanel} isPanelOpen={rightPanelShown} hasActiveContext={hasActiveContext} activeProjectPath={activeProjectPath} />
|
|
317
344
|
)}
|
|
318
345
|
</div>
|
|
319
346
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useCallback,
|
|
1
|
+
import { useCallback, useRef, useState } from 'preact/hooks';
|
|
2
2
|
import { Group, Panel, type PanelImperativeHandle } from '@/client/components/layout/desktop-layout/resizer';
|
|
3
3
|
import { LeftColumn } from '@/client/components/layout/desktop-layout/LeftColumn';
|
|
4
4
|
import { DesktopOverlays } from '@/client/components/layout/desktop-layout/DesktopOverlays';
|
|
@@ -21,16 +21,16 @@ import { useRightOpenRequest } from '@/client/hooks/workspace/right-open-request
|
|
|
21
21
|
import { useLeftDock, useLeftDockWidth } from '@/client/hooks/workspace/left-dock';
|
|
22
22
|
import { useEditorViewLayout } from '@/client/hooks/workspace/editor-view';
|
|
23
23
|
import { useLeftDockView } from '@/client/components/workspace/plugin-panel/catalog';
|
|
24
|
-
import type { EditorWidthMode } from '@/shared/lib/workspace/panel-widths';
|
|
25
24
|
import { useSettingsModal } from '@/client/hooks/ui/settings-modal';
|
|
26
25
|
import { useWorkspaceCommands } from '@/client/hooks/workspace/commands';
|
|
27
26
|
import { PluginBootstrap } from '@/client/lib/plugins/bootstrap';
|
|
28
27
|
import { useToasts } from '@/client/hooks/ui/toasts';
|
|
29
|
-
import
|
|
28
|
+
import { useDropOutcomeToast } from '@/client/hooks/editor/use-editor-drop';
|
|
30
29
|
import { useNavbarSessionActions } from '@/client/hooks/workspace/navbar-session-actions';
|
|
31
30
|
import { useCopyTabPath } from '@/client/hooks/workspace/copy-tab-path';
|
|
32
31
|
import { useRightSideLayout, type RightSideLayout } from '@/client/hooks/workspace/right-side';
|
|
33
32
|
import { useActiveWorkspaceProject } from '@/client/hooks/workspace/active-project';
|
|
33
|
+
import { useRightPanelPresence } from '@/client/hooks/workspace/right-panel-presence';
|
|
34
34
|
|
|
35
35
|
interface DesktopLayoutProps {
|
|
36
36
|
sessionId: string | null;
|
|
@@ -90,6 +90,7 @@ export function DesktopLayout({ sessionId, onMobileToggle, appSettings = {} }: D
|
|
|
90
90
|
const {
|
|
91
91
|
openedFiles,
|
|
92
92
|
activeFileId,
|
|
93
|
+
widthMode: editorWidthMode,
|
|
93
94
|
setActiveFileId,
|
|
94
95
|
handleOpenFile,
|
|
95
96
|
handleCloseFile,
|
|
@@ -130,13 +131,6 @@ export function DesktopLayout({ sessionId, onMobileToggle, appSettings = {} }: D
|
|
|
130
131
|
// while the rail draws another.
|
|
131
132
|
const rightSideShown = !rightSide.hidden;
|
|
132
133
|
|
|
133
|
-
// A diff wants room a source file does not, so the editor panel keeps a
|
|
134
|
-
// separate remembered width per tab kind.
|
|
135
|
-
const editorWidthMode: EditorWidthMode = useMemo(
|
|
136
|
-
() => (openedFiles.find(f => String(f.id) === String(activeFileId))?.isDiff ? 'diff' : 'editor'),
|
|
137
|
-
[openedFiles, activeFileId],
|
|
138
|
-
);
|
|
139
|
-
|
|
140
134
|
/**
|
|
141
135
|
* The editor's WIDTH mode (`compact` / `full`), entered from either toolbar.
|
|
142
136
|
*
|
|
@@ -163,17 +157,17 @@ export function DesktopLayout({ sessionId, onMobileToggle, appSettings = {} }: D
|
|
|
163
157
|
|
|
164
158
|
const { pushToast } = useToasts();
|
|
165
159
|
|
|
166
|
-
|
|
167
|
-
* A refused drop names its reason ("outside every workspace", "not text") —
|
|
168
|
-
* a silent no-op reads as a broken target. The TARGET is `WorkspacePanels`':
|
|
169
|
-
* a layout-wide one would accept a drop over the sidebar and right panel too.
|
|
170
|
-
*/
|
|
171
|
-
const handleDropResult = useCallback(
|
|
172
|
-
(result: EditorDropResult) => pushToast(result.message, result.ok ? 'success' : 'error'),
|
|
173
|
-
[pushToast],
|
|
174
|
-
);
|
|
160
|
+
const handleDropResult = useDropOutcomeToast(pushToast);
|
|
175
161
|
const { menu: sessionActions, sessionDelete } = useNavbarSessionActions(folders, sessionId, pushToast);
|
|
176
162
|
|
|
163
|
+
// The side's presence and its refusal, one owner: `useRightPanelPresence`.
|
|
164
|
+
const rightPanel = useRightPanelPresence({
|
|
165
|
+
pushToast,
|
|
166
|
+
showEditor,
|
|
167
|
+
sideShown: rightSideShown,
|
|
168
|
+
toggleSide: rightSide.toggleRightSide,
|
|
169
|
+
});
|
|
170
|
+
|
|
177
171
|
/**
|
|
178
172
|
* Ask for the sidebar (or put it away).
|
|
179
173
|
*
|
|
@@ -199,7 +193,7 @@ export function DesktopLayout({ sessionId, onMobileToggle, appSettings = {} }: D
|
|
|
199
193
|
toggleEditor: rightSide.toggleEditor,
|
|
200
194
|
// The side's own switch, so the other chord and the navbar's button cannot
|
|
201
195
|
// disagree about what "the right side" means.
|
|
202
|
-
toggleRightPanel:
|
|
196
|
+
toggleRightPanel: rightPanel.toggle,
|
|
203
197
|
openSettings: () => (settings.isOpen ? settings.close() : settings.open()),
|
|
204
198
|
});
|
|
205
199
|
|
|
@@ -292,9 +286,9 @@ export function DesktopLayout({ sessionId, onMobileToggle, appSettings = {} }: D
|
|
|
292
286
|
sessionTitle={sessionTitle}
|
|
293
287
|
sessionId={sessionId}
|
|
294
288
|
showLeftPanel={sidebarOpen}
|
|
295
|
-
showRightSide={rightSideShown}
|
|
289
|
+
showRightSide={rightSideShown && rightPanel.sideVisible}
|
|
296
290
|
streamStatus={streamStatus}
|
|
297
|
-
onToggleRightSide={
|
|
291
|
+
onToggleRightSide={rightPanel.toggle}
|
|
298
292
|
onToggleLeftPanel={() => handleToggleLeftPanel(!sidebarOpen)}
|
|
299
293
|
sessionActions={sessionActions}
|
|
300
294
|
/>
|
|
@@ -338,6 +332,7 @@ export function DesktopLayout({ sessionId, onMobileToggle, appSettings = {} }: D
|
|
|
338
332
|
onHideEditor={rightSide.hideEditor}
|
|
339
333
|
onSessionTitle={setSessionTitle}
|
|
340
334
|
onPanelWidths={commitWidths}
|
|
335
|
+
onRightPanelSuppressed={rightPanel.report}
|
|
341
336
|
/>
|
|
342
337
|
</main>
|
|
343
338
|
</Panel>
|
|
@@ -123,6 +123,8 @@ export function MobileEditorSurface({
|
|
|
123
123
|
name={file.name}
|
|
124
124
|
source={editor.byteSource}
|
|
125
125
|
content={editor.content}
|
|
126
|
+
root={file.root}
|
|
127
|
+
repo={file.repo}
|
|
126
128
|
revision={editor.revision}
|
|
127
129
|
onContentChange={editor.onChange}
|
|
128
130
|
onSaveBytes={editor.deviceBacked ? undefined : saveBytes}
|
|
@@ -29,7 +29,13 @@ import { indentUnitFor, useEditorIndent } from '@/client/hooks/editor/indent-set
|
|
|
29
29
|
import { useEditorTyping } from '@/client/hooks/editor/typing-settings';
|
|
30
30
|
import { useFileReviewMode } from '@/client/hooks/editor/use-file-review-mode';
|
|
31
31
|
import { MOBILE_SCROLL_POSITIONS_KEY } from '@/shared/lib/workspace/scroll-positions';
|
|
32
|
-
import {
|
|
32
|
+
import {
|
|
33
|
+
BINARY_VIEWERS,
|
|
34
|
+
RENDERED_VIEWERS,
|
|
35
|
+
VIEWER_LABELS,
|
|
36
|
+
opensInPreview,
|
|
37
|
+
viewerKindFor,
|
|
38
|
+
} from '@/shared/lib/fs/document-kind';
|
|
33
39
|
import type { MobileFullEditorProps } from '@/client/components/mobile/mobile-right-sidebar/editor-props';
|
|
34
40
|
|
|
35
41
|
export function MobileFullEditor({ file, missing = false, onClose, onFileSaved, onDropResult }: MobileFullEditorProps) {
|
|
@@ -57,8 +63,10 @@ export function MobileFullEditor({ file, missing = false, onClose, onFileSaved,
|
|
|
57
63
|
const hasPreview = RENDERED_VIEWERS[viewerKind] === true;
|
|
58
64
|
const fileKey = file.path ?? file.name;
|
|
59
65
|
// The picture/grid/prose is what the file was opened to read, so a rendered
|
|
60
|
-
// kind defaults to its preview and only a user's own toggle moves it.
|
|
61
|
-
|
|
66
|
+
// kind defaults to its preview and only a user's own toggle moves it. An HTML
|
|
67
|
+
// page is the exception: it opens its SOURCE, which is why the default is its
|
|
68
|
+
// own table rather than "has a preview at all".
|
|
69
|
+
const isPreview = previewOverrides[fileKey] ?? opensInPreview(viewerKind);
|
|
62
70
|
// Review mode is the same per-tab toggle the desktop pane uses (one key, one
|
|
63
71
|
// rule), and it exists only where a rendered markdown document is on screen —
|
|
64
72
|
// a CSV grid and an SVG picture have no markdown blocks to judge.
|
package/src/client/components/settings/categories/appearance-settings/EditorThemeSection.test.tsx
CHANGED
|
@@ -164,4 +164,25 @@ describe('editor theme picker', () => {
|
|
|
164
164
|
// Auto is a choice, not a light/dark theme, so a variant filter keeps it.
|
|
165
165
|
expect(labels.some((label) => label.startsWith('Auto'))).toBe(true);
|
|
166
166
|
});
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* The grid's density is a fact about the PANE, not the window.
|
|
170
|
+
*
|
|
171
|
+
* `sm:grid-cols-2 lg:grid-cols-3` read the VIEWPORT: at a 768px window the
|
|
172
|
+
* settings modal is 720 wide and this pane gets 174px, where two 83px cards
|
|
173
|
+
* were drawn and the selected card's check measured 6px outside the dialog
|
|
174
|
+
* (which is `overflow-hidden`, so it was clipped). A DOM test cannot measure
|
|
175
|
+
* Tailwind, so this pins the contract the markup must keep: the section is
|
|
176
|
+
* the container and the grid's breakpoints are container queries.
|
|
177
|
+
*/
|
|
178
|
+
test('the card grid asks its PANE, never the viewport', async () => {
|
|
179
|
+
const root = await mount(EDITOR_AUTO_THEME_ID);
|
|
180
|
+
const grid = root.querySelector('.grid');
|
|
181
|
+
expect(grid).not.toBeNull();
|
|
182
|
+
const classes = grid?.className ?? '';
|
|
183
|
+
expect(classes).toContain('grid-cols-1');
|
|
184
|
+
expect(classes).toContain('@[320px]:grid-cols-2');
|
|
185
|
+
expect(classes).not.toMatch(/(^|\s)(sm|md|lg|xl):/);
|
|
186
|
+
expect(root.querySelector('section')?.className).toContain('@container');
|
|
187
|
+
});
|
|
167
188
|
});
|
package/src/client/components/settings/categories/appearance-settings/EditorThemeSection.tsx
CHANGED
|
@@ -85,7 +85,9 @@ export function EditorThemeSection({ settings, onUpdate }: EditorThemeSectionPro
|
|
|
85
85
|
);
|
|
86
86
|
|
|
87
87
|
return (
|
|
88
|
-
|
|
88
|
+
// `@container`, for the reason `ThemeGrid` states: the card grid's density
|
|
89
|
+
// follows the PANE, and the pane is 174px wide at a 768px window.
|
|
90
|
+
<section className="@container space-y-3">
|
|
89
91
|
<div>
|
|
90
92
|
<h4 className="flex items-center gap-2 text-sm font-semibold text-ink">
|
|
91
93
|
<Palette size={15} className="text-ink/60" />
|
|
@@ -98,7 +100,9 @@ export function EditorThemeSection({ settings, onUpdate }: EditorThemeSectionPro
|
|
|
98
100
|
</p>
|
|
99
101
|
</div>
|
|
100
102
|
|
|
101
|
-
|
|
103
|
+
{/* Same row, same wrap as the palette grid's: the pane is 174px wide at
|
|
104
|
+
a 768px window, where three filters plus the count overflow it. */}
|
|
105
|
+
<div className="flex flex-wrap items-center gap-1.5">
|
|
102
106
|
{FILTERS.map((option) => (
|
|
103
107
|
<button
|
|
104
108
|
key={option.id}
|
|
@@ -115,12 +119,12 @@ export function EditorThemeSection({ settings, onUpdate }: EditorThemeSectionPro
|
|
|
115
119
|
{option.label}
|
|
116
120
|
</button>
|
|
117
121
|
))}
|
|
118
|
-
<span className="ml-auto font-mono text-[11px] text-ink/50">
|
|
122
|
+
<span className="ml-auto min-w-0 font-mono text-[11px] text-ink/50 whitespace-nowrap">
|
|
119
123
|
{filter === 'all' ? `${themes.length} themes` : `${themes.length} shown`}
|
|
120
124
|
</span>
|
|
121
125
|
</div>
|
|
122
126
|
|
|
123
|
-
<div className="grid grid-cols-1 gap-2
|
|
127
|
+
<div className="grid grid-cols-1 gap-2 @[320px]:grid-cols-2 @[560px]:grid-cols-3">
|
|
124
128
|
{/* `Auto` is a card rather than a checkbox: it is one of the choices,
|
|
125
129
|
and a checkbox beside a grid makes the default look like an
|
|
126
130
|
override of the thing it is a peer of. It is drawn under EVERY
|
|
@@ -36,8 +36,14 @@ export function ThemeCard({ theme, selected, onSelect }: ThemeCardProps) {
|
|
|
36
36
|
: 'border-ink/20 bg-paper hover:border-ink/40 hover:bg-ink/5'
|
|
37
37
|
}`}
|
|
38
38
|
>
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
{/* `min-w-0` on the name and the badge as a group: a flex item's default
|
|
40
|
+
`min-width: auto` is its min-content width, so the name refused to
|
|
41
|
+
shrink and the selected card's check was painted past the pane's own
|
|
42
|
+
edge — measured at a 768px window, where this card is 83px wide and
|
|
43
|
+
the check landed 6px outside the dialog (which is `overflow-hidden`,
|
|
44
|
+
so it was clipped rather than scrolled). */}
|
|
45
|
+
<div className="flex min-w-0 items-center gap-2">
|
|
46
|
+
<span className="min-w-0 truncate font-semibold text-ink" title={theme.name}>
|
|
41
47
|
{theme.name}
|
|
42
48
|
</span>
|
|
43
49
|
<span className="shrink-0 rounded-full border border-ink/15 px-1.5 py-px text-[10px] font-semibold uppercase tracking-wider text-ink/50">
|
|
@@ -44,8 +44,19 @@ export function ThemeGrid({ selectedId, onSelect }: ThemeGridProps) {
|
|
|
44
44
|
const themes = useMemo(() => filterThemes(filter), [filter]);
|
|
45
45
|
|
|
46
46
|
return (
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
// `@container` on the section: the grid's density is a fact about THIS
|
|
48
|
+
// pane, not about the window. At a 768px window the settings modal is 720
|
|
49
|
+
// wide and the palette pane gets 174px, where `sm:grid-cols-2` (a VIEWPORT
|
|
50
|
+
// query) drew two 83px cards and pushed the selected card's check past the
|
|
51
|
+
// dialog's clipped edge.
|
|
52
|
+
<div className="@container space-y-3 pb-6">
|
|
53
|
+
{/* `flex-wrap` + a `min-w-0` count: at a 768px window the settings modal
|
|
54
|
+
is 720 wide and this pane gets 174px, where the three filters and the
|
|
55
|
+
count measured 138 client against 191 scroll — the count painted 30px
|
|
56
|
+
past the dialog's own edge and was clipped, since the modal is
|
|
57
|
+
`overflow-hidden`. Wrapping costs one row on a narrow pane and nothing
|
|
58
|
+
on a wide one. */}
|
|
59
|
+
<div className="flex flex-wrap items-center gap-1.5">
|
|
49
60
|
{FILTERS.map((option) => (
|
|
50
61
|
<button
|
|
51
62
|
key={option.id}
|
|
@@ -62,10 +73,10 @@ export function ThemeGrid({ selectedId, onSelect }: ThemeGridProps) {
|
|
|
62
73
|
{option.label}
|
|
63
74
|
</button>
|
|
64
75
|
))}
|
|
65
|
-
<span className="ml-auto font-mono text-[11px] text-ink/50">{themes.length} themes</span>
|
|
76
|
+
<span className="ml-auto min-w-0 font-mono text-[11px] text-ink/50 whitespace-nowrap">{themes.length} themes</span>
|
|
66
77
|
</div>
|
|
67
78
|
|
|
68
|
-
<div className="grid grid-cols-1 gap-2.5
|
|
79
|
+
<div className="grid grid-cols-1 gap-2.5 @[320px]:grid-cols-2 @[560px]:grid-cols-3">
|
|
69
80
|
{themes.map((theme) => (
|
|
70
81
|
<ThemeCard
|
|
71
82
|
key={theme.id}
|
|
@@ -44,6 +44,27 @@ async function open(harness?: string): Promise<HTMLElement> {
|
|
|
44
44
|
return container;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
describe('AccessDropdown label', () => {
|
|
48
|
+
/**
|
|
49
|
+
* The chip's label is hidden by the COMPOSER's width, not the window's.
|
|
50
|
+
*
|
|
51
|
+
* `hidden lg:inline` read the viewport, so a 1440px window kept the label on
|
|
52
|
+
* inside a 366px card (the chat column beside the editor and the right panel)
|
|
53
|
+
* and wrapped the chip to two lines — measured, `Always ask` at h=40 against
|
|
54
|
+
* the row's 24px controls. `Toolbar`'s row is the `@container`, so the class
|
|
55
|
+
* has to be a container query.
|
|
56
|
+
*/
|
|
57
|
+
test('the label folds on the COMPOSER width, never a viewport breakpoint', async () => {
|
|
58
|
+
const el = await open('omp-rpc');
|
|
59
|
+
const label = [...el.querySelectorAll('span')].find((span) => span.textContent === 'Always ask');
|
|
60
|
+
expect(label).toBeDefined();
|
|
61
|
+
const classes = label?.className ?? '';
|
|
62
|
+
expect(classes).toContain('hidden');
|
|
63
|
+
expect(classes).toContain('@[420px]:inline');
|
|
64
|
+
expect(classes).not.toMatch(/(^|\s)(sm|md|lg|xl):/);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
47
68
|
describe('AccessDropdown copy', () => {
|
|
48
69
|
test('omp keeps the restricted-folder promise', async () => {
|
|
49
70
|
const el = await open('omp-rpc');
|
|
@@ -36,7 +36,13 @@ export function AccessDropdown({ value, onSelect, harness }: AccessDropdownProps
|
|
|
36
36
|
className="tap-chip flex items-center space-x-1 hover:bg-ink/5 px-2 py-1 rounded transition-colors text-xs text-muted"
|
|
37
37
|
>
|
|
38
38
|
<LockKeyhole size={12} className="text-ink/60" />
|
|
39
|
-
|
|
39
|
+
{/* A CONTAINER query, not `lg:`: the composer lives in a chat column
|
|
40
|
+
that can be 320px on a 1440px window (measured: 400px chat beside
|
|
41
|
+
the editor and the right panel), and `lg:` read the WINDOW, so the
|
|
42
|
+
label stayed on and wrapped the chip to two lines inside a 366px
|
|
43
|
+
card. `Toolbar`'s row is the `@container`; `ModeToggles` states the
|
|
44
|
+
same 420px. */}
|
|
45
|
+
<span className="hidden @[420px]:inline whitespace-nowrap">{copy.labels[value]}</span>
|
|
40
46
|
</button>
|
|
41
47
|
{showAccess && (
|
|
42
48
|
<div className={`glass-popover absolute bottom-full left-0 mb-1 ${copy.note ? 'w-56' : 'w-40'} bg-paper border border-ink/20 rounded-md shadow-lg z-50 py-1 text-xs`}>
|
|
@@ -27,7 +27,9 @@ export function ThinkingLevelDropdown({ thinkingLevels, currentThinking, onSelec
|
|
|
27
27
|
title={thinkingLevels.length === 0 ? 'This model exposes no thinking levels' : `Thinking Level: ${currentThinking}`}
|
|
28
28
|
>
|
|
29
29
|
<Brain size={12} className="text-ink/60" />
|
|
30
|
-
|
|
30
|
+
{/* Same axis as `AccessDropdown` and `ModeToggles`: the chip's room is
|
|
31
|
+
the COMPOSER's width, not the window's. */}
|
|
32
|
+
<span className="hidden @[420px]:inline whitespace-nowrap">{currentThinking}</span>
|
|
31
33
|
</button>
|
|
32
34
|
{showThinking && thinkingLevels.length > 0 && (
|
|
33
35
|
<div className="glass-popover absolute bottom-full left-0 mb-1 w-40 bg-paper border border-ink/20 rounded-md shadow-lg z-50 py-1 text-xs">
|
|
@@ -3,7 +3,7 @@ import { FileCode, FileImage, FolderOpen, Info, Loader2 } from 'lucide-preact';
|
|
|
3
3
|
import { getLanguageFromPath } from '@/shared/lib/code/language';
|
|
4
4
|
import { useDeferredHighlightLines } from '@/client/hooks/code/deferred-highlight';
|
|
5
5
|
import { parseDirListing, parseNumberedCode } from '@/shared/lib/code/parser';
|
|
6
|
-
import { getPaintableImageMimeType, SVG_MIME } from '@/shared/lib/fs/
|
|
6
|
+
import { getPaintableImageMimeType, SVG_MIME } from '@/shared/lib/fs/mime';
|
|
7
7
|
import { buildFsRawUrl, isVirtualPath, stripReadSelector } from '@/shared/lib/fs/paths';
|
|
8
8
|
import { toolImageSrc } from '@/shared/lib/omp/session/tool-images';
|
|
9
9
|
import { MarkdownRenderer } from '@/client/components/common/MarkdownRenderer';
|
|
@@ -12,7 +12,7 @@ import type { UseFileEditorResult } from '@/client/hooks/editor/use-file-editor'
|
|
|
12
12
|
import type { EditorFindState } from '@/client/hooks/editor/use-editor-find';
|
|
13
13
|
import type { EditorCommand } from '@/shared/lib/code/editor/keymap';
|
|
14
14
|
import { EDITOR_MAX_FONT_SIZE, EDITOR_MIN_FONT_SIZE } from '@/shared/lib/code/editor/typography';
|
|
15
|
-
import { RENDERED_VIEWERS, type ViewerKind } from '@/shared/lib/fs/document-kind';
|
|
15
|
+
import { BINARY_VIEWERS, RENDERED_VIEWERS, type ViewerKind } from '@/shared/lib/fs/document-kind';
|
|
16
16
|
import type { OpenedFile } from '@/shared/types/fs';
|
|
17
17
|
import { isProbeableTab } from '@/client/hooks/workspace/missing-files';
|
|
18
18
|
import { saveFileBytes } from '@/client/hooks/editor/save-bytes';
|
|
@@ -98,7 +98,7 @@ export function FilePane({
|
|
|
98
98
|
}: FilePaneProps) {
|
|
99
99
|
// A byte viewer owns the whole surface and has no buffer, so Save, find,
|
|
100
100
|
// wrap and font zoom are all hidden — the toolbar reads this same flag.
|
|
101
|
-
const byteViewer = viewerKind ===
|
|
101
|
+
const byteViewer = BINARY_VIEWERS[viewerKind] === true;
|
|
102
102
|
// The rendered text views are the ones the eye toggle switches.
|
|
103
103
|
const hasPreview = RENDERED_VIEWERS[viewerKind] === true;
|
|
104
104
|
|
|
@@ -294,6 +294,8 @@ export function FilePane({
|
|
|
294
294
|
name={activeFile.name}
|
|
295
295
|
source={editor.byteSource}
|
|
296
296
|
content={editor.content}
|
|
297
|
+
root={activeFile.root ?? rootPath}
|
|
298
|
+
repo={activeFile.repo ?? repoPath}
|
|
297
299
|
revision={editor.revision}
|
|
298
300
|
onContentChange={editor.onChange}
|
|
299
301
|
onSaveBytes={editor.deviceBacked ? undefined : saveBytes}
|
|
@@ -8,6 +8,7 @@ import { splitCandidate } from '@/shared/lib/workspace/split-editor';
|
|
|
8
8
|
import { PanelRight } from 'lucide-preact';
|
|
9
9
|
import { EditorHideButton } from '@/client/components/workspace/editor/EditorHideButton';
|
|
10
10
|
import { useOnClickOutside } from '@/client/hooks/ui/on-click-outside';
|
|
11
|
+
import { CONTROL_ROW_HEIGHT } from '@/client/lib/ui/control-plate';
|
|
11
12
|
import { getGitStatusInfo } from '@/shared/lib/fs/git-status';
|
|
12
13
|
import type { OpenedFile } from '@/shared/types/fs';
|
|
13
14
|
|
|
@@ -111,7 +112,12 @@ export function EditorTabs({
|
|
|
111
112
|
}
|
|
112
113
|
|
|
113
114
|
return (
|
|
114
|
-
|
|
115
|
+
// The strip is the column's CHROME ROW: `CONTROL_ROW_HEIGHT.desktop`, the
|
|
116
|
+
// same 40px as the right column's strip and its `PanelHeader` beneath it.
|
|
117
|
+
// Sized from its own chips (`py-1.5` + `border-t-2`) it measured 31px, so
|
|
118
|
+
// the two columns' separators landed on different lines (measured in
|
|
119
|
+
// Chromium at 1365x768: 71 against 80).
|
|
120
|
+
<div className={`${CONTROL_ROW_HEIGHT.desktop} flex bg-ink/10 w-full relative border-b border-ink/10`} ref={tabsContainerRef}>
|
|
115
121
|
<div className="flex overflow-hidden">
|
|
116
122
|
{visibleTabs.map(file => {
|
|
117
123
|
const isActive = file.id === activeFileId;
|
|
@@ -11,6 +11,7 @@ import { buildEditorClusters } from '@/client/components/workspace/editor/toolba
|
|
|
11
11
|
import { ACTION_CLASS } from '@/client/components/workspace/editor/toolbar-toggle';
|
|
12
12
|
import { writeKabmoSettings } from '@/shared/lib/settings/client';
|
|
13
13
|
import { EDITOR_BLAME_CHANGED_EVENT, currentEditorBlame, useEditorBlame } from '@/client/hooks/editor/blame-settings';
|
|
14
|
+
import { CONTROL_ROW_HEIGHT } from '@/client/lib/ui/control-plate';
|
|
14
15
|
|
|
15
16
|
export type EditorSaveStatus = 'idle' | 'saving' | 'saved' | 'error' | 'needs-permission';
|
|
16
17
|
|
|
@@ -244,7 +245,12 @@ export function EditorToolbar({
|
|
|
244
245
|
// viewport. At the editor panel's 320px floor the path would be a truncated
|
|
245
246
|
// fragment of a filename — not information, and the tab above already
|
|
246
247
|
// carries it.
|
|
247
|
-
|
|
248
|
+
//
|
|
249
|
+
// The row is the shared chrome row (`CONTROL_ROW_HEIGHT.desktop`, not
|
|
250
|
+
// `py-2` around 27px of controls) because it is the peer of the right
|
|
251
|
+
// column's `PanelHeader`: two columns' second chrome rows have to end on the
|
|
252
|
+
// same line or the panels look staggered.
|
|
253
|
+
<div className={`@container ${CONTROL_ROW_HEIGHT.desktop} flex items-center justify-between gap-2 px-3 border-b border-ink/10 bg-paper flex-shrink-0`}>
|
|
248
254
|
{/* Left status */}
|
|
249
255
|
<div className="hidden @[420px]:flex items-center space-x-2 text-xs font-mono text-ink/40 min-w-0">
|
|
250
256
|
<span className="truncate max-w-[300px]" title={path}>{path}</span>
|