@kabmo-labs/kabmo 0.38.2 → 0.39.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 +565 -537
- package/dist/client/static/js/{CsvGrid-4dpsfdrf.js → CsvGrid-kfcp4sd6.js} +2 -2
- package/dist/client/static/js/{DocxView-crdgc0jd.js → DocxView-atff5w38.js} +4 -4
- package/dist/client/static/js/DrawioView-yfnq4c99.js +5 -0
- package/dist/client/static/js/ImageView-nreh25s0.js +1 -0
- package/dist/client/static/js/LayoutWrapper-0x1q1q5z.js +2 -0
- package/dist/client/static/js/Modal-2xqd3sss.js +38 -0
- package/dist/client/static/js/{PdfView-72c123a9.js → PdfView-mk8paxt1.js} +1 -1
- package/dist/client/static/js/SessionsView-ner25qxn.js +1 -0
- package/dist/client/static/js/{SheetView-8xh69wgk.js → SheetView-s6n3fawm.js} +31 -31
- package/dist/client/static/js/{SvgPreview-z3fm87h6.js → SvgPreview-8bxvz3ez.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-25r2p3vh.js → abnfDiagram-O67JEVCF-tvvz9fha.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-y0zb4vqa.js +1 -0
- package/dist/client/static/js/architectureDiagram-NJMV4G6O-bybv3wg4.js +36 -0
- package/dist/client/static/js/{astro-p3f5p9p2.js → astro-4ybhkc9b.js} +1 -1
- package/dist/client/static/js/bash-k6p3y3pr.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-vzamgz9s.js → blockDiagram-BEXU5L5S-h3fs79x6.js} +8 -8
- package/dist/client/static/js/c-ve09y19q.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-jejafgn0.js → c4Diagram-YGBWAQC7-h8p3h54v.js} +5 -5
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-qfa6mj0q.js → classDiagram-v2-NBCMYWYE-q645r4q6.js} +6 -6
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-9vzdgmk1.js → cose-bilkent-JH36ORCC-p4mm1zcv.js} +1 -1
- package/dist/client/static/js/cpp-vhqp7bcy.js +1 -0
- package/dist/client/static/js/css-77mvf0ca.js +1 -0
- package/dist/client/static/js/css-tys2rrny.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-nt1ed192.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-a3k3w1t5.js → cynefinDiagram-VND7K2PF-v2hbc3aq.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-gf04dvxj.js → dagre-6A5THRUB-4edpda33.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-a9e0a684.js → diagram-22UHCM2B-b6gp813w.js} +19 -19
- package/dist/client/static/js/{diagram-3UASUU5V-fb73gfjd.js → diagram-3UASUU5V-s1f3b0ng.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-yb9n3t30.js → diagram-ATOU4E4O-ga06kjp5.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-adhbhw28.js → diagram-CDSNMT55-wdbmv4td.js} +5 -5
- package/dist/client/static/js/{diagram-MLGK6HIB-v4yxyb8r.js → diagram-MLGK6HIB-fkntefcq.js} +2 -2
- package/dist/client/static/js/{diagram-MPIPVDR6-94ttsqy2.js → diagram-MPIPVDR6-k2zh7edp.js} +3 -3
- package/dist/client/static/js/{dockerfile-mrranatf.js → dockerfile-srcym0bs.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-jj4f3pyq.js → ebnfDiagram-ZINNZB2B-4vc4vz9c.js} +1 -1
- package/dist/client/static/js/{elixir-jwphgp8j.js → elixir-v9bbxsgg.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-mtnkhyte.js → elk-276RUBZZ-g2ppf1by.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-18qdkhm5.js → erDiagram-OPXOYQCR-rmnwkb5q.js} +9 -9
- package/dist/client/static/js/{erlang-6m6tpt72.js → erlang-55r0skxa.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-v4edaxx7.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-jvrvhb9d.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-vz28h061.js → ganttDiagram-FUAMR5RP-ptfvae64.js} +5 -5
- package/dist/client/static/js/gitGraph-4MIJSDKK-adzhec96.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-cgq3r4rz.js → gitGraphDiagram-X574FWY7-ne9n3cyf.js} +14 -14
- package/dist/client/static/js/graphql-g97hycb3.js +1 -0
- package/dist/client/static/js/html-2syect3n.js +1 -0
- package/dist/client/static/js/{index-3az1w5f8.js → index-0j518hqm.js} +2 -2
- package/dist/client/static/js/index-1jeyjqkh.js +2 -0
- package/dist/client/static/js/{index-t5t71dhp.js → index-1sgad84m.js} +2 -2
- package/dist/client/static/js/{index-z72wf7q4.js → index-270y5r9k.js} +2 -2
- package/dist/client/static/js/{index-sa9cp6km.js → index-2rs03vfy.js} +2 -2
- package/dist/client/static/js/index-3fw3sd10.js +474 -0
- package/dist/client/static/js/{index-xya34x4v.js → index-442mbhwb.js} +2 -2
- package/dist/client/static/js/{index-95t1hwr8.js → index-4pehdq5h.js} +2 -2
- package/dist/client/static/js/{index-dt7e1328.js → index-4wtr5wjp.js} +2 -2
- package/dist/client/static/js/{index-gr6jng0x.js → index-4wvtar0v.js} +2 -2
- package/dist/client/static/js/{index-zdbvm01f.js → index-56w8m083.js} +2 -2
- package/dist/client/static/js/index-5a4w58r2.js +1 -0
- package/dist/client/static/js/{index-4hsxaa87.js → index-5kvvb0zm.js} +2 -2
- package/dist/client/static/js/{index-5v9v41ap.js → index-61qjr1k0.js} +98 -98
- package/dist/client/static/js/{index-6k3e5dph.js → index-72289dgx.js} +2 -2
- package/dist/client/static/js/{index-gbdvr4rt.js → index-7h5n5rz4.js} +2 -2
- package/dist/client/static/js/{index-y5y7smet.js → index-7z63xr1s.js} +1 -1
- package/dist/client/static/js/index-878d61js.js +1 -0
- package/dist/client/static/js/{index-fghst0kd.js → index-8egjccbq.js} +34 -34
- package/dist/client/static/js/index-8qgwj6m8.js +1 -0
- package/dist/client/static/js/{index-kf9t3mzv.js → index-8w2tx2k9.js} +2 -2
- package/dist/client/static/js/{index-x07kp3jz.js → index-9d6x1f3t.js} +2 -2
- package/dist/client/static/js/{index-vb6t44dw.js → index-9gepbvdt.js} +2 -2
- package/dist/client/static/js/index-a7qccdq2.js +1 -0
- package/dist/client/static/js/{index-7fdp9c7m.js → index-b08hx4tw.js} +2 -2
- package/dist/client/static/js/{index-nd4p98mc.js → index-c1be3rva.js} +2 -2
- package/dist/client/static/js/{index-3zc1b0dv.js → index-c36pag9y.js} +2 -2
- package/dist/client/static/js/{index-qkscve6n.js → index-cfnxda13.js} +2 -2
- package/dist/client/static/js/index-cst843zs.css +1 -0
- package/dist/client/static/js/{index-6j9h1fa7.js → index-dmd26a1y.js} +1 -1
- package/dist/client/static/js/{index-1y9r4frb.js → index-drjtwfp5.js} +2 -2
- package/dist/client/static/js/index-dt22v9ns.js +2 -0
- package/dist/client/static/js/{index-h7pn9qw6.js → index-enmh3w27.js} +2 -2
- package/dist/client/static/js/{index-ray2czf6.js → index-fjnkzk12.js} +4 -4
- package/dist/client/static/js/index-gvkc9e32.js +1 -0
- package/dist/client/static/js/{index-d146s9g3.js → index-hh05xd1d.js} +2 -2
- package/dist/client/static/js/{index-qxb8k6py.js → index-jkph8wqq.js} +3 -3
- package/dist/client/static/js/index-k3c3n69j.js +12 -0
- package/dist/client/static/js/{index-dr7nhha9.js → index-k5a6r25s.js} +2 -2
- package/dist/client/static/js/{index-we2ezmn7.js → index-k61tdd4a.js} +2 -2
- package/dist/client/static/js/{index-8acv5b77.js → index-k7sdsmgv.js} +2 -2
- package/dist/client/static/js/{index-s16h2nmv.js → index-m3r0j562.js} +6 -6
- package/dist/client/static/js/{index-njqpkcvw.js → index-mdxnhndy.js} +2 -2
- package/dist/client/static/js/index-me7m3516.js +9 -0
- package/dist/client/static/js/index-mmsszqvn.js +1 -0
- package/dist/client/static/js/index-ntx3bbmb.js +1 -0
- package/dist/client/static/js/index-p89z1qmj.js +1 -0
- package/dist/client/static/js/{index-fqhpxzyb.js → index-pr7gk5eq.js} +13 -13
- package/dist/client/static/js/index-pzqsp5jw.js +4 -0
- package/dist/client/static/js/{index-qn4pkjfh.js → index-q0bph5x0.js} +2 -2
- package/dist/client/static/js/{index-gbfg0anm.js → index-qsrw5c67.js} +2 -2
- package/dist/client/static/js/{index-ashpbfqv.js → index-rj81xrvw.js} +2 -2
- package/dist/client/static/js/{index-b9b2nwdd.js → index-t6gznaxm.js} +2 -2
- package/dist/client/static/js/{index-12p63902.js → index-v8vjh5jj.js} +2 -2
- package/dist/client/static/js/{index-naz3px72.js → index-xdqsqhnn.js} +9 -9
- package/dist/client/static/js/{index-9wd9y6m0.js → index-xrp2zv8z.js} +2 -2
- package/dist/client/static/js/{index-ajtd1q1h.js → index-y2prm0xm.js} +2 -2
- package/dist/client/static/js/{index-y3hdv561.js → index-y3qxrs90.js} +2 -2
- package/dist/client/static/js/index-ymp2wqtc.js +3 -0
- package/dist/client/static/js/index-ywpdhntc.js +1 -0
- package/dist/client/static/js/info-A6RAGUB7-2ye26vqn.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-jjwckbr9.js → infoDiagram-VRGFBTTK-ctfwcm3n.js} +2 -2
- package/dist/client/static/js/ini-7ffv28px.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-qzk5gejf.js → ishikawaDiagram-OU5B5YK6-b0b0pn4y.js} +3 -3
- package/dist/client/static/js/java-4x5yky4a.js +1 -0
- package/dist/client/static/js/javascript-4kw2j9t3.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-maccpg3q.js → journeyDiagram-ZHPQQLJL-kdq12drs.js} +5 -5
- package/dist/client/static/js/json-h3kwpty2.js +1 -0
- package/dist/client/static/js/jsx-jk20f0dr.js +1 -0
- package/dist/client/static/js/{julia-237yk557.js → julia-jhe2vd4f.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-xv2azgws.js → kanban-definition-PNTS6WVX-65x6xn2q.js} +6 -6
- package/dist/client/static/js/lua-k02dpxq8.js +1 -0
- package/dist/client/static/js/markdown-fhhg7ms6.js +1 -0
- package/dist/client/static/js/{mermaid.core-e4ys760s.js → mermaid.core-0fq63jpa.js} +8 -8
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-b779wz81.js → mindmap-definition-NLK3R4M7-p86myex3.js} +6 -6
- package/dist/client/static/js/one-dark-pro-c4q810z4.js +1 -0
- package/dist/client/static/js/one-light-czk9dzya.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-b0j3te0q.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-8sgdmhnw.js → pegDiagram-GJSIUBJH-p2hkk9xb.js} +1 -1
- package/dist/client/static/js/{perl-dvz4y1tb.js → perl-qhj6tk7k.js} +1 -1
- package/dist/client/static/js/{php-n6y7dzhm.js → php-arycc4w7.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-28qq62fn.js +1 -0
- package/dist/client/static/js/pieDiagram-5QR66LMP-bza19wkx.js +39 -0
- package/dist/client/static/js/properties-qhvcxc13.js +1 -0
- package/dist/client/static/js/python-3qsrs510.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-47dpygk5.js → quadrantDiagram-O4NWA36T-bxqec9w1.js} +6 -6
- package/dist/client/static/js/r-z2ng7mza.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-fyrcbpyd.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-9s62qncd.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-f7yjmhrk.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-sfrw8gkz.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-4mm4cern.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-wv0bvwve.js → railroadDiagram-XR7U4H2S-1g3hx3sm.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-w3r8r837.js → requirementDiagram-PLB6GJNP-qbjjm48v.js} +13 -13
- package/dist/client/static/js/{ruby-7zye3g0e.js → ruby-fb6zzevm.js} +1 -1
- package/dist/client/static/js/{rust-42c4h7e4.js → rust-jatm47v6.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-t55rjgad.js → sankeyDiagram-IPEJSGJF-t2ythbh7.js} +6 -6
- package/dist/client/static/js/{sass-m0h9yzfb.js → sass-fzs6a0kr.js} +1 -1
- package/dist/client/static/js/{scss-2pwwfkvn.js → scss-gdb52d0c.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-yfwjwy37.js → sequenceDiagram-PO4LG4MO-mqsfek2j.js} +21 -21
- package/dist/client/static/js/{sizeCapture-INFHLROL-nq6hy7ce.js → sizeCapture-INFHLROL-xj67pgds.js} +1 -1
- package/dist/client/static/js/sql-ypk53ntb.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-4xy0atqh.js → stateDiagram-v2-GCMORJYK-gj4fezak.js} +3 -3
- package/dist/client/static/js/{svelte-x8f8c8hq.js → svelte-8s3k6qjd.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-np47cy1q.js → swimlanes-2SLR337P-pgtdd1pk.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-zk37paj9.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-rb0gnm35.js → timeline-definition-EJHVYXUP-q013vdd1.js} +7 -7
- package/dist/client/static/js/treeView-Q6P3EWNA-a5vgg4gz.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-ctqhajgg.js +1 -0
- package/dist/client/static/js/tsx-zy7hb2hw.js +1 -0
- package/dist/client/static/js/typescript-2hr53c8j.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-gatkznan.js → usecaseDiagram-POWQR4AR-7swsbqnq.js} +51 -51
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-r3f5xjjq.js → vennDiagram-UO4OBE2U-9dygxdxf.js} +5 -5
- package/dist/client/static/js/{vue-myjjd0gd.js → vue-k3f3chre.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-ns7e0fqf.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-tpass65t.js → wardleyDiagram-VNRHLVJA-aaaa9kj3.js} +4 -4
- package/dist/client/static/js/xml-p4742r9b.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-8xkh67cw.js → xychartDiagram-PMCCYNJV-tamf39gx.js} +6 -6
- package/dist/client/static/js/yaml-qbckg671.js +1 -0
- package/marketplace/plugins/command-runner/README.md +5 -0
- package/marketplace/plugins/command-runner/package.json +2 -2
- package/marketplace/plugins/command-runner/src/panel/Output.test.tsx +177 -0
- package/marketplace/plugins/command-runner/src/panel/Output.tsx +53 -2
- package/package.json +3 -1
- package/public/tray-monochrome-dark.png +0 -0
- package/public/tray-monochrome-light.png +0 -0
- package/src/client/App.tsx +4 -0
- package/src/client/components/common/NotificationPermissionDialog.test.tsx +166 -0
- package/src/client/components/common/NotificationPermissionDialog.tsx +167 -0
- package/src/client/components/common/batch-selection/BatchDeleteModal.test.tsx +97 -0
- package/src/client/components/common/batch-selection/BatchDeleteModal.tsx +24 -1
- package/src/client/components/common/context-usage-button/SessionStats.tsx +4 -8
- package/src/client/components/common/context-usage-button/TokenTotals.tsx +51 -0
- package/src/client/components/common/context-usage-button/index.test.tsx +26 -3
- package/src/client/components/common/context-usage-button/index.tsx +2 -0
- package/src/client/components/common/diagram-viewer/index.tsx +11 -235
- package/src/client/components/common/fullscreen-viewer/fullscreen-viewer.test.tsx +108 -0
- package/src/client/components/common/fullscreen-viewer/index.tsx +326 -0
- package/src/client/components/common/header-button/index.test.tsx +97 -0
- package/src/client/components/common/header-button/index.tsx +67 -0
- package/src/client/components/common/header-controls/index.test.tsx +17 -1
- package/src/client/components/common/header-controls/index.tsx +18 -8
- package/src/client/components/common/image-viewer/fullscreen.tsx +64 -0
- package/src/client/components/common/progress-bar/index.tsx +53 -0
- package/src/client/components/common/session-actions-menu/MenuItem.tsx +36 -0
- package/src/client/components/common/session-actions-menu/index.test.tsx +79 -0
- package/src/client/components/common/session-actions-menu/index.tsx +62 -69
- package/src/client/components/common/session-delete-modal/index.tsx +5 -0
- package/src/client/components/common/session-row/TimeCell.tsx +22 -6
- package/src/client/components/common/session-row/TrailingSlot.tsx +3 -3
- package/src/client/components/common/session-row/index.tsx +6 -3
- package/src/client/components/common/session-row/row-state.ts +18 -0
- package/src/client/components/common/session-row/session-row.test.tsx +24 -0
- package/src/client/components/common/session-row/time-cell.test.tsx +110 -0
- package/src/client/components/layout/ActivityBar.test.ts +10 -116
- package/src/client/components/layout/ActivityBar.tsx +138 -134
- package/src/client/components/layout/ActivityBarDrag.test.ts +334 -0
- package/src/client/components/layout/LeftActivityBar.test.ts +30 -5
- package/src/client/components/layout/LeftDock.tsx +19 -1
- package/src/client/components/layout/PanelButton.tsx +93 -0
- package/src/client/components/layout/{PanelVisibilityMenu.tsx → VisibilityMenu.tsx} +37 -18
- package/src/client/components/layout/desktop-layout/LeftColumn.tsx +30 -1
- package/src/client/components/layout/desktop-layout/PanelSuspense.tsx +30 -0
- package/src/client/components/layout/desktop-layout/ResizeHandle.tsx +24 -3
- package/src/client/components/layout/desktop-layout/TopNavbar.tsx +62 -6
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +28 -19
- package/src/client/components/layout/desktop-layout/index.tsx +7 -5
- package/src/client/components/layout/desktop-layout/resizer/index.tsx +17 -4
- package/src/client/components/layout/session-sidebar/CategoryItem.tsx +4 -2
- package/src/client/components/layout/session-sidebar/Footer.test.tsx +76 -0
- package/src/client/components/layout/session-sidebar/Footer.tsx +13 -9
- package/src/client/components/layout/session-sidebar/SessionItem.batch.test.ts +3 -0
- package/src/client/components/layout/session-sidebar/SessionItem.test.ts +21 -0
- package/src/client/components/layout/session-sidebar/SessionItem.tsx +7 -4
- package/src/client/components/layout/session-sidebar/SessionList.tsx +1 -1
- package/src/client/components/layout/session-sidebar/SessionsView.tsx +1 -0
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +3 -1
- package/src/client/components/layout/session-sidebar/modern/index.tsx +1 -1
- package/src/client/components/layout/session-sidebar/search-results.test.tsx +127 -0
- package/src/client/components/mobile/mobile-session-sidebar/Dialogs.tsx +1 -0
- package/src/client/components/mobile/mobile-session-sidebar/SessionRow.test.ts +31 -0
- package/src/client/components/mobile/mobile-session-sidebar/SessionRow.tsx +8 -4
- package/src/client/components/mobile/mobile-session-sidebar/use-dock.test.ts +41 -0
- package/src/client/components/mobile/mobile-session-sidebar/use-dock.ts +4 -1
- package/src/client/components/mobile/mobile-session-sidebar/use-drawer.ts +2 -0
- package/src/client/components/mobile/panel-chips.test.tsx +18 -11
- package/src/client/components/settings/categories/AppearanceSettings.tsx +3 -0
- package/src/client/components/settings/categories/HarnessSettings.tsx +3 -1
- package/src/client/components/settings/categories/NotificationSettings.test.tsx +56 -2
- package/src/client/components/settings/categories/NotificationSettings.tsx +46 -6
- package/src/client/components/settings/categories/appearance-settings/TrayIconSection.test.tsx +81 -0
- package/src/client/components/settings/categories/appearance-settings/TrayIconSection.tsx +118 -0
- package/src/client/components/settings/categories/harness-settings/HarnessCard.import.test.tsx +124 -0
- package/src/client/components/settings/categories/harness-settings/HarnessCard.tsx +21 -2
- package/src/client/components/settings/categories/harness-settings/HarnessImportControls.tsx +143 -0
- package/src/client/components/settings/categories/notification-settings/PermissionNotice.tsx +50 -0
- package/src/client/components/settings/categories/panel-plugins/GitFreshness.test.tsx +1 -1
- package/src/client/components/settings/categories/panel-plugins/LeftDockSettings.test.tsx +107 -0
- package/src/client/components/settings/categories/panel-plugins/LeftDockSettings.tsx +49 -24
- package/src/client/components/settings/categories/panel-plugins/Placement.test.tsx +3 -0
- package/src/client/components/settings/categories/panel-plugins/PluginCard.test.tsx +4 -0
- package/src/client/components/settings/categories/panel-plugins/Section.tsx +1 -1
- package/src/client/components/settings/categories/panel-plugins/Toolbar.tsx +6 -10
- package/src/client/components/settings/categories/plugin-settings/DetailPane.tsx +45 -38
- package/src/client/components/settings/categories/plugin-settings/MarketplacePane.tsx +20 -18
- package/src/client/components/settings/categories/plugin-settings/PaneHeader.tsx +40 -0
- package/src/client/components/settings/categories/plugin-settings/SidebarList.tsx +6 -9
- package/src/client/components/settings/categories/usage-settings/usage-icons.test.tsx +1 -25
- package/src/client/components/workspace/chat-timeline/GeneratingIndicator.test.ts +9 -1
- package/src/client/components/workspace/chat-timeline/MessageItem.gutter.test.ts +4 -0
- package/src/client/components/workspace/chat-timeline/chat-input/expansion.test.ts +22 -2
- package/src/client/components/workspace/chat-timeline/chat-input/expansion.ts +15 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/wait-parts.tsx +6 -11
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolScreenshots.test.tsx +9 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolScreenshots.tsx +9 -18
- package/src/client/components/workspace/context-panel/index.tsx +18 -19
- package/src/client/components/workspace/editor/SplitColumn.tsx +5 -1
- package/src/client/components/workspace/file-explorer/Toolbar.tsx +40 -28
- package/src/client/components/workspace/git-panel/RepoHeader.tsx +27 -25
- package/src/client/components/workspace/git-panel/commit-modal/CommitActions.tsx +28 -77
- package/src/client/components/workspace/git-panel/commit-modal/CommitDiffViewer.tsx +15 -15
- package/src/client/components/workspace/git-panel/commit-modal/CommitRow.test.ts +79 -5
- package/src/client/components/workspace/git-panel/commit-modal/CommitRow.tsx +66 -45
- package/src/client/components/workspace/git-panel/commit-modal/GraphCanvas.tsx +1 -7
- package/src/client/components/workspace/git-panel/commit-modal/Header.test.tsx +90 -0
- package/src/client/components/workspace/git-panel/commit-modal/Header.tsx +28 -18
- package/src/client/components/workspace/git-panel/commit-modal/index.tsx +24 -7
- package/src/client/components/workspace/git-panel/commit-modal.test.ts +16 -0
- package/src/client/components/workspace/panel-header/index.test.tsx +80 -0
- package/src/client/components/workspace/panel-header/index.tsx +46 -0
- package/src/client/components/workspace/plan-panel/index.tsx +24 -22
- package/src/client/components/workspace/plugin-panel/catalog.tsx +21 -13
- package/src/client/components/workspace/search-panel/Body.tsx +42 -37
- package/src/client/components/workspace/terminal-panel/Header.tsx +37 -38
- package/src/client/components/workspace/terminal-panel/fonts.test.ts +40 -0
- package/src/client/components/workspace/terminal-panel/fonts.ts +27 -0
- package/src/client/components/workspace/terminal-panel/mount.ts +2 -5
- package/src/client/components/workspace/todo-panel/index.tsx +28 -26
- package/src/client/components/workspace/usage-panel/index.test.tsx +91 -0
- package/src/client/components/workspace/usage-panel/index.tsx +31 -55
- package/src/client/components/workspace/wiki-panel/index.tsx +47 -46
- package/src/client/data/context-data/index.ts +16 -0
- package/src/client/data/settings/omp-schema.json +201 -151
- package/src/client/hooks/chat/composer/auto-grow.ts +13 -3
- package/src/client/hooks/chat/omp/session-sidebar-controller.folder-open.test.ts +140 -0
- package/src/client/hooks/chat/omp/session-sidebar-controller.test.ts +33 -203
- package/src/client/hooks/chat/omp/session-sidebar-controller.ts +8 -6
- package/src/client/hooks/chat/timeline/jump-landing.ts +27 -9
- package/src/client/hooks/chat/timeline/jump-rail.ts +1 -0
- package/src/client/hooks/chat/timeline/reader-input.ts +39 -0
- package/src/client/hooks/chat/timeline/restore-history.ts +55 -0
- package/src/client/hooks/chat/timeline/row-window.test.ts +36 -3
- package/src/client/hooks/chat/timeline/row-window.ts +12 -3
- package/src/client/hooks/chat/timeline/scroll-geometry.ts +95 -0
- package/src/client/hooks/chat/timeline/scroll-probe.test-util.ts +17 -4
- package/src/client/hooks/chat/timeline/scroll.test.ts +53 -0
- package/src/client/hooks/chat/timeline/scroll.ts +30 -70
- package/src/client/hooks/chat/timeline/session-load.test.ts +25 -0
- package/src/client/hooks/chat/timeline/session-load.ts +8 -1
- package/src/client/hooks/chat/timeline/session-shapes.ts +3 -0
- package/src/client/hooks/models/use-harnesses-controller.ts +8 -1
- package/src/client/hooks/models/use-harnesses.ts +68 -1
- package/src/client/hooks/ui/navbar-controls.test.ts +50 -0
- package/src/client/hooks/ui/navbar-controls.ts +118 -0
- package/src/client/hooks/ui/pointer-hover.test.ts +94 -0
- package/src/client/hooks/ui/pointer-hover.ts +62 -0
- package/src/client/hooks/ui/ui-sounds.test.ts +4 -0
- package/src/client/hooks/workspace/batch-archive.ts +19 -3
- package/src/client/hooks/workspace/batch-delete-run.ts +15 -3
- package/src/client/hooks/workspace/batch-delete.test.ts +112 -0
- package/src/client/hooks/workspace/batch-delete.ts +51 -5
- package/src/client/hooks/workspace/left-dock.ts +14 -0
- package/src/client/hooks/workspace/panel-drop-target.test.tsx +119 -0
- package/src/client/hooks/workspace/panel-drop-target.ts +76 -0
- package/src/client/hooks/workspace/panel-menu-items.ts +57 -0
- package/src/client/hooks/workspace/panel-reorder.ts +5 -2
- package/src/client/lib/browser/download.ts +12 -1
- package/src/client/lib/notifications/active.ts +26 -0
- package/src/client/lib/notifications/native-banner-sound.test.ts +34 -1
- package/src/client/lib/notifications/native-banner-sound.ts +7 -0
- package/src/client/lib/notifications/os.test.ts +53 -0
- package/src/client/lib/notifications/os.ts +129 -5
- package/src/client/lib/session-export.test.ts +72 -0
- package/src/client/lib/session-export.ts +60 -0
- package/src/client/lib/ui/control-plate.test.ts +29 -0
- package/src/client/lib/ui/control-plate.ts +42 -0
- package/src/client/main.tsx +7 -0
- package/src/client/tailwind.css +18 -7
- package/src/server/lib/changes/attach.test.ts +3 -1
- package/src/server/lib/changes/capture-bash.server.ts +15 -1
- package/src/server/lib/changes/capture.server.ts +2 -0
- package/src/server/lib/changes/capture.test.ts +40 -0
- package/src/server/lib/changes/journal-read.server.ts +204 -0
- package/src/server/lib/changes/reader.server.ts +28 -184
- package/src/server/lib/changes/reader.test.ts +40 -0
- package/src/server/lib/changes/scan.server.ts +86 -12
- package/src/server/lib/changes/scan.test.ts +56 -0
- package/src/server/lib/changes/sessions.server.ts +15 -0
- package/src/server/lib/changes/temp-path.test.ts +45 -0
- package/src/server/lib/changes/temp-path.ts +102 -0
- package/src/server/lib/db/schema.ts +9 -0
- package/src/server/lib/harness/acp/client.ts +12 -6
- package/src/server/lib/harness/acp/frames-replay.test.ts +55 -0
- package/src/server/lib/harness/acp/frames.ts +45 -3
- package/src/server/lib/harness/acp/protocol.ts +29 -0
- package/src/server/lib/harness/acp/replay-transcript.test.ts +47 -0
- package/src/server/lib/harness/acp/replay-transcript.ts +55 -0
- package/src/server/lib/harness/acp/replay.ts +78 -0
- package/src/server/lib/harness/acp/session-config.ts +36 -1
- package/src/server/lib/harness/acp/session-handshake.ts +32 -8
- package/src/server/lib/harness/acp/session-observers.test.ts +2 -2
- package/src/server/lib/harness/acp/session-options.ts +9 -0
- package/src/server/lib/harness/acp/session-start.ts +62 -0
- package/src/server/lib/harness/acp/session.test-util.ts +2 -0
- package/src/server/lib/harness/acp/session.ts +33 -37
- package/src/server/lib/harness/acp/v2.test.ts +44 -0
- package/src/server/lib/harness/acp/v2.ts +38 -0
- package/src/server/lib/harness/acp/verbs.test.ts +37 -1
- package/src/server/lib/harness/acp/verbs.ts +52 -6
- package/src/server/lib/harness/auto-import.server.test.ts +92 -0
- package/src/server/lib/harness/auto-import.server.ts +209 -0
- package/src/server/lib/harness/auto-probe.server.ts +9 -3
- package/src/server/lib/harness/codex/transcript.server.test.ts +67 -0
- package/src/server/lib/harness/codex/transcript.server.ts +222 -0
- package/src/server/lib/harness/schema.server.ts +15 -7
- package/src/server/lib/harness/session-delete.server.test.ts +156 -0
- package/src/server/lib/harness/session-delete.server.ts +198 -0
- package/src/server/lib/harness/session-import.server.ts +177 -0
- package/src/server/lib/harness/session-store.server.test.ts +85 -0
- package/src/server/lib/harness/session-store.server.ts +70 -3
- package/src/server/lib/harness/session-transcript.server.test.ts +183 -0
- package/src/server/lib/harness/session-transcript.server.ts +301 -0
- package/src/server/lib/harness/session.ts +4 -2
- package/src/server/lib/harness/spawn.server.ts +9 -0
- package/src/server/lib/lifecycle/after-listen.ts +11 -5
- package/src/server/lib/model-roles/mock.server.test.ts +35 -0
- package/src/server/lib/model-roles/mock.server.ts +1 -1
- package/src/server/lib/omp/rpc/frame-fold-frames.test.ts +15 -4
- package/src/server/lib/omp/session/delete-flow.server.ts +62 -9
- package/src/server/lib/omp/session/delete.server.ts +6 -0
- package/src/server/lib/omp/session/sidebar-data.harness.test.ts +86 -1
- package/src/server/lib/omp/session/sidebar-data.server.ts +41 -70
- package/src/server/lib/omp/session/sidebar-status.server.ts +82 -0
- package/src/server/lib/omp/session/telemetry/compute.ts +18 -0
- package/src/server/lib/omp/session/telemetry.test.ts +21 -0
- package/src/server/lib/realtime/topics/catalog.server.ts +2 -1
- package/src/server/lib/realtime/topics.server.ts +2 -1
- package/src/server/lib/sessions/deleted-sessions.server.test.ts +49 -0
- package/src/server/lib/sessions/deleted-sessions.server.ts +45 -0
- package/src/server/lib/tray/config.ts +19 -4
- package/src/server/lib/tray/host/darwin.js +6 -1
- package/src/server/lib/tray/host/linux.js +2 -1
- package/src/server/lib/tray/host/win32.ps1 +7 -1
- package/src/server/lib/tray/runtime.server.ts +81 -3
- package/src/server/lib/tray/tray.test.ts +20 -0
- package/src/server/routes/agent/command.ts +4 -0
- package/src/server/routes/agent/harness-command.ts +77 -3
- package/src/server/routes/agent/restore.ts +50 -0
- package/src/server/routes/chat/imported.ts +32 -0
- package/src/server/routes/chat/session.ts +33 -21
- package/src/server/routes/chat/window.ts +25 -0
- package/src/server/routes/folders/batch-delete.ts +3 -4
- package/src/server/routes/harness/root.ts +17 -1
- package/src/server/routes/harness/session-actions.ts +60 -0
- package/src/server/routes/harness/session-import.test.ts +81 -0
- package/src/server/routes/sessions/batch-archive.ts +5 -4
- package/src/server/routes/sessions/batch-delete.ts +23 -12
- package/src/server/routes/sessions/delete-acp.test.ts +70 -0
- package/src/server/routes/sessions/export.test.ts +83 -0
- package/src/server/routes/sessions/export.ts +59 -0
- package/src/server/routes/sessions/index.ts +4 -0
- package/src/server/routes/sessions/list.ts +5 -0
- package/src/server/routes/settings/root.ts +13 -0
- package/src/shared/lib/chat/export-markdown.test.ts +110 -0
- package/src/shared/lib/chat/export-markdown.ts +141 -0
- package/src/shared/lib/omp/config/schema-releases.test.ts +193 -0
- package/src/shared/lib/omp/config/schema.test.ts +0 -117
- package/src/shared/lib/realtime/connection.ts +4 -0
- package/src/shared/lib/sessions/batch-limits.test.ts +51 -0
- package/src/shared/lib/sessions/batch-limits.ts +42 -0
- package/src/shared/lib/settings/defaults.ts +2 -0
- package/src/shared/lib/theme/tray-icon-style.test.ts +43 -0
- package/src/shared/lib/theme/tray-icon-style.ts +69 -0
- package/src/shared/lib/workspace/left-dock-width.ts +23 -3
- package/src/shared/lib/workspace/left-dock.test.ts +38 -10
- package/src/shared/lib/workspace/left-dock.ts +39 -14
- package/src/shared/lib/workspace/panel-drag.test.ts +52 -0
- package/src/shared/lib/workspace/panel-drag.ts +34 -0
- package/src/shared/lib/workspace/panel-open.test.ts +7 -1
- package/src/shared/lib/workspace/session-state/store.ts +0 -1
- package/src/shared/types/context.ts +20 -0
- package/src/shared/types/harness.ts +26 -0
- package/src/shared/types/settings/state.ts +9 -0
- package/src/test-support/fake-acp-delete.ts +63 -0
- package/src/test-support/sidebar-controller-harness.test-util.ts +121 -0
- package/dist/client/static/js/DrawioView-1ts9y0yk.js +0 -5
- package/dist/client/static/js/ImageView-w2hyp129.js +0 -1
- package/dist/client/static/js/LayoutWrapper-pdvfkncm.js +0 -2
- package/dist/client/static/js/Modal-2sx1tgqr.js +0 -38
- package/dist/client/static/js/SessionsView-a8921ysr.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-r8sz34h3.js +0 -1
- package/dist/client/static/js/architectureDiagram-NJMV4G6O-z3n19xwk.js +0 -36
- package/dist/client/static/js/bash-b3rwyg5p.js +0 -1
- package/dist/client/static/js/c-jkdstn33.js +0 -1
- package/dist/client/static/js/cpp-9d3xdpe3.js +0 -1
- package/dist/client/static/js/css-r3wja1ze.js +0 -1
- package/dist/client/static/js/css-sebxkh5f.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-w2f2vev7.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-k5n61zzh.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-zmz4grtx.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-2gf053bx.js +0 -1
- package/dist/client/static/js/graphql-p4cskvad.js +0 -1
- package/dist/client/static/js/html-f26r6vv5.js +0 -1
- package/dist/client/static/js/index-1c7294vk.js +0 -1
- package/dist/client/static/js/index-2mx9ej4k.css +0 -1
- package/dist/client/static/js/index-2xb54jt3.js +0 -4
- package/dist/client/static/js/index-6d5qj0kb.js +0 -1
- package/dist/client/static/js/index-6k2x281j.js +0 -12
- package/dist/client/static/js/index-6rt7gs1j.js +0 -1
- package/dist/client/static/js/index-737w2mqf.js +0 -1
- package/dist/client/static/js/index-a5ptb956.js +0 -3
- package/dist/client/static/js/index-aa6qdgmv.js +0 -1
- package/dist/client/static/js/index-arvqarv3.js +0 -7
- package/dist/client/static/js/index-bgcp21ed.js +0 -1
- package/dist/client/static/js/index-d8kjsgpt.js +0 -474
- package/dist/client/static/js/index-enxfdvdq.js +0 -1
- package/dist/client/static/js/index-hp8kfk9z.js +0 -1
- package/dist/client/static/js/index-r83kr4s5.js +0 -2
- package/dist/client/static/js/index-rtd9frp1.js +0 -2
- package/dist/client/static/js/index-s910y31q.js +0 -1
- package/dist/client/static/js/info-A6RAGUB7-3tr0y3s6.js +0 -1
- package/dist/client/static/js/ini-cg0a5wm3.js +0 -1
- package/dist/client/static/js/java-vcck089n.js +0 -1
- package/dist/client/static/js/javascript-nyf39d5r.js +0 -1
- package/dist/client/static/js/json-j5q8nt57.js +0 -1
- package/dist/client/static/js/jsx-ht9zyzwa.js +0 -1
- package/dist/client/static/js/lua-86fjqj8v.js +0 -1
- package/dist/client/static/js/markdown-gwmsh53r.js +0 -1
- package/dist/client/static/js/one-dark-pro-kckm8epj.js +0 -1
- package/dist/client/static/js/one-light-0v7rg9a7.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-xbsyjzrh.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-j2tpz0cs.js +0 -1
- package/dist/client/static/js/pieDiagram-5QR66LMP-nz6n95d6.js +0 -39
- package/dist/client/static/js/properties-mzvvbqg5.js +0 -1
- package/dist/client/static/js/python-3w64wsyd.js +0 -1
- package/dist/client/static/js/r-32re2zwb.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-m3tsyfv0.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-5p202a4q.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-hj0y9tgn.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-8c5dct8f.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-3tx8z65q.js +0 -1
- package/dist/client/static/js/sql-0e9mnrda.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-56rk9kxv.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-mf0rb2yv.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-0x5gf06b.js +0 -1
- package/dist/client/static/js/tsx-nm94hed6.js +0 -1
- package/dist/client/static/js/typescript-5nmrzgkj.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-x7ej8dms.js +0 -1
- package/dist/client/static/js/xml-3dd1pter.js +0 -1
- package/dist/client/static/js/yaml-yssayv8a.js +0 -1
- package/src/client/components/workspace/usage-panel/ProviderSelect.tsx +0 -229
|
@@ -41,7 +41,7 @@ afterAll(() => {
|
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
-
const commit = (body?: string): GitCommit => ({
|
|
44
|
+
const commit = (body?: string, files: GitCommit['files'] = []): GitCommit => ({
|
|
45
45
|
hash: 'a'.repeat(40),
|
|
46
46
|
shortHash: 'aaaaaaaa',
|
|
47
47
|
author: 'Ada',
|
|
@@ -49,18 +49,17 @@ const commit = (body?: string): GitCommit => ({
|
|
|
49
49
|
message: 'feat(scope): the subject line',
|
|
50
50
|
body,
|
|
51
51
|
parents: [],
|
|
52
|
-
files
|
|
52
|
+
files,
|
|
53
53
|
});
|
|
54
54
|
|
|
55
|
-
async function mount(commitRow: GitCommit): Promise<HTMLElement> {
|
|
55
|
+
async function mount(commitRow: GitCommit, options: { isSelected?: boolean } = {}): Promise<HTMLElement> {
|
|
56
56
|
const container = document.createElement('div');
|
|
57
57
|
document.body.appendChild(container);
|
|
58
58
|
await act(async () => {
|
|
59
59
|
render(
|
|
60
60
|
h(CommitRow, {
|
|
61
61
|
commit: commitRow,
|
|
62
|
-
isSelected: false,
|
|
63
|
-
isGraphMode: false,
|
|
62
|
+
isSelected: options.isSelected ?? false,
|
|
64
63
|
onSelect: () => {},
|
|
65
64
|
onAction: () => {},
|
|
66
65
|
onToggleFile: () => {},
|
|
@@ -126,3 +125,78 @@ describe('CommitRow message expansion', () => {
|
|
|
126
125
|
expect(el.textContent).not.toContain('selectable text');
|
|
127
126
|
});
|
|
128
127
|
});
|
|
128
|
+
|
|
129
|
+
describe('CommitRow changed-file list', () => {
|
|
130
|
+
const files: GitCommit['files'] = [
|
|
131
|
+
{ file: 'src/one.ts', status: 'M', additions: 3, deletions: 1 },
|
|
132
|
+
{ file: 'src/two.ts', status: 'A', additions: 9, deletions: 0 },
|
|
133
|
+
];
|
|
134
|
+
|
|
135
|
+
test('the file list is hidden until the row is expanded', async () => {
|
|
136
|
+
const el = await mount(commit(undefined, files));
|
|
137
|
+
expect(el.textContent).toContain('feat(scope): the subject line');
|
|
138
|
+
expect(el.textContent).not.toContain('src/one.ts');
|
|
139
|
+
expect(el.textContent).not.toContain('src/two.ts');
|
|
140
|
+
|
|
141
|
+
await click(el.firstElementChild!);
|
|
142
|
+
expect(el.textContent).toContain('src/one.ts');
|
|
143
|
+
expect(el.textContent).toContain('src/two.ts');
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
test('a commit with files but no body still expands', async () => {
|
|
147
|
+
const el = await mount(commit(undefined, files));
|
|
148
|
+
// The chevron is the affordance: without it the file list would be
|
|
149
|
+
// unreachable on a one-line commit.
|
|
150
|
+
expect(el.querySelectorAll('svg').length).toBe(2); // copy-hash + chevron
|
|
151
|
+
await click(el.firstElementChild!);
|
|
152
|
+
expect(el.textContent).toContain('src/one.ts');
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
test('the collapsed row states how many files the commit touched', async () => {
|
|
156
|
+
const el = await mount(commit(undefined, files));
|
|
157
|
+
expect(el.textContent).toContain('2 files');
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
test('clicking again collapses the file list', async () => {
|
|
161
|
+
const el = await mount(commit(undefined, files));
|
|
162
|
+
await click(el.firstElementChild!);
|
|
163
|
+
await click(el.firstElementChild!);
|
|
164
|
+
expect(el.textContent).not.toContain('src/one.ts');
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
test('the subject is a button that reports and toggles the expanded state', async () => {
|
|
168
|
+
const el = await mount(commit(undefined, files));
|
|
169
|
+
const subject = Array.from(el.querySelectorAll('button[aria-expanded]')).find((button) =>
|
|
170
|
+
button.textContent?.includes('feat(scope): the subject line')
|
|
171
|
+
) as HTMLButtonElement | undefined;
|
|
172
|
+
expect(subject).toBeTruthy();
|
|
173
|
+
expect(subject?.getAttribute('aria-expanded')).toBe('false');
|
|
174
|
+
|
|
175
|
+
await click(subject!);
|
|
176
|
+
expect(el.textContent).toContain('src/one.ts');
|
|
177
|
+
expect(subject?.getAttribute('aria-expanded')).toBe('true');
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
test('a file row is a button that reports its own expanded state', async () => {
|
|
181
|
+
const el = await mount(commit(undefined, files));
|
|
182
|
+
await click(el.firstElementChild!);
|
|
183
|
+
const fileRow = Array.from(el.querySelectorAll('button[aria-expanded]')).find((button) =>
|
|
184
|
+
button.textContent?.includes('src/one.ts')
|
|
185
|
+
) as HTMLButtonElement | undefined;
|
|
186
|
+
expect(fileRow).toBeTruthy();
|
|
187
|
+
expect(fileRow?.getAttribute('aria-expanded')).toBe('false');
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
describe('CommitRow action strip', () => {
|
|
192
|
+
test('an unselected row renders no action buttons', async () => {
|
|
193
|
+
const el = await mount(commit(undefined, []));
|
|
194
|
+
expect(el.textContent).not.toContain('checkout');
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
test('a selected row renders the action buttons', async () => {
|
|
198
|
+
const el = await mount(commit(undefined, []), { isSelected: true });
|
|
199
|
+
expect(el.textContent).toContain('checkout');
|
|
200
|
+
expect(el.textContent).toContain('cherry-pick');
|
|
201
|
+
});
|
|
202
|
+
});
|
|
@@ -8,9 +8,8 @@ import { CommitDiffViewer } from '@/client/components/workspace/git-panel/commit
|
|
|
8
8
|
interface CommitRowProps {
|
|
9
9
|
commit: GitCommit;
|
|
10
10
|
isSelected: boolean;
|
|
11
|
-
isGraphMode: boolean;
|
|
12
11
|
onSelect: (commit: GitCommit) => void;
|
|
13
|
-
onAction: (action: string, commit: GitCommit
|
|
12
|
+
onAction: (action: string, commit: GitCommit) => void;
|
|
14
13
|
onToggleFile: (commitHash: string, file: GitCommitFile) => void;
|
|
15
14
|
isExpandedFile: (commitHash: string, filePath: string) => boolean;
|
|
16
15
|
isLoadingFile: (commitHash: string, filePath: string) => boolean;
|
|
@@ -23,7 +22,6 @@ interface CommitRowProps {
|
|
|
23
22
|
export function CommitRow({
|
|
24
23
|
commit,
|
|
25
24
|
isSelected,
|
|
26
|
-
isGraphMode,
|
|
27
25
|
onSelect,
|
|
28
26
|
onAction,
|
|
29
27
|
onToggleFile,
|
|
@@ -36,11 +34,17 @@ export function CommitRow({
|
|
|
36
34
|
}: CommitRowProps) {
|
|
37
35
|
const [copied, setCopied] = useState(false);
|
|
38
36
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
39
|
-
// A one-line commit
|
|
37
|
+
// A one-line commit with no changed files has nothing to expand, and no
|
|
40
38
|
// affordance is drawn, because a chevron that opens an empty block reads as
|
|
41
|
-
// a broken row.
|
|
39
|
+
// a broken row. The changed-file list is part of the expanded block: a page
|
|
40
|
+
// of 50 commits otherwise renders every file of every commit at once, which
|
|
41
|
+
// buries the subjects the list exists to show.
|
|
42
42
|
const body = commit.body?.trim() ?? '';
|
|
43
43
|
const hasBody = body.length > 0;
|
|
44
|
+
const files = commit.files ?? [];
|
|
45
|
+
const fileCount = files.length;
|
|
46
|
+
const hasFiles = fileCount > 0;
|
|
47
|
+
const expandable = hasBody || hasFiles;
|
|
44
48
|
|
|
45
49
|
const handleCopyHash = (e: globalThis.MouseEvent) => {
|
|
46
50
|
e.stopPropagation();
|
|
@@ -55,12 +59,13 @@ export function CommitRow({
|
|
|
55
59
|
};
|
|
56
60
|
|
|
57
61
|
// Clicking the row still selects it for the action strip, and additionally
|
|
58
|
-
// opens the full message
|
|
59
|
-
// A click that ends a text selection must not
|
|
60
|
-
// of an open body would otherwise collapse
|
|
62
|
+
// opens the full message and the changed-file list, neither of which is
|
|
63
|
+
// visible in the collapsed row. A click that ends a text selection must not
|
|
64
|
+
// count: copying the message out of an open body would otherwise collapse
|
|
65
|
+
// the very block being read.
|
|
61
66
|
const handleRowClick = () => {
|
|
62
67
|
onSelect(commit);
|
|
63
|
-
if (!
|
|
68
|
+
if (!expandable) return;
|
|
64
69
|
const selection = globalThis.getSelection?.();
|
|
65
70
|
if (selection && !selection.isCollapsed) return;
|
|
66
71
|
setIsExpanded((prev) => !prev);
|
|
@@ -75,7 +80,7 @@ export function CommitRow({
|
|
|
75
80
|
isSelected ? 'bg-ink/[0.03]' : 'hover:bg-ink/[0.015]'
|
|
76
81
|
}`}
|
|
77
82
|
>
|
|
78
|
-
<div className="py-2.5
|
|
83
|
+
<div className="py-2.5 flex flex-col">
|
|
79
84
|
{/* Commit Header Line */}
|
|
80
85
|
<div className="flex flex-col gap-1">
|
|
81
86
|
{/* Ref tags / Branch badges */}
|
|
@@ -89,10 +94,10 @@ export function CommitRow({
|
|
|
89
94
|
key={idx}
|
|
90
95
|
className={`px-2 py-0.5 rounded text-[10px] font-mono border ${
|
|
91
96
|
isStash
|
|
92
|
-
? 'bg-warning/10 text-
|
|
97
|
+
? 'bg-warning/10 text-ink/80 border-warning/25 font-semibold'
|
|
93
98
|
: isHead
|
|
94
99
|
? 'bg-ink/10 text-ink font-semibold border-ink/20'
|
|
95
|
-
: 'bg-canvas text-
|
|
100
|
+
: 'bg-canvas text-muted border-ink/10 font-medium'
|
|
96
101
|
}`}
|
|
97
102
|
>
|
|
98
103
|
{refTag}
|
|
@@ -113,20 +118,27 @@ export function CommitRow({
|
|
|
113
118
|
this row" resolves to two elements — measured, and a locator
|
|
114
119
|
that picks the first is a locator that silently measures a
|
|
115
120
|
different element the day the row is reordered. */}
|
|
116
|
-
<
|
|
117
|
-
|
|
118
|
-
|
|
121
|
+
<button
|
|
122
|
+
type="button"
|
|
123
|
+
onClick={(e) => {
|
|
124
|
+
e.stopPropagation();
|
|
125
|
+
handleRowClick();
|
|
126
|
+
}}
|
|
127
|
+
aria-expanded={expandable ? isExpanded : undefined}
|
|
128
|
+
className="flex flex-1 min-w-0 items-start gap-1.5 text-left cursor-pointer rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink/20"
|
|
119
129
|
>
|
|
120
|
-
{commit.message}
|
|
121
|
-
</span>
|
|
122
|
-
{hasBody && (
|
|
123
130
|
<span
|
|
124
|
-
|
|
125
|
-
|
|
131
|
+
data-commit-title=""
|
|
132
|
+
className="text-[13px] font-semibold text-ink leading-snug break-words flex-1 min-w-0"
|
|
126
133
|
>
|
|
127
|
-
{
|
|
134
|
+
{commit.message}
|
|
128
135
|
</span>
|
|
129
|
-
|
|
136
|
+
{expandable && (
|
|
137
|
+
<span className="text-ink/55 flex-shrink-0 mt-0.5" aria-hidden="true">
|
|
138
|
+
{isExpanded ? <ChevronDown size={13} /> : <ChevronRight size={13} />}
|
|
139
|
+
</span>
|
|
140
|
+
)}
|
|
141
|
+
</button>
|
|
130
142
|
</div>
|
|
131
143
|
|
|
132
144
|
{/* Full commit message body — the subject alone hides it */}
|
|
@@ -136,54 +148,63 @@ export function CommitRow({
|
|
|
136
148
|
</div>
|
|
137
149
|
)}
|
|
138
150
|
|
|
139
|
-
{/* Metadata line:
|
|
140
|
-
<div className="flex items-center gap-2 text-[11px] text-
|
|
151
|
+
{/* Metadata line: author, date, hash with copy button, file count */}
|
|
152
|
+
<div className="flex items-center gap-x-2 gap-y-0.5 text-[11px] text-muted font-mono flex-wrap">
|
|
141
153
|
<span>{commit.author}</span>
|
|
142
|
-
<span>•</span>
|
|
143
154
|
<span>{commit.date}</span>
|
|
144
|
-
<span>•</span>
|
|
145
155
|
<button
|
|
146
156
|
type="button"
|
|
147
157
|
onClick={handleCopyHash}
|
|
148
158
|
title="Copy commit hash"
|
|
159
|
+
aria-label={`Copy commit hash ${commit.shortHash}`}
|
|
149
160
|
className="inline-flex items-center gap-1 hover:text-ink transition-colors cursor-pointer text-ink/70"
|
|
150
161
|
>
|
|
151
162
|
<span>{commit.shortHash}</span>
|
|
152
|
-
{copied ? <Check size={11} className="text-success" /> : <Copy size={11} />}
|
|
163
|
+
{copied ? <Check size={11} className="text-success-text" aria-hidden="true" /> : <Copy size={11} aria-hidden="true" />}
|
|
153
164
|
</button>
|
|
165
|
+
{hasFiles && (
|
|
166
|
+
/* The collapsed row still says how much the commit touched,
|
|
167
|
+
so the file list being closed is a choice, not a surprise. */
|
|
168
|
+
<span>{fileCount} {fileCount === 1 ? 'file' : 'files'}</span>
|
|
169
|
+
)}
|
|
154
170
|
</div>
|
|
155
171
|
</div>
|
|
156
172
|
|
|
157
|
-
{/* Action buttons
|
|
158
|
-
|
|
173
|
+
{/* Action buttons belong to the selected row only. Rendering them on
|
|
174
|
+
every row in graph mode turned the list into a wall of buttons and
|
|
175
|
+
buried the topology the mode exists to show. */}
|
|
176
|
+
{isSelected && (
|
|
159
177
|
<div className="mt-2">
|
|
160
178
|
<CommitActions commit={commit} onAction={onAction} />
|
|
161
179
|
</div>
|
|
162
180
|
)}
|
|
163
181
|
|
|
164
|
-
{/* Changed Files List
|
|
165
|
-
|
|
182
|
+
{/* Changed Files List — part of the expanded block, so a collapsed
|
|
183
|
+
page stays a list of subjects rather than a wall of paths. */}
|
|
184
|
+
{hasFiles && isExpanded && (
|
|
166
185
|
<div className="mt-2 flex flex-col gap-1">
|
|
167
|
-
{
|
|
168
|
-
const
|
|
186
|
+
{files.map((file, fileIdx) => {
|
|
187
|
+
const fileExpanded = isExpandedFile(commit.hash, file.file);
|
|
169
188
|
const diffKey = `${commit.hash}:${file.file}`;
|
|
170
189
|
const activeDiff = fileDiffs[diffKey] !== undefined ? fileDiffs[diffKey] : file.diff;
|
|
171
190
|
const isLoading = isLoadingFile(commit.hash, file.file);
|
|
172
191
|
|
|
173
192
|
const statusColor =
|
|
174
193
|
file.status === 'A'
|
|
175
|
-
? 'text-success font-bold'
|
|
194
|
+
? 'text-success-text font-bold'
|
|
176
195
|
: file.status === 'D'
|
|
177
|
-
? 'text-error font-bold'
|
|
196
|
+
? 'text-error-text font-bold'
|
|
178
197
|
: file.status === 'R'
|
|
179
|
-
? 'text-meta font-bold'
|
|
180
|
-
: 'text-info font-bold';
|
|
198
|
+
? 'text-meta-text font-bold'
|
|
199
|
+
: 'text-info-text font-bold';
|
|
181
200
|
|
|
182
201
|
return (
|
|
183
202
|
<div key={fileIdx} className="flex flex-col">
|
|
184
|
-
<
|
|
203
|
+
<button
|
|
204
|
+
type="button"
|
|
185
205
|
onClick={(e) => handleToggleFile(e, file)}
|
|
186
|
-
|
|
206
|
+
aria-expanded={fileExpanded}
|
|
207
|
+
className="flex w-full items-center gap-2 py-1 px-2 rounded text-[11.5px] font-mono text-ink/80 transition-colors group cursor-pointer border border-transparent hover:border-ink/10 text-left"
|
|
187
208
|
>
|
|
188
209
|
{/* Status badge: M / A / D */}
|
|
189
210
|
<span className={`w-3.5 text-center flex-shrink-0 text-[11px] ${statusColor}`}>
|
|
@@ -197,19 +218,19 @@ export function CommitRow({
|
|
|
197
218
|
|
|
198
219
|
{/* Stats: +3 / -2 */}
|
|
199
220
|
<span className="flex items-center gap-1 text-[10.5px] tabular-nums flex-shrink-0 font-medium">
|
|
200
|
-
<span className="text-success">+{file.additions}</span>
|
|
221
|
+
<span className="text-success-text">+{file.additions}</span>
|
|
201
222
|
<span className="text-ink/30">/</span>
|
|
202
|
-
<span className="text-error">-{file.deletions}</span>
|
|
223
|
+
<span className="text-error-text">-{file.deletions}</span>
|
|
203
224
|
</span>
|
|
204
225
|
|
|
205
226
|
{/* Expand icon */}
|
|
206
|
-
<span className="text-ink/
|
|
207
|
-
{
|
|
227
|
+
<span className="text-ink/55 group-hover:text-ink flex-shrink-0">
|
|
228
|
+
{fileExpanded ? <ChevronDown size={13} aria-hidden="true" /> : <ChevronRight size={13} aria-hidden="true" />}
|
|
208
229
|
</span>
|
|
209
|
-
</
|
|
230
|
+
</button>
|
|
210
231
|
|
|
211
232
|
{/* Inline Diff Viewer when expanded */}
|
|
212
|
-
{
|
|
233
|
+
{fileExpanded && (
|
|
213
234
|
<div className="pl-4 pr-1">
|
|
214
235
|
<CommitDiffViewer
|
|
215
236
|
diffText={activeDiff}
|
|
@@ -75,17 +75,12 @@ export function GraphCanvas({
|
|
|
75
75
|
<div
|
|
76
76
|
className="absolute top-0 left-0 pointer-events-none z-10"
|
|
77
77
|
style={{ width: canvasWidth, height: totalHeight }}
|
|
78
|
+
aria-hidden="true"
|
|
78
79
|
>
|
|
79
80
|
<svg
|
|
80
81
|
className="w-full h-full overflow-visible"
|
|
81
82
|
style={{ width: canvasWidth, height: totalHeight }}
|
|
82
83
|
>
|
|
83
|
-
<defs>
|
|
84
|
-
<filter id="node-glow" x="-20%" y="-20%" width="140%" height="140%">
|
|
85
|
-
<feDropShadow dx="0" dy="0" stdDeviation="2" floodOpacity="0.35" />
|
|
86
|
-
</filter>
|
|
87
|
-
</defs>
|
|
88
|
-
|
|
89
84
|
{/* 1. Continuous Connecting Lines */}
|
|
90
85
|
{links.map((link) => {
|
|
91
86
|
const x1 = isGraphMode ? paddingLeft + link.fromLane * laneWidth : 16;
|
|
@@ -146,7 +141,6 @@ export function GraphCanvas({
|
|
|
146
141
|
fill={isGraphMode ? 'var(--theme-paper)' : laneColor}
|
|
147
142
|
stroke={laneColor}
|
|
148
143
|
strokeWidth={isGraphMode ? 2.5 : 1.5}
|
|
149
|
-
filter="url(#node-glow)"
|
|
150
144
|
/>
|
|
151
145
|
|
|
152
146
|
{/* Inner dot for Graph Mode */}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The header is the modal's only chrome: the mode switch, the filter and the
|
|
8
|
+
* close control. These mounts pin the parts a screen reader and a keyboard
|
|
9
|
+
* user depend on, plus the copy that changes with the mode.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { afterAll, beforeAll, describe, expect, test } from 'bun:test';
|
|
13
|
+
import { Window } from 'happy-dom';
|
|
14
|
+
import { h, render } from 'preact';
|
|
15
|
+
import { act } from 'preact/test-utils';
|
|
16
|
+
import { Header } from '@/client/components/workspace/git-panel/commit-modal/Header';
|
|
17
|
+
|
|
18
|
+
const DOM_GLOBALS = ['window', 'document', 'navigator', 'Node', 'Element', 'HTMLElement', 'Event'] as const;
|
|
19
|
+
const nativeGlobals: Partial<Record<(typeof DOM_GLOBALS)[number], unknown>> = {};
|
|
20
|
+
|
|
21
|
+
beforeAll(() => {
|
|
22
|
+
const win = new Window({ url: 'http://localhost' });
|
|
23
|
+
const target = globalThis as unknown as Record<string, unknown>;
|
|
24
|
+
for (const key of DOM_GLOBALS) {
|
|
25
|
+
if (!(key in nativeGlobals)) nativeGlobals[key] = target[key];
|
|
26
|
+
target[key] = (win as unknown as Record<string, unknown>)[key];
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
afterAll(() => {
|
|
31
|
+
const target = globalThis as unknown as Record<string, unknown>;
|
|
32
|
+
for (const key of DOM_GLOBALS) {
|
|
33
|
+
if (nativeGlobals[key] === undefined) delete target[key];
|
|
34
|
+
else target[key] = nativeGlobals[key];
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
async function mount(isGraphMode: boolean): Promise<HTMLElement> {
|
|
39
|
+
const container = document.createElement('div');
|
|
40
|
+
document.body.appendChild(container);
|
|
41
|
+
await act(async () => {
|
|
42
|
+
render(
|
|
43
|
+
h(Header, {
|
|
44
|
+
isGraphMode,
|
|
45
|
+
onToggleMode: () => {},
|
|
46
|
+
searchQuery: '',
|
|
47
|
+
onSearchChange: () => {},
|
|
48
|
+
onRefresh: () => {},
|
|
49
|
+
onClose: () => {},
|
|
50
|
+
totalCommits: 50,
|
|
51
|
+
loadedCount: 50,
|
|
52
|
+
totalCount: 1815,
|
|
53
|
+
hasMore: true,
|
|
54
|
+
}),
|
|
55
|
+
container
|
|
56
|
+
);
|
|
57
|
+
});
|
|
58
|
+
return container;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
describe('commit modal header', () => {
|
|
62
|
+
test('history mode names the page and its subtitle', async () => {
|
|
63
|
+
const el = await mount(false);
|
|
64
|
+
expect(el.textContent).toContain('History');
|
|
65
|
+
expect(el.textContent).toContain('Browse recent commits and inspect changed files.');
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
test('graph mode names the page and its subtitle', async () => {
|
|
69
|
+
const el = await mount(true);
|
|
70
|
+
expect(el.textContent).toContain('Graph');
|
|
71
|
+
expect(el.textContent).toContain('Follow branch topology and inspect commits.');
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
test('the mode buttons report which view is active', async () => {
|
|
75
|
+
const history = await mount(false);
|
|
76
|
+
expect(history.querySelector('button[aria-label="History view"]')?.getAttribute('aria-pressed')).toBe('true');
|
|
77
|
+
expect(history.querySelector('button[aria-label="Graph view"]')?.getAttribute('aria-pressed')).toBe('false');
|
|
78
|
+
|
|
79
|
+
const graph = await mount(true);
|
|
80
|
+
expect(graph.querySelector('button[aria-label="History view"]')?.getAttribute('aria-pressed')).toBe('false');
|
|
81
|
+
expect(graph.querySelector('button[aria-label="Graph view"]')?.getAttribute('aria-pressed')).toBe('true');
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
test('the filter and the close control have accessible names', async () => {
|
|
85
|
+
const el = await mount(false);
|
|
86
|
+
expect(el.querySelector('input[aria-label="Filter commits"]')).toBeTruthy();
|
|
87
|
+
expect(el.querySelector('button[aria-label="Close commit history"]')).toBeTruthy();
|
|
88
|
+
expect(el.querySelector('button[aria-label="Refresh commit history"]')).toBeTruthy();
|
|
89
|
+
});
|
|
90
|
+
});
|
|
@@ -54,12 +54,14 @@ export function Header({
|
|
|
54
54
|
<h2 className="text-base font-semibold text-ink tracking-tight">
|
|
55
55
|
{isGraphMode ? 'Graph' : 'History'}
|
|
56
56
|
</h2>
|
|
57
|
-
<span className="text-[11px] font-mono px-2 py-0.5 rounded-full bg-ink/5 text-ink/
|
|
57
|
+
<span className="text-[11px] font-mono px-2 py-0.5 rounded-full bg-ink/5 text-ink/80 border border-ink/10 whitespace-nowrap">
|
|
58
58
|
{badge}
|
|
59
59
|
</span>
|
|
60
60
|
</div>
|
|
61
|
-
<p className="text-xs text-
|
|
62
|
-
|
|
61
|
+
<p className="text-xs text-muted mt-0.5 hidden lg:block">
|
|
62
|
+
{isGraphMode
|
|
63
|
+
? 'Follow branch topology and inspect commits.'
|
|
64
|
+
: 'Browse recent commits and inspect changed files.'}
|
|
63
65
|
</p>
|
|
64
66
|
</div>
|
|
65
67
|
|
|
@@ -71,26 +73,30 @@ export function Header({
|
|
|
71
73
|
type="button"
|
|
72
74
|
onClick={() => onToggleMode(false)}
|
|
73
75
|
title="History view"
|
|
74
|
-
|
|
76
|
+
aria-label="History view"
|
|
77
|
+
aria-pressed={!isGraphMode}
|
|
78
|
+
className={`tap-target flex items-center gap-1.5 px-2.5 py-1 rounded-md font-medium transition-colors cursor-pointer ${
|
|
75
79
|
!isGraphMode
|
|
76
80
|
? 'bg-paper text-ink shadow-xs'
|
|
77
|
-
: 'text-ink/
|
|
81
|
+
: 'text-ink/80 hover:text-ink hover:bg-ink/5'
|
|
78
82
|
}`}
|
|
79
83
|
>
|
|
80
|
-
<History size={13} />
|
|
84
|
+
<History size={13} aria-hidden="true" />
|
|
81
85
|
<span className="hidden lg:inline">History</span>
|
|
82
86
|
</button>
|
|
83
87
|
<button
|
|
84
88
|
type="button"
|
|
85
89
|
onClick={() => onToggleMode(true)}
|
|
86
90
|
title="Graph view"
|
|
87
|
-
|
|
91
|
+
aria-label="Graph view"
|
|
92
|
+
aria-pressed={isGraphMode}
|
|
93
|
+
className={`tap-target flex items-center gap-1.5 px-2.5 py-1 rounded-md font-medium transition-colors cursor-pointer ${
|
|
88
94
|
isGraphMode
|
|
89
95
|
? 'bg-paper text-ink shadow-xs'
|
|
90
|
-
: 'text-ink/
|
|
96
|
+
: 'text-ink/80 hover:text-ink hover:bg-ink/5'
|
|
91
97
|
}`}
|
|
92
98
|
>
|
|
93
|
-
<GitMerge size={13} />
|
|
99
|
+
<GitMerge size={13} aria-hidden="true" />
|
|
94
100
|
<span className="hidden lg:inline">Graph</span>
|
|
95
101
|
</button>
|
|
96
102
|
</div>
|
|
@@ -100,42 +106,46 @@ export function Header({
|
|
|
100
106
|
type="button"
|
|
101
107
|
onClick={onRefresh}
|
|
102
108
|
disabled={isRefreshing}
|
|
103
|
-
className="flex items-center gap-1.5 px-2.5 py-1.5 rounded-md border border-ink/15 hover:bg-ink/5 text-ink/70 hover:text-ink transition-colors cursor-pointer text-xs disabled:opacity-40"
|
|
109
|
+
className="tap-target flex items-center gap-1.5 px-2.5 py-1.5 rounded-md border border-ink/15 hover:bg-ink/5 text-ink/70 hover:text-ink transition-colors cursor-pointer text-xs disabled:opacity-40"
|
|
104
110
|
title="Refresh commit history"
|
|
111
|
+
aria-label="Refresh commit history"
|
|
105
112
|
>
|
|
106
|
-
<RotateCw size={13} className={isRefreshing ? 'animate-spin text-ink' : ''} />
|
|
107
|
-
<span className="hidden lg:inline">
|
|
113
|
+
<RotateCw size={13} className={isRefreshing ? 'animate-spin text-ink' : ''} aria-hidden="true" />
|
|
114
|
+
<span className="hidden lg:inline">Refresh</span>
|
|
108
115
|
</button>
|
|
109
116
|
|
|
110
117
|
{/* Close Button */}
|
|
111
118
|
<button
|
|
112
119
|
type="button"
|
|
113
120
|
onClick={onClose}
|
|
114
|
-
className="p-2 -mr-1 rounded-md hover:bg-ink/5 text-
|
|
121
|
+
className="tap-target p-2 -mr-1 rounded-md hover:bg-ink/5 text-muted hover:text-ink transition-colors cursor-pointer"
|
|
115
122
|
title="Close modal"
|
|
123
|
+
aria-label="Close commit history"
|
|
116
124
|
>
|
|
117
|
-
<X size={16} />
|
|
125
|
+
<X size={16} aria-hidden="true" />
|
|
118
126
|
</button>
|
|
119
127
|
</div>
|
|
120
128
|
</div>
|
|
121
129
|
|
|
122
130
|
{/* Search Input Filter */}
|
|
123
131
|
<div className="relative mt-1">
|
|
124
|
-
<Search size={13} className="absolute left-2.5 top-1/2 -translate-y-1/2 text-ink/
|
|
132
|
+
<Search size={13} className="absolute left-2.5 top-1/2 -translate-y-1/2 text-ink/55" aria-hidden="true" />
|
|
125
133
|
<input
|
|
126
134
|
type="text"
|
|
127
135
|
value={searchQuery}
|
|
128
136
|
onChange={(e) => onSearchChange(e.currentTarget.value)}
|
|
129
137
|
placeholder="Filter commits by message, author, or hash..."
|
|
130
|
-
|
|
138
|
+
aria-label="Filter commits"
|
|
139
|
+
className="w-full bg-ink/[0.03] border border-ink/15 rounded-md pl-8 pr-3 py-1.5 text-xs text-ink placeholder-ink/40 focus:outline-none focus:border-ink/40 focus-visible:ring-2 focus-visible:ring-ink/20 transition-colors font-mono"
|
|
131
140
|
/>
|
|
132
141
|
{searchQuery && (
|
|
133
142
|
<button
|
|
134
143
|
type="button"
|
|
135
144
|
onClick={() => onSearchChange('')}
|
|
136
|
-
|
|
145
|
+
aria-label="Clear filter"
|
|
146
|
+
className="absolute right-2.5 top-1/2 -translate-y-1/2 text-ink/55 hover:text-ink cursor-pointer"
|
|
137
147
|
>
|
|
138
|
-
<X size={12} />
|
|
148
|
+
<X size={12} aria-hidden="true" />
|
|
139
149
|
</button>
|
|
140
150
|
)}
|
|
141
151
|
</div>
|
|
@@ -25,6 +25,18 @@ export function GitCommitModal({
|
|
|
25
25
|
rootPath,
|
|
26
26
|
activeRepo,
|
|
27
27
|
}: GitCommitModalProps) {
|
|
28
|
+
// Escape closes the dialog, as every other dialog in the app does. The
|
|
29
|
+
// listener lives on `document` because the card itself is not focusable and
|
|
30
|
+
// the scrim click is mouse-only.
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
if (!output) return;
|
|
33
|
+
const onKeyDown = (event: KeyboardEvent) => {
|
|
34
|
+
if (event.key === 'Escape') onClose();
|
|
35
|
+
};
|
|
36
|
+
document.addEventListener('keydown', onKeyDown);
|
|
37
|
+
return () => document.removeEventListener('keydown', onKeyDown);
|
|
38
|
+
}, [output, onClose]);
|
|
39
|
+
|
|
28
40
|
if (!output) return null;
|
|
29
41
|
|
|
30
42
|
/**
|
|
@@ -228,6 +240,7 @@ export function GitCommitModal({
|
|
|
228
240
|
onClick={onClose}
|
|
229
241
|
role="dialog"
|
|
230
242
|
aria-modal="true"
|
|
243
|
+
aria-label={output.title}
|
|
231
244
|
>
|
|
232
245
|
<div
|
|
233
246
|
className="glass-overlay bg-paper border-ink/20 shadow-2xl flex flex-col overflow-hidden
|
|
@@ -251,13 +264,18 @@ export function GitCommitModal({
|
|
|
251
264
|
hasMore={hasMore}
|
|
252
265
|
/>
|
|
253
266
|
|
|
254
|
-
{/* Commits Container with Unified Continuous SVG Canvas
|
|
267
|
+
{/* Commits Container with Unified Continuous SVG Canvas.
|
|
268
|
+
The horizontal padding matches the header's (`px-3 lg:px-5` plus the
|
|
269
|
+
safe-area insets), so the rows and the graph column line up with the
|
|
270
|
+
title and search field instead of hugging the card's edge. */}
|
|
255
271
|
<div
|
|
256
272
|
ref={containerRef}
|
|
257
|
-
className="flex-1 overflow-y-auto scrollbar-overlay-container relative select-text
|
|
273
|
+
className="flex-1 overflow-y-auto scrollbar-overlay-container relative select-text
|
|
274
|
+
px-3 lg:px-5
|
|
275
|
+
pl-[max(0.75rem,env(safe-area-inset-left,0px))] pr-[max(0.75rem,env(safe-area-inset-right,0px))]"
|
|
258
276
|
>
|
|
259
277
|
{filteredCommits.length === 0 ? (
|
|
260
|
-
<div className="flex flex-col items-center justify-center py-20 text-
|
|
278
|
+
<div className="flex flex-col items-center justify-center py-20 text-muted font-mono text-xs">
|
|
261
279
|
{searchQuery.trim() ? 'No matching commits found.' : 'No commits in this branch.'}
|
|
262
280
|
</div>
|
|
263
281
|
) : (
|
|
@@ -284,7 +302,6 @@ export function GitCommitModal({
|
|
|
284
302
|
key={commit.hash}
|
|
285
303
|
commit={commit}
|
|
286
304
|
isSelected={selectedHash === commit.hash}
|
|
287
|
-
isGraphMode={isGraphMode}
|
|
288
305
|
onSelect={(c) => setSelectedHash(c.hash)}
|
|
289
306
|
onAction={handleCommitAction}
|
|
290
307
|
onToggleFile={handleToggleFile}
|
|
@@ -302,8 +319,8 @@ export function GitCommitModal({
|
|
|
302
319
|
{/* Lazy Load Sentinel & Controls */}
|
|
303
320
|
<div ref={sentinelRef} className="pt-3 pb-4 px-4 flex items-center justify-center">
|
|
304
321
|
{isLoadingMore ? (
|
|
305
|
-
<div className="flex items-center gap-2 text-xs text-
|
|
306
|
-
<Loader2 size={14} className="animate-spin text-info" />
|
|
322
|
+
<div className="flex items-center gap-2 text-xs text-muted font-mono py-2">
|
|
323
|
+
<Loader2 size={14} className="animate-spin text-info-text" aria-hidden="true" />
|
|
307
324
|
<span>Loading more commits...</span>
|
|
308
325
|
</div>
|
|
309
326
|
) : hasMore && !searchQuery.trim() ? (
|
|
@@ -315,7 +332,7 @@ export function GitCommitModal({
|
|
|
315
332
|
Load more commits...
|
|
316
333
|
</button>
|
|
317
334
|
) : filteredCommits.length > 10 ? (
|
|
318
|
-
<div className="text-[11px] font-mono text-
|
|
335
|
+
<div className="text-[11px] font-mono text-muted py-2">
|
|
319
336
|
End of commit history ({typeof totalCount === 'number' && totalCount > 0 ? totalCount : commits.length} commits)
|
|
320
337
|
</div>
|
|
321
338
|
) : null}
|
|
@@ -192,4 +192,20 @@ describe('GitPanel commit modal', () => {
|
|
|
192
192
|
await rerender({ rootPath: ROOT, enabled: true });
|
|
193
193
|
expect(container.querySelector('[role="dialog"]')).toBeNull();
|
|
194
194
|
});
|
|
195
|
+
|
|
196
|
+
test('Escape closes the modal', async () => {
|
|
197
|
+
await mountHistory();
|
|
198
|
+
|
|
199
|
+
const historyButton = container.querySelector('button[title="Commit History"]') as HTMLButtonElement | null;
|
|
200
|
+
expect(historyButton).toBeTruthy();
|
|
201
|
+
await act(async () => { historyButton?.click(); });
|
|
202
|
+
await settle();
|
|
203
|
+
expect(container.querySelector('[role="dialog"]')).toBeTruthy();
|
|
204
|
+
|
|
205
|
+
await act(async () => {
|
|
206
|
+
document.dispatchEvent(new window.KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
|
|
207
|
+
});
|
|
208
|
+
await settle(5);
|
|
209
|
+
expect(container.querySelector('[role="dialog"]')).toBeNull();
|
|
210
|
+
});
|
|
195
211
|
});
|