@kabmo-labs/kabmo 0.46.0 → 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-br4j001k.js → CsvGrid-vfgttmym.js} +2 -2
- package/dist/client/static/js/{DocxView-kmtkbmmw.js → DocxView-dc41t6rp.js} +2 -2
- package/dist/client/static/js/{DrawioView-3df0g3jr.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-tmxhxd6q.js → Modal-dsqhas10.js} +13 -13
- package/dist/client/static/js/{PdfView-p5z7c7eg.js → PdfView-cpvsbfk0.js} +1 -1
- package/dist/client/static/js/{SessionsView-t06h6zfx.js → SessionsView-s0crtcm8.js} +1 -1
- package/dist/client/static/js/{SheetView-agw459v2.js → SheetView-n6mst0hq.js} +13 -13
- package/dist/client/static/js/{SvgPreview-b9rfy1h6.js → SvgPreview-g2aqq812.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-wbnhzcnj.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-t2sgevea.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-v2nzp54a.js → blockDiagram-BEXU5L5S-62z6kaar.js} +2 -2
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-7h03146b.js → c4Diagram-YGBWAQC7-rts5zgx4.js} +3 -3
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-m57e9kp1.js → classDiagram-v2-NBCMYWYE-tnpww186.js} +1 -1
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-c4tnh4mg.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-mjf6njey.js → cynefinDiagram-VND7K2PF-005gc8km.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-6yma9ch3.js → dagre-6A5THRUB-41zsteyd.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-1q4ce2gb.js → diagram-22UHCM2B-prsm18a1.js} +3 -3
- package/dist/client/static/js/{diagram-3UASUU5V-0ttps29p.js → diagram-3UASUU5V-5nx9wf04.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-1mzexgv1.js → diagram-ATOU4E4O-k3d4z3aq.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-4ae89t23.js → diagram-CDSNMT55-x2c5x5j2.js} +2 -2
- package/dist/client/static/js/{diagram-MLGK6HIB-057jaqvh.js → diagram-MLGK6HIB-nvr76jqh.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-p6yyq5sx.js → diagram-MPIPVDR6-v1jpzp9p.js} +1 -1
- package/dist/client/static/js/{dockerfile-00hqsk9c.js → dockerfile-vz6va73h.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-bsk7dvm4.js → ebnfDiagram-ZINNZB2B-0v4tqr9v.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-dsq91er5.js → elk-276RUBZZ-qfn4r7xj.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-p7p13mbh.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-bwgnttyk.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-ca0gj5am.js → gitGraphDiagram-X574FWY7-fts23jer.js} +2 -2
- package/dist/client/static/js/graphql-a4gbqpj9.js +1 -0
- package/dist/client/static/js/{index-y2z8nsvw.js → index-0dkc6z8e.js} +2 -2
- package/dist/client/static/js/{index-eqhjs1yv.js → index-1d8bxjsz.js} +4 -4
- 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-qn200x1b.js → index-39d8zbkx.js} +6 -6
- package/dist/client/static/js/{index-dn7hg4em.js → index-3nsrnyqr.js} +2 -2
- package/dist/client/static/js/{index-jkay7aw7.js → index-4jzsr1ky.js} +2 -2
- package/dist/client/static/js/{index-064vdkrs.js → index-4wnzs76g.js} +1 -1
- package/dist/client/static/js/{index-16sd19f0.js → index-4x9p7hf9.js} +2 -2
- package/dist/client/static/js/{index-zq0qxb17.js → index-52nd4hgm.js} +1 -1
- package/dist/client/static/js/{index-8pksqzwq.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-95kese1h.js → index-6009v8jf.js} +1 -1
- package/dist/client/static/js/{index-29npynva.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-9d3n04vb.js → index-7zeah164.js} +2 -2
- package/dist/client/static/js/{index-5h8y54t6.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-x1fqhhpp.js → index-9xsf8162.js} +35 -35
- package/dist/client/static/js/{index-j718pxb3.js → index-a4h5np9r.js} +2 -2
- package/dist/client/static/js/{index-bjv5ga2e.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-aagt3382.js → index-c63qyysm.js} +1 -1
- package/dist/client/static/js/{index-red856x6.js → index-ccgzzydx.js} +1 -1
- package/dist/client/static/js/{index-ex5dtdx2.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-7055hdx1.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-f7te27n5.js → index-f2ahkev0.js} +5 -5
- package/dist/client/static/js/{index-5gf52a6d.js → index-fjex1y0t.js} +2 -2
- package/dist/client/static/js/{index-bafe7hmd.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-twsbv1yn.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-3bf7r7z4.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-ncpwteyt.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-amys498v.js → index-x2v1zmth.js} +186 -186
- package/dist/client/static/js/{index-pwe6chtp.js → index-x9hfvbz6.js} +1 -1
- package/dist/client/static/js/{index-dr5hca5b.js → index-xk1cqjkn.js} +3 -3
- package/dist/client/static/js/{index-k5zfzgez.js → index-y6ke70e6.js} +2 -2
- package/dist/client/static/js/{index-zedt16w7.js → index-zhjjpvcc.js} +1 -1
- package/dist/client/static/js/info-A6RAGUB7-ym2xevn8.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-7q58qdf1.js → infoDiagram-VRGFBTTK-88qbtpq5.js} +1 -1
- package/dist/client/static/js/ini-80p6sp79.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-9jmeszag.js → ishikawaDiagram-OU5B5YK6-s8bagk00.js} +1 -1
- package/dist/client/static/js/java-mm2b3s9b.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-0d7xe845.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-7p83rwdn.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-hwhzw0wv.js → mermaid.core-zvwygxbh.js} +7 -7
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-hy0rtr7t.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-kd8t53tx.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-h3x03f80.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-y2b1ncbg.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-x188rcxf.js → railroadDiagram-XR7U4H2S-800fdzkr.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-g5e9fk17.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-1v8xbxn9.js → rust-waks43wh.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-y9ht91gf.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-pp8s63rt.js → sequenceDiagram-PO4LG4MO-c0tk7gfn.js} +6 -6
- package/dist/client/static/js/{sizeCapture-INFHLROL-k6dhfxex.js → sizeCapture-INFHLROL-fma9p1vy.js} +1 -1
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-y3akpsm4.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-89081dr3.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-tz6r8g3q.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-yq2y1b09.js → usecaseDiagram-POWQR4AR-w6ew1red.js} +2 -2
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-qdmjf6x3.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-3n2sm7rj.js → wardleyDiagram-VNRHLVJA-5ewc8s4p.js} +1 -1
- package/dist/client/static/js/xml-nrb23phz.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-d7n2av2t.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 +14 -4
- package/src/client/components/layout/desktop-layout/RightColumn.test.tsx +204 -0
- package/src/client/components/layout/desktop-layout/RightColumn.tsx +37 -16
- 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/RightSidebar.tsx +10 -8
- 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/mobile/mobile-session-sidebar/use-drawer-tabs.ts +2 -1
- 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/MessageList.test.ts +11 -0
- package/src/client/components/workspace/chat-timeline/MessageList.tsx +29 -21
- 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/chat/timeline/row-measure.ts +75 -0
- package/src/client/hooks/chat/timeline/row-window.test.ts +41 -21
- package/src/client/hooks/chat/timeline/row-window.ts +6 -24
- 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/panel-tabs-reveal.test.tsx +20 -17
- package/src/client/hooks/workspace/panel-tabs-reveal.ts +29 -17
- package/src/client/hooks/workspace/panel-tabs.ts +3 -2
- 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/hooks/workspace/session-state/index.test.tsx +145 -0
- package/src/client/hooks/workspace/session-state/index.ts +28 -16
- 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-2r8p5z3y.js +0 -1
- package/dist/client/static/js/LayoutWrapper-rq3d2a4e.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-7b4w6phx.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-3qnjdjg2.js +0 -1
- package/dist/client/static/js/index-4bqssvt6.js +0 -2
- package/dist/client/static/js/index-dpy3ewrn.css +0 -1
- package/dist/client/static/js/index-gq5w5w8x.js +0 -2
- package/dist/client/static/js/index-ta6gpcpw.js +0 -3
- 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-4b8er03c.js +0 -1
- package/dist/client/static/js/one-light-e6r3vsz4.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-3q2a15wc.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
|
|
|
@@ -158,7 +159,8 @@ export function LeftColumn({
|
|
|
158
159
|
useRevealPanelTab({
|
|
159
160
|
enabled: tabsMode,
|
|
160
161
|
revealed,
|
|
161
|
-
view
|
|
162
|
+
// The left column pins the session list, so it always has a view to reveal.
|
|
163
|
+
storedView: view,
|
|
162
164
|
home: tabsState.home,
|
|
163
165
|
chosenHome: tabsState.chosenHome,
|
|
164
166
|
openTab: tabsState.open,
|
|
@@ -212,14 +214,22 @@ export function LeftColumn({
|
|
|
212
214
|
// not.
|
|
213
215
|
useUpdateCheckRequest(updates, pushToast);
|
|
214
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
|
+
|
|
215
225
|
return (
|
|
216
226
|
<>
|
|
217
227
|
<Panel
|
|
218
228
|
panelRef={panelRef}
|
|
219
229
|
id="left-panel"
|
|
220
|
-
defaultSize={
|
|
230
|
+
defaultSize={renderedWidth}
|
|
221
231
|
minSize={minWidth}
|
|
222
|
-
maxSize={MAX_LEFT_PANEL_WIDTH}
|
|
232
|
+
maxSize={Math.max(minWidth, sidebarWidthForViewport(MAX_LEFT_PANEL_WIDTH, viewportWidth))}
|
|
223
233
|
collapsed={!open}
|
|
224
234
|
>
|
|
225
235
|
{/* The column is three ROWS, and the order is what makes it read as one
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* An explicit "open this view" wins over the strip's mirror in BOTH directions.
|
|
8
|
+
*
|
|
9
|
+
* The reported defect: on a session whose right strip already held `Files`, the
|
|
10
|
+
* Stats navbar readout added a `Resources` tab but left `Files` selected and
|
|
11
|
+
* drawn; the tab only appeared to work after switching chats and coming back.
|
|
12
|
+
* The cause was a second writer: a request writes `layout.activeRightPanel`
|
|
13
|
+
* before its tab is opened, so for one commit the stored view names `Resources`
|
|
14
|
+
* while the strip still says `Files`. The mirror effect read that as a strip
|
|
15
|
+
* choice and requested `Files` back, and the next commit repeated the exchange
|
|
16
|
+
* in the other direction — an open/pending request that also re-applied after a
|
|
17
|
+
* session switch, which is how the tab landed in the next chat too.
|
|
18
|
+
*
|
|
19
|
+
* The claim is the PAIR: after a request settles, the stored selection and the
|
|
20
|
+
* strip's active tab name the SAME view, and no request is left pending.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, test } from 'bun:test';
|
|
24
|
+
import { h, render } from 'preact';
|
|
25
|
+
import { act } from 'preact/test-utils';
|
|
26
|
+
import { Window } from 'happy-dom';
|
|
27
|
+
import { Group } from '@/client/components/layout/desktop-layout/resizer';
|
|
28
|
+
import { RightColumn } from '@/client/components/layout/desktop-layout/RightColumn';
|
|
29
|
+
import { SessionStateProvider } from '@/client/components/common/session-state-provider/index';
|
|
30
|
+
import { useSessionState } from '@/client/hooks/workspace/session-state';
|
|
31
|
+
import { useRightOpenRequest, type RightOpenRequest } from '@/client/hooks/workspace/right-open-request';
|
|
32
|
+
import type { ResolvedPanel } from '@/client/components/workspace/plugin-panel/catalog';
|
|
33
|
+
import {
|
|
34
|
+
getSessionState,
|
|
35
|
+
getSessionValue,
|
|
36
|
+
hydrateSession,
|
|
37
|
+
resetSessionStateStore,
|
|
38
|
+
} from '@/shared/lib/workspace/session-state/store';
|
|
39
|
+
import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
|
|
40
|
+
|
|
41
|
+
const FILES = 'files';
|
|
42
|
+
const STATS = 'plugin:stats:rightPanel';
|
|
43
|
+
|
|
44
|
+
let container: HTMLElement;
|
|
45
|
+
let requestPanel: ((panelKey: string) => void) | null = null;
|
|
46
|
+
let request: RightOpenRequest | null = null;
|
|
47
|
+
|
|
48
|
+
function panel(id: string, label: string, builtin: boolean): ResolvedPanel {
|
|
49
|
+
return {
|
|
50
|
+
id,
|
|
51
|
+
side: 'right',
|
|
52
|
+
title: `${label} — title`,
|
|
53
|
+
label,
|
|
54
|
+
name: builtin ? '' : 'Stats',
|
|
55
|
+
builtin,
|
|
56
|
+
requiresWorkspace: false,
|
|
57
|
+
liveWhileHidden: false,
|
|
58
|
+
minWidth: 200,
|
|
59
|
+
defaultWidth: 420,
|
|
60
|
+
defaultFraction: 0.3,
|
|
61
|
+
render: () => h('div', { 'data-body': id }, `${label} body`),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const CATALOG = [panel(FILES, 'Files', true), panel(STATS, 'Resources', false)];
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The desktop layout's own wiring, reduced to what the two effects read: the
|
|
69
|
+
* restored selection, its request handle, and the rail's toggle-on-select rule.
|
|
70
|
+
*/
|
|
71
|
+
function Harness() {
|
|
72
|
+
const [activeRightPanel, setActiveRightPanel] = useSessionState<string>('layout.activeRightPanel', FILES);
|
|
73
|
+
const [showRightPanel, setShowRightPanel] = useSessionState<boolean>('layout.showRightPanel', true);
|
|
74
|
+
const handle = useRightOpenRequest(setActiveRightPanel);
|
|
75
|
+
requestPanel = handle.requestPanel;
|
|
76
|
+
request = handle.request;
|
|
77
|
+
|
|
78
|
+
const onSelectPanel = (id: string) => {
|
|
79
|
+
if (activeRightPanel === id && showRightPanel) {
|
|
80
|
+
setShowRightPanel(false);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
setShowRightPanel(true);
|
|
84
|
+
handle.requestPanel(id);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
return h(
|
|
88
|
+
Group,
|
|
89
|
+
{ orientation: 'horizontal', children: h(RightColumn, {
|
|
90
|
+
panelRef: { current: null },
|
|
91
|
+
open: showRightPanel,
|
|
92
|
+
width: 420,
|
|
93
|
+
minWidth: 200,
|
|
94
|
+
maxWidth: undefined,
|
|
95
|
+
catalog: CATALOG,
|
|
96
|
+
shownPanel: activeRightPanel,
|
|
97
|
+
selectedPanel: activeRightPanel,
|
|
98
|
+
activePanelFound: true,
|
|
99
|
+
hasActiveContext: false,
|
|
100
|
+
refreshKey: 0,
|
|
101
|
+
onRefresh: () => {},
|
|
102
|
+
onOpenFile: () => {},
|
|
103
|
+
onClose: () => {},
|
|
104
|
+
navStyle: 'tabs',
|
|
105
|
+
onSelectPanel,
|
|
106
|
+
openRequest: handle.request,
|
|
107
|
+
}) },
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** Render the provider on a session id and drain the load's promise chain. */
|
|
112
|
+
async function show(sessionId: string): Promise<void> {
|
|
113
|
+
await act(async () => {
|
|
114
|
+
render(h(SessionStateProvider, { sessionId, children: h(Harness, null) }), container);
|
|
115
|
+
});
|
|
116
|
+
await drain();
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
async function drain(): Promise<void> {
|
|
120
|
+
for (let i = 0; i < 20; i += 1) await act(async () => {});
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function activeTab(): string | null {
|
|
124
|
+
return container.querySelector('[role="tab"][aria-selected="true"]')?.getAttribute('data-panel-tab') ?? null;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
beforeAll(() => {
|
|
128
|
+
installDomGlobals(new Window({ url: 'http://localhost' }));
|
|
129
|
+
const target = globalThis as unknown as Record<string, unknown>;
|
|
130
|
+
target.fetch = async (input: unknown, init?: { method?: string }) => {
|
|
131
|
+
const method = init?.method ?? 'GET';
|
|
132
|
+
const sessionId = String(input).split('/sessions/')[1]?.split('/')[0] ?? 'x';
|
|
133
|
+
if (method === 'POST') return new Response(JSON.stringify({ success: true }), { status: 200 });
|
|
134
|
+
return new Response(
|
|
135
|
+
JSON.stringify({ sessionId, state: { ...(getSessionState(sessionId) ?? {}) } }),
|
|
136
|
+
{ status: 200 },
|
|
137
|
+
);
|
|
138
|
+
};
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
afterAll(() => {
|
|
142
|
+
restoreDomGlobals();
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
beforeEach(() => {
|
|
146
|
+
resetSessionStateStore();
|
|
147
|
+
requestPanel = null;
|
|
148
|
+
request = null;
|
|
149
|
+
container = document.createElement('div');
|
|
150
|
+
document.body.appendChild(container);
|
|
151
|
+
hydrateSession('s-a', {
|
|
152
|
+
'layout.rightPanelTabs': { tabs: [FILES], active: FILES, home: false },
|
|
153
|
+
'layout.activeRightPanel': FILES,
|
|
154
|
+
'layout.showRightPanel': true,
|
|
155
|
+
});
|
|
156
|
+
hydrateSession('s-b', {});
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
afterEach(() => {
|
|
160
|
+
render(null, container);
|
|
161
|
+
container.remove();
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
describe('an explicit open request beside the strip mirror', () => {
|
|
165
|
+
test('the requested view is the one stored AND the one drawn, and nothing stays pending', async () => {
|
|
166
|
+
await show('s-a');
|
|
167
|
+
expect(activeTab()).toBe(FILES);
|
|
168
|
+
|
|
169
|
+
await act(async () => {
|
|
170
|
+
requestPanel?.(STATS);
|
|
171
|
+
});
|
|
172
|
+
await drain();
|
|
173
|
+
|
|
174
|
+
// The race this test exists for: on the buggy code the two writers keep
|
|
175
|
+
// swapping, so the stored selection and the drawn tab disagree in every
|
|
176
|
+
// commit — whichever parity the drains happen to land on.
|
|
177
|
+
expect(getSessionValue<{ active: string }>('s-a', 'layout.rightPanelTabs')?.active).toBe(STATS);
|
|
178
|
+
expect(activeTab()).toBe(STATS);
|
|
179
|
+
expect(getSessionValue<string>('s-a', 'layout.activeRightPanel')).toBe(STATS);
|
|
180
|
+
expect(container.textContent).toContain('Resources body');
|
|
181
|
+
|
|
182
|
+
// A pending request would be re-applied by the next commit (and by the next
|
|
183
|
+
// session). Settled means the nonce stops moving.
|
|
184
|
+
const settled = request?.nonce;
|
|
185
|
+
await drain();
|
|
186
|
+
expect(request?.nonce).toBe(settled);
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
test('a request that settled under one session is not replayed in the next', async () => {
|
|
190
|
+
await show('s-a');
|
|
191
|
+
await act(async () => {
|
|
192
|
+
requestPanel?.(STATS);
|
|
193
|
+
});
|
|
194
|
+
await drain();
|
|
195
|
+
|
|
196
|
+
await show('s-b');
|
|
197
|
+
|
|
198
|
+
// A still-pending nonce would open `Resources` here on the switch commit —
|
|
199
|
+
// the reported tab in every chat. A fresh session owns no tab and no pick.
|
|
200
|
+
expect(container.querySelectorAll('[role="tab"]').length).toBe(0);
|
|
201
|
+
expect(getSessionValue('s-b', 'layout.rightPanelTabs')).toBeUndefined();
|
|
202
|
+
expect(getSessionValue('s-b', 'layout.activeRightPanel')).toBeUndefined();
|
|
203
|
+
});
|
|
204
|
+
});
|
|
@@ -43,6 +43,7 @@ import { useLeftDock } from '@/client/hooks/workspace/left-dock';
|
|
|
43
43
|
import { usePanelTabs } from '@/client/hooks/workspace/panel-tabs';
|
|
44
44
|
import { useRevealEdge, useRevealPanelTab } from '@/client/hooks/workspace/panel-tabs-reveal';
|
|
45
45
|
import { useSessionStateContext } from '@/client/hooks/workspace/session-state/context';
|
|
46
|
+
import { getSessionValue } from '@/shared/lib/workspace/session-state/store';
|
|
46
47
|
import { resolvePanelNav, type PanelNavStyle } from '@/shared/lib/workspace/panel-nav';
|
|
47
48
|
|
|
48
49
|
export interface RightColumnProps {
|
|
@@ -126,10 +127,14 @@ export function RightColumn({
|
|
|
126
127
|
// for. The Stats readout, which names a panel, already opened one — this is
|
|
127
128
|
// the same answer for the click that names no view. See `panel-tabs-reveal`.
|
|
128
129
|
const revealed = useRevealEdge(open);
|
|
130
|
+
// The view this session PICKED, not the fallback `files`: a fresh chat has
|
|
131
|
+
// never stored one, and treating the fallback as a pick is what opened the
|
|
132
|
+
// file explorer in every new session.
|
|
133
|
+
const storedView = getSessionValue<string>(sessionId, 'layout.activeRightPanel') ?? null;
|
|
129
134
|
useRevealPanelTab({
|
|
130
135
|
enabled: tabsMode,
|
|
131
136
|
revealed,
|
|
132
|
-
|
|
137
|
+
storedView,
|
|
133
138
|
home: tabsState.home,
|
|
134
139
|
chosenHome: tabsState.chosenHome,
|
|
135
140
|
openTab: tabsState.open,
|
|
@@ -146,21 +151,6 @@ export function RightColumn({
|
|
|
146
151
|
// would mark a view active behind the catalog, and a view that re-reads on
|
|
147
152
|
// activation would fetch for a page nobody is looking at.
|
|
148
153
|
const effectivePanel = tabsMode ? (tabsState.home ? null : tabsState.active) : shownPanel;
|
|
149
|
-
// Opening a tab from the home page happens through the strip, which writes the
|
|
150
|
-
// hook; the effect above then mirrors it into the stored selection. `pinned`
|
|
151
|
-
// is null here, so `active` is the user's own choice and may be `null`.
|
|
152
|
-
useEffect(() => {
|
|
153
|
-
if (!tabsMode || tabsState.home || tabsState.active === null) return;
|
|
154
|
-
if (tabsState.active !== shownPanel) onSelectPanel?.(tabsState.active);
|
|
155
|
-
}, [tabsMode, tabsState.home, tabsState.active, shownPanel, onSelectPanel]);
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* The OTHER direction, and it listens to a REQUEST rather than to
|
|
159
|
-
* `shownPanel` — see `openRequest`. A restored selection is not an opening:
|
|
160
|
-
* this column's default is the home page, so the only thing that may add a
|
|
161
|
-
* tab without the user pressing something in the strip is a caller that
|
|
162
|
-
* asked for a view by name.
|
|
163
|
-
*/
|
|
164
154
|
const { open: openTab } = tabsState;
|
|
165
155
|
/**
|
|
166
156
|
* Each request is applied ONCE, tracked by its nonce.
|
|
@@ -174,6 +164,37 @@ export function RightColumn({
|
|
|
174
164
|
const appliedRequest = useRef<number | null>(null);
|
|
175
165
|
const requestKey = openRequest?.panelKey;
|
|
176
166
|
const requestNonce = openRequest?.nonce;
|
|
167
|
+
/**
|
|
168
|
+
* A request that has not been applied yet is AHEAD of the strip: it writes
|
|
169
|
+
* `layout.activeRightPanel` in its event handler, while the tab it names is
|
|
170
|
+
* only opened by the effect below. For that commit `shownPanel` names the
|
|
171
|
+
* requested view and `tabsState.active` names the one the user is leaving —
|
|
172
|
+
* the mirror effect would read that as a strip choice and request the OLD
|
|
173
|
+
* view right back. The two then alternate every commit: measured on a session
|
|
174
|
+
* whose strip held `Files`, clicking the Stats readout added `Resources` but
|
|
175
|
+
* left `Files` selected and drawn, and the still-pending request re-applied
|
|
176
|
+
* after a session switch — the tab appeared in the next chat too.
|
|
177
|
+
*/
|
|
178
|
+
const requestPending = requestNonce !== undefined && appliedRequest.current !== requestNonce;
|
|
179
|
+
// Opening a tab from the home page happens through the strip, which writes the
|
|
180
|
+
// hook; the effect above then mirrors it into the stored selection. `pinned`
|
|
181
|
+
// is null here, so `active` is the user's own choice and may be `null`.
|
|
182
|
+
useEffect(() => {
|
|
183
|
+
if (!tabsMode || tabsState.home || tabsState.active === null) return;
|
|
184
|
+
if (tabsState.active === shownPanel) return;
|
|
185
|
+
// The divergence a pending request creates is not a strip choice; only the
|
|
186
|
+
// request may answer it, and it does so in the effect below.
|
|
187
|
+
if (requestPending) return;
|
|
188
|
+
onSelectPanel?.(tabsState.active);
|
|
189
|
+
}, [tabsMode, tabsState.home, tabsState.active, shownPanel, onSelectPanel, requestPending]);
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* The OTHER direction, and it listens to a REQUEST rather than to
|
|
193
|
+
* `shownPanel` — see `openRequest`. A restored selection is not an opening:
|
|
194
|
+
* this column's default is the home page, so the only thing that may add a
|
|
195
|
+
* tab without the user pressing something in the strip is a caller that
|
|
196
|
+
* asked for a view by name.
|
|
197
|
+
*/
|
|
177
198
|
useEffect(() => {
|
|
178
199
|
if (!tabsMode || requestKey === undefined || requestNonce === undefined) return;
|
|
179
200
|
if (appliedRequest.current === requestNonce) return;
|
|
@@ -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>
|
|
@@ -99,23 +99,25 @@ export function MobileRightSidebar({
|
|
|
99
99
|
const tabsMode = navStyle === 'tabs';
|
|
100
100
|
const known = useMemo(() => new Set(catalog.map((panel) => panel.id)), [catalog]);
|
|
101
101
|
const tabsState = usePanelTabs('right', known, null);
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
//
|
|
102
|
+
// Whether the session's blob actually holds a right-drawer view. Read through
|
|
103
|
+
// the store (not the hook's fallback), because "unset" and "set to the
|
|
104
|
+
// default" are different facts here — and only the former is a session the
|
|
105
|
+
// header's reveal may open a view for.
|
|
106
|
+
const hasStoredTab = getSessionValue<string>(sessionId, 'layout.mobileRightPanel') !== undefined;
|
|
107
|
+
// The header's "Open Right Panel" is a reveal, so it shows the view this
|
|
108
|
+
// session PICKED. A fresh chat never picked one (`activeTab` is the `files`
|
|
109
|
+
// fallback), so it keeps its catalog — the reported defect was a new chat
|
|
110
|
+
// opening a `Files` tab every time the drawer was revealed.
|
|
105
111
|
useRevealPanelTab({
|
|
106
112
|
enabled: tabsMode,
|
|
107
113
|
revealed: useRevealSignal(revealSignal),
|
|
108
|
-
|
|
114
|
+
storedView: hasStoredTab ? activeTab : null,
|
|
109
115
|
home: tabsState.home,
|
|
110
116
|
chosenHome: tabsState.chosenHome,
|
|
111
117
|
openTab: tabsState.open,
|
|
112
118
|
known,
|
|
113
119
|
});
|
|
114
120
|
const { open: openTab, tabs: openTabIds } = tabsState;
|
|
115
|
-
// Whether the session's blob actually holds a right-drawer view. Read through
|
|
116
|
-
// the store (not the hook's fallback), because "unset" and "set to the
|
|
117
|
-
// default" are different facts here.
|
|
118
|
-
const hasStoredTab = getSessionValue<string>(sessionId, 'layout.mobileRightPanel') !== undefined;
|
|
119
121
|
|
|
120
122
|
/**
|
|
121
123
|
* Every gesture that CHANGES the view must arm the soft keyboard before the
|
|
@@ -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.
|
|
@@ -46,7 +46,8 @@ export function useMobileDrawerTabs(dock: MobileDockState, revealSignal: number)
|
|
|
46
46
|
useRevealPanelTab({
|
|
47
47
|
enabled: dock.tabsMode,
|
|
48
48
|
revealed: useRevealSignal(revealSignal),
|
|
49
|
-
view
|
|
49
|
+
// The left drawer pins the session list, so it always has a view to reveal.
|
|
50
|
+
storedView: dock.activeView,
|
|
50
51
|
home: tabs?.home ?? false,
|
|
51
52
|
chosenHome: tabs?.chosenHome ?? false,
|
|
52
53
|
openTab: tabs?.open ?? null,
|
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
|
});
|