@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
|
@@ -190,4 +190,33 @@ describe('OMP_SCHEMA release rows', () => {
|
|
|
190
190
|
// asking; a stale ladder would hide the only uncoverable value.
|
|
191
191
|
expect(OMP_SCHEMA.entries['worktree.onExit']?.values).toEqual(['keep', 'ask', 'remove', 'force']);
|
|
192
192
|
});
|
|
193
|
+
|
|
194
|
+
test("18.22.2's live-endpoint and keyless rows are offered, and credentials are masked", () => {
|
|
195
|
+
// 18.22.1 lets live voice reach any OpenAI Realtime server, so the endpoint
|
|
196
|
+
// and its key are the only way to configure one from the console; the
|
|
197
|
+
// keyless switch is the only way to turn the scraped engines off.
|
|
198
|
+
const expected: Record<string, { type: SchemaEntry['type']; tab: string; group: string; default: unknown }> = {
|
|
199
|
+
'live.endpoint': { type: 'string', tab: 'providers', group: 'Services', default: undefined },
|
|
200
|
+
'live.apiKey': { type: 'string', tab: 'providers', group: 'Services', default: undefined },
|
|
201
|
+
'providers.webKeyless': { type: 'boolean', tab: 'providers', group: 'Services', default: true },
|
|
202
|
+
};
|
|
203
|
+
for (const [key, want] of Object.entries(expected)) {
|
|
204
|
+
const entry = OMP_SCHEMA.entries[key];
|
|
205
|
+
expect({ key, entry: entry && { type: entry.type, tab: entry.ui.tab, group: entry.ui.group, default: entry.default } }).toEqual({
|
|
206
|
+
key,
|
|
207
|
+
entry: want,
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
// `live.voice` became a free-form string that still ships the nine known
|
|
211
|
+
// voices as options: omp's own panel renders string+options as a submenu,
|
|
212
|
+
// and so does `RowEditor`, so the row must keep its options.
|
|
213
|
+
expect(OMP_SCHEMA.entries['live.voice']?.type).toBe('string');
|
|
214
|
+
expect(OMP_SCHEMA.entries['live.voice']?.ui.options).toHaveLength(9);
|
|
215
|
+
// The generator reads the raw definition, where the marker is `credential`
|
|
216
|
+
// (not the `Setting` instance's `isCredential` getter). Reading the getter
|
|
217
|
+
// left every credential row in plain text — including this release's key.
|
|
218
|
+
for (const key of ['live.apiKey', 'mnemopi.embeddingApiKey', 'mnemopi.llmApiKey', 'hindsight.apiToken']) {
|
|
219
|
+
expect({ key, credential: OMP_SCHEMA.entries[key]?.credential }).toEqual({ key, credential: true });
|
|
220
|
+
}
|
|
221
|
+
});
|
|
193
222
|
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The harness filter's two rules, in isolation.
|
|
8
|
+
*
|
|
9
|
+
* The failure mode is a list that lies: an entry whose count is about the current
|
|
10
|
+
* filter instead of the workspace, or a workspace drawn as an empty header
|
|
11
|
+
* because its rows were filtered away. Both are asserted here rather than
|
|
12
|
+
* through the mounted sidebar, which cannot tell a wrong count from a right one
|
|
13
|
+
* without the same arithmetic.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { describe, expect, test } from 'bun:test';
|
|
17
|
+
import {
|
|
18
|
+
harnessFilterFolders,
|
|
19
|
+
harnessFilterOptions,
|
|
20
|
+
} from '@/shared/lib/workspace/harness-filter';
|
|
21
|
+
import type { SessionItemData, WorkspaceFolderData } from '@/shared/types';
|
|
22
|
+
|
|
23
|
+
function session(id: string, harness?: string): SessionItemData {
|
|
24
|
+
return { id, folder_id: 1, title: id, ...(harness ? { harness } : {}) };
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function folder(id: number, sessions: SessionItemData[]): WorkspaceFolderData {
|
|
28
|
+
return { id, name: `ws-${id}`, isExpanded: false, hasMore: false, totalSessions: sessions.length, sessions };
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
describe('harnessFilterOptions', () => {
|
|
32
|
+
test('counts every harness over the whole list, most-used first', () => {
|
|
33
|
+
const folders = [
|
|
34
|
+
folder(1, [session('a', 'omp-rpc'), session('b', 'claude'), session('c', 'omp-rpc')]),
|
|
35
|
+
folder(2, [session('d', 'codex')]),
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
expect(harnessFilterOptions(folders)).toEqual([
|
|
39
|
+
{ harness: 'omp-rpc', label: 'omp', count: 2 },
|
|
40
|
+
{ harness: 'claude', label: 'claude', count: 1 },
|
|
41
|
+
{ harness: 'codex', label: 'codex', count: 1 },
|
|
42
|
+
]);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
test('a row with no harness belongs to no entry', () => {
|
|
46
|
+
const folders = [folder(1, [session('a'), session('b', 'claude')])];
|
|
47
|
+
|
|
48
|
+
expect(harnessFilterOptions(folders).map((option) => option.harness)).toEqual(['claude']);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
test('an empty list has no entries', () => {
|
|
52
|
+
expect(harnessFilterOptions([])).toEqual([]);
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
describe('harnessFilterFolders', () => {
|
|
57
|
+
test('null returns the input untouched', () => {
|
|
58
|
+
const folders = [folder(1, [session('a', 'claude')])];
|
|
59
|
+
|
|
60
|
+
expect(harnessFilterFolders(folders, null)).toBe(folders);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
test('keeps only the chosen harness and drops a workspace with nothing left', () => {
|
|
64
|
+
const folders = [
|
|
65
|
+
folder(1, [session('a', 'omp-rpc'), session('b', 'claude')]),
|
|
66
|
+
folder(2, [session('c', 'codex')]),
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
const filtered = harnessFilterFolders(folders, 'claude');
|
|
70
|
+
|
|
71
|
+
expect(filtered.map((entry) => entry.id)).toEqual([1]);
|
|
72
|
+
expect(filtered[0]?.sessions.map((entry) => entry.id)).toEqual(['b']);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
test('a row with no harness is not claimed by any filter', () => {
|
|
76
|
+
const folders = [folder(1, [session('a'), session('b', 'claude')])];
|
|
77
|
+
|
|
78
|
+
expect(harnessFilterFolders(folders, 'claude')[0]?.sessions.map((entry) => entry.id)).toEqual(['b']);
|
|
79
|
+
expect(harnessFilterFolders(folders, 'omp-rpc')).toEqual([]);
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
test('does not mutate the input folders', () => {
|
|
83
|
+
const folders = [folder(1, [session('a', 'omp-rpc'), session('b', 'claude')])];
|
|
84
|
+
|
|
85
|
+
harnessFilterFolders(folders, 'claude');
|
|
86
|
+
|
|
87
|
+
expect(folders[0]?.sessions).toHaveLength(2);
|
|
88
|
+
});
|
|
89
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The sidebar's harness filter: which agent ran the chat.
|
|
8
|
+
*
|
|
9
|
+
* A harness is a SPAWN-time fact (`SessionItemData.harness`), so this is a
|
|
10
|
+
* filter over rows the server already sent — never a second query. A workspace
|
|
11
|
+
* with nothing left to show is dropped rather than drawn as an empty header,
|
|
12
|
+
* the same rule the search and focus filters follow.
|
|
13
|
+
*
|
|
14
|
+
* The options are counted over the UNFILTERED list, so an entry's number is a
|
|
15
|
+
* fact about the workspace rather than about what the current filter shows.
|
|
16
|
+
* That is what makes "3 claude" still readable while the list is narrowed to
|
|
17
|
+
* `codex`.
|
|
18
|
+
*
|
|
19
|
+
* A row with no harness (a session created before harnesses were tracked, or a
|
|
20
|
+
* MOCK row) belongs to no entry: inventing `omp-rpc` for it would claim a
|
|
21
|
+
* transport the row itself refuses to draw. It stays reachable through `All`.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
import { harnessBadgeLabel } from '@/shared/lib/harness/catalog';
|
|
25
|
+
import type { WorkspaceFolderData } from '@/shared/types';
|
|
26
|
+
|
|
27
|
+
/** A harness id, or `null` for every harness. */
|
|
28
|
+
export type HarnessFilter = string | null;
|
|
29
|
+
|
|
30
|
+
export interface HarnessFilterOption {
|
|
31
|
+
harness: string;
|
|
32
|
+
/** The name a human reads (`omp`, `claude`, …). */
|
|
33
|
+
label: string;
|
|
34
|
+
/** Rows this harness owns in the unfiltered list. */
|
|
35
|
+
count: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The menu entries, most-used first.
|
|
40
|
+
*
|
|
41
|
+
* Ordering by count puts the agent the user actually works on at the top, where
|
|
42
|
+
* the eye lands; the label breaks ties so two harnesses with one row each do not
|
|
43
|
+
* swap places between renders.
|
|
44
|
+
*/
|
|
45
|
+
export function harnessFilterOptions(folders: readonly WorkspaceFolderData[]): HarnessFilterOption[] {
|
|
46
|
+
const counts = new Map<string, number>();
|
|
47
|
+
for (const folder of folders) {
|
|
48
|
+
for (const session of folder.sessions) {
|
|
49
|
+
if (!session.harness) continue;
|
|
50
|
+
counts.set(session.harness, (counts.get(session.harness) ?? 0) + 1);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return [...counts]
|
|
54
|
+
.map(([harness, count]) => ({ harness, label: harnessBadgeLabel(harness), count }))
|
|
55
|
+
.sort((a, b) => b.count - a.count || a.label.localeCompare(b.label));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The folders a harness filter offers.
|
|
60
|
+
*
|
|
61
|
+
* `null` returns the input untouched — the caller compares by identity to know
|
|
62
|
+
* whether it has to re-expand anything.
|
|
63
|
+
*/
|
|
64
|
+
export function harnessFilterFolders(
|
|
65
|
+
folders: readonly WorkspaceFolderData[],
|
|
66
|
+
filter: HarnessFilter,
|
|
67
|
+
): WorkspaceFolderData[] {
|
|
68
|
+
if (!filter) return folders as WorkspaceFolderData[];
|
|
69
|
+
return folders
|
|
70
|
+
.map((folder) => ({
|
|
71
|
+
...folder,
|
|
72
|
+
sessions: folder.sessions.filter((session) => session.harness === filter),
|
|
73
|
+
}))
|
|
74
|
+
.filter((folder) => folder.sessions.length > 0);
|
|
75
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { describe, expect, test } from 'bun:test';
|
|
7
|
-
import { buildSessionTree, descendantsOf } from '@/
|
|
7
|
+
import { buildSessionTree, descendantsOf } from '@/shared/lib/workspace/session-tree';
|
|
8
8
|
import type { SessionItemData } from '@/shared/types';
|
|
9
9
|
|
|
10
10
|
function session(id: string, parentSessionId?: string): SessionItemData {
|
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
* when it sits past the window. A regression here is silent on screen (the row
|
|
14
14
|
* simply is not there) and the label's count would be wrong by the same rows.
|
|
15
15
|
*
|
|
16
|
+
* The windowed unit is a ROOT session, not a transcript: a child session is a
|
|
17
|
+
* row inside its parent's branch, so counting it against the page shrank the
|
|
18
|
+
* list the user sees (five rows of budget drew three top-level rows). The
|
|
19
|
+
* branch cases below are that bug, measured.
|
|
20
|
+
*
|
|
16
21
|
* The `hiddenCount` cases are as load-bearing as the exemption ones: it feeds
|
|
17
22
|
* "Show more sessions (n)", which must count only what the next click reveals.
|
|
18
23
|
* The exempt rows are already rendered, so counting them overstates the
|
|
@@ -115,3 +120,69 @@ describe('selectVisibleSessions', () => {
|
|
|
115
120
|
expect(second.hiddenCount).toBe(0);
|
|
116
121
|
});
|
|
117
122
|
});
|
|
123
|
+
|
|
124
|
+
/** `parent` with two children, in the sidebar's activity order. */
|
|
125
|
+
function rootWithChildren(
|
|
126
|
+
parent: number,
|
|
127
|
+
childIds: number[],
|
|
128
|
+
): SessionItemData[] {
|
|
129
|
+
const root = makeSession(parent);
|
|
130
|
+
const children = childIds.map((id) => makeSession(id, { parentSessionId: String(parent) }));
|
|
131
|
+
return [root, ...children];
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
describe('selectVisibleSessions over branches', () => {
|
|
135
|
+
test('a child session does not consume a root slot', () => {
|
|
136
|
+
// Two roots, the first carrying two children: five transcripts, three rows.
|
|
137
|
+
const sessions = [
|
|
138
|
+
...rootWithChildren(1, [2, 3]),
|
|
139
|
+
...rootWithChildren(4, [5, 6]),
|
|
140
|
+
];
|
|
141
|
+
const result = selectVisibleSessions(sessions, 2, { activeSessionId: null });
|
|
142
|
+
|
|
143
|
+
// Both roots stay, and each keeps its whole branch — the old flat window
|
|
144
|
+
// spent three of its five slots on one root plus two children.
|
|
145
|
+
expect(result.rendered.map((s) => s.id)).toEqual([1, 2, 3, 4, 5, 6]);
|
|
146
|
+
expect(result.hiddenCount).toBe(0);
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
test('a hidden root takes its branch with it, and counts as one row', () => {
|
|
150
|
+
const sessions = [
|
|
151
|
+
...rootWithChildren(1, [2, 3]),
|
|
152
|
+
...rootWithChildren(4, [5, 6]),
|
|
153
|
+
...rootWithChildren(7, [8, 9]),
|
|
154
|
+
];
|
|
155
|
+
const result = selectVisibleSessions(sessions, 2, { activeSessionId: null });
|
|
156
|
+
|
|
157
|
+
expect(result.rendered.map((s) => s.id)).toEqual([1, 2, 3, 4, 5, 6]);
|
|
158
|
+
// Next click reveals ONE row, the third root; its branch follows it.
|
|
159
|
+
expect(result.hiddenCount).toBe(1);
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
test('a live child keeps its ancestor chain and branch rendered', () => {
|
|
163
|
+
const sessions = [
|
|
164
|
+
...rootWithChildren(1, [2, 3]),
|
|
165
|
+
...rootWithChildren(4, [5, 6]),
|
|
166
|
+
];
|
|
167
|
+
const status = { '5': 'stream' } as Record<string, string>;
|
|
168
|
+
const result = selectVisibleSessions(sessions, 1, { activeSessionId: null, sessionStatus: status });
|
|
169
|
+
|
|
170
|
+
// Root 1 is inside the window; root 4 is past it but its child is live, so
|
|
171
|
+
// the parent row that hosts the spinner is rendered too.
|
|
172
|
+
expect(result.rendered.map((s) => s.id)).toEqual([1, 2, 3, 4, 5, 6]);
|
|
173
|
+
expect(result.hiddenCount).toBe(0);
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
test('an opened grandchild keeps every ancestor row rendered', () => {
|
|
177
|
+
const sessions = [
|
|
178
|
+
makeSession(1),
|
|
179
|
+
makeSession(2, { parentSessionId: '1' }),
|
|
180
|
+
makeSession(3, { parentSessionId: '2' }),
|
|
181
|
+
makeSession(4),
|
|
182
|
+
];
|
|
183
|
+
const result = selectVisibleSessions(sessions, 1, { activeSessionId: 3 });
|
|
184
|
+
|
|
185
|
+
expect(result.rendered.map((s) => s.id)).toEqual([1, 2, 3]);
|
|
186
|
+
expect(result.hiddenCount).toBe(1);
|
|
187
|
+
});
|
|
188
|
+
});
|
|
@@ -7,13 +7,20 @@
|
|
|
7
7
|
* Sidebar session pagination, shared by the desktop workspace category and the
|
|
8
8
|
* mobile drawer item.
|
|
9
9
|
*
|
|
10
|
-
* The list is truncated for height (`useShowMore`),
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* the window
|
|
15
|
-
*
|
|
16
|
-
*
|
|
10
|
+
* The list is truncated for height (`useShowMore`), and the unit of that window
|
|
11
|
+
* is a ROOT session — one row the sidebar actually draws — not a transcript.
|
|
12
|
+
* Child sessions are rows INSIDE their parent's branch, so letting them take
|
|
13
|
+
* page slots shrank the list the user sees: a folder with three roots whose two
|
|
14
|
+
* children sat inside the window drew two or three top-level rows while the
|
|
15
|
+
* label claimed five. The branch of every kept root travels with it, so a child
|
|
16
|
+
* session is never cut off by a boundary that was counted on its parent.
|
|
17
|
+
*
|
|
18
|
+
* A session that is OPENED or LIVE must never be one of the hidden rows: the
|
|
19
|
+
* row the operator is reading, the run whose spinner is turning, and the run
|
|
20
|
+
* blocked on a question are the states the sidebar exists to report. Such a
|
|
21
|
+
* session keeps its whole branch rendered — including the ancestors a collapsed
|
|
22
|
+
* branch would otherwise hide it behind — so the list is `visibleCount` roots
|
|
23
|
+
* or more exactly when one of them sits past the boundary, never shorter.
|
|
17
24
|
*
|
|
18
25
|
* The "opened or live" rule lives here rather than at either call site, because
|
|
19
26
|
* the two sidebars are the same list on two layouts: one predicate means the
|
|
@@ -21,12 +28,13 @@
|
|
|
21
28
|
* exempt from the window.
|
|
22
29
|
*/
|
|
23
30
|
|
|
31
|
+
import { buildSessionTree, descendantsOf } from '@/shared/lib/workspace/session-tree';
|
|
24
32
|
import type { SessionItemData } from '@/shared/types';
|
|
25
33
|
|
|
26
34
|
export interface SessionWindow {
|
|
27
35
|
/** The rows to render, in the source order. */
|
|
28
36
|
rendered: SessionItemData[];
|
|
29
|
-
/** How many rows the next "Show more" click reveals. */
|
|
37
|
+
/** How many ROOT rows the next "Show more" click reveals. */
|
|
30
38
|
hiddenCount: number;
|
|
31
39
|
}
|
|
32
40
|
|
|
@@ -42,14 +50,14 @@ export interface SessionWindowContext {
|
|
|
42
50
|
}
|
|
43
51
|
|
|
44
52
|
/**
|
|
45
|
-
* The first `count` sessions,
|
|
46
|
-
*
|
|
47
|
-
* lifted to the top, because the list is
|
|
48
|
-
* would misreport that.
|
|
53
|
+
* The first `count` root sessions, each with its full branch, plus every root
|
|
54
|
+
* whose branch holds a session that is OPENED or LIVE. Source order is
|
|
55
|
+
* preserved — an exempt row is never lifted to the top, because the list is
|
|
56
|
+
* ordered by activity and moving one would misreport that.
|
|
49
57
|
*
|
|
50
|
-
* `hiddenCount` counts only the
|
|
51
|
-
* what the "Show more sessions (n)" label must print: the
|
|
52
|
-
*
|
|
58
|
+
* `hiddenCount` counts only the roots the next click actually reveals, which is
|
|
59
|
+
* what the "Show more sessions (n)" label must print: the branch of a hidden
|
|
60
|
+
* root has no row on screen yet, and an exempt branch is already rendered.
|
|
53
61
|
*/
|
|
54
62
|
export function selectVisibleSessions(
|
|
55
63
|
sessions: SessionItemData[],
|
|
@@ -57,20 +65,37 @@ export function selectVisibleSessions(
|
|
|
57
65
|
{ activeSessionId, sessionStatus = {} }: SessionWindowContext,
|
|
58
66
|
): SessionWindow {
|
|
59
67
|
if (sessions.length <= count) return { rendered: sessions, hiddenCount: 0 };
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
for (
|
|
63
|
-
const session = sessions[index];
|
|
68
|
+
|
|
69
|
+
const exemptIds = new Set<string>();
|
|
70
|
+
for (const session of sessions) {
|
|
64
71
|
const key = String(session.id);
|
|
65
72
|
// The same test the row itself uses to draw the highlight: the URL's
|
|
66
73
|
// session when one is selected, else the row's own `is_active` flag (which
|
|
67
74
|
// only MOCK's seeded rows ever carry — real mode writes 0 unconditionally).
|
|
68
75
|
const isOpened =
|
|
69
76
|
activeSessionId !== null ? String(activeSessionId) === key : session.is_active === 1;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
77
|
+
if (isOpened || sessionStatus[key] === 'stream' || Boolean(session.awaitingInput)) {
|
|
78
|
+
exemptIds.add(key);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const tree = buildSessionTree(sessions);
|
|
83
|
+
const keptIds = new Set<string>();
|
|
84
|
+
let hiddenCount = 0;
|
|
85
|
+
|
|
86
|
+
for (let index = 0; index < tree.roots.length; index += 1) {
|
|
87
|
+
const root = tree.roots[index];
|
|
88
|
+
const rootId = String(root.id);
|
|
89
|
+
const branch = descendantsOf(rootId, tree.childrenOf);
|
|
90
|
+
const exempt = exemptIds.has(rootId) || branch.some((row) => exemptIds.has(String(row.session.id)));
|
|
91
|
+
if (index < count || exempt) {
|
|
92
|
+
keptIds.add(rootId);
|
|
93
|
+
for (const row of branch) keptIds.add(String(row.session.id));
|
|
94
|
+
} else {
|
|
95
|
+
hiddenCount += 1;
|
|
96
|
+
}
|
|
74
97
|
}
|
|
98
|
+
|
|
99
|
+
const rendered = sessions.filter((session) => keptIds.has(String(session.id)));
|
|
75
100
|
return { rendered, hiddenCount };
|
|
76
101
|
}
|
|
@@ -4,26 +4,34 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Which form the filter row
|
|
8
|
-
* moves to the right edge.
|
|
7
|
+
* Which form each control in the filter row takes, by width.
|
|
9
8
|
*
|
|
10
9
|
* The thresholds are the point of this file, so they are pinned by width rather
|
|
11
10
|
* than described: the sidebar's floor is 264px (240px of row content) and its
|
|
12
|
-
* default is 280px (256px)
|
|
13
|
-
*
|
|
11
|
+
* default is 280px (256px). At the default the harness control fits as a glyph
|
|
12
|
+
* beside `Archived`, `Select` as its trailing glyph; at the floor neither narrow
|
|
13
|
+
* form fits and only the harness control wraps. A Select form decided without
|
|
14
|
+
* the harness control would have overflowed the moment the filter was added.
|
|
14
15
|
*/
|
|
15
16
|
|
|
16
17
|
import { describe, expect, test } from 'bun:test';
|
|
17
18
|
import {
|
|
18
19
|
FILTER_CHIP_PX,
|
|
20
|
+
FILTER_HARNESS_PX,
|
|
19
21
|
FILTER_ROW_GAP_PX,
|
|
22
|
+
FILTER_SELECT_BUTTON_PX,
|
|
23
|
+
FILTER_SELECT_MINI_PX,
|
|
20
24
|
filterChipGroupWidth,
|
|
21
|
-
|
|
25
|
+
filterRowForms,
|
|
22
26
|
} from '@/shared/lib/workspace/sidebar-filter-row';
|
|
23
27
|
|
|
24
28
|
/** The row's content width at a given sidebar width (its `px-3` removed). */
|
|
25
29
|
const contentAt = (sidebarWidth: number) => sidebarWidth - 24;
|
|
26
30
|
|
|
31
|
+
/** The row's width with the harness form and the Select form it budgets for. */
|
|
32
|
+
const rowWith = (runningCount: number, harness: number, select: number) =>
|
|
33
|
+
filterChipGroupWidth(runningCount, false) + 2 * FILTER_ROW_GAP_PX + harness + select;
|
|
34
|
+
|
|
27
35
|
describe('filterChipGroupWidth', () => {
|
|
28
36
|
test('three chips plus two gaps', () => {
|
|
29
37
|
expect(filterChipGroupWidth(0, false)).toBe(
|
|
@@ -42,32 +50,65 @@ describe('filterChipGroupWidth', () => {
|
|
|
42
50
|
});
|
|
43
51
|
});
|
|
44
52
|
|
|
45
|
-
describe('
|
|
46
|
-
test('the
|
|
47
|
-
expect(
|
|
48
|
-
|
|
53
|
+
describe('filterRowForms', () => {
|
|
54
|
+
test('the 280px default fits the harness glyph and the trailing Select glyph', () => {
|
|
55
|
+
expect(filterRowForms(contentAt(280), 0)).toEqual({
|
|
56
|
+
select: 'button',
|
|
57
|
+
harness: 'icon',
|
|
58
|
+
wrap: false,
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
test('a running count still fits at the default, in the mini form', () => {
|
|
63
|
+
expect(filterRowForms(contentAt(280), 2)).toEqual({
|
|
64
|
+
select: 'mini',
|
|
65
|
+
harness: 'icon',
|
|
66
|
+
wrap: false,
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
test('the 264px floor fits without a count and wraps with one', () => {
|
|
71
|
+
expect(filterRowForms(contentAt(264), 0).wrap).toBe(false);
|
|
72
|
+
expect(filterRowForms(contentAt(264), 2).wrap).toBe(true);
|
|
49
73
|
});
|
|
50
74
|
|
|
51
|
-
test('
|
|
52
|
-
|
|
75
|
+
test('a wide sidebar takes the harness chip before it takes the Select chip', () => {
|
|
76
|
+
const chipHarnessWithButton = rowWith(0, FILTER_HARNESS_PX.chip, FILTER_SELECT_BUTTON_PX);
|
|
77
|
+
expect(filterRowForms(chipHarnessWithButton, 0)).toEqual({
|
|
78
|
+
select: 'button',
|
|
79
|
+
harness: 'chip',
|
|
80
|
+
wrap: false,
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
const chipHarnessWithChip = rowWith(0, FILTER_HARNESS_PX.chip, FILTER_CHIP_PX.select);
|
|
84
|
+
expect(filterRowForms(chipHarnessWithChip, 0)).toEqual({
|
|
85
|
+
select: 'chip',
|
|
86
|
+
harness: 'chip',
|
|
87
|
+
wrap: false,
|
|
88
|
+
});
|
|
53
89
|
});
|
|
54
90
|
|
|
55
|
-
test('a
|
|
56
|
-
const
|
|
57
|
-
expect(
|
|
58
|
-
|
|
91
|
+
test('one pixel under a threshold drops to the next form, never a wrap', () => {
|
|
92
|
+
const chipHarness = rowWith(0, FILTER_HARNESS_PX.chip, FILTER_SELECT_BUTTON_PX);
|
|
93
|
+
expect(filterRowForms(chipHarness - 1, 0).harness).toBe('icon');
|
|
94
|
+
|
|
95
|
+
const button = rowWith(0, FILTER_HARNESS_PX.icon, FILTER_SELECT_BUTTON_PX);
|
|
96
|
+
expect(filterRowForms(button - 1, 0).select).toBe('mini');
|
|
97
|
+
|
|
98
|
+
const mini = rowWith(0, FILTER_HARNESS_PX.icon, FILTER_SELECT_MINI_PX);
|
|
99
|
+
expect(filterRowForms(mini - 1, 0).wrap).toBe(true);
|
|
59
100
|
});
|
|
60
101
|
|
|
61
|
-
test('a running count moves the
|
|
62
|
-
const withoutCount =
|
|
63
|
-
const withCount =
|
|
102
|
+
test('a running count moves the thresholds with it', () => {
|
|
103
|
+
const withoutCount = rowWith(0, FILTER_HARNESS_PX.chip, FILTER_SELECT_BUTTON_PX);
|
|
104
|
+
const withCount = rowWith(2, FILTER_HARNESS_PX.chip, FILTER_SELECT_BUTTON_PX);
|
|
64
105
|
expect(withCount).toBeGreaterThan(withoutCount);
|
|
65
|
-
expect(
|
|
66
|
-
expect(
|
|
106
|
+
expect(filterRowForms(withoutCount, 2).harness).toBe('icon');
|
|
107
|
+
expect(filterRowForms(withCount, 2).harness).toBe('chip');
|
|
67
108
|
});
|
|
68
109
|
|
|
69
|
-
test('an unmeasured row keeps the narrow
|
|
70
|
-
expect(
|
|
71
|
-
expect(
|
|
110
|
+
test('an unmeasured row keeps the narrow forms rather than guessing', () => {
|
|
111
|
+
expect(filterRowForms(0, 0)).toEqual({ select: 'mini', harness: 'icon', wrap: false });
|
|
112
|
+
expect(filterRowForms(Number.NaN, 0)).toEqual({ select: 'mini', harness: 'icon', wrap: false });
|
|
72
113
|
});
|
|
73
114
|
});
|