@nextclaw/ui 0.25.4 → 0.26.1
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/CHANGELOG.md +61 -0
- package/dist/.vite/manifest.json +1158 -1392
- package/dist/assets/{abnfDiagram-VRR7QNED-DX_u5BBX.js → abnfDiagram-VRR7QNED-Dcw10Yt1.js} +1 -1
- package/dist/assets/account-panel-ZM2qzKF4.js +1 -0
- package/dist/assets/{aiden0z-pptx-renderer.es-C-E9e5yB.js → aiden0z-pptx-renderer.es--oNqetPA.js} +1 -1
- package/dist/assets/api-Cjq-o1VN.js +20 -0
- package/dist/assets/app-presenter-provider-C02YPoMr.js +124 -0
- package/dist/assets/appearance-settings-page-B4zouKzg.js +1 -0
- package/dist/assets/{arc-Cxwa624o.js → arc-DBRedCax.js} +1 -1
- package/dist/assets/architecture-TIHT7OUA-CvnC-LeA.js +1 -0
- package/dist/assets/{architectureDiagram-ZJ3FMSHR-D8mCj0H1.js → architectureDiagram-ZJ3FMSHR-Dufhtuv-.js} +1 -1
- package/dist/assets/{blockDiagram-677ZJIJ3-CbGC1IHl.js → blockDiagram-677ZJIJ3-BUk0vtJ7.js} +1 -1
- package/dist/assets/{book-open-xqEj1OLE.js → book-open-AteA89HX.js} +1 -1
- package/dist/assets/{c4Diagram-LMCZKHZV-BQhGC1Vc.js → c4Diagram-LMCZKHZV-CxDcVE9p.js} +1 -1
- package/dist/assets/card-BLXvBstA.js +1 -0
- package/dist/assets/channel-CpMstUPF.js +1 -0
- package/dist/assets/channels-list-page-fj8kMo-T.js +8 -0
- package/dist/assets/chunk-2Q5K7J3B-Djp3VF0s.js +1 -0
- package/dist/assets/{chunk-32BRIVSS-B74ZZwYG.js → chunk-32BRIVSS-DSF3KElA.js} +1 -1
- package/dist/assets/{chunk-52WLFC77-BvmxW_f_.js → chunk-52WLFC77-Costxzr3.js} +1 -1
- package/dist/assets/{chunk-5FCAYU7R-DQvBRnwL.js → chunk-5FCAYU7R-rhqzGGZo.js} +1 -1
- package/dist/assets/{chunk-5HE753X5-CDIH0_y3.js → chunk-5HE753X5-BsEsmIao.js} +1 -1
- package/dist/assets/{chunk-5JV3BV7I-CcevlKd-.js → chunk-5JV3BV7I-Dqw_DCoN.js} +1 -1
- package/dist/assets/{chunk-5TONJI2A-_3dxVdnY.js → chunk-5TONJI2A-Cft82fp8.js} +1 -1
- package/dist/assets/{chunk-5VM5RSS4-pGO5vvo-.js → chunk-5VM5RSS4-DqNHn9Dl.js} +1 -1
- package/dist/assets/{chunk-7BUUIJ7U-DEKF5uAN.js → chunk-7BUUIJ7U-A5SBEMYY.js} +1 -1
- package/dist/assets/{chunk-BIQX33UG-CjBFgq2r.js → chunk-BIQX33UG-1Ng3mTrH.js} +1 -1
- package/dist/assets/{chunk-C7G6YPKG-e_K9OGTz.js → chunk-C7G6YPKG-DRJEy8ZI.js} +1 -1
- package/dist/assets/{chunk-CQNSW5MT-C2IiHyHz.js → chunk-CQNSW5MT-Bydv_J3J.js} +1 -1
- package/dist/assets/{chunk-CYSBUYHQ-DCC6KmGp.js → chunk-CYSBUYHQ-HkMIg12u.js} +1 -1
- package/dist/assets/{chunk-EMLP6XTP-BYGgekQ0.js → chunk-EMLP6XTP-C5ndDvm3.js} +1 -1
- package/dist/assets/{chunk-EX3LRPZG-FGcwuVsA.js → chunk-EX3LRPZG-DzeloZRo.js} +1 -1
- package/dist/assets/{chunk-FWX5IMBZ-CV3Ih_Os.js → chunk-FWX5IMBZ-n_2_CLTQ.js} +2 -2
- package/dist/assets/{chunk-HOUHSVGY-CXpq_hfV.js → chunk-HOUHSVGY-kx_slvu3.js} +1 -1
- package/dist/assets/{chunk-ICXQ74PX-CZIpjupq.js → chunk-ICXQ74PX-sQLMURqL.js} +1 -1
- package/dist/assets/{chunk-JG7HCLWE-CdgwBpW7.js → chunk-JG7HCLWE-CMUn5Elc.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-BPjAZpOQ.js → chunk-JWPE2WC7-Cra3s-Uk.js} +1 -1
- package/dist/assets/{chunk-MOJQB5TN-DbJDm8to.js → chunk-MOJQB5TN-umcrg5Bi.js} +1 -1
- package/dist/assets/{chunk-MOZMSUNE-BUa1fqKn.js → chunk-MOZMSUNE-BnljD1ig.js} +1 -1
- package/dist/assets/{chunk-OGEWGWER-CtnzLgRu.js → chunk-OGEWGWER-BXx5pQjU.js} +1 -1
- package/dist/assets/{chunk-OSBZ3O6U-fUgdpTUM.js → chunk-OSBZ3O6U-D-1qfdWu.js} +1 -1
- package/dist/assets/{chunk-PUDLZKDR-CtDWZT9-.js → chunk-PUDLZKDR-DLzX78LC.js} +1 -1
- package/dist/assets/{chunk-Q4XR5HBZ-BxnK2qxr.js → chunk-Q4XR5HBZ-DTK-rtW6.js} +1 -1
- package/dist/assets/{chunk-QBLGF6JB-CH4UKoCF.js → chunk-QBLGF6JB-CsFeIGfr.js} +1 -1
- package/dist/assets/{chunk-R7FJI6CG-BxwFoF1v.js → chunk-R7FJI6CG-4xNYUeng.js} +1 -1
- package/dist/assets/{chunk-RYQCIY6F-DpHAmq7O.js → chunk-RYQCIY6F-DJiHiTE5.js} +1 -1
- package/dist/assets/{chunk-U6XO7XAA-BjH2VUHU.js → chunk-U6XO7XAA-BVYkauHz.js} +1 -1
- package/dist/assets/{chunk-V7JOEXUC-DKJZ3HGj.js → chunk-V7JOEXUC-BsazE8cS.js} +1 -1
- package/dist/assets/chunk-VAUOI2AC-BrbiIC1Q.js +1 -0
- package/dist/assets/{chunk-VR4S4FIN-Cf-o2GtI.js → chunk-VR4S4FIN-7RoZQffO.js} +1 -1
- package/dist/assets/{chunk-WYO6CB5R-zeNXGm20.js → chunk-WYO6CB5R-DEuS6N1R.js} +3 -3
- package/dist/assets/chunk-XXDRQBXY-Cx9N40wF.js +1 -0
- package/dist/assets/{chunk-YOTPTUD7-Ck87Kqxe.js → chunk-YOTPTUD7-9KBrosZL.js} +1 -1
- package/dist/assets/{chunk-ZGVPDNZ5-BbfK6Bfd.js → chunk-ZGVPDNZ5-IYgN9f5A.js} +1 -1
- package/dist/assets/{chunk-ZIRB5QZD-BDpzh4Yl.js → chunk-ZIRB5QZD-BUo0-zcp.js} +1 -1
- package/dist/assets/{circle-dashed-CU3yApvP.js → circle-dashed-LSYZTzM7.js} +1 -1
- package/dist/assets/classDiagram-OUVF2IWQ-DFN1v3PQ.js +1 -0
- package/dist/assets/classDiagram-v2-EOCWNBFH-DRvglADa.js +1 -0
- package/dist/assets/client-DudCRJw4.js +1 -0
- package/dist/assets/config-split-page-G7Kt2BnV.js +1 -0
- package/dist/assets/confirm-dialog-DShT64F6.js +1 -0
- package/dist/assets/context-menu-rd7b_kVD.js +1 -0
- package/dist/assets/{cose-bilkent-JH36ORCC-CQfMxKCT.js → cose-bilkent-JH36ORCC-DhqbC1fR.js} +1 -1
- package/dist/assets/createLucideIcon-D7hvIHV-.js +1 -0
- package/dist/assets/cynefin-VYW2F7L2-DXUGnpJH.js +1 -0
- package/dist/assets/{cynefinDiagram-TSTJHNR4-CxFTiC-p.js → cynefinDiagram-TSTJHNR4-C-TBRi5V.js} +1 -1
- package/dist/assets/{dagre-CaBNMcB1.js → dagre-CrgsRasE.js} +1 -1
- package/dist/assets/{dagre-VKFMJZFB-S_7Hc7bI.js → dagre-VKFMJZFB-BmafJymp.js} +1 -1
- package/dist/assets/desktop-capabilities-page-CzqzFZUY.js +1 -0
- package/dist/assets/desktop-update-config-CgeQ0Ffo.js +1 -0
- package/dist/assets/{diagram-FQU43EPY-C7zENvFb.js → diagram-FQU43EPY-BoOMwa6D.js} +1 -1
- package/dist/assets/{diagram-G47NLZAW-DqYTCqZA.js → diagram-G47NLZAW-Le7N6Uym.js} +1 -1
- package/dist/assets/{diagram-NH7WQ7WH-BfSJtXRc.js → diagram-NH7WQ7WH-Fbpj3-MO.js} +1 -1
- package/dist/assets/{diagram-OA4YK3LP-CFO-j67H.js → diagram-OA4YK3LP-D3QuGGuu.js} +1 -1
- package/dist/assets/{diagram-WEI45ONY-DBQDbTaJ.js → diagram-WEI45ONY-Cxu1uiN6.js} +1 -1
- package/dist/assets/dialog-C7glmAQJ.js +5 -0
- package/dist/assets/doc-browser-context-BlhBAOLH.js +1 -0
- package/dist/assets/doc-browser-dBiR9Qi0.js +1 -0
- package/dist/assets/{docx-preview-B4-aDfvO.js → docx-preview-CkU2psnd.js} +1 -1
- package/dist/assets/download-BYgECE0n.js +1 -0
- package/dist/assets/{ebnfDiagram-CCIWWBDH-CfDNIXFN.js → ebnfDiagram-CCIWWBDH-CCAjuQM6.js} +1 -1
- package/dist/assets/{erDiagram-Q63AITRT-D95rFXMM.js → erDiagram-Q63AITRT-BuzUAq-d.js} +1 -1
- package/dist/assets/es2015-CsjAAQ6X.js +41 -0
- package/dist/assets/eventmodeling-45OFAUF4-ZBfVS3ZC.js +1 -0
- package/dist/assets/extensions-qYL-NpL3.js +1 -0
- package/dist/assets/{eye-C84inPcV.js → eye-BBuTzJ53.js} +1 -1
- package/dist/assets/flowDiagram-23GEKE2U-CqdsKk6x.js +1 -0
- package/dist/assets/form-actions-CLGWO52v.js +1 -0
- package/dist/assets/{ganttDiagram-NO4QXBWP-Bawg0P0r.js → ganttDiagram-NO4QXBWP-cJmWVY8F.js} +1 -1
- package/dist/assets/gitGraph-TEB2WS4Q-fHYFd9Es.js +1 -0
- package/dist/assets/{gitGraphDiagram-IHSO6WYX-BbKh9nbL.js → gitGraphDiagram-IHSO6WYX-F58o-vtP.js} +1 -1
- package/dist/assets/{i18n-20rSH40D.js → i18n-qBGEbcW6.js} +2 -2
- package/dist/assets/info-DKCQHKI2-CSaOL_bb.js +1 -0
- package/dist/assets/{infoDiagram-FWYZ7A6U-DPffZXYh.js → infoDiagram-FWYZ7A6U-Gt59b83C.js} +1 -1
- package/dist/assets/{ishikawaDiagram-FXEZZL3T-CBMsLwZ2.js → ishikawaDiagram-FXEZZL3T-1u4IAj1I.js} +1 -1
- package/dist/assets/{journeyDiagram-5HDEW3XC-Mz5U4OzU.js → journeyDiagram-5HDEW3XC-CCQsfV-5.js} +1 -1
- package/dist/assets/{kanban-definition-HUTT4EX6-FXZq2k19.js → kanban-definition-HUTT4EX6-vlB6O_Zn.js} +1 -1
- package/dist/assets/katex-B4FQSo9k.js +1 -0
- package/dist/assets/keyboard-shortcuts-settings-page-B-wK_6zG.js +1 -0
- package/dist/assets/{line-BZwCgT9K.js → line-D_bHubTL.js} +1 -1
- package/dist/assets/{linear-CTe9mKUw.js → linear-ChlwuS5y.js} +1 -1
- package/dist/assets/loader-circle-BA7EMkih.js +1 -0
- package/dist/assets/login-page-Cd84lpVV.js +1 -0
- package/dist/assets/login-page-VdMyNkFf.js +1 -0
- package/dist/assets/main-CR0SrTBf.js +2 -0
- package/dist/assets/main-DXH6EdXI.css +1 -0
- package/dist/assets/main-i18n-catalog.config-Btp_OowF.js +1 -0
- package/dist/assets/{map-Ci48ZwAp.js → map-oGHTsIu8.js} +1 -1
- package/dist/assets/mcp-marketplace-page-jacRwiI-.js +1 -0
- package/dist/assets/{mermaid-parser.core-CzPD3U_z.js → mermaid-parser.core-CuRe1ZG4.js} +2 -2
- package/dist/assets/{mermaid.core-geIMNPbV.js → mermaid.core-u4YCFKRf.js} +3 -3
- package/dist/assets/{mindmap-definition-LN4V7U3C-xqlKxsr_.js → mindmap-definition-LN4V7U3C-DeJAQYTu.js} +1 -1
- package/dist/assets/model-config-page-D0DQlSDa.js +1 -0
- package/dist/assets/navigation-history-CzErJuPG.js +1 -0
- package/dist/assets/navigation-link-32iM1-e6.js +3 -0
- package/dist/assets/{ordinal-MxnX8yhv.js → ordinal-C6JFfkKN.js} +1 -1
- package/dist/assets/packet-7NZHBO7P-D-YFTczs.js +1 -0
- package/dist/assets/panel-app-CC0bVSu4.js +1 -0
- package/dist/assets/panel-app-i18n-catalog.config-LUSBp5Ce.js +1 -0
- package/dist/assets/panelStandalone-C9EKaApN.js +2 -0
- package/dist/assets/{pegDiagram-2B236MQR-D50MFTN1.js → pegDiagram-2B236MQR-nVMkxShH.js} +1 -1
- package/dist/assets/pie-RZYD4A2V-VEnYu9s5.js +1 -0
- package/dist/assets/{pieDiagram-ENE6RG2P-CpA13oiC.js → pieDiagram-ENE6RG2P-8aUH44QZ.js} +1 -1
- package/dist/assets/privacy-settings-page-Bxxx12OO.js +1 -0
- package/dist/assets/projects-D56yAPNT.js +1 -0
- package/dist/assets/provider-models-C3frdXeW.js +1 -0
- package/dist/assets/provider-scoped-model-input-CYetrPYZ.js +1 -0
- package/dist/assets/providers-config-page-DESB1h8g.js +1 -0
- package/dist/assets/{puzzle-D6gulz7u.js → puzzle-CWHfFyYN.js} +1 -1
- package/dist/assets/pwa-CiGUjpcd.js +1 -0
- package/dist/assets/{quadrantDiagram-ABIIQ3AL-CYCgaj4l.js → quadrantDiagram-ABIIQ3AL-EY8hpFv8.js} +1 -1
- package/dist/assets/radar-I7S5WNFK-BFNIekC1.js +1 -0
- package/dist/assets/railroad-3IZDKUUU-lVqJ3Hak.js +1 -0
- package/dist/assets/railroad-abnf-AHOZXSZD-DYaefdFC.js +1 -0
- package/dist/assets/railroad-ebnf-EBAXGLYW-CTAk6lVq.js +1 -0
- package/dist/assets/railroad-peg-LSFZ7HO6-Cob294tg.js +1 -0
- package/dist/assets/{railroadDiagram-RFXS5EU6-4LKDGlXN.js → railroadDiagram-RFXS5EU6-CNhcIeji.js} +1 -1
- package/dist/assets/{refresh-cw-h9Xq3LY3.js → refresh-cw-y3L6PyLt.js} +1 -1
- package/dist/assets/remote-DiGFV8nP.js +1 -0
- package/dist/assets/{requirementDiagram-TGXJPOKE-CxNOU0JH.js → requirementDiagram-TGXJPOKE-D8Dcs-Rt.js} +1 -1
- package/dist/assets/{rotate-cw-B6xm41Wn.js → rotate-cw-CNE9qSHi.js} +1 -1
- package/dist/assets/runtime-config-page-5o98T-TD.js +1 -0
- package/dist/assets/{sankeyDiagram-HTMAVEWB-DbCBDe2S.js → sankeyDiagram-HTMAVEWB-HTrb6aa-.js} +1 -1
- package/dist/assets/{save-fff_WpY2.js → save-B0p5a0ET.js} +1 -1
- package/dist/assets/search-config-page-CpGcnIzi.js +1 -0
- package/dist/assets/secrets-config-page-C4VTiW3r.js +3 -0
- package/dist/assets/security-config-C5-RQVpS.js +1 -0
- package/dist/assets/select-CctTN205.js +1 -0
- package/dist/assets/{sequenceDiagram-DBY2YBRQ-DA6W2BS_.js → sequenceDiagram-DBY2YBRQ-6f_4X16Y.js} +1 -1
- package/dist/assets/service-apps-panel-CKE5HKNY.js +1 -0
- package/dist/assets/{settings-2-CE3ELQyk.js → settings-2-EPflrNk6.js} +1 -1
- package/dist/assets/{sizeCapture-X5ZJPWSS-T_q_d_VW.js → sizeCapture-X5ZJPWSS-Ck9rsuwL.js} +1 -1
- package/dist/assets/{src-CYpUlx-4.js → src-C8AUg09O.js} +1 -1
- package/dist/assets/{stateDiagram-2N3HPSRC-mi8z2G0a.js → stateDiagram-2N3HPSRC-Cm33MLHu.js} +1 -1
- package/dist/assets/stateDiagram-v2-6OUMAXLB-BrNv-raG.js +1 -0
- package/dist/assets/status-dot-CensgJZC.js +1 -0
- package/dist/assets/{swimlanes-5IMT3BWC-DkBEhWE4.js → swimlanes-5IMT3BWC-B107vmvM.js} +2 -2
- package/dist/assets/swimlanesDiagram-G3AALYLV-ntcxaPXp.js +8 -0
- package/dist/assets/tag-chip-Bjzb4-qW.js +1 -0
- package/dist/assets/theme-provider-hlle7Skk.js +1 -0
- package/dist/assets/{timeline-definition-FHXFAJF6-BoFmqBw1.js → timeline-definition-FHXFAJF6-CJEoAj33.js} +1 -1
- package/dist/assets/trash-2-C5KH5Rw9.js +1 -0
- package/dist/assets/treeView-QDETBFTQ-DbFmr-gw.js +1 -0
- package/dist/assets/treemap-6X3UGDF4-C8aY96pi.js +1 -0
- package/dist/assets/use-config-CPl_F79t.js +1 -0
- package/dist/assets/use-desktop-capabilities-CEg9-DrQ.js +1 -0
- package/dist/assets/use-viewport-layout-CPZUmTPi.js +1 -0
- package/dist/assets/{vennDiagram-L72KCM5P-BlZ3Or5U.js → vennDiagram-L72KCM5P-DzsUHk5I.js} +1 -1
- package/dist/assets/wardley-OPB4EBWU-D8d6DbbJ.js +1 -0
- package/dist/assets/{wardleyDiagram-EHGQE667-yDfr33i3.js → wardleyDiagram-EHGQE667-1NfFs5ua.js} +1 -1
- package/dist/assets/x--xxUvHKW.js +1 -0
- package/dist/assets/{xychartDiagram-FW5EYKEG-mIXwIGAQ.js → xychartDiagram-FW5EYKEG-Ci8AI3Qo.js} +1 -1
- package/dist/index.html +38 -54
- package/dist/panel-standalone.html +11 -15
- package/package.json +8 -8
- package/src/app/components/layout/__tests__/app-layout.test.tsx +7 -0
- package/src/app/components/layout/__tests__/sidebar.layout.test.tsx +36 -16
- package/src/app/components/layout/app-layout.tsx +18 -46
- package/src/app/components/layout/sidebar-items.tsx +27 -18
- package/src/app/components/layout/sidebar-rail.styles.ts +11 -2
- package/src/app/components/layout/sidebar.tsx +3 -2
- package/src/app/configs/__tests__/app-navigation.config.test.ts +4 -0
- package/src/app/configs/app-navigation.config.ts +41 -86
- package/src/app/configs/page-resource-renderers.config.ts +13 -0
- package/src/app/index.tsx +4 -0
- package/src/app/presenters/app.presenter.ts +13 -2
- package/src/features/agents/components/__tests__/agents-page.test.tsx +4 -0
- package/src/features/agents/components/agent-details-dialog.tsx +5 -2
- package/src/features/agents/components/agents-page.tsx +9 -4
- package/src/features/apps/components/app-package-card.tsx +2 -2
- package/src/features/chat/components/conversation/chat-conversation-content.tsx +32 -19
- package/src/features/chat/components/conversation/chat-conversation-header-section.tsx +1 -0
- package/src/features/chat/components/conversation/chat-conversation-header.tsx +1 -1
- package/src/features/chat/components/conversation/chat-conversation-panel.tsx +2 -2
- package/src/features/chat/components/conversation/chat-conversation-workspace-section.tsx +1 -0
- package/src/features/chat/components/layout/__tests__/chat-page-shell.test.tsx +5 -6
- package/src/features/chat/components/layout/__tests__/chat-sidebar-toolbar.test.tsx +14 -12
- package/src/features/chat/components/layout/chat-page-shell.tsx +31 -64
- package/src/features/chat/components/layout/chat-sidebar-desktop-layout.tsx +8 -5
- package/src/features/chat/components/layout/chat-sidebar-toolbar.tsx +64 -256
- package/src/features/chat/components/layout/chat-sidebar.tsx +8 -30
- package/src/features/chat/components/providers/chat-runtime.provider.tsx +62 -0
- package/src/features/chat/features/conversation/components/__tests__/floating-session-conversation.test.tsx +70 -0
- package/src/features/chat/features/conversation/components/chat-voice-input-panel.tsx +3 -2
- package/src/features/chat/features/conversation/components/floating-session-conversation.tsx +27 -0
- package/src/features/chat/features/conversation/components/session-conversation-area.tsx +1 -0
- package/src/features/chat/features/conversation/components/session-conversation-panel-tab.tsx +25 -0
- package/src/features/chat/features/conversation/hooks/__tests__/use-chat-voice-input.test.tsx +4 -0
- package/src/features/chat/features/conversation/hooks/use-chat-composer-reference-intent.ts +2 -1
- package/src/features/chat/features/message/components/__tests__/chat-inline-panel-app-card.test.tsx +2 -1
- package/src/features/chat/features/message/components/__tests__/chat-message-assistant-header.container.test.tsx +3 -0
- package/src/features/chat/features/message/components/__tests__/chat-message-list-skill-preview.container.test.tsx +3 -0
- package/src/features/chat/features/message/components/__tests__/chat-message-list.container.test.tsx +35 -47
- package/src/features/chat/features/message/components/chat-message-list.container.tsx +6 -10
- package/src/features/chat/features/message/hooks/use-chat-inline-token-actions.ts +7 -3
- package/src/features/chat/features/message/utils/__tests__/chat-message-process-summary.utils.test.ts +52 -6
- package/src/features/chat/features/message/utils/chat-message-process-summary.utils.ts +22 -37
- package/src/features/chat/features/session/components/__tests__/chat-sidebar-project-groups.test.tsx +1 -1
- package/src/features/chat/features/session/components/__tests__/chat-sidebar-session-item.test.tsx +21 -0
- package/src/features/chat/features/session/components/chat-mobile-session-row.tsx +61 -0
- package/src/features/chat/features/session/components/chat-sidebar-project-groups.tsx +4 -37
- package/src/features/chat/features/session/components/chat-sidebar-session-entry.tsx +2 -0
- package/src/features/chat/features/session/components/chat-sidebar-session-item.tsx +18 -7
- package/src/features/chat/features/session/components/chat-sidebar-session-list.tsx +5 -3
- package/src/features/chat/features/session/components/session-header/__tests__/chat-session-header-actions.test.tsx +10 -2
- package/src/features/chat/features/session/components/session-header/chat-session-header-actions.tsx +20 -17
- package/src/features/chat/features/session/components/session-header/chat-session-header-menu-item.tsx +4 -4
- package/src/features/chat/features/session/components/session-header/chat-session-more-actions-menu.tsx +18 -5
- package/src/features/chat/features/session/utils/chat-session-route.utils.ts +12 -0
- package/src/features/chat/features/workspace/components/__tests__/chat-session-child-sessions.test.tsx +28 -0
- package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-file-preview.test.tsx +9 -0
- package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-panel-content.test.tsx +6 -2
- package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-panel.test.tsx +49 -12
- package/src/features/chat/features/workspace/components/chat-session-workspace-file-preview.tsx +13 -6
- package/src/features/chat/features/workspace/components/chat-session-workspace-panel-content.tsx +6 -0
- package/src/features/chat/features/workspace/components/chat-session-workspace-panel-nav.tsx +21 -36
- package/src/features/chat/features/workspace/components/chat-session-workspace-panel.tsx +40 -31
- package/src/features/chat/features/workspace/components/child-sessions/chat-session-child-sessions.tsx +6 -1
- package/src/features/chat/features/workspace/components/project-files/workspace-directory-tree.tsx +2 -2
- package/src/features/chat/features/workspace/components/project-files/workspace-project-files-toolbar.tsx +2 -2
- package/src/features/chat/features/workspace/utils/__tests__/chat-workspace-panel-view-model.utils.test.ts +27 -0
- package/src/features/chat/features/workspace/utils/__tests__/workspace-file-panel-route.utils.test.ts +94 -0
- package/src/features/chat/features/workspace/utils/chat-workspace-file-tab-persistence.utils.ts +2 -0
- package/src/features/chat/features/workspace/utils/chat-workspace-file-tab.utils.ts +15 -0
- package/src/features/chat/features/workspace/utils/chat-workspace-panel-view-model.utils.ts +11 -0
- package/src/features/chat/features/workspace/utils/workspace-file-panel-route.utils.ts +147 -0
- package/src/features/chat/index.ts +20 -4
- package/src/features/chat/managers/__tests__/chat-completion-notification.manager.test.ts +8 -0
- package/src/features/chat/managers/__tests__/chat-thread-workspace.manager.test.ts +7 -2
- package/src/features/chat/managers/__tests__/session-surface.manager.test.ts +45 -0
- package/src/features/chat/managers/chat-completion-notification.manager.ts +5 -0
- package/src/features/chat/managers/chat-composer-intent.manager.ts +16 -0
- package/src/features/chat/managers/chat-thread.manager.ts +18 -27
- package/src/features/chat/managers/chat-voice-input.manager.ts +5 -3
- package/src/features/chat/managers/session-surface.manager.ts +46 -0
- package/src/features/chat/pages/__tests__/ncp-chat-page.test.tsx +23 -5
- package/src/features/chat/pages/ncp-chat-page.tsx +6 -86
- package/src/features/chat/presenters/chat.presenter.ts +2 -1
- package/src/features/chat/stores/__tests__/chat-thread.store.test.ts +2 -2
- package/src/features/chat/stores/chat-thread.store.ts +7 -1
- package/src/features/chat/stores/floating-session.store.ts +11 -0
- package/src/features/chat/utils/chat-voice-permissions.utils.test.ts +12 -1
- package/src/features/chat/utils/chat-voice-permissions.utils.ts +6 -1
- package/src/features/cron/components/__tests__/cron-config.test.tsx +4 -0
- package/src/features/cron/components/cron-job-detail-dialog.tsx +3 -1
- package/src/features/cron/components/cron-job-row.tsx +14 -8
- package/src/features/inbox/components/inbox-reader-dialog.test.tsx +3 -0
- package/src/features/inbox/components/inbox-reader-dialog.tsx +6 -1
- package/src/features/inbox/pages/inbox-page.test.ts +3 -0
- package/src/features/inbox/pages/inbox-page.tsx +12 -4
- package/src/features/marketplace/components/__tests__/marketplace-page-detail.test.tsx +5 -1
- package/src/features/marketplace/components/__tests__/marketplace-page.test.tsx +3 -0
- package/src/features/marketplace/components/curated-shelves/__tests__/marketplace-curated-scene-route.test.tsx +2 -0
- package/src/features/marketplace/components/marketplace-list-card.tsx +4 -0
- package/src/features/marketplace/components/mcp/__tests__/mcp-marketplace-page.test.tsx +2 -0
- package/src/features/marketplace/components/mcp/mcp-marketplace-card.tsx +3 -0
- package/src/features/notifications/components/__tests__/app-notification-toast.test.tsx +19 -0
- package/src/features/notifications/components/app-notification-toast.tsx +33 -15
- package/src/features/notifications/managers/app-notification.manager.ts +2 -0
- package/src/features/panel-apps/components/__tests__/panel-app-list-item.test.tsx +13 -4
- package/src/features/panel-apps/components/__tests__/panel-app-toolbar.test.tsx +13 -5
- package/src/features/panel-apps/components/panel-app-list-item.tsx +1 -1
- package/src/features/panel-apps/components/panel-app-main-sidebar-menu-item.tsx +5 -38
- package/src/features/panel-apps/components/panel-app-toolbar.tsx +7 -7
- package/src/features/panel-apps/index.ts +1 -1
- package/src/features/projects/components/project-materials.test.tsx +2 -0
- package/src/features/projects/components/project-skills.tsx +7 -3
- package/src/features/projects/components/work/project-work-item-drawer.test.tsx +2 -0
- package/src/features/projects/components/work/project-work-item-drawer.tsx +3 -1
- package/src/features/right-panel-resources/components/__tests__/page-resource-icon.test.tsx +67 -0
- package/src/features/right-panel-resources/components/__tests__/page-resource-sidebar-nav.test.tsx +183 -0
- package/src/features/right-panel-resources/components/__tests__/system-object-resource.test.tsx +42 -0
- package/src/features/right-panel-resources/components/page-resource-actions-menu.tsx +53 -0
- package/src/features/right-panel-resources/components/page-resource-icon.tsx +245 -0
- package/src/features/right-panel-resources/components/page-resource-sidebar-nav.tsx +119 -0
- package/src/features/right-panel-resources/components/system-object-resource.tsx +100 -0
- package/src/features/right-panel-resources/components/workspace-file-resource.tsx +56 -0
- package/src/features/right-panel-resources/configs/right-panel-resource-routes.config.ts +46 -3
- package/src/features/right-panel-resources/hooks/use-page-resource-actions.ts +190 -0
- package/src/features/right-panel-resources/index.ts +21 -8
- package/src/features/right-panel-resources/managers/__tests__/page-resource.manager.test.ts +149 -0
- package/src/features/right-panel-resources/managers/page-resource.manager.ts +342 -0
- package/src/features/right-panel-resources/pages/resource-page.tsx +114 -0
- package/src/features/right-panel-resources/stores/page-navigation.store.ts +55 -0
- package/src/features/right-panel-resources/types/page-resource.types.ts +11 -0
- package/src/features/right-panel-resources/utils/__tests__/right-panel-resource-route-resolver.utils.test.ts +10 -0
- package/src/features/right-panel-resources/utils/page-resource-identity.utils.ts +61 -0
- package/src/features/right-panel-resources/utils/right-panel-resource-uri.utils.ts +2 -6
- package/src/features/service-apps/components/__tests__/service-apps-panel.test.tsx +2 -0
- package/src/features/service-apps/components/service-app-list-item.tsx +6 -1
- package/src/features/settings/pages/providers-config-page.tsx +2 -2
- package/src/features/side-dock/components/__tests__/side-dock.test.tsx +9 -8
- package/src/features/side-dock/components/side-dock.tsx +14 -47
- package/src/features/side-dock/managers/side-dock.manager.ts +2 -0
- package/src/features/system-status/components/__tests__/desktop-update-config.test.tsx +40 -0
- package/src/features/system-status/components/desktop-update-config.tsx +19 -1
- package/src/platforms/desktop/components/__tests__/desktop-app-shell.test.tsx +2 -0
- package/src/platforms/desktop/components/desktop-app-shell.tsx +3 -14
- package/src/platforms/mobile/components/__tests__/mobile-app-shell.test.tsx +1 -0
- package/src/platforms/mobile/components/__tests__/mobile-bottom-nav.test.tsx +3 -2
- package/src/platforms/mobile/components/mobile-app-shell.tsx +3 -4
- package/src/platforms/mobile/components/mobile-bottom-nav.tsx +7 -7
- package/src/platforms/mobile/components/mobile-settings-shell.tsx +8 -3
- package/src/platforms/mobile/components/mobile-topbar.tsx +4 -4
- package/src/shared/components/doc-browser/__tests__/doc-browser-context.test.tsx +4 -3
- package/src/shared/components/doc-browser/__tests__/doc-browser-tab-strip.test.tsx +0 -5
- package/src/shared/components/doc-browser/__tests__/doc-browser.test.tsx +57 -73
- package/src/shared/components/doc-browser/__tests__/resource-link-interceptor.test.tsx +104 -0
- package/src/shared/components/doc-browser/doc-browser-context.tsx +5 -1
- package/src/shared/components/doc-browser/doc-browser-panel-parts.tsx +1 -1
- package/src/shared/components/doc-browser/doc-browser-tab-strip.tsx +6 -118
- package/src/shared/components/doc-browser/doc-browser.tsx +30 -194
- package/src/shared/components/doc-browser/hooks/use-doc-browser-scroll-restoration.ts +1 -1
- package/src/shared/components/doc-browser/managers/doc-browser.manager.ts +11 -1
- package/src/shared/components/doc-browser/stores/doc-browser.store.ts +3 -7
- package/src/shared/components/doc-browser/types/doc-browser.types.ts +8 -1
- package/src/shared/components/doc-browser/use-doc-link-interceptor.ts +30 -32
- package/src/shared/components/doc-browser/utils/doc-browser-state.utils.ts +6 -6
- package/src/shared/components/ui/context-menu/__tests__/context-menu.test.tsx +105 -1
- package/src/shared/components/ui/context-menu/context-menu-items.tsx +173 -0
- package/src/shared/components/ui/context-menu/context-menu.tsx +99 -112
- package/src/shared/components/ui/dialog.tsx +4 -0
- package/src/shared/components/ui/overlays/sheet.tsx +4 -0
- package/src/shared/components/ui/popover.tsx +10 -4
- package/src/shared/components/workbench/__tests__/workbench-surface.manager.test.ts +70 -0
- package/src/shared/components/workbench/__tests__/workbench-surface.test.tsx +111 -0
- package/src/shared/components/workbench/managers/workbench-surface.manager.ts +120 -0
- package/src/shared/components/workbench/stores/workbench-surface.store.ts +83 -0
- package/src/shared/components/workbench/types/workbench-surface.types.ts +32 -0
- package/src/shared/components/workbench/utils/workbench-surface-geometry.utils.ts +46 -0
- package/src/shared/components/workbench/workbench-surface-toolbar.tsx +102 -0
- package/src/shared/components/workbench/workbench-surface.tsx +401 -0
- package/src/shared/hooks/use-panel-app-scroll-restoration.test.tsx +19 -0
- package/src/shared/hooks/use-panel-app-scroll-restoration.ts +8 -6
- package/src/shared/hooks/use-scroll-restoration.test.tsx +39 -2
- package/src/shared/hooks/use-scroll-restoration.ts +33 -33
- package/src/shared/lib/api/marketplace.types.ts +1 -0
- package/src/shared/lib/i18n/locales/en-US/chat.json +46 -1
- package/src/shared/lib/i18n/locales/en-US/core.json +3 -1
- package/src/shared/lib/i18n/locales/en-US/desktop-update.json +1 -0
- package/src/shared/lib/i18n/locales/en-US/doc-browser.json +1 -1
- package/src/shared/lib/i18n/locales/zh-CN/chat.json +46 -1
- package/src/shared/lib/i18n/locales/zh-CN/core.json +11 -9
- package/src/shared/lib/i18n/locales/zh-CN/desktop-update.json +1 -0
- package/src/shared/lib/navigation-history/index.ts +1 -0
- package/src/shared/lib/navigation-history/navigation-history.utils.ts +1 -1
- package/src/shared/lib/navigation-history/scroll-restoration.manager.test.ts +11 -0
- package/src/shared/lib/navigation-history/scroll-restoration.manager.ts +36 -7
- package/src/shared/lib/navigation-history/view-memory-storage.store.test.ts +37 -0
- package/src/shared/lib/navigation-history/view-memory-storage.store.ts +21 -0
- package/src/shared/lib/transport/__tests__/browser-realtime-recovery.service.test.ts +27 -2
- package/src/shared/lib/transport/__tests__/local-transport.service.test.ts +20 -0
- package/src/shared/lib/transport/__tests__/remote.transport.test.ts +26 -0
- package/src/shared/lib/transport/browser-realtime-recovery.service.ts +32 -5
- package/src/shared/lib/transport/local-transport.service.ts +1 -6
- package/src/shared/lib/transport/remote-transport.service.ts +22 -1
- package/src/shared/lib/ui-document-title/index.ts +1 -0
- package/dist/assets/account-panel-BW4GbzQd.js +0 -1
- package/dist/assets/api-DqzQ-_3w.js +0 -13
- package/dist/assets/app-data-C54N2p8b.js +0 -1
- package/dist/assets/app-presenter-provider-CBZ_-ewx.js +0 -115
- package/dist/assets/appearance-settings-page-C-uZ2Wkf.js +0 -1
- package/dist/assets/architecture-TIHT7OUA-DEt0Abz9.js +0 -1
- package/dist/assets/boxes-D6uPnkGo.js +0 -1
- package/dist/assets/card-BhfAZv5L.js +0 -1
- package/dist/assets/channel-CxQkbwRD.js +0 -1
- package/dist/assets/channels-list-page-Bv7CVSqV.js +0 -8
- package/dist/assets/chevron-down-BL-yMYcX.js +0 -1
- package/dist/assets/chunk-2Q5K7J3B-ClVhziok.js +0 -1
- package/dist/assets/chunk-VAUOI2AC-DZQxkIsv.js +0 -1
- package/dist/assets/chunk-XXDRQBXY-BkExtw5C.js +0 -1
- package/dist/assets/circle-alert-lSa3LRvS.js +0 -1
- package/dist/assets/classDiagram-OUVF2IWQ-Bd6apBb-.js +0 -1
- package/dist/assets/classDiagram-v2-EOCWNBFH-CYxUZGCI.js +0 -1
- package/dist/assets/client-BtGBwLTs.js +0 -1
- package/dist/assets/config-split-page-DqAXKLmG.js +0 -1
- package/dist/assets/confirm-dialog-BTKCWMn6.js +0 -1
- package/dist/assets/createLucideIcon-BNKf0_kc.js +0 -1
- package/dist/assets/cynefin-VYW2F7L2-CV0bFLH9.js +0 -1
- package/dist/assets/desktop-capabilities-page-zLzCSB7A.js +0 -1
- package/dist/assets/desktop-update-config-PmofcFf6.js +0 -1
- package/dist/assets/dialog-Xe73hpQz.js +0 -5
- package/dist/assets/dist-BiIcnf9j.js +0 -1
- package/dist/assets/dist-C5I0v8Qn.js +0 -1
- package/dist/assets/dist-czPa8xFO.js +0 -1
- package/dist/assets/doc-browser-BJrre2S_.js +0 -1
- package/dist/assets/doc-browser-BPqA-zQx.js +0 -1
- package/dist/assets/doc-browser-context-TILuCY5c.js +0 -1
- package/dist/assets/ellipsis-C5YXdOUx.js +0 -1
- package/dist/assets/es2015-cuwbYI-l.js +0 -41
- package/dist/assets/eventmodeling-45OFAUF4-BzkLWWdP.js +0 -1
- package/dist/assets/extensions-CVUFK6Jj.js +0 -1
- package/dist/assets/flowDiagram-23GEKE2U-ukkCsB0j.js +0 -1
- package/dist/assets/form-actions-BRESe-m_.js +0 -1
- package/dist/assets/gitGraph-TEB2WS4Q-BYFhT0Q5.js +0 -1
- package/dist/assets/i18n-provider-BPRq6S7O.js +0 -1
- package/dist/assets/info-DKCQHKI2-CTmlJdcH.js +0 -1
- package/dist/assets/katex-DbZC06Q5.js +0 -1
- package/dist/assets/keyboard-shortcuts-settings-page-CScSXYS4.js +0 -1
- package/dist/assets/loader-circle-K1BDdHR5.js +0 -1
- package/dist/assets/login-page-Dlyvp-81.js +0 -1
- package/dist/assets/login-page-f8qQ4xKY.js +0 -1
- package/dist/assets/logo-badge-C-5-zim6.js +0 -1
- package/dist/assets/main-D2dWy8fM.css +0 -1
- package/dist/assets/main-DMNmwcJE.js +0 -2
- package/dist/assets/main-i18n-catalog.config-DZ-5ollN.js +0 -1
- package/dist/assets/mcp-marketplace-page-FfIfEo6w.js +0 -10
- package/dist/assets/mcp-marketplace-page-sH7VptN_.js +0 -1
- package/dist/assets/model-config-page-Bcm6-pCX.js +0 -1
- package/dist/assets/navigation-link-BAQjgx2F.js +0 -3
- package/dist/assets/packet-7NZHBO7P-BbrI0ZlN.js +0 -1
- package/dist/assets/panel-app-B39rJPj8.js +0 -1
- package/dist/assets/panel-app-i18n-catalog.config-p3qAY_Eq.js +0 -1
- package/dist/assets/panelStandalone-By-6dDXS.js +0 -2
- package/dist/assets/pie-RZYD4A2V-B7zE1ZIr.js +0 -1
- package/dist/assets/plus-LA8-jpxP.js +0 -1
- package/dist/assets/popover-NkrFlWHp.js +0 -1
- package/dist/assets/privacy-settings-page-B1sHLAc1.js +0 -1
- package/dist/assets/projects-Voql-cvx.js +0 -1
- package/dist/assets/provider-models-hrHMcHqg.js +0 -1
- package/dist/assets/provider-scoped-model-input-BQsugx1v.js +0 -1
- package/dist/assets/providers-config-page-BDEdHJbw.js +0 -1
- package/dist/assets/pwa-CzqfYjFx.js +0 -1
- package/dist/assets/radar-I7S5WNFK-1X_q11Ed.js +0 -1
- package/dist/assets/railroad-3IZDKUUU-CIXnuFyE.js +0 -1
- package/dist/assets/railroad-abnf-AHOZXSZD-D6ImKl2r.js +0 -1
- package/dist/assets/railroad-ebnf-EBAXGLYW-2j9d3twU.js +0 -1
- package/dist/assets/railroad-peg-LSFZ7HO6-DMVaJGbm.js +0 -1
- package/dist/assets/remote-BekqL5nA.js +0 -1
- package/dist/assets/runtime-config-page-BH9uF4u_.js +0 -1
- package/dist/assets/search-CUe41wjm.js +0 -1
- package/dist/assets/search-config-page-DWKlMHgH.js +0 -1
- package/dist/assets/secrets-config-page-DiQL088Y.js +0 -3
- package/dist/assets/security-config-DmTDKKY4.js +0 -1
- package/dist/assets/select-CG5YWnwe.js +0 -1
- package/dist/assets/service-apps-panel-CEnyYsQp.js +0 -1
- package/dist/assets/skeleton-Drvn83YW.js +0 -1
- package/dist/assets/stateDiagram-v2-6OUMAXLB-OlIMT57r.js +0 -1
- package/dist/assets/swimlanesDiagram-G3AALYLV-sLThrh07.js +0 -8
- package/dist/assets/tabs-BuE0qKMh.js +0 -1
- package/dist/assets/tag-chip-B1AYPOKL.js +0 -1
- package/dist/assets/theme-provider-DzvAi3pe.js +0 -1
- package/dist/assets/tooltip-DYcuWhuP.js +0 -1
- package/dist/assets/trash-2-BPPYt2NV.js +0 -1
- package/dist/assets/treeView-QDETBFTQ-CCFyazDE.js +0 -1
- package/dist/assets/treemap-6X3UGDF4-D6wvq1Hz.js +0 -1
- package/dist/assets/use-config-BEdbtpD4.js +0 -1
- package/dist/assets/use-desktop-capabilities-BkuRd2cY.js +0 -1
- package/dist/assets/use-panel-app-scroll-restoration-ZnicIfo3.js +0 -1
- package/dist/assets/use-viewport-layout-BS18drMT.js +0 -1
- package/dist/assets/utils-CBZPzC_b.js +0 -8
- package/dist/assets/wardley-OPB4EBWU-BRzaRyFf.js +0 -1
- package/dist/assets/x-DdXOqLnX.js +0 -1
- package/src/features/panel-apps/components/__tests__/panel-app-main-sidebar-nav.test.tsx +0 -219
- package/src/features/panel-apps/components/panel-app-main-sidebar-nav.tsx +0 -258
- package/src/shared/components/doc-browser/utils/doc-browser-floating-panel.utils.ts +0 -83
- /package/dist/assets/{array-D0DyKZdT.js → array-BV9OtnO8.js} +0 -0
- /package/dist/assets/{chunk-KEIR6QF5-CuZFOa6q.js → chunk-KEIR6QF5-Cx-8EJ4_.js} +0 -0
- /package/dist/assets/{chunk-Y2CYZVJY-Frut-1TF.js → chunk-Y2CYZVJY-Dy1ufvjf.js} +0 -0
- /package/dist/assets/{config-hints-B_C9DAp5.js → config-hints-DbmiyTKg.js} +0 -0
- /package/dist/assets/{cytoscape.esm-BibuhnZD.js → cytoscape.esm-CSCjuT4Z.js} +0 -0
- /package/dist/assets/{defaultLocale-q7sRUXPc.js → defaultLocale-DWTiNsbT.js} +0 -0
- /package/dist/assets/{dist-DhMddrrH.js → dist-BVCSkfWY.js} +0 -0
- /package/dist/assets/{graphlib-BM63WsW3.js → graphlib-B1yb1Wl8.js} +0 -0
- /package/dist/assets/{host-capabilities-B107nwS3.js → host-capabilities-DuIFVsvM.js} +0 -0
- /package/dist/assets/{init-CRMkf9sL.js → init-BF6GH5oe.js} +0 -0
- /package/dist/assets/{jszip.min-6thm2J_a.js → jszip.min-D12teKzP.js} +0 -0
- /package/dist/assets/{katex-B26hhTOT.js → katex-CsAM73R9.js} +0 -0
- /package/dist/assets/{middleware-0o3JF3tS.js → middleware-B--6mAUM.js} +0 -0
- /package/dist/assets/{path-BFMmafCM.js → path-C56XkznJ.js} +0 -0
- /package/dist/assets/{rough.esm-5Tjchx1D.js → rough.esm-CGfeEbtE.js} +0 -0
- /package/dist/assets/{xlsx-BC8ibjXK.js → xlsx-sds5nUpL.js} +0 -0
|
@@ -7,10 +7,12 @@ import { PanelAppListItem } from '@/features/panel-apps/components/panel-app-lis
|
|
|
7
7
|
|
|
8
8
|
const mainSidebarMutation = vi.hoisted(() => ({
|
|
9
9
|
isPending: false,
|
|
10
|
+
pinned: false,
|
|
10
11
|
mutate: vi.fn(),
|
|
11
12
|
}));
|
|
12
13
|
|
|
13
14
|
vi.mock('@/features/panel-apps/hooks/use-panel-apps', () => ({
|
|
15
|
+
usePanelApps: () => ({ data:{ entries:[{ ...baseEntry, mainSidebar: mainSidebarMutation.pinned }] } }),
|
|
14
16
|
useUpdatePanelAppPreferences: () => mainSidebarMutation,
|
|
15
17
|
}));
|
|
16
18
|
|
|
@@ -37,6 +39,7 @@ describe('PanelAppListItem', () => {
|
|
|
37
39
|
window.localStorage.clear();
|
|
38
40
|
viewportLayoutManager.resetForTests();
|
|
39
41
|
mainSidebarMutation.isPending = false;
|
|
42
|
+
mainSidebarMutation.pinned = false;
|
|
40
43
|
mainSidebarMutation.mutate.mockReset();
|
|
41
44
|
});
|
|
42
45
|
|
|
@@ -95,9 +98,10 @@ describe('PanelAppListItem', () => {
|
|
|
95
98
|
/>,
|
|
96
99
|
);
|
|
97
100
|
|
|
98
|
-
expect(screen.queryByRole('
|
|
101
|
+
expect(screen.queryByRole('menuitem', { name: 'Pin to left sidebar' })).toBeNull();
|
|
99
102
|
await user.click(screen.getByRole('button', { name: 'More panel app actions' }));
|
|
100
|
-
await user.click(screen.getByRole('
|
|
103
|
+
await user.click(screen.getByRole('menuitem', { name: 'Layout and position' }));
|
|
104
|
+
await user.click(screen.getByRole('menuitem', { name: 'Pin to left sidebar' }));
|
|
101
105
|
expect(mainSidebarMutation.mutate).toHaveBeenCalledWith({
|
|
102
106
|
id: 'demo',
|
|
103
107
|
preferences: { mainSidebar: true },
|
|
@@ -106,6 +110,7 @@ describe('PanelAppListItem', () => {
|
|
|
106
110
|
useViewportLayoutStore.getState().isMainSidebarAppGroupCollapsed,
|
|
107
111
|
).toBe(false);
|
|
108
112
|
|
|
113
|
+
mainSidebarMutation.pinned = true;
|
|
109
114
|
rerender(
|
|
110
115
|
<PanelAppListItem
|
|
111
116
|
deletePending={false}
|
|
@@ -116,9 +121,10 @@ describe('PanelAppListItem', () => {
|
|
|
116
121
|
onToggleFavorite={vi.fn()}
|
|
117
122
|
/>,
|
|
118
123
|
);
|
|
119
|
-
expect(screen.queryByRole('
|
|
124
|
+
expect(screen.queryByRole('menuitem', { name: 'Unpin from left sidebar' })).toBeNull();
|
|
120
125
|
await user.click(screen.getByRole('button', { name: 'More panel app actions' }));
|
|
121
|
-
await user.click(screen.getByRole('
|
|
126
|
+
await user.click(screen.getByRole('menuitem', { name: 'Layout and position' }));
|
|
127
|
+
await user.click(screen.getByRole('menuitem', { name: 'Unpin from left sidebar' }));
|
|
122
128
|
expect(mainSidebarMutation.mutate).toHaveBeenLastCalledWith({
|
|
123
129
|
id: 'demo',
|
|
124
130
|
preferences: { mainSidebar: false },
|
|
@@ -143,3 +149,6 @@ describe('PanelAppListItem', () => {
|
|
|
143
149
|
expect(link.getAttribute('href')).toBe('/apps/panel/demo/standalone');
|
|
144
150
|
});
|
|
145
151
|
});
|
|
152
|
+
|
|
153
|
+
vi.mock("react-router-dom", async (importOriginal) => ({ ...(await importOriginal<object>()),useNavigate: () => vi.fn(), useLocation: () => ({ pathname:'/apps',search:'' }) }));
|
|
154
|
+
vi.mock("@/app/components/app-presenter-provider", () => ({ useAppPresenter: () => ({ pageResourceManager:{ open:vi.fn() } }) }));
|
|
@@ -5,11 +5,12 @@ import { PanelAppToolbar } from '@/features/panel-apps/components/panel-app-tool
|
|
|
5
5
|
|
|
6
6
|
const mainSidebarMutation = vi.hoisted(() => ({
|
|
7
7
|
isPending: false,
|
|
8
|
+
pinned: false,
|
|
8
9
|
mutate: vi.fn(),
|
|
9
10
|
}));
|
|
10
11
|
|
|
11
12
|
vi.mock('@/features/panel-apps/hooks/use-panel-apps', () => ({
|
|
12
|
-
usePanelApps:
|
|
13
|
+
usePanelApps: () => ({ data:{ entries:[{ ...entry, mainSidebar: mainSidebarMutation.pinned }] } }),
|
|
13
14
|
useUpdatePanelAppPreferences: () => mainSidebarMutation,
|
|
14
15
|
}));
|
|
15
16
|
|
|
@@ -33,6 +34,7 @@ const entry = {
|
|
|
33
34
|
describe('PanelAppToolbar', () => {
|
|
34
35
|
beforeEach(() => {
|
|
35
36
|
mainSidebarMutation.isPending = false;
|
|
37
|
+
mainSidebarMutation.pinned = false;
|
|
36
38
|
mainSidebarMutation.mutate.mockReset();
|
|
37
39
|
});
|
|
38
40
|
|
|
@@ -49,9 +51,10 @@ describe('PanelAppToolbar', () => {
|
|
|
49
51
|
expect(screen.getByText('墨爪助手')).toBeTruthy();
|
|
50
52
|
expect(screen.queryByRole('button', { name: 'Apps' })).toBeNull();
|
|
51
53
|
|
|
52
|
-
expect(screen.queryByRole('
|
|
54
|
+
expect(screen.queryByRole('menuitem', { name: 'Pin to left sidebar' })).toBeNull();
|
|
53
55
|
await user.click(screen.getByRole('button', { name: 'More panel app actions' }));
|
|
54
|
-
|
|
56
|
+
await user.click(screen.getByRole('menuitem', { name: 'Layout and position' }));
|
|
57
|
+
const addButton = screen.getByRole('menuitem', { name: 'Pin to left sidebar' });
|
|
55
58
|
expect(addButton.getAttribute('aria-pressed')).toBe('false');
|
|
56
59
|
await user.click(addButton);
|
|
57
60
|
|
|
@@ -59,10 +62,11 @@ describe('PanelAppToolbar', () => {
|
|
|
59
62
|
id: 'ink-assistant',
|
|
60
63
|
preferences: { mainSidebar: true },
|
|
61
64
|
});
|
|
62
|
-
expect(screen.queryByRole('
|
|
65
|
+
expect(screen.queryByRole('menuitem', { name: 'Pin to left sidebar' })).toBeNull();
|
|
63
66
|
});
|
|
64
67
|
|
|
65
68
|
it('uses the same menu item to remove an app already in the main sidebar', async () => {
|
|
69
|
+
mainSidebarMutation.pinned = true;
|
|
66
70
|
const user = userEvent.setup();
|
|
67
71
|
render(
|
|
68
72
|
<PanelAppToolbar
|
|
@@ -73,7 +77,8 @@ describe('PanelAppToolbar', () => {
|
|
|
73
77
|
);
|
|
74
78
|
|
|
75
79
|
await user.click(screen.getByRole('button', { name: 'More panel app actions' }));
|
|
76
|
-
|
|
80
|
+
await user.click(screen.getByRole('menuitem', { name: 'Layout and position' }));
|
|
81
|
+
const removeButton = screen.getByRole('menuitem', { name: 'Unpin from left sidebar' });
|
|
77
82
|
expect(removeButton.getAttribute('aria-pressed')).toBe('true');
|
|
78
83
|
await user.click(removeButton);
|
|
79
84
|
|
|
@@ -98,3 +103,6 @@ describe('PanelAppToolbar', () => {
|
|
|
98
103
|
expect(link.getAttribute('href')).toBe('/apps/panel/ink-assistant/standalone');
|
|
99
104
|
});
|
|
100
105
|
});
|
|
106
|
+
|
|
107
|
+
vi.mock("react-router-dom", async (importOriginal) => ({ ...(await importOriginal<object>()),useNavigate: () => vi.fn(), useLocation: () => ({ pathname:'/apps',search:'' }) }));
|
|
108
|
+
vi.mock("@/app/components/app-presenter-provider", () => ({ useAppPresenter: () => ({ pageResourceManager:{ open:vi.fn() } }) }));
|
|
@@ -76,7 +76,7 @@ export function PanelAppListItem({
|
|
|
76
76
|
<MoreVertical className="h-4 w-4" />
|
|
77
77
|
</button>
|
|
78
78
|
</PopoverTrigger>
|
|
79
|
-
<PopoverContent align="end"
|
|
79
|
+
<PopoverContent align="end" variant="menu">
|
|
80
80
|
<PanelAppOpenStandaloneMenuItem
|
|
81
81
|
entry={entry}
|
|
82
82
|
onSelect={() => setIsMenuOpen(false)}
|
|
@@ -1,41 +1,8 @@
|
|
|
1
|
-
import { PanelLeft, PanelLeftDashed } from 'lucide-react';
|
|
2
|
-
import { viewportLayoutManager } from '@/app/managers/viewport-layout.manager';
|
|
3
|
-
import { useUpdatePanelAppPreferences } from '@/features/panel-apps/hooks/use-panel-apps';
|
|
4
1
|
import type { PanelAppEntryView } from '@/shared/lib/api';
|
|
5
|
-
import {
|
|
2
|
+
import { PageResourceActionItems } from '@/features/right-panel-resources';
|
|
3
|
+
import { pageResourceFromTarget } from '@/features/right-panel-resources';
|
|
4
|
+
import { createPanelAppRightPanelResourceTarget } from '@/features/right-panel-resources';
|
|
6
5
|
|
|
7
|
-
export function PanelAppMainSidebarMenuItem({
|
|
8
|
-
entry
|
|
9
|
-
onSelect,
|
|
10
|
-
}: {
|
|
11
|
-
entry: PanelAppEntryView;
|
|
12
|
-
onSelect?: () => void;
|
|
13
|
-
}) {
|
|
14
|
-
const updatePreferences = useUpdatePanelAppPreferences();
|
|
15
|
-
const label = entry.mainSidebar
|
|
16
|
-
? t('panelAppsRemoveFromMainSidebar')
|
|
17
|
-
: t('panelAppsAddToMainSidebar');
|
|
18
|
-
const Icon = entry.mainSidebar ? PanelLeftDashed : PanelLeft;
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<button
|
|
22
|
-
type="button"
|
|
23
|
-
disabled={updatePreferences.isPending}
|
|
24
|
-
aria-pressed={entry.mainSidebar}
|
|
25
|
-
className="flex w-full items-center gap-2 rounded-lg px-2.5 py-2 text-left text-sm text-muted-foreground transition-colors hover:bg-[var(--interaction-hover)] hover:text-accent-foreground disabled:cursor-not-allowed disabled:opacity-50"
|
|
26
|
-
onClick={() => {
|
|
27
|
-
onSelect?.();
|
|
28
|
-
if (!entry.mainSidebar) {
|
|
29
|
-
viewportLayoutManager.setMainSidebarAppGroupCollapsed(false);
|
|
30
|
-
}
|
|
31
|
-
updatePreferences.mutate({
|
|
32
|
-
id: entry.id,
|
|
33
|
-
preferences: { mainSidebar: !entry.mainSidebar },
|
|
34
|
-
});
|
|
35
|
-
}}
|
|
36
|
-
>
|
|
37
|
-
<Icon className="h-4 w-4 shrink-0" />
|
|
38
|
-
<span>{label}</span>
|
|
39
|
-
</button>
|
|
40
|
-
);
|
|
6
|
+
export function PanelAppMainSidebarMenuItem({ entry, onSelect }: { entry: PanelAppEntryView; onSelect?: () => void }) {
|
|
7
|
+
return <PageResourceActionItems page={pageResourceFromTarget(createPanelAppRightPanelResourceTarget(entry))} onSelect={onSelect} />;
|
|
41
8
|
}
|
|
@@ -30,6 +30,12 @@ export function PanelAppToolbar({
|
|
|
30
30
|
>
|
|
31
31
|
{appTitle}
|
|
32
32
|
</span>
|
|
33
|
+
<IconActionButton
|
|
34
|
+
icon={<RefreshCw className="h-3.5 w-3.5" />}
|
|
35
|
+
label={t('panelAppsRefreshCurrent')}
|
|
36
|
+
onClick={onRefresh}
|
|
37
|
+
size="sm"
|
|
38
|
+
/>
|
|
33
39
|
{entry ? (
|
|
34
40
|
<Popover open={isMenuOpen} onOpenChange={setIsMenuOpen}>
|
|
35
41
|
<PopoverTrigger asChild>
|
|
@@ -39,7 +45,7 @@ export function PanelAppToolbar({
|
|
|
39
45
|
size="sm"
|
|
40
46
|
/>
|
|
41
47
|
</PopoverTrigger>
|
|
42
|
-
<PopoverContent align="end"
|
|
48
|
+
<PopoverContent align="end" variant="menu">
|
|
43
49
|
<PanelAppOpenStandaloneMenuItem
|
|
44
50
|
entry={entry}
|
|
45
51
|
onSelect={() => setIsMenuOpen(false)}
|
|
@@ -51,12 +57,6 @@ export function PanelAppToolbar({
|
|
|
51
57
|
</PopoverContent>
|
|
52
58
|
</Popover>
|
|
53
59
|
) : null}
|
|
54
|
-
<IconActionButton
|
|
55
|
-
icon={<RefreshCw className="h-3.5 w-3.5" />}
|
|
56
|
-
label={t('panelAppsRefreshCurrent')}
|
|
57
|
-
onClick={onRefresh}
|
|
58
|
-
size="sm"
|
|
59
|
-
/>
|
|
60
60
|
</div>
|
|
61
61
|
);
|
|
62
62
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { PanelAppsList } from './components/panel-apps-list';
|
|
2
|
-
export { PanelAppMainSidebarNav } from './components/panel-app-main-sidebar-nav';
|
|
3
2
|
export { PanelAppMainPage } from './pages/panel-app-main-page';
|
|
4
3
|
export { PanelAppStandalonePage } from './pages/panel-app-standalone-page';
|
|
5
4
|
export { PanelAppServiceActionAuthorizationDialog } from './components/panel-app-service-action-authorization-dialog';
|
|
@@ -9,6 +8,7 @@ export {
|
|
|
9
8
|
usePanelApp,
|
|
10
9
|
useGrantPanelAppClient,
|
|
11
10
|
usePanelApps,
|
|
11
|
+
useUpdatePanelAppPreferences,
|
|
12
12
|
useRecordPanelAppOpened,
|
|
13
13
|
} from './hooks/use-panel-apps';
|
|
14
14
|
export { PanelAppBridgeManager } from './managers/panel-app-bridge.manager';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PageResourceActionsMenu } from "@/features/right-panel-resources";
|
|
2
|
+
import { pageResourceFromSystemObject } from "@/features/right-panel-resources";
|
|
1
3
|
import type { ProjectSkillMaterial } from "@nextclaw/client-sdk";
|
|
2
4
|
import { formatNumber, t } from "@/shared/lib/i18n";
|
|
3
5
|
import { ProjectEmptyState } from "./project-section";
|
|
@@ -33,13 +35,13 @@ export function ProjectSkills({
|
|
|
33
35
|
{skills.length ? (
|
|
34
36
|
<div className="grid min-w-0 gap-3 md:grid-cols-2">
|
|
35
37
|
{skills.map((skill) => (
|
|
38
|
+
<div key={skill.ref} className="relative group/page-row rounded-xl border border-border/60 transition-colors hover:border-border hover:bg-[var(--interaction-hover)] focus-within:bg-[var(--interaction-hover)] has-[[data-context-menu-open]]:bg-[var(--interaction-hover)]">
|
|
36
39
|
<button
|
|
37
40
|
type="button"
|
|
38
|
-
|
|
39
|
-
className="min-w-0 rounded-xl border border-border/60 p-3 text-left transition-colors hover:border-border hover:bg-muted/30 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border"
|
|
41
|
+
className="w-full min-w-0 rounded-xl p-3 text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border"
|
|
40
42
|
onClick={() => onOpen(skill)}
|
|
41
43
|
>
|
|
42
|
-
<h3 className="text-sm font-medium">{skill.name}</h3>
|
|
44
|
+
<h3 className="pr-7 text-sm font-medium">{skill.name}</h3>
|
|
43
45
|
<p
|
|
44
46
|
className="mt-1 truncate text-xs text-muted-foreground"
|
|
45
47
|
title={skill.path}
|
|
@@ -53,6 +55,8 @@ export function ProjectSkills({
|
|
|
53
55
|
{skill.description ?? skill.ref}
|
|
54
56
|
</p>
|
|
55
57
|
</button>
|
|
58
|
+
<span className="absolute right-2 top-2"><PageResourceActionsMenu revealOnHover page={pageResourceFromSystemObject("skill", skill.ref, skill.name)} /></span>
|
|
59
|
+
</div>
|
|
56
60
|
))}
|
|
57
61
|
</div>
|
|
58
62
|
) : (
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PageResourceActionsMenu } from "@/features/right-panel-resources";
|
|
2
|
+
import { pageResourceFromSystemObject } from "@/features/right-panel-resources";
|
|
1
3
|
import { useState } from "react";
|
|
2
4
|
import type {
|
|
3
5
|
ProjectWorkActivity,
|
|
@@ -163,7 +165,7 @@ function ProjectWorkItemEditor({
|
|
|
163
165
|
return (
|
|
164
166
|
<>
|
|
165
167
|
<SheetHeader className="shrink-0 border-b border-border/60 px-5 pb-5 pt-6 pr-14 sm:px-7 sm:pt-7">
|
|
166
|
-
<SheetTitle>{t("projectsWorkDetails")}</SheetTitle>
|
|
168
|
+
<div className="flex items-center justify-between gap-2"><SheetTitle>{t("projectsWorkDetails")}</SheetTitle><PageResourceActionsMenu page={pageResourceFromSystemObject("project-work", JSON.stringify([item.projectId, item.id]), item.title)} /></div>
|
|
167
169
|
<SheetDescription>
|
|
168
170
|
{item.id} · {t("projectsWorkVersion")} {item.version}
|
|
169
171
|
</SheetDescription>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { cleanup, fireEvent, render } from "@testing-library/react";
|
|
2
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
3
|
+
import { PageResourceIcon } from "@/features/right-panel-resources/components/page-resource-icon";
|
|
4
|
+
|
|
5
|
+
vi.mock("@/features/panel-apps/hooks/use-panel-apps", () => ({
|
|
6
|
+
usePanelApps: () => ({
|
|
7
|
+
data: { entries: [{ id: "source:notes", appId: "notes", icon: "/notes.png" }] },
|
|
8
|
+
}),
|
|
9
|
+
}));
|
|
10
|
+
afterEach(cleanup);
|
|
11
|
+
|
|
12
|
+
describe("resource icon precedence", () => {
|
|
13
|
+
it("keeps avatar links inline under Markdown body-image styles without resizing body images", () => {
|
|
14
|
+
const view = render(
|
|
15
|
+
<div className="chat-markdown">
|
|
16
|
+
<style>{'.chat-markdown img { display: block; width: auto; height: auto; max-width: 32rem; }'}</style>
|
|
17
|
+
<a href="nextclaw://objects/agent/coder">
|
|
18
|
+
<PageResourceIcon uri="nextclaw://objects/agent/coder" icon={{ type: "url", url: "/avatar.png" }} />
|
|
19
|
+
Coder
|
|
20
|
+
</a>
|
|
21
|
+
<img src="/body.png" alt="Body illustration" />
|
|
22
|
+
</div>,
|
|
23
|
+
);
|
|
24
|
+
const icon = view.container.querySelector("a img")!;
|
|
25
|
+
expect(getComputedStyle(icon).width).toBe("1em");
|
|
26
|
+
expect(getComputedStyle(icon).height).toBe("1em");
|
|
27
|
+
expect(getComputedStyle(icon).display).toBe("inline-block");
|
|
28
|
+
expect(getComputedStyle(view.getByAltText("Body illustration")).width).toBe("auto");
|
|
29
|
+
});
|
|
30
|
+
it("uses installed app metadata for an ordinary resource URI and falls back after a load error", () => {
|
|
31
|
+
const view = render(<PageResourceIcon uri="nextclaw://panel-app/notes" />);
|
|
32
|
+
const image = view.container.querySelector("img")!;
|
|
33
|
+
expect(image.getAttribute("src")).toBe("/notes.png");
|
|
34
|
+
fireEvent.error(image);
|
|
35
|
+
expect(view.container.querySelector("img")).toBeNull();
|
|
36
|
+
expect(view.container.querySelector(".lucide-app-window")).not.toBeNull();
|
|
37
|
+
});
|
|
38
|
+
it("uses an explicit icon ahead of metadata and then the resource category", () => {
|
|
39
|
+
const view = render(
|
|
40
|
+
<PageResourceIcon
|
|
41
|
+
uri="nextclaw://panel-app/notes"
|
|
42
|
+
icon={{ type: "text", value: "✎" }}
|
|
43
|
+
/>,
|
|
44
|
+
);
|
|
45
|
+
expect(view.container.textContent).toBe("✎");
|
|
46
|
+
view.rerender(<PageResourceIcon uri="https://example.com" />);
|
|
47
|
+
expect(view.container.querySelector(".lucide-globe")).not.toBeNull();
|
|
48
|
+
view.rerender(<PageResourceIcon uri="nextclaw://unknown/item" />);
|
|
49
|
+
expect(view.container.querySelector(".lucide-link2")).not.toBeNull();
|
|
50
|
+
});
|
|
51
|
+
it("uses Panel object identity for its installed icon and falls back to the application icon", () => {
|
|
52
|
+
const view = render(<PageResourceIcon uri="nextclaw://objects/panel-app/source%3Anotes" />);
|
|
53
|
+
const icon = view.container.querySelector("img")!;
|
|
54
|
+
expect(icon.getAttribute("src")).toBe("/notes.png");
|
|
55
|
+
fireEvent.error(icon);
|
|
56
|
+
expect(view.container.querySelector(".lucide-app-window")).not.toBeNull();
|
|
57
|
+
});
|
|
58
|
+
it("honors precise builtin icons", () => {
|
|
59
|
+
const view = render(
|
|
60
|
+
<PageResourceIcon
|
|
61
|
+
uri="https://github.com"
|
|
62
|
+
icon={{ type: "builtin", name: "github" }}
|
|
63
|
+
/>,
|
|
64
|
+
);
|
|
65
|
+
expect(view.container.querySelector(".lucide-github")).not.toBeNull();
|
|
66
|
+
});
|
|
67
|
+
});
|
package/src/features/right-panel-resources/components/__tests__/page-resource-sidebar-nav.test.tsx
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { render, screen } from "@testing-library/react";
|
|
2
|
+
import userEvent from "@testing-library/user-event";
|
|
3
|
+
import { MemoryRouter } from "react-router-dom";
|
|
4
|
+
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
5
|
+
import { viewportLayoutManager } from "@/app/managers/viewport-layout.manager";
|
|
6
|
+
import { useViewportLayoutStore } from "@/app/stores/viewport-layout.store";
|
|
7
|
+
import { PageResourceSidebarNav } from "@/features/right-panel-resources/components/page-resource-sidebar-nav";
|
|
8
|
+
import { usePageNavigationStore } from "@/features/right-panel-resources/stores/page-navigation.store";
|
|
9
|
+
import { AppPresenterProvider } from "@/app/components/app-presenter-provider";
|
|
10
|
+
import type { PanelAppEntryView } from "@/shared/lib/api";
|
|
11
|
+
import { SidebarNavLinkItem } from "@/app/components/layout/sidebar-items";
|
|
12
|
+
|
|
13
|
+
const mocks = vi.hoisted(() => ({
|
|
14
|
+
entries: [] as PanelAppEntryView[],
|
|
15
|
+
mutate: vi.fn(),
|
|
16
|
+
}));
|
|
17
|
+
|
|
18
|
+
vi.mock("@/features/panel-apps/hooks/use-panel-apps", () => ({
|
|
19
|
+
usePanelApps: () => ({ data: { entries: mocks.entries } }),
|
|
20
|
+
useUpdatePanelAppPreferences: () => ({
|
|
21
|
+
isPending: false,
|
|
22
|
+
mutate: mocks.mutate,
|
|
23
|
+
}),
|
|
24
|
+
}));
|
|
25
|
+
|
|
26
|
+
function createEntry(
|
|
27
|
+
overrides: Partial<PanelAppEntryView> = {},
|
|
28
|
+
): PanelAppEntryView {
|
|
29
|
+
return {
|
|
30
|
+
appId: "demo",
|
|
31
|
+
clientDeclared: false,
|
|
32
|
+
clientGranted: false,
|
|
33
|
+
contentPath: "/api/panel-apps/demo/content",
|
|
34
|
+
createdAt: "2026-08-19T00:00:00.000Z",
|
|
35
|
+
favorite: false,
|
|
36
|
+
fileName: "demo.panel.html",
|
|
37
|
+
id: "demo",
|
|
38
|
+
kind: "single-file",
|
|
39
|
+
mainSidebar: false,
|
|
40
|
+
openCount: 0,
|
|
41
|
+
sizeBytes: 10,
|
|
42
|
+
title: "Demo",
|
|
43
|
+
updatedAt: "2026-08-19T00:00:00.000Z",
|
|
44
|
+
...overrides,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function renderNav(collapsed = false, route = "/") {
|
|
49
|
+
return render(
|
|
50
|
+
<MemoryRouter initialEntries={[route]}>
|
|
51
|
+
<AppPresenterProvider>
|
|
52
|
+
<PageResourceSidebarNav isCollapsed={collapsed} />
|
|
53
|
+
</AppPresenterProvider>
|
|
54
|
+
</MemoryRouter>,
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
describe("shared left pages", () => {
|
|
58
|
+
beforeEach(() => {
|
|
59
|
+
localStorage.clear();
|
|
60
|
+
viewportLayoutManager.resetForTests();
|
|
61
|
+
usePageNavigationStore.setState({ pinned: [] });
|
|
62
|
+
mocks.entries = [];
|
|
63
|
+
mocks.mutate.mockReset();
|
|
64
|
+
});
|
|
65
|
+
it("preserves app ordering and app routes while including arbitrary pinned pages", () => {
|
|
66
|
+
mocks.entries = [
|
|
67
|
+
createEntry({
|
|
68
|
+
appId: "second",
|
|
69
|
+
title: "Second",
|
|
70
|
+
mainSidebar: true,
|
|
71
|
+
mainSidebarOrder: 1,
|
|
72
|
+
}),
|
|
73
|
+
createEntry({
|
|
74
|
+
appId: "first",
|
|
75
|
+
title: "First",
|
|
76
|
+
mainSidebar: true,
|
|
77
|
+
mainSidebarOrder: 0,
|
|
78
|
+
}),
|
|
79
|
+
createEntry({ appId: "hidden", title: "Hidden" }),
|
|
80
|
+
];
|
|
81
|
+
const uri = "nextclaw://page?path=%2Fskills";
|
|
82
|
+
usePageNavigationStore.setState({
|
|
83
|
+
pinned: [
|
|
84
|
+
{
|
|
85
|
+
uri,
|
|
86
|
+
title: "Skills",
|
|
87
|
+
mainPath: "/skills",
|
|
88
|
+
target: {
|
|
89
|
+
kind: "route",
|
|
90
|
+
title: "Skills",
|
|
91
|
+
url: "/skills",
|
|
92
|
+
resourceUri: uri,
|
|
93
|
+
historyPolicy: "none",
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
});
|
|
98
|
+
renderNav(false, "/apps/panel/first");
|
|
99
|
+
expect(screen.getAllByRole("link").map((link) => link.textContent)).toEqual(
|
|
100
|
+
["First", "Second", "Skills"],
|
|
101
|
+
);
|
|
102
|
+
expect(
|
|
103
|
+
screen.getByRole("link", { name: "First" }).getAttribute("aria-current"),
|
|
104
|
+
).toBe("page");
|
|
105
|
+
expect(
|
|
106
|
+
screen.getByRole("link", { name: "Skills" }).getAttribute("href"),
|
|
107
|
+
).toBe("/skills");
|
|
108
|
+
expect(screen.queryByText("Hidden")).toBeNull();
|
|
109
|
+
});
|
|
110
|
+
it("preserves the collapsed group preference", async () => {
|
|
111
|
+
mocks.entries = [createEntry({ mainSidebar: true })];
|
|
112
|
+
renderNav();
|
|
113
|
+
await userEvent.click(screen.getByRole("button", { name: "Pages 1" }));
|
|
114
|
+
expect(screen.queryByRole("link")).toBeNull();
|
|
115
|
+
expect(
|
|
116
|
+
useViewportLayoutStore.getState().isMainSidebarAppGroupCollapsed,
|
|
117
|
+
).toBe(true);
|
|
118
|
+
});
|
|
119
|
+
it("uses shared actions without nesting action buttons inside links and keeps app preferences on their existing owner", async () => {
|
|
120
|
+
mocks.entries = [createEntry({ mainSidebar: true })];
|
|
121
|
+
renderNav();
|
|
122
|
+
const link = screen.getByRole("link", { name: "Demo" });
|
|
123
|
+
const menu = screen.getByRole("button", { name: "Page actions" });
|
|
124
|
+
expect(link.contains(menu)).toBe(false);
|
|
125
|
+
expect(menu.querySelector(".lucide-ellipsis-vertical")).not.toBeNull();
|
|
126
|
+
expect(menu.parentElement?.className).toContain(
|
|
127
|
+
"group-hover/sidebar-item:opacity-100",
|
|
128
|
+
);
|
|
129
|
+
expect(menu.parentElement?.className).toContain(
|
|
130
|
+
"group-focus-within/sidebar-item:opacity-100",
|
|
131
|
+
);
|
|
132
|
+
expect(menu.parentElement?.className).toContain(
|
|
133
|
+
"data-[context-menu-open]:opacity-100",
|
|
134
|
+
);
|
|
135
|
+
await userEvent.click(menu);
|
|
136
|
+
expect(menu.getAttribute("aria-expanded")).toBe("true");
|
|
137
|
+
expect(menu.parentElement?.hasAttribute("data-context-menu-open")).toBe(
|
|
138
|
+
true,
|
|
139
|
+
);
|
|
140
|
+
expect(screen.queryByRole("menuitem", { name: "Unpin from left sidebar" })).toBeNull();
|
|
141
|
+
await userEvent.click(screen.getByRole("menuitem", { name: "Layout and position" }));
|
|
142
|
+
await userEvent.click(
|
|
143
|
+
screen.getByRole("menuitem", { name: "Unpin from left sidebar" }),
|
|
144
|
+
);
|
|
145
|
+
expect(mocks.mutate).toHaveBeenCalledWith({
|
|
146
|
+
id: "demo",
|
|
147
|
+
preferences: { mainSidebar: false },
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
it("closes the collapsed rail menu after navigation", async () => {
|
|
151
|
+
mocks.entries = [createEntry({ mainSidebar: true })];
|
|
152
|
+
renderNav(true);
|
|
153
|
+
expect(screen.queryByRole("link")).toBeNull();
|
|
154
|
+
await userEvent.click(screen.getByRole("button", { name: "Pages" }));
|
|
155
|
+
await userEvent.click(screen.getByRole("link", { name: "Demo" }));
|
|
156
|
+
expect(screen.queryByRole("link")).toBeNull();
|
|
157
|
+
});
|
|
158
|
+
it("omits an empty group", () => {
|
|
159
|
+
expect(renderNav().container.firstChild).toBeNull();
|
|
160
|
+
});
|
|
161
|
+
it("shares one whole-row surface with primary navigation and keeps actions inside that surface", () => {
|
|
162
|
+
mocks.entries = [createEntry({ mainSidebar: true })];
|
|
163
|
+
render(
|
|
164
|
+
<MemoryRouter><AppPresenterProvider>
|
|
165
|
+
<SidebarNavLinkItem to="/inbox" label="Inbox" density="compact" />
|
|
166
|
+
<PageResourceSidebarNav isCollapsed={false} />
|
|
167
|
+
</AppPresenterProvider></MemoryRouter>,
|
|
168
|
+
);
|
|
169
|
+
const primary = screen.getByRole("link", { name: "Inbox" });
|
|
170
|
+
const page = screen.getByRole("link", { name: "Demo" });
|
|
171
|
+
expect(page.parentElement?.className).toBe(primary.parentElement?.className);
|
|
172
|
+
expect(page.parentElement?.contains(screen.getByRole("button", { name: "Page actions" }))).toBe(true);
|
|
173
|
+
expect(page.className).toContain("pr-9");
|
|
174
|
+
});
|
|
175
|
+
it("distinguishes resources sharing a pathname by their query identity", () => {
|
|
176
|
+
render(<MemoryRouter initialEntries={["/resource?uri=one"]}>
|
|
177
|
+
<SidebarNavLinkItem to="/resource?uri=one" label="One" />
|
|
178
|
+
<SidebarNavLinkItem to="/resource?uri=two" label="Two" />
|
|
179
|
+
</MemoryRouter>);
|
|
180
|
+
expect(screen.getByRole("link", { name: "One" }).getAttribute("aria-current")).toBe("page");
|
|
181
|
+
expect(screen.getByRole("link", { name: "Two" }).hasAttribute("aria-current")).toBe(false);
|
|
182
|
+
});
|
|
183
|
+
});
|
package/src/features/right-panel-resources/components/__tests__/system-object-resource.test.tsx
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type * as ReactQuery from "@tanstack/react-query";
|
|
2
|
+
import { cleanup, render, screen } from "@testing-library/react";
|
|
3
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
4
|
+
import { SYSTEM_OBJECT_RESOURCE_RENDERERS } from "@/features/right-panel-resources/components/system-object-resource";
|
|
5
|
+
import type { DocBrowserCustomTabRenderParams } from "@/shared/components/doc-browser/doc-browser-renderer.types";
|
|
6
|
+
|
|
7
|
+
vi.mock("@tanstack/react-query", async (importOriginal) => ({
|
|
8
|
+
...await importOriginal<typeof ReactQuery>(),
|
|
9
|
+
useQuery: () => ({
|
|
10
|
+
data: {
|
|
11
|
+
reference: { fileName: "agent.md", label: "Agent", mimeType: "text/markdown" },
|
|
12
|
+
content: "# Agent snapshot",
|
|
13
|
+
},
|
|
14
|
+
}),
|
|
15
|
+
}));
|
|
16
|
+
vi.mock("@/features/chat/features/workspace/components/chat-session-workspace-file-preview", () => ({
|
|
17
|
+
ChatSessionWorkspaceFilePreview: ({ file }: { file: { key: string; rawText: string } }) => (
|
|
18
|
+
<div data-testid="preview" data-resource-key={file.key}>{file.rawText}</div>
|
|
19
|
+
),
|
|
20
|
+
}));
|
|
21
|
+
afterEach(cleanup);
|
|
22
|
+
|
|
23
|
+
describe("system object reading identity", () => {
|
|
24
|
+
it("isolates same-named snapshots by resource URI and preserves identity on reopen", () => {
|
|
25
|
+
const content = (uri: string) => SYSTEM_OBJECT_RESOURCE_RENDERERS["system-object"].renderContent!({
|
|
26
|
+
currentUrl: uri,
|
|
27
|
+
tab: { id: uri, kind: "system-object", title: "Agent", currentUrl: uri, resourceUri: uri, history: [uri], historyIndex: 0, navVersion: 0 },
|
|
28
|
+
open: vi.fn(),
|
|
29
|
+
openTarget: vi.fn(),
|
|
30
|
+
refreshIframe: vi.fn(),
|
|
31
|
+
} satisfies DocBrowserCustomTabRenderParams);
|
|
32
|
+
const first = "nextclaw://objects/agent/first";
|
|
33
|
+
const second = "nextclaw://objects/agent/second";
|
|
34
|
+
const view = render(content(first));
|
|
35
|
+
expect(screen.getByTestId("preview").getAttribute("data-resource-key")).toBe(first);
|
|
36
|
+
view.rerender(content(second));
|
|
37
|
+
expect(screen.getByTestId("preview").getAttribute("data-resource-key")).toBe(second);
|
|
38
|
+
view.rerender(content(first));
|
|
39
|
+
expect(screen.getByTestId("preview").getAttribute("data-resource-key")).toBe(first);
|
|
40
|
+
expect(screen.getByTestId("preview").textContent).toBe("# Agent snapshot");
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { MoreVertical } from "lucide-react";
|
|
2
|
+
import {
|
|
3
|
+
ContextMenu,
|
|
4
|
+
ContextMenuTrigger,
|
|
5
|
+
ContextMenuItems,
|
|
6
|
+
} from "@/shared/components/ui/context-menu/context-menu";
|
|
7
|
+
import { IconActionButton } from "@/shared/components/ui/actions/icon-action-button";
|
|
8
|
+
import { usePageResourceActions } from "@/features/right-panel-resources/hooks/use-page-resource-actions";
|
|
9
|
+
import type { PageResource } from "@/features/right-panel-resources/types/page-resource.types";
|
|
10
|
+
import { cn } from "@/shared/lib/utils";
|
|
11
|
+
import { t } from "@/shared/lib/i18n";
|
|
12
|
+
|
|
13
|
+
export function PageResourceActionsMenu({
|
|
14
|
+
page,
|
|
15
|
+
revealOnHover = false,
|
|
16
|
+
}: {
|
|
17
|
+
page: PageResource;
|
|
18
|
+
revealOnHover?: boolean;
|
|
19
|
+
}) {
|
|
20
|
+
const actions = usePageResourceActions();
|
|
21
|
+
return (
|
|
22
|
+
<ContextMenu groups={actions(page)} label={t("pageActions")}>
|
|
23
|
+
<span
|
|
24
|
+
className={cn(
|
|
25
|
+
"inline-flex shrink-0",
|
|
26
|
+
revealOnHover &&
|
|
27
|
+
"pointer-events-none opacity-0 transition-opacity group-hover/sidebar-item:pointer-events-auto group-hover/sidebar-item:opacity-100 group-focus-within/sidebar-item:pointer-events-auto group-focus-within/sidebar-item:opacity-100 data-[context-menu-open]:pointer-events-auto data-[context-menu-open]:opacity-100 [@media(hover:none)]:pointer-events-auto [@media(hover:none)]:opacity-100",
|
|
28
|
+
)}
|
|
29
|
+
>
|
|
30
|
+
<ContextMenuTrigger>
|
|
31
|
+
<IconActionButton
|
|
32
|
+
icon={<MoreVertical className="h-4 w-4" />}
|
|
33
|
+
label={t("pageActions")}
|
|
34
|
+
size="sm"
|
|
35
|
+
/>
|
|
36
|
+
</ContextMenuTrigger>
|
|
37
|
+
</span>
|
|
38
|
+
</ContextMenu>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function PageResourceActionItems({
|
|
43
|
+
page,
|
|
44
|
+
onSelect,
|
|
45
|
+
}: {
|
|
46
|
+
page: PageResource;
|
|
47
|
+
onSelect?: () => void;
|
|
48
|
+
}) {
|
|
49
|
+
const actions = usePageResourceActions();
|
|
50
|
+
return (
|
|
51
|
+
<ContextMenuItems groups={actions(page)} onClose={() => onSelect?.()} />
|
|
52
|
+
);
|
|
53
|
+
}
|