@kabmo-labs/kabmo 0.41.0 → 0.42.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 +533 -518
- package/dist/client/static/js/{CsvGrid-60njj97j.js → CsvGrid-20k047ht.js} +2 -2
- package/dist/client/static/js/{DocxView-rsv0j46a.js → DocxView-qpvhfcmg.js} +5 -5
- package/dist/client/static/js/{DrawioView-n2g5df3a.js → DrawioView-178skky8.js} +2 -2
- package/dist/client/static/js/ImageView-460th5qa.js +1 -0
- package/dist/client/static/js/LayoutWrapper-5cv0dty8.js +2 -0
- package/dist/client/static/js/Modal-wks6p4r5.js +38 -0
- package/dist/client/static/js/{PdfView-1r7a0qkp.js → PdfView-y51g03nr.js} +1 -1
- package/dist/client/static/js/SessionsView-rsmvn7ks.js +1 -0
- package/dist/client/static/js/{SheetView-bt5pp042.js → SheetView-z7yvb05v.js} +25 -25
- package/dist/client/static/js/{SvgPreview-vfmqgmrx.js → SvgPreview-yehgzhem.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-8k5hk1yx.js → abnfDiagram-O67JEVCF-6zxpcy8b.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-9q06651f.js +1 -0
- package/dist/client/static/js/architectureDiagram-NJMV4G6O-m98sgh3c.js +36 -0
- package/dist/client/static/js/{astro-0rh34hha.js → astro-nn7xg0we.js} +1 -1
- package/dist/client/static/js/bash-fjzhxy10.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-04sbtdth.js → blockDiagram-BEXU5L5S-cp7rervg.js} +5 -5
- package/dist/client/static/js/c-wqtyezvw.js +1 -0
- package/dist/client/static/js/c4Diagram-YGBWAQC7-t31recqm.js +38 -0
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-18cc0bsb.js → classDiagram-v2-NBCMYWYE-fy8x3dkx.js} +5 -5
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-dk683zvp.js → cose-bilkent-JH36ORCC-va7ybm9e.js} +1 -1
- package/dist/client/static/js/cpp-y0nzwner.js +1 -0
- package/dist/client/static/js/css-a13jmmnc.js +1 -0
- package/dist/client/static/js/css-n2waj098.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-w7a38g4g.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-m2sx8d8s.js → cynefinDiagram-VND7K2PF-4k0k429c.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-qf3pr59p.js → dagre-6A5THRUB-ykdhxq6t.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-twnz23mt.js → diagram-22UHCM2B-5nvwx7b6.js} +8 -8
- package/dist/client/static/js/{diagram-3UASUU5V-417bas6t.js → diagram-3UASUU5V-hc7zsjgw.js} +1 -1
- package/dist/client/static/js/diagram-ATOU4E4O-97ae07y7.js +3 -0
- package/dist/client/static/js/diagram-CDSNMT55-b56nnbbs.js +30 -0
- package/dist/client/static/js/{diagram-MLGK6HIB-7a0h1hs3.js → diagram-MLGK6HIB-37rygr9k.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-w75bftmd.js → diagram-MPIPVDR6-wv3vhhfk.js} +2 -2
- package/dist/client/static/js/{dockerfile-g5qbaeq3.js → dockerfile-0efb1z6e.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-vdzm3tsv.js → ebnfDiagram-ZINNZB2B-13fv7vxg.js} +1 -1
- package/dist/client/static/js/{elixir-gpez1k9m.js → elixir-mabagxwa.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-2fsbb484.js → elk-276RUBZZ-xam60ktz.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-vnkztq7d.js → erDiagram-OPXOYQCR-24ctv2ee.js} +6 -6
- package/dist/client/static/js/{erlang-jqqa3ehb.js → erlang-zwy7cqdk.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-6wrjccyw.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-19vjkg84.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-pbvcch52.js → ganttDiagram-FUAMR5RP-766a8fqw.js} +2 -2
- package/dist/client/static/js/gitGraph-4MIJSDKK-4je2p50v.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-dkvktvzr.js → gitGraphDiagram-X574FWY7-fmwjkgh6.js} +2 -2
- package/dist/client/static/js/graphql-gvb7e2eb.js +1 -0
- package/dist/client/static/js/html-bwyt0ayy.js +1 -0
- package/dist/client/static/js/{index-rc8wrs2a.js → index-03pyvmcz.js} +2 -2
- package/dist/client/static/js/index-13dr1t1r.js +314 -0
- package/dist/client/static/js/{index-rebnv57p.js → index-13xbwcbz.js} +2 -2
- package/dist/client/static/js/{index-pbsm2vw7.js → index-1c0pnsjd.js} +2 -2
- package/dist/client/static/js/index-1rxa9zxp.js +1 -0
- package/dist/client/static/js/{index-c6kx7s6a.js → index-2hpy58d0.js} +2 -2
- package/dist/client/static/js/{index-f8pq132s.js → index-2x9eqztp.js} +1 -1
- package/dist/client/static/js/{index-pn91shfp.js → index-4cncqz8j.js} +2 -2
- package/dist/client/static/js/index-4j8rgr4p.js +1 -0
- package/dist/client/static/js/{index-x2kb1kx5.js → index-4mstdh41.js} +3 -3
- package/dist/client/static/js/index-4z4ax55k.js +12 -0
- package/dist/client/static/js/{index-55hq7tnj.js → index-6ge6gk9w.js} +1 -1
- package/dist/client/static/js/{index-re1xz433.js → index-7t63akyt.js} +1 -1
- package/dist/client/static/js/{index-zye9309h.js → index-8b3t2y77.js} +2 -2
- package/dist/client/static/js/index-8hgm0abr.js +474 -0
- package/dist/client/static/js/index-8jqawh3r.js +2 -0
- package/dist/client/static/js/index-95en3p3g.js +9 -0
- package/dist/client/static/js/{index-rdqn92tc.js → index-97qst4k9.js} +2 -2
- package/dist/client/static/js/{index-xfa5hswh.js → index-9vdbnvmk.js} +1 -1
- package/dist/client/static/js/{index-zfykeg7x.js → index-a9t9gdew.js} +9 -9
- package/dist/client/static/js/{index-ds6a2cx7.js → index-b4y5g48d.js} +5 -5
- package/dist/client/static/js/{index-hz177dr2.js → index-czagykbq.js} +2 -2
- package/dist/client/static/js/{index-yq9vnd1y.js → index-dfqmwm7j.js} +2 -2
- package/dist/client/static/js/{index-tgper3yy.js → index-dydwcp3n.js} +2 -2
- package/dist/client/static/js/{index-0c6vpk89.js → index-e1yz59fa.js} +2 -2
- package/dist/client/static/js/{index-ce4vytm6.js → index-e6any867.js} +2 -2
- package/dist/client/static/js/{index-j5ram1ve.js → index-ejdnjh5c.js} +2 -2
- package/dist/client/static/js/index-f4vr1c6e.css +1 -0
- package/dist/client/static/js/{index-cytks03p.js → index-feffxxss.js} +2 -2
- package/dist/client/static/js/{index-6fx2t6y7.js → index-grczkttn.js} +12 -12
- package/dist/client/static/js/{index-s78n0dtv.js → index-hga3e13s.js} +2 -2
- package/dist/client/static/js/{index-ajjq0b8y.js → index-hw14rhen.js} +2 -2
- package/dist/client/static/js/index-hzwr5fm9.js +4 -0
- package/dist/client/static/js/{index-sj4y8kj2.js → index-j17h4z6f.js} +2 -2
- package/dist/client/static/js/{index-a4ed3mks.js → index-ka2rc2cr.js} +5 -5
- package/dist/client/static/js/{index-djv15k5s.js → index-ktbrmp29.js} +2 -2
- package/dist/client/static/js/{index-3rymer2w.js → index-nbexks3x.js} +1 -1
- package/dist/client/static/js/{index-ngk9h0v9.js → index-nh29fkk9.js} +2 -2
- package/dist/client/static/js/{index-gn92c6hp.js → index-p0ez6hqd.js} +2 -2
- package/dist/client/static/js/{index-e7yf273s.js → index-pkes9492.js} +2 -2
- package/dist/client/static/js/{index-fg965t62.js → index-pysqpc5n.js} +2 -2
- package/dist/client/static/js/index-qj34r6d0.js +1 -0
- package/dist/client/static/js/{index-ntcqyqd5.js → index-qx6x4z0y.js} +2 -2
- package/dist/client/static/js/{index-agdbjh5k.js → index-r8cc80w5.js} +2 -2
- package/dist/client/static/js/{index-9dnkfpx4.js → index-rab39785.js} +2 -2
- package/dist/client/static/js/{index-haaz8t7e.js → index-sk9ej289.js} +2 -2
- package/dist/client/static/js/{index-9fnzcg2x.js → index-sq3r1xhf.js} +2 -2
- package/dist/client/static/js/{index-pfbyfab5.js → index-sx809d6d.js} +2 -2
- package/dist/client/static/js/{index-7w3gqw2b.js → index-sz3mxjvy.js} +1 -1
- package/dist/client/static/js/{index-4jk8ngjg.js → index-tqycj126.js} +2 -2
- package/dist/client/static/js/{index-0xaz2eyv.js → index-vcn1kcpy.js} +3 -3
- package/dist/client/static/js/{index-2z9wrb46.js → index-x7f5ysch.js} +2 -2
- package/dist/client/static/js/index-xe5cqwnf.js +1 -0
- package/dist/client/static/js/index-xxe52zrm.js +2 -0
- package/dist/client/static/js/{index-amawahyh.js → index-yvxa7hd8.js} +2 -2
- package/dist/client/static/js/{index-e6qjfcz9.js → index-z6kpc98a.js} +1 -1
- package/dist/client/static/js/{index-yzg9mbsv.js → index-zjydzxhm.js} +1 -1
- package/dist/client/static/js/{index-ne131hmw.js → index-zvazj4va.js} +2 -2
- package/dist/client/static/js/info-A6RAGUB7-k0z5qdew.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-mh6yks62.js → infoDiagram-VRGFBTTK-tqytmzp1.js} +1 -1
- package/dist/client/static/js/ini-2gvjwh83.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-hnfqppnv.js → ishikawaDiagram-OU5B5YK6-rp77ff6m.js} +1 -1
- package/dist/client/static/js/java-1xwcq79s.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-s4nv1f3q.js → journeyDiagram-ZHPQQLJL-c7bxrhf1.js} +2 -2
- package/dist/client/static/js/json-4pqjabgq.js +1 -0
- package/dist/client/static/js/jsx-wcsss15s.js +1 -0
- package/dist/client/static/js/{julia-yre4bxb9.js → julia-2eekpjq8.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-t8kbfefp.js → kanban-definition-PNTS6WVX-j2pxewqq.js} +5 -5
- package/dist/client/static/js/lua-h7vjcn0h.js +1 -0
- package/dist/client/static/js/markdown-f30jjjh9.js +1 -0
- package/dist/client/static/js/{mermaid.core-0784021p.js → mermaid.core-cqqe1krg.js} +6 -6
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-swkkze8c.js → mindmap-definition-NLK3R4M7-s03k32p9.js} +5 -5
- package/dist/client/static/js/one-dark-pro-9tt0a020.js +1 -0
- package/dist/client/static/js/one-light-5fg4r0ra.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-6cnvmb2z.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-jqayzh7z.js → pegDiagram-GJSIUBJH-dfg2j0zc.js} +1 -1
- package/dist/client/static/js/{perl-weeskn1v.js → perl-5vxax0nr.js} +1 -1
- package/dist/client/static/js/{php-vf3045p9.js → php-hgrgdq63.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-m9z1mztn.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-w03a65ky.js → pieDiagram-5QR66LMP-pshd1j79.js} +1 -1
- package/dist/client/static/js/properties-ymexza6q.js +1 -0
- package/dist/client/static/js/python-31ycwa66.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-2j7sfa9s.js → quadrantDiagram-O4NWA36T-cvvvmtk2.js} +4 -4
- package/dist/client/static/js/r-t2nne4xp.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-8m9rkex6.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-wc55emj8.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-2y2rnrzq.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-zzcc9x0v.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-z82na5nb.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-jtkkgy34.js → railroadDiagram-XR7U4H2S-h53p3sha.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-t85ckjdb.js → requirementDiagram-PLB6GJNP-bdv2fkxd.js} +4 -4
- package/dist/client/static/js/{ruby-1a2ryzy6.js → ruby-8pxcn21w.js} +1 -1
- package/dist/client/static/js/{rust-736r0f0v.js → rust-j80dxgjg.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-5pfkw8ne.js → sankeyDiagram-IPEJSGJF-xqnnvmhy.js} +2 -2
- package/dist/client/static/js/{sass-tq4vw7hd.js → sass-bm32bb5k.js} +1 -1
- package/dist/client/static/js/{scss-x7ddw6gb.js → scss-e2dndbfa.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-55vs9zv5.js → sequenceDiagram-PO4LG4MO-3p67305f.js} +10 -10
- package/dist/client/static/js/{sizeCapture-INFHLROL-pzqqd7f4.js → sizeCapture-INFHLROL-f87525h7.js} +1 -1
- package/dist/client/static/js/sql-bwnasywx.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-6nhrph8n.js → stateDiagram-v2-GCMORJYK-e5st1fy3.js} +6 -6
- package/dist/client/static/js/{svelte-0hv6pak2.js → svelte-ztkaww47.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-6tcnxfbv.js → swimlanes-2SLR337P-ceghkbez.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-vc8hvfya.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-1dz46nt5.js → timeline-definition-EJHVYXUP-f7evs443.js} +2 -2
- package/dist/client/static/js/treeView-Q6P3EWNA-kzh6cm3f.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-wz5ed560.js +1 -0
- package/dist/client/static/js/tsx-zfy727zs.js +1 -0
- package/dist/client/static/js/typescript-p3syh43m.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-b3jfveq6.js → usecaseDiagram-POWQR4AR-0gpn21p7.js} +27 -27
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-dnc3jqvp.js → vennDiagram-UO4OBE2U-4spzy428.js} +1 -1
- package/dist/client/static/js/{vue-zccj3qa5.js → vue-xm1dxpmy.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-zewbfccz.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-466m8400.js → wardleyDiagram-VNRHLVJA-745xr2pa.js} +4 -4
- package/dist/client/static/js/xml-4enq788a.js +1 -0
- package/dist/client/static/js/xychartDiagram-PMCCYNJV-7dr9qwx5.js +7 -0
- package/dist/client/static/js/yaml-pjtt3jsc.js +1 -0
- package/package.json +1 -1
- package/src/client/components/common/batch-selection/folder-state.ts +2 -2
- package/src/client/components/common/server-control/Panel.tsx +16 -5
- package/src/client/components/common/server-control/index.test.tsx +63 -9
- package/src/client/components/common/session-row/TrailingSlot.tsx +8 -0
- package/src/client/components/common/session-row/index.tsx +16 -9
- package/src/client/components/layout/session-sidebar/CategoryItem.tsx +1 -1
- package/src/client/components/layout/session-sidebar/ClassicView.tsx +13 -0
- package/src/client/components/layout/session-sidebar/HarnessFilter.tsx +175 -0
- package/src/client/components/layout/session-sidebar/SessionList.tsx +9 -1
- package/src/client/components/layout/session-sidebar/SessionsView.tsx +6 -0
- package/src/client/components/layout/session-sidebar/harness-filter.test.tsx +173 -0
- package/src/client/components/layout/session-sidebar/modern/FilterChips.tsx +63 -18
- package/src/client/components/layout/session-sidebar/modern/SearchField.tsx +1 -1
- package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +21 -12
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +1 -1
- package/src/client/components/layout/session-sidebar/modern/index.tsx +11 -2
- package/src/client/components/layout/session-sidebar/modern/search-field.test.tsx +96 -0
- package/src/client/components/layout/session-sidebar/session-list-states.test.tsx +3 -0
- package/src/client/components/layout/session-sidebar/variant-props.ts +7 -0
- package/src/client/components/mobile/SessionSidebar.tsx +14 -25
- package/src/client/components/mobile/mobile-session-sidebar/ClassicDrawer.tsx +19 -0
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +1 -1
- package/src/client/components/settings/categories/omp-settings/EngineHeader.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.image.test.ts +147 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.test.ts +51 -83
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.tsx +44 -63
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/ReadDirectory.tsx +72 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/ReadImage.tsx +51 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/read-test-util.ts +91 -0
- package/src/client/components/workspace/git-panel/commit-modal/CommitRow.test.ts +80 -62
- package/src/client/components/workspace/git-panel/commit-modal/CommitRow.tsx +15 -33
- package/src/client/components/workspace/git-panel/commit-modal/Header.tsx +1 -1
- package/src/client/components/workspace/terminal-panel/copy.test.ts +179 -0
- package/src/client/components/workspace/terminal-panel/copy.ts +76 -0
- package/src/client/components/workspace/terminal-panel/mount.ts +13 -0
- package/src/client/data/settings/omp-schema.json +39 -18
- package/src/client/hooks/chat/omp/pending-child.test.ts +1 -1
- package/src/client/hooks/chat/omp/session-sidebar-controller.test.ts +61 -0
- package/src/client/hooks/chat/omp/session-sidebar-controller.ts +37 -39
- package/src/client/hooks/chat/omp/sidebar-filter.ts +62 -0
- package/src/client/hooks/chat/timeline/session-changes.test.ts +85 -0
- package/src/client/hooks/chat/timeline/session-changes.ts +8 -5
- package/src/client/hooks/shell/servers.ts +60 -2
- package/src/client/hooks/ui/updates/mobile-flow.ts +56 -0
- package/src/client/tailwind.css +58 -0
- package/src/server/lib/harness/acp/commands.test.ts +1 -0
- package/src/server/lib/harness/acp/commands.ts +12 -4
- package/src/server/lib/harness/acp/replay-transcript.ts +32 -13
- package/src/server/lib/harness/acp/session-transcript.server.test.ts +162 -0
- package/src/server/lib/harness/acp/session-transcript.server.ts +350 -0
- package/src/server/lib/harness/acp/session.ts +6 -1
- package/src/server/lib/harness/schema.server.ts +18 -0
- package/src/server/lib/harness/spawn.server.ts +14 -1
- package/src/server/lib/models/provider-icon-fetch.ts +2 -2
- package/src/server/lib/models/provider-icon-parse.test.ts +0 -12
- package/src/server/lib/models/provider-icon-parse.ts +0 -8
- package/src/server/lib/omp/rpc/frame-fold.test.ts +16 -1
- package/src/server/lib/omp/rpc/frame-fold.ts +17 -4
- package/src/server/lib/omp/session/blobs.server.test.ts +34 -0
- package/src/server/lib/omp/session/blobs.server.ts +8 -3
- package/src/server/lib/omp/session/delete.server.ts +4 -0
- package/src/server/lib/omp/session/sidebar-activity.server.test.ts +2 -1
- package/src/server/routes/agent/harness-command.test.ts +71 -0
- package/src/server/routes/agent/harness-command.ts +27 -13
- package/src/server/routes/chat/imported.ts +5 -2
- package/src/server/routes/chat/live-meta.ts +42 -0
- package/src/server/routes/chat/session.test.ts +110 -0
- package/src/server/routes/chat/session.ts +31 -34
- package/src/shared/lib/chat/transcript-rows.ts +22 -0
- package/src/shared/lib/fs/file-kind.test.ts +46 -3
- package/src/shared/lib/fs/file-kind.ts +40 -9
- package/src/shared/lib/omp/config/schema-releases.test.ts +29 -0
- package/src/shared/lib/workspace/harness-filter.test.ts +89 -0
- package/src/shared/lib/workspace/harness-filter.ts +75 -0
- package/src/{client/lib → shared/lib/workspace}/session-tree.test.ts +1 -1
- package/src/shared/lib/workspace/session-visibility.test.ts +71 -0
- package/src/shared/lib/workspace/session-visibility.ts +48 -23
- package/src/shared/lib/workspace/sidebar-filter-row.test.ts +64 -23
- package/src/shared/lib/workspace/sidebar-filter-row.ts +89 -31
- package/dist/client/static/js/ImageView-t330jx6y.js +0 -1
- package/dist/client/static/js/LayoutWrapper-qp6nsw65.js +0 -2
- package/dist/client/static/js/Modal-sbya4ahp.js +0 -38
- package/dist/client/static/js/SessionsView-yqs5m8tj.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-1wqga929.js +0 -1
- package/dist/client/static/js/architectureDiagram-NJMV4G6O-7jcb7fgy.js +0 -36
- package/dist/client/static/js/bash-vv2ysp0a.js +0 -1
- package/dist/client/static/js/c-67jyc7sg.js +0 -1
- package/dist/client/static/js/c4Diagram-YGBWAQC7-vwac9za0.js +0 -38
- package/dist/client/static/js/cpp-crfbnwv8.js +0 -1
- package/dist/client/static/js/css-2re5mbea.js +0 -1
- package/dist/client/static/js/css-983fbv00.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-j2dpdgkh.js +0 -1
- package/dist/client/static/js/diagram-ATOU4E4O-n63cpdnx.js +0 -3
- package/dist/client/static/js/diagram-CDSNMT55-v86p14dd.js +0 -30
- package/dist/client/static/js/eventmodeling-NTZA5JFV-xjvjawd3.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-j21f2bfg.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-r0zbk95f.js +0 -1
- package/dist/client/static/js/graphql-npbd9fdx.js +0 -1
- package/dist/client/static/js/html-1cpe2xc8.js +0 -1
- package/dist/client/static/js/index-1sw00wm0.js +0 -2
- package/dist/client/static/js/index-7fwppdkn.js +0 -1
- package/dist/client/static/js/index-ae91g8ka.js +0 -9
- package/dist/client/static/js/index-b6cyn4hr.js +0 -314
- package/dist/client/static/js/index-efn233xp.js +0 -4
- package/dist/client/static/js/index-esx3zwnt.js +0 -1
- package/dist/client/static/js/index-fbbp5cwj.js +0 -2
- package/dist/client/static/js/index-g1cggqgx.js +0 -12
- package/dist/client/static/js/index-ghsdzs4m.js +0 -1
- package/dist/client/static/js/index-gs7ytgdw.js +0 -474
- package/dist/client/static/js/index-jqs23cc7.css +0 -1
- package/dist/client/static/js/index-qjsy6p86.js +0 -1
- package/dist/client/static/js/info-A6RAGUB7-a8xap43w.js +0 -1
- package/dist/client/static/js/ini-df5bw23e.js +0 -1
- package/dist/client/static/js/java-8j33rj1p.js +0 -1
- package/dist/client/static/js/json-g5ggnd94.js +0 -1
- package/dist/client/static/js/jsx-f6p72qpc.js +0 -1
- package/dist/client/static/js/lua-bahx6qze.js +0 -1
- package/dist/client/static/js/markdown-9dhg1fax.js +0 -1
- package/dist/client/static/js/one-dark-pro-h5tmw145.js +0 -1
- package/dist/client/static/js/one-light-x7vj1pxr.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-b5bvg6v1.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-77ee73zg.js +0 -1
- package/dist/client/static/js/properties-49mfnee4.js +0 -1
- package/dist/client/static/js/python-qb69wp1s.js +0 -1
- package/dist/client/static/js/r-s3mf2tch.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-cp79xtvb.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-dcpgqhcb.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-qasqv686.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-e46908rd.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-7009t6bk.js +0 -1
- package/dist/client/static/js/sql-aczp05f2.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-7xrkrkpa.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-tpn62q8j.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-w910f1g4.js +0 -1
- package/dist/client/static/js/tsx-s1shkfg9.js +0 -1
- package/dist/client/static/js/typescript-htx9v6bf.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-pt9tq808.js +0 -1
- package/dist/client/static/js/xml-wr1dxav5.js +0 -1
- package/dist/client/static/js/xychartDiagram-PMCCYNJV-kryrpqp1.js +0 -7
- package/dist/client/static/js/yaml-0y9fdskg.js +0 -1
- /package/src/{client/lib → shared/lib/workspace}/session-tree.ts +0 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The harness filter, mounted.
|
|
8
|
+
*
|
|
9
|
+
* The rules that matter are the ones a screenshot cannot show: the control is
|
|
10
|
+
* ABSENT while one agent owns the list (a filter with one choice can only be
|
|
11
|
+
* wrong), and an active filter whose last row disappeared keeps its entry so
|
|
12
|
+
* the list it emptied can be restored. Both are asserted here rather than
|
|
13
|
+
* through the sidebar, which would need a socket to reach the same two states.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { afterAll, afterEach, beforeAll, describe, expect, test } from 'bun:test';
|
|
17
|
+
import { Window } from 'happy-dom';
|
|
18
|
+
import { h, render } from 'preact';
|
|
19
|
+
import { act } from 'preact/test-utils';
|
|
20
|
+
|
|
21
|
+
import { HarnessFilter } from '@/client/components/layout/session-sidebar/HarnessFilter';
|
|
22
|
+
import type { HarnessFilterOption } from '@/shared/lib/workspace/harness-filter';
|
|
23
|
+
|
|
24
|
+
const DOM_GLOBALS = ['window', 'document', 'navigator', 'Node', 'Element', 'HTMLElement', 'HTMLInputElement', 'Event', 'MouseEvent', 'KeyboardEvent'] as const;
|
|
25
|
+
const nativeGlobals: Partial<Record<(typeof DOM_GLOBALS)[number], unknown>> = {};
|
|
26
|
+
|
|
27
|
+
let container: HTMLElement;
|
|
28
|
+
|
|
29
|
+
beforeAll(() => {
|
|
30
|
+
const win = new Window({ url: 'http://localhost' });
|
|
31
|
+
const target = globalThis as unknown as Record<string, unknown>;
|
|
32
|
+
for (const key of DOM_GLOBALS) {
|
|
33
|
+
if (!(key in nativeGlobals)) nativeGlobals[key] = target[key];
|
|
34
|
+
target[key] = (win as unknown as Record<string, unknown>)[key];
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
afterAll(() => {
|
|
39
|
+
const target = globalThis as unknown as Record<string, unknown>;
|
|
40
|
+
for (const key of DOM_GLOBALS) {
|
|
41
|
+
if (nativeGlobals[key] === undefined) delete target[key];
|
|
42
|
+
else target[key] = nativeGlobals[key];
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
afterEach(() => {
|
|
47
|
+
if (container) render(null, container);
|
|
48
|
+
container?.remove();
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const OPTIONS: HarnessFilterOption[] = [
|
|
52
|
+
{ harness: 'omp-rpc', label: 'omp', count: 3 },
|
|
53
|
+
{ harness: 'claude', label: 'claude', count: 1 },
|
|
54
|
+
];
|
|
55
|
+
|
|
56
|
+
async function mount(node: preact.ComponentChild) {
|
|
57
|
+
container = document.createElement('div');
|
|
58
|
+
document.body.appendChild(container);
|
|
59
|
+
await act(async () => {
|
|
60
|
+
render(node, container);
|
|
61
|
+
});
|
|
62
|
+
return container;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** The trigger is the only button inside the mounted container. */
|
|
66
|
+
function trigger(el: HTMLElement): HTMLButtonElement {
|
|
67
|
+
return el.querySelector('button')!;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** A row of the portalled menu, by its visible text. */
|
|
71
|
+
function menuRow(label: string): HTMLButtonElement | undefined {
|
|
72
|
+
return [...document.body.querySelectorAll('button')].find((button) => (
|
|
73
|
+
button.textContent?.includes(label) && !container.contains(button)
|
|
74
|
+
));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
async function openMenu(el: HTMLElement) {
|
|
78
|
+
await act(async () => {
|
|
79
|
+
trigger(el).dispatchEvent(new MouseEvent('click', { bubbles: true }));
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
describe('the harness filter', () => {
|
|
84
|
+
test('is absent while one agent owns the list', async () => {
|
|
85
|
+
const el = await mount(h(HarnessFilter, {
|
|
86
|
+
options: [{ harness: 'omp-rpc', label: 'omp', count: 4 }],
|
|
87
|
+
value: null,
|
|
88
|
+
onChange: () => {},
|
|
89
|
+
}));
|
|
90
|
+
|
|
91
|
+
expect(el.querySelector('button')).toBeNull();
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
test('the trigger names the whole list, and the menu counts each harness', async () => {
|
|
95
|
+
const el = await mount(h(HarnessFilter, { options: OPTIONS, value: null, onChange: () => {} }));
|
|
96
|
+
|
|
97
|
+
expect(trigger(el).textContent).toContain('All harnesses');
|
|
98
|
+
expect(trigger(el).getAttribute('aria-expanded')).toBe('false');
|
|
99
|
+
|
|
100
|
+
await openMenu(el);
|
|
101
|
+
expect(trigger(el).getAttribute('aria-expanded')).toBe('true');
|
|
102
|
+
expect(menuRow('omp')?.textContent).toContain('3');
|
|
103
|
+
expect(menuRow('claude')?.textContent).toContain('1');
|
|
104
|
+
// The glyph is decoration inside a named row, not a second announcement.
|
|
105
|
+
expect(menuRow('claude')?.querySelector('[data-harness="claude"]')?.getAttribute('aria-hidden')).toBe('true');
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
test('picking a harness reports it and closes the menu', async () => {
|
|
109
|
+
const picked: Array<string | null> = [];
|
|
110
|
+
const el = await mount(h(HarnessFilter, {
|
|
111
|
+
options: OPTIONS,
|
|
112
|
+
value: null,
|
|
113
|
+
onChange: (next) => picked.push(next),
|
|
114
|
+
}));
|
|
115
|
+
|
|
116
|
+
await openMenu(el);
|
|
117
|
+
await act(async () => {
|
|
118
|
+
menuRow('claude')?.dispatchEvent(new MouseEvent('click', { bubbles: true }));
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
expect(picked).toEqual(['claude']);
|
|
122
|
+
expect(trigger(el).getAttribute('aria-expanded')).toBe('false');
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
test('an active filter names itself on the trigger and can be cleared', async () => {
|
|
126
|
+
const picked: Array<string | null> = [];
|
|
127
|
+
const el = await mount(h(HarnessFilter, {
|
|
128
|
+
options: OPTIONS,
|
|
129
|
+
value: 'claude',
|
|
130
|
+
onChange: (next) => picked.push(next),
|
|
131
|
+
}));
|
|
132
|
+
|
|
133
|
+
expect(trigger(el).textContent).toContain('claude');
|
|
134
|
+
expect(trigger(el).textContent).toContain('1');
|
|
135
|
+
|
|
136
|
+
await openMenu(el);
|
|
137
|
+
await act(async () => {
|
|
138
|
+
menuRow('All harnesses')?.dispatchEvent(new MouseEvent('click', { bubbles: true }));
|
|
139
|
+
});
|
|
140
|
+
expect(picked).toEqual([null]);
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
test('the icon form names itself for assistive tech and still opens the menu', async () => {
|
|
144
|
+
const el = await mount(h(HarnessFilter, {
|
|
145
|
+
options: OPTIONS,
|
|
146
|
+
value: 'claude',
|
|
147
|
+
onChange: () => {},
|
|
148
|
+
form: 'icon',
|
|
149
|
+
}));
|
|
150
|
+
|
|
151
|
+
// No room for the words in the 22px slot: the label lives on the control.
|
|
152
|
+
expect(trigger(el).textContent).not.toContain('claude');
|
|
153
|
+
expect(trigger(el).getAttribute('aria-label')).toBe('Filter by harness: claude');
|
|
154
|
+
expect(trigger(el).getAttribute('aria-haspopup')).toBe('menu');
|
|
155
|
+
|
|
156
|
+
await openMenu(el);
|
|
157
|
+
expect(menuRow('All harnesses')).toBeDefined();
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
test('an active filter with no rows left keeps an entry so it can be cleared', async () => {
|
|
161
|
+
const el = await mount(h(HarnessFilter, {
|
|
162
|
+
options: [{ harness: 'omp-rpc', label: 'omp', count: 2 }],
|
|
163
|
+
value: 'claude',
|
|
164
|
+
onChange: () => {},
|
|
165
|
+
}));
|
|
166
|
+
|
|
167
|
+
expect(trigger(el).textContent).toContain('claude');
|
|
168
|
+
expect(trigger(el).textContent).toContain('0');
|
|
169
|
+
|
|
170
|
+
await openMenu(el);
|
|
171
|
+
expect(menuRow('claude')?.textContent).toContain('0');
|
|
172
|
+
});
|
|
173
|
+
});
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* The `modern` sidebar's filter row: what the list is showing,
|
|
8
|
-
* batch selection.
|
|
7
|
+
* The `modern` sidebar's filter row: what the list is showing, which agent ran
|
|
8
|
+
* it, plus the way into batch selection.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* Three axes and one mode, and they are not the same kind of thing:
|
|
11
11
|
*
|
|
12
12
|
* - **All / Running** are one choice — the focus. Selecting one deselects the
|
|
13
13
|
* other, so they are drawn as a segmented pair and report `aria-pressed`.
|
|
@@ -15,10 +15,13 @@
|
|
|
15
15
|
* can be on at the same time as either focus. It carries a colour
|
|
16
16
|
* (`--theme-warning`) because an archived list is not the list the user
|
|
17
17
|
* expects, and that fact should not be readable only from a label.
|
|
18
|
-
* - **
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
18
|
+
* - **Harness** is the other separate axis: a dropdown immediately right of
|
|
19
|
+
* `Archived`, because that is where the user looks for "which agent". Its two
|
|
20
|
+
* forms are chosen by measured width too (`filterRowForms`).
|
|
21
|
+
* - **Select** enters batch mode. It has TWO forms, chosen by measured width:
|
|
22
|
+
* a trailing glyph while the row is narrow, and a chip once four chips fit.
|
|
23
|
+
* Either way it is the LAST item and it alone sits at the row's trailing edge
|
|
24
|
+
* (`ml-auto`) — the filter group never moves.
|
|
22
25
|
*
|
|
23
26
|
* **Only Select is right-aligned, never the chip group.** The group is a reading
|
|
24
27
|
* order — All, Running, Archived — and it starts at the same left edge as the
|
|
@@ -30,12 +33,18 @@
|
|
|
30
33
|
* **This row never wraps.** It is a control strip, and a second line of chips
|
|
31
34
|
* pushes the list down and reads as a layout break: the four-chip version
|
|
32
35
|
* measured 265px against 256px of content at the 280px default, which is what
|
|
33
|
-
* `Select` falling onto a line of its own looked like.
|
|
36
|
+
* `Select` falling onto a line of its own looked like. The harness control is
|
|
37
|
+
* part of that budget, so adding it never pushes `Select` off the row — and at
|
|
38
|
+
* the 264px floor, where even the narrow forms do not fit, it is the harness
|
|
39
|
+
* control alone that wraps (`filterRowForms(...).wrap`), never a filter chip or
|
|
40
|
+
* `Select`.
|
|
34
41
|
*/
|
|
35
42
|
|
|
36
43
|
import { Archive, ListChecks, X } from 'lucide-preact';
|
|
37
44
|
import { useToolbarRowWidth } from '@/client/hooks/workspace/toolbar-row-width';
|
|
38
|
-
import {
|
|
45
|
+
import { HarnessFilter } from '@/client/components/layout/session-sidebar/HarnessFilter';
|
|
46
|
+
import { filterRowForms } from '@/shared/lib/workspace/sidebar-filter-row';
|
|
47
|
+
import type { HarnessFilterOption } from '@/shared/lib/workspace/harness-filter';
|
|
39
48
|
import type { SessionFocus } from '@/shared/lib/workspace/session-focus';
|
|
40
49
|
|
|
41
50
|
interface FilterChipsProps {
|
|
@@ -45,6 +54,11 @@ interface FilterChipsProps {
|
|
|
45
54
|
runningCount: number;
|
|
46
55
|
showArchived: boolean;
|
|
47
56
|
onToggleArchived: () => void;
|
|
57
|
+
/** The harness the list is narrowed to, or null for every harness. */
|
|
58
|
+
harnessFilter: string | null;
|
|
59
|
+
onHarnessFilterChange: (harness: string | null) => void;
|
|
60
|
+
/** The harnesses the list holds, with row counts — the filter's menu. */
|
|
61
|
+
harnessOptions: HarnessFilterOption[];
|
|
48
62
|
/** True while a batch selection is active — the control reads pressed. */
|
|
49
63
|
selecting: boolean;
|
|
50
64
|
/** Enter or leave workspace batch-selection mode. */
|
|
@@ -62,19 +76,39 @@ export function FilterChips({
|
|
|
62
76
|
runningCount,
|
|
63
77
|
showArchived,
|
|
64
78
|
onToggleArchived,
|
|
79
|
+
harnessFilter,
|
|
80
|
+
onHarnessFilterChange,
|
|
81
|
+
harnessOptions,
|
|
65
82
|
selecting,
|
|
66
83
|
onToggleSelect,
|
|
67
84
|
}: FilterChipsProps) {
|
|
68
|
-
// Measured, not guessed: the sidebar is dragged, so the
|
|
69
|
-
// panel's real content width (see `
|
|
85
|
+
// Measured, not guessed: the sidebar is dragged, so the forms have to follow
|
|
86
|
+
// the panel's real content width (see `filterRowForms`). The row carries no
|
|
70
87
|
// padding of its own — its `px-3` lives on the wrapper — hence `0`.
|
|
71
88
|
const { ref, width } = useToolbarRowWidth(0);
|
|
72
|
-
const
|
|
89
|
+
const forms = filterRowForms(width, runningCount);
|
|
73
90
|
const selectGlyph = selecting ? <X size={10} /> : <ListChecks size={10} />;
|
|
74
91
|
|
|
92
|
+
// DOM order decides which control wraps when the row runs out of room. On a
|
|
93
|
+
// wide row the harness sits before Select (right of Archived); on the narrow
|
|
94
|
+
// fallback it sits AFTER Select, so the 22px Select glyph keeps the row's
|
|
95
|
+
// trailing edge and the harness alone drops to a second line. Letting the
|
|
96
|
+
// order stand would wrap Select instead — the one control the row exists to
|
|
97
|
+
// keep reachable.
|
|
98
|
+
const harness = (
|
|
99
|
+
<HarnessFilter
|
|
100
|
+
options={harnessOptions}
|
|
101
|
+
value={harnessFilter}
|
|
102
|
+
onChange={onHarnessFilterChange}
|
|
103
|
+
// On its own line there is room for the label, so the fallback is the
|
|
104
|
+
// full chip — the same control the row before this one drew.
|
|
105
|
+
form={forms.wrap ? 'chip' : forms.harness}
|
|
106
|
+
/>
|
|
107
|
+
);
|
|
108
|
+
|
|
75
109
|
return (
|
|
76
110
|
<div className="px-3 pb-2">
|
|
77
|
-
<div ref={ref} className=
|
|
111
|
+
<div ref={ref} className={`flex items-center gap-1 ${forms.wrap ? 'flex-wrap' : 'flex-nowrap'}`}>
|
|
78
112
|
<div className="flex shrink-0 items-center gap-1" role="group" aria-label="Session filters">
|
|
79
113
|
<button
|
|
80
114
|
type="button"
|
|
@@ -114,12 +148,17 @@ export function FilterChips({
|
|
|
114
148
|
</button>
|
|
115
149
|
</div>
|
|
116
150
|
|
|
151
|
+
{/* The harness dropdown sits immediately right of `Archived`: it is a
|
|
152
|
+
filter axis beside the archive one, not a mode. Its form is part of
|
|
153
|
+
the row's budget, so a chip here can never push `Select` off. */}
|
|
154
|
+
{forms.wrap ? null : harness}
|
|
155
|
+
|
|
117
156
|
{/* Select is a SIBLING of the filter group, never a member of it. Inside
|
|
118
157
|
the group `ml-auto` has no free space to claim — the group is
|
|
119
158
|
`shrink-0` and only as wide as its chips — so the fourth chip landed
|
|
120
159
|
immediately after `Archived` instead of at the row's trailing edge.
|
|
121
160
|
Out here it is the row's own spare space that pushes it right. */}
|
|
122
|
-
{
|
|
161
|
+
{forms.select === 'chip' ? (
|
|
123
162
|
<button
|
|
124
163
|
type="button"
|
|
125
164
|
onClick={onToggleSelect}
|
|
@@ -137,13 +176,19 @@ export function FilterChips({
|
|
|
137
176
|
title={selecting ? 'Cancel selection' : 'Select workspaces'}
|
|
138
177
|
aria-label={selecting ? 'Cancel selection' : 'Select workspaces'}
|
|
139
178
|
aria-pressed={selecting}
|
|
140
|
-
className={`ml-auto inline-flex
|
|
141
|
-
|
|
142
|
-
}`}
|
|
179
|
+
className={`ml-auto inline-flex shrink-0 items-center justify-center rounded-md transition-colors cursor-pointer ${
|
|
180
|
+
forms.select === 'mini' ? 'h-[22px] w-[22px]' : 'h-7 w-7'
|
|
181
|
+
} ${selecting ? 'bg-ink/10 text-ink' : 'text-ink/55 hover:bg-ink/[0.06] hover:text-ink'}`}
|
|
143
182
|
>
|
|
144
|
-
{selecting
|
|
183
|
+
{selecting
|
|
184
|
+
? <X size={forms.select === 'mini' ? 12 : 14} />
|
|
185
|
+
: <ListChecks size={forms.select === 'mini' ? 12 : 14} />}
|
|
145
186
|
</button>
|
|
146
187
|
)}
|
|
188
|
+
|
|
189
|
+
{/* The narrow fallback: after Select in DOM order, so the row's trailing
|
|
190
|
+
glyph stays put and this control alone takes the second line. */}
|
|
191
|
+
{forms.wrap ? harness : null}
|
|
147
192
|
</div>
|
|
148
193
|
</div>
|
|
149
194
|
);
|
|
@@ -54,7 +54,7 @@ export function SearchField({ value, onChange, touch = false }: SearchFieldProps
|
|
|
54
54
|
onChange={(event) => onChange(event.currentTarget.value)}
|
|
55
55
|
placeholder="Search workspaces & sessions"
|
|
56
56
|
aria-label="Search workspaces and sessions"
|
|
57
|
-
className={`min-w-0 flex-1 bg-transparent text-ink outline-none placeholder:text-ink/40 ${
|
|
57
|
+
className={`kabmo-search-field min-w-0 flex-1 bg-transparent text-ink outline-none placeholder:text-ink/40 ${
|
|
58
58
|
touch ? 'text-[13px]' : 'text-xs'
|
|
59
59
|
}`}
|
|
60
60
|
/>
|
|
@@ -24,13 +24,19 @@
|
|
|
24
24
|
* The icon column, the title column and the TRAILING column are the same columns
|
|
25
25
|
* as a session row's (`common/session-row`): 4px of inset, a 16px slot (18px on
|
|
26
26
|
* touch), then 8px before the text; and on the right, a 22px (28px on touch)
|
|
27
|
-
* action box ending 4px inside the list's content edge
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
27
|
+
* action box ending 3px (4px on touch) inside the list's content edge — half
|
|
28
|
+
* the difference between it and the action row's 28px (36px) sort control.
|
|
29
|
+
* Measured before this rule existed, the folder mark's centre sat at x=20 while
|
|
30
|
+
* the row's status glyph sat at 24, the folder name at 34 while the session
|
|
31
|
+
* title started at 40, and the two `⋯` triggers were 9px apart (8px vs 16px
|
|
32
|
+
* from the panel edge) — three steps that made the list look like two lists. A
|
|
33
|
+
* header that "looked about right" is what produced them: the pair has to be
|
|
34
|
+
* stated, so it is stated here and in `session-row`.
|
|
35
|
+
*
|
|
36
|
+
* The list's content edge is the action row's (`modern/index.tsx` +
|
|
37
|
+
* `.session-list-gutter`), which is why the trailing column needs only the
|
|
38
|
+
* half-box difference: with a scrollbar taking 8px, the rows used to sit 8px
|
|
39
|
+
* inside the sort icon and no inset could close that gap.
|
|
34
40
|
*
|
|
35
41
|
* The actions are the same components the classic header uses — `+` opens a
|
|
36
42
|
* chat in THIS folder and `⋯` is `WorkspaceOptionsMenu` — so pin, delete,
|
|
@@ -158,12 +164,15 @@ export function WorkspaceHeader({
|
|
|
158
164
|
</span>
|
|
159
165
|
</button>
|
|
160
166
|
|
|
161
|
-
{/* `pr-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
167
|
+
{/* `pr-[3px]` on the desktop and `pr-1` on touch: the action cluster ends
|
|
168
|
+
on the SAME inset as a session row's trailing column
|
|
169
|
+
(`common/session-row`) — half the difference between the 22px (28px)
|
|
170
|
+
`⋯` box and the action row's 28px (36px) sort control — so the two
|
|
171
|
+
`⋯` columns and the sort icon share one centre. The list's content
|
|
172
|
+
edge is the action row's content edge (`.session-list-gutter`), which
|
|
173
|
+
is what makes that half difference the whole story. */}
|
|
165
174
|
{!batchActive && (
|
|
166
|
-
<div className=
|
|
175
|
+
<div className={`flex shrink-0 items-center gap-0.5 ${touch ? 'pr-1' : 'pr-[3px]'}`}>
|
|
167
176
|
<button
|
|
168
177
|
type="button"
|
|
169
178
|
title="New Session"
|
|
@@ -36,7 +36,7 @@ import { useSidebarData } from '@/client/hooks/chat/omp/session-list';
|
|
|
36
36
|
import { SessionRow, sessionRowBranchStyle, type SessionRowDensity } from '@/client/components/common/session-row';
|
|
37
37
|
import { SessionBranch, branchControlFor } from '@/client/components/common/session-branch';
|
|
38
38
|
import type { BranchControl } from '@/client/components/common/session-branch';
|
|
39
|
-
import { buildSessionTree } from '@/
|
|
39
|
+
import { buildSessionTree } from '@/shared/lib/workspace/session-tree';
|
|
40
40
|
import { SessionDeleteModal } from '@/client/components/common/session-delete-modal';
|
|
41
41
|
import { WorkspaceOptionsMenu } from '@/client/components/common/workspace-options-menu';
|
|
42
42
|
import { NewWorktreeModal } from '@/client/components/workspace/worktree-modal/index';
|
|
@@ -27,6 +27,7 @@ import { SidebarActionRow } from '@/client/components/layout/session-sidebar/mod
|
|
|
27
27
|
import { WorkspaceSection } from '@/client/components/layout/session-sidebar/modern/WorkspaceSection';
|
|
28
28
|
import { ModernSidebarSkeleton } from '@/client/components/layout/session-sidebar/modern/Skeleton';
|
|
29
29
|
import { SessionListNotice } from '@/client/components/layout/session-sidebar/SessionListNotice';
|
|
30
|
+
import { harnessBadgeLabel } from '@/shared/lib/harness/catalog';
|
|
30
31
|
import {
|
|
31
32
|
focusFolders,
|
|
32
33
|
runningSessionCount,
|
|
@@ -50,6 +51,9 @@ export function ModernSidebarView({
|
|
|
50
51
|
onToggleOptions,
|
|
51
52
|
onCloseOptions,
|
|
52
53
|
onSortChange,
|
|
54
|
+
harnessFilter,
|
|
55
|
+
onHarnessFilterChange,
|
|
56
|
+
harnessOptions,
|
|
53
57
|
onRefresh,
|
|
54
58
|
refreshing,
|
|
55
59
|
scheduledCount,
|
|
@@ -91,6 +95,9 @@ export function ModernSidebarView({
|
|
|
91
95
|
runningCount={runningCount}
|
|
92
96
|
showArchived={showArchived}
|
|
93
97
|
onToggleArchived={onToggleArchived}
|
|
98
|
+
harnessFilter={harnessFilter}
|
|
99
|
+
onHarnessFilterChange={onHarnessFilterChange}
|
|
100
|
+
harnessOptions={harnessOptions}
|
|
94
101
|
selecting={selecting}
|
|
95
102
|
onToggleSelect={onSelectWorkspaces}
|
|
96
103
|
/>
|
|
@@ -110,7 +117,7 @@ export function ModernSidebarView({
|
|
|
110
117
|
touch={touch}
|
|
111
118
|
/>
|
|
112
119
|
|
|
113
|
-
<div className="mt-1 flex-1 scrollbar-overlay-container
|
|
120
|
+
<div className="mt-1 flex-1 scrollbar-overlay-container pl-2 session-list-gutter pb-3">
|
|
114
121
|
{failed ? (
|
|
115
122
|
<SessionListNotice touch={touch} onRetry={onRefresh} refreshing={refreshing} />
|
|
116
123
|
) : initializing ? (
|
|
@@ -121,7 +128,9 @@ export function ModernSidebarView({
|
|
|
121
128
|
? 'Nothing is running right now.'
|
|
122
129
|
: searchQuery
|
|
123
130
|
? 'No workspace or chat matches that search.'
|
|
124
|
-
:
|
|
131
|
+
: harnessFilter
|
|
132
|
+
? `No chats on ${harnessBadgeLabel(harnessFilter)}.`
|
|
133
|
+
: 'No workspaces yet.'}
|
|
125
134
|
</div>
|
|
126
135
|
) : (
|
|
127
136
|
<div className="space-y-3">
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The `modern` sidebar's search line.
|
|
8
|
+
*
|
|
9
|
+
* The field draws its own clear control, so it must opt out of the engine's:
|
|
10
|
+
* `type="search"` makes WebKit and Blink paint `::-webkit-search-cancel-button`
|
|
11
|
+
* inside the input, and the sidebar then showed two X's — the native one beside
|
|
12
|
+
* the app's labelled button. The DOM cannot show the native glyph, so the
|
|
13
|
+
* contract asserted here is the one that suppresses it: the input carries
|
|
14
|
+
* `kabmo-search-field` (the rule in `tailwind.css`) and the app's button is the
|
|
15
|
+
* only clear control in the field.
|
|
16
|
+
*
|
|
17
|
+
* Rendered with `h()` against happy-dom, following `modern/reveal-row.test.tsx`.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { afterAll, afterEach, beforeAll, describe, expect, test } from 'bun:test';
|
|
21
|
+
import { Window } from 'happy-dom';
|
|
22
|
+
import { h, render } from 'preact';
|
|
23
|
+
|
|
24
|
+
import { SearchField } from '@/client/components/layout/session-sidebar/modern/SearchField';
|
|
25
|
+
|
|
26
|
+
const DOM_GLOBALS = ['window', 'document', 'navigator', 'Node', 'Element', 'HTMLElement', 'Event', 'MouseEvent'] as const;
|
|
27
|
+
const nativeGlobals: Partial<Record<(typeof DOM_GLOBALS)[number], unknown>> = {};
|
|
28
|
+
|
|
29
|
+
let container: HTMLElement;
|
|
30
|
+
|
|
31
|
+
beforeAll(() => {
|
|
32
|
+
const win = new Window({ url: 'http://localhost' });
|
|
33
|
+
const target = globalThis as unknown as Record<string, unknown>;
|
|
34
|
+
for (const key of DOM_GLOBALS) {
|
|
35
|
+
if (!(key in nativeGlobals)) nativeGlobals[key] = target[key];
|
|
36
|
+
target[key] = (win as unknown as Record<string, unknown>)[key];
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
afterAll(() => {
|
|
41
|
+
const target = globalThis as unknown as Record<string, unknown>;
|
|
42
|
+
for (const key of DOM_GLOBALS) {
|
|
43
|
+
if (nativeGlobals[key] === undefined) delete target[key];
|
|
44
|
+
else target[key] = nativeGlobals[key];
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
afterEach(() => {
|
|
49
|
+
if (container) render(null, container);
|
|
50
|
+
container?.remove();
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
function mount(props: { value: string; onChange?: (value: string) => void; touch?: boolean }) {
|
|
54
|
+
if (container) {
|
|
55
|
+
render(null, container);
|
|
56
|
+
container.remove();
|
|
57
|
+
}
|
|
58
|
+
container = document.createElement('div');
|
|
59
|
+
document.body.appendChild(container);
|
|
60
|
+
render(h(SearchField, { onChange: () => {}, ...props }), container);
|
|
61
|
+
return container.querySelector('input') as HTMLInputElement;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const buttons = () => Array.from(container.querySelectorAll('button'));
|
|
65
|
+
|
|
66
|
+
describe('modern sidebar search field', () => {
|
|
67
|
+
test('the input opts out of the engine clear control', () => {
|
|
68
|
+
const input = mount({ value: '' });
|
|
69
|
+
expect(input.type).toBe('search');
|
|
70
|
+
expect(input.classList.contains('kabmo-search-field')).toBe(true);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
test('an empty field has no clear control at all', () => {
|
|
74
|
+
mount({ value: '' });
|
|
75
|
+
expect(buttons()).toHaveLength(0);
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
test('a query leaves exactly one clear control, and it is the app\'s', () => {
|
|
79
|
+
mount({ value: 'kabmo' });
|
|
80
|
+
const clear = buttons();
|
|
81
|
+
expect(clear).toHaveLength(1);
|
|
82
|
+
expect(clear[0]!.getAttribute('aria-label')).toBe('Clear search');
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
test('the clear control empties the query', () => {
|
|
86
|
+
const seen: string[] = [];
|
|
87
|
+
mount({ value: 'kabmo', onChange: (value) => seen.push(value) });
|
|
88
|
+
buttons()[0]!.click();
|
|
89
|
+
expect(seen).toEqual(['']);
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
test('the touch variant keeps the same single clear control', () => {
|
|
93
|
+
mount({ value: 'kabmo', touch: true });
|
|
94
|
+
expect(buttons()).toHaveLength(1);
|
|
95
|
+
});
|
|
96
|
+
});
|
|
@@ -71,6 +71,9 @@ function props(overrides: Record<string, unknown> = {}) {
|
|
|
71
71
|
onToggleOptions: () => {},
|
|
72
72
|
onCloseOptions: () => {},
|
|
73
73
|
onSortChange: () => {},
|
|
74
|
+
harnessFilter: null,
|
|
75
|
+
onHarnessFilterChange: () => {},
|
|
76
|
+
harnessOptions: [],
|
|
74
77
|
onRefresh: () => {},
|
|
75
78
|
refreshing: false,
|
|
76
79
|
scheduledCount: 0,
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
import type { SessionSortOption, WorkspaceFolderData } from '@/shared/types';
|
|
23
|
+
import type { HarnessFilterOption } from '@/shared/lib/workspace/harness-filter';
|
|
23
24
|
import type { BatchBinding } from '@/client/components/common/batch-selection/types';
|
|
24
25
|
import type { ToastTone } from '@/shared/lib/ui/toast-duration';
|
|
25
26
|
|
|
@@ -52,6 +53,12 @@ export interface SessionSidebarVariantProps {
|
|
|
52
53
|
onCloseOptions: () => void;
|
|
53
54
|
onSortChange: (option: SessionSortOption) => void;
|
|
54
55
|
|
|
56
|
+
/** The harness the list is narrowed to, or null for every harness. */
|
|
57
|
+
harnessFilter: string | null;
|
|
58
|
+
onHarnessFilterChange: (harness: string | null) => void;
|
|
59
|
+
/** The harnesses the list holds, with row counts — the filter's menu. */
|
|
60
|
+
harnessOptions: HarnessFilterOption[];
|
|
61
|
+
|
|
55
62
|
/** Reload the list; `refreshing` spins whatever the style's refresh control is. */
|
|
56
63
|
onRefresh: () => void;
|
|
57
64
|
refreshing: boolean;
|
|
@@ -3,17 +3,12 @@ import { MobileSessionHeader } from '@/client/components/mobile/mobile-session-s
|
|
|
3
3
|
import { ClassicDrawer } from '@/client/components/mobile/mobile-session-sidebar/ClassicDrawer';
|
|
4
4
|
import { ModernSidebarView } from '@/client/components/layout/session-sidebar/modern';
|
|
5
5
|
import { MobileSessionFooter } from '@/client/components/mobile/mobile-session-sidebar/Footer';
|
|
6
|
-
import {
|
|
7
|
-
import { useKabmoEvent } from '@/client/hooks/ui/window-event';
|
|
6
|
+
import { useMobileUpdateFlow } from '@/client/hooks/ui/updates/mobile-flow';
|
|
8
7
|
import { useToasts } from '@/client/hooks/ui/toasts';
|
|
9
8
|
import { useCancelWait } from '@/client/hooks/chat/waiting/cancel';
|
|
10
9
|
import { useWaitingDispatch } from '@/client/hooks/chat/waiting/dispatch';
|
|
11
|
-
import { useUpdates } from '@/client/hooks/ui/updates';
|
|
12
10
|
import { useSidebarStyle } from '@/client/hooks/workspace/sidebar-style';
|
|
13
|
-
import { UPDATE_REQUEST_EVENT } from '@/shared/lib/updates/popup-state';
|
|
14
|
-
import { useUpdateCheckRequest } from '@/client/hooks/ui/updates/check-request';
|
|
15
11
|
import { openKeyBindingHelp } from '@/client/lib/commands/overlays';
|
|
16
|
-
import { updateOutcomeTone } from '@/shared/lib/ui/toast-duration';
|
|
17
12
|
import { useScheduledTaskCount } from '@/client/hooks/workspace/scheduled-tasks';
|
|
18
13
|
import { phoneLeftStripVisible } from '@/shared/lib/workspace/mobile-dock';
|
|
19
14
|
import { MobileDockBody, MobileDockStrip } from '@/client/components/mobile/mobile-session-sidebar/Dock';
|
|
@@ -99,6 +94,9 @@ export function MobileSessionSidebar({
|
|
|
99
94
|
setOptionsOpen,
|
|
100
95
|
sortOption,
|
|
101
96
|
handleSortChange,
|
|
97
|
+
harnessFilter,
|
|
98
|
+
setHarnessFilter,
|
|
99
|
+
harnessOptions,
|
|
102
100
|
processedFolders,
|
|
103
101
|
sessionStatus,
|
|
104
102
|
handleSelectSession,
|
|
@@ -117,30 +115,15 @@ export function MobileSessionSidebar({
|
|
|
117
115
|
const [schedulerOpen, setSchedulerOpen] = useState(false);
|
|
118
116
|
const scheduledCount = useScheduledTaskCount();
|
|
119
117
|
const [aboutOpen, setAboutOpen] = useState(false);
|
|
120
|
-
const updates = useUpdates();
|
|
121
|
-
// An update inside a native shell, an install on an Android browser, nothing
|
|
122
|
-
// elsewhere — see `useShellOffer`.
|
|
123
|
-
const shellDownload = useShellOffer();
|
|
124
118
|
const { pushToast } = useToasts();
|
|
125
119
|
const cancelWait = useCancelWait(pushToast);
|
|
126
120
|
useWaitingDispatch({ onNotice: pushToast });
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
// session list they came from.
|
|
132
|
-
useKabmoEvent(UPDATE_REQUEST_EVENT, () => {
|
|
133
|
-
onClose();
|
|
134
|
-
setAboutOpen(true);
|
|
135
|
-
void updates.apply('kabmo').then((result) => {
|
|
136
|
-
if (!result) return;
|
|
137
|
-
pushToast(result.message, updateOutcomeTone(result));
|
|
138
|
-
});
|
|
121
|
+
const { updates, shellDownload } = useMobileUpdateFlow({
|
|
122
|
+
onClose,
|
|
123
|
+
openAbout: () => setAboutOpen(true),
|
|
124
|
+
pushToast,
|
|
139
125
|
});
|
|
140
126
|
|
|
141
|
-
// The same native row as the desktop's: one check, one verdict, drawer stays.
|
|
142
|
-
useUpdateCheckRequest(updates, pushToast);
|
|
143
|
-
|
|
144
127
|
const handleNewSessionAndClose = () => {
|
|
145
128
|
onNewSession();
|
|
146
129
|
onClose();
|
|
@@ -200,6 +183,9 @@ export function MobileSessionSidebar({
|
|
|
200
183
|
onToggleOptions: () => setOptionsOpen(!optionsOpen),
|
|
201
184
|
onCloseOptions: () => setOptionsOpen(false),
|
|
202
185
|
onSortChange: handleSortChange,
|
|
186
|
+
harnessFilter,
|
|
187
|
+
onHarnessFilterChange: setHarnessFilter,
|
|
188
|
+
harnessOptions,
|
|
203
189
|
onRefresh: refreshNow,
|
|
204
190
|
refreshing: isRefreshing,
|
|
205
191
|
scheduledCount,
|
|
@@ -268,6 +254,9 @@ export function MobileSessionSidebar({
|
|
|
268
254
|
sortOption={sortOption}
|
|
269
255
|
optionsOpen={optionsOpen}
|
|
270
256
|
showArchived={showArchived}
|
|
257
|
+
harnessFilter={harnessFilter}
|
|
258
|
+
onHarnessFilterChange={setHarnessFilter}
|
|
259
|
+
harnessOptions={harnessOptions}
|
|
271
260
|
optionsRef={optionsRef}
|
|
272
261
|
scheduledCount={scheduledCount}
|
|
273
262
|
refreshing={isRefreshing}
|