@nextclaw/ui 0.15.24 → 0.15.26

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.
Files changed (312) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/assets/{abnfDiagram-VRR7QNED-DvTjgVMf.js → abnfDiagram-VRR7QNED-BcFJp_1X.js} +1 -1
  3. package/dist/assets/{aiden0z-pptx-renderer.es-C1nfBAXR.js → aiden0z-pptx-renderer.es-Dp2ezlQn.js} +1 -1
  4. package/dist/assets/{api-BxPNDp30.js → api-CK3Fro7z.js} +6 -6
  5. package/dist/assets/appearance-settings-page-zqwWO8Dy.js +1 -0
  6. package/dist/assets/{arc-BvhODBXv.js → arc-CkgyPMyW.js} +1 -1
  7. package/dist/assets/architecture-TIHT7OUA-DO2x53FK.js +1 -0
  8. package/dist/assets/{architectureDiagram-ZJ3FMSHR-BKO9RgNS.js → architectureDiagram-ZJ3FMSHR-CMd4cIjI.js} +1 -1
  9. package/dist/assets/{blockDiagram-677ZJIJ3-DHpDXy7D.js → blockDiagram-677ZJIJ3-Bz3tbhet.js} +1 -1
  10. package/dist/assets/{c4Diagram-LMCZKHZV-BG_iQnDr.js → c4Diagram-LMCZKHZV-D9hFNAGv.js} +1 -1
  11. package/dist/assets/channel-nBvMaVyP.js +1 -0
  12. package/dist/assets/{channels-list-page-DRaNWAxC.js → channels-list-page-CVCZBlCL.js} +2 -2
  13. package/dist/assets/chat-page-D4wehRTz.js +1 -0
  14. package/dist/assets/chunk-2Q5K7J3B-CJgqFDS4.js +1 -0
  15. package/dist/assets/{chunk-32BRIVSS-DR9M0LLx.js → chunk-32BRIVSS-7NrjEITq.js} +1 -1
  16. package/dist/assets/{chunk-52WLFC77-698iC3BB.js → chunk-52WLFC77-viIcqj9q.js} +1 -1
  17. package/dist/assets/{chunk-5FCAYU7R-DikTj9Ey.js → chunk-5FCAYU7R-Vsu4J-VM.js} +1 -1
  18. package/dist/assets/{chunk-5HE753X5-ko0o7_q0.js → chunk-5HE753X5-C-w6CQZK.js} +1 -1
  19. package/dist/assets/{chunk-5JV3BV7I-CEHufhgo.js → chunk-5JV3BV7I-CuKgJQ4W.js} +1 -1
  20. package/dist/assets/{chunk-5TONJI2A-CGgno1cu.js → chunk-5TONJI2A-CYeiWZKb.js} +1 -1
  21. package/dist/assets/{chunk-5VM5RSS4-DkiB4cUQ.js → chunk-5VM5RSS4-DRCbfwIn.js} +1 -1
  22. package/dist/assets/{chunk-7BUUIJ7U-DzptcytQ.js → chunk-7BUUIJ7U-BvydOcm3.js} +1 -1
  23. package/dist/assets/{chunk-BIQX33UG-DMRSQJvT.js → chunk-BIQX33UG-RlppOXKo.js} +1 -1
  24. package/dist/assets/{chunk-C7G6YPKG-Bw1BwwuY.js → chunk-C7G6YPKG-DAizzYwr.js} +1 -1
  25. package/dist/assets/{chunk-CQNSW5MT-C0z6eHBk.js → chunk-CQNSW5MT-5eChJHca.js} +1 -1
  26. package/dist/assets/{chunk-CYSBUYHQ-ByPyAouO.js → chunk-CYSBUYHQ-YHPr53fv.js} +1 -1
  27. package/dist/assets/{chunk-EMLP6XTP-CJlAXWZg.js → chunk-EMLP6XTP-CK4D7Hz5.js} +1 -1
  28. package/dist/assets/{chunk-EX3LRPZG-Dqq4zKJu.js → chunk-EX3LRPZG-BmlDFIRW.js} +1 -1
  29. package/dist/assets/{chunk-FWX5IMBZ-B0SNoCmi.js → chunk-FWX5IMBZ-D0ksHZZ9.js} +2 -2
  30. package/dist/assets/{chunk-HOUHSVGY-DG_GJih_.js → chunk-HOUHSVGY-DPkq8FCm.js} +1 -1
  31. package/dist/assets/{chunk-ICXQ74PX-Drxk_6bE.js → chunk-ICXQ74PX-FAatv5fC.js} +1 -1
  32. package/dist/assets/{chunk-JG7HCLWE-DdLFPpnd.js → chunk-JG7HCLWE-DLkIi4F7.js} +1 -1
  33. package/dist/assets/{chunk-JWPE2WC7-B8M4G76F.js → chunk-JWPE2WC7-DawOjNE3.js} +1 -1
  34. package/dist/assets/{chunk-MOJQB5TN-XP6FJHY_.js → chunk-MOJQB5TN-Di52TorW.js} +1 -1
  35. package/dist/assets/{chunk-MOZMSUNE-C_6x18Qw.js → chunk-MOZMSUNE-PfyK9w1-.js} +1 -1
  36. package/dist/assets/{chunk-OGEWGWER-N25BzCmG.js → chunk-OGEWGWER-C3jdH3Ty.js} +1 -1
  37. package/dist/assets/{chunk-OSBZ3O6U-ASDEm7y0.js → chunk-OSBZ3O6U-CecHo-f0.js} +1 -1
  38. package/dist/assets/{chunk-PUDLZKDR-CTlvAcn7.js → chunk-PUDLZKDR-f3IJh3sN.js} +1 -1
  39. package/dist/assets/{chunk-Q4XR5HBZ-Da9BWfB6.js → chunk-Q4XR5HBZ-DQFeUPxZ.js} +1 -1
  40. package/dist/assets/{chunk-QBLGF6JB-Bi6RpTJO.js → chunk-QBLGF6JB-BhUeG0y2.js} +1 -1
  41. package/dist/assets/{chunk-R7FJI6CG-DkMsSPvK.js → chunk-R7FJI6CG-C3XpZ-2u.js} +1 -1
  42. package/dist/assets/{chunk-RYQCIY6F-DZp0eU-j.js → chunk-RYQCIY6F-CAqa5klQ.js} +1 -1
  43. package/dist/assets/{chunk-U6XO7XAA-vfinDSrj.js → chunk-U6XO7XAA-D_WXezeD.js} +1 -1
  44. package/dist/assets/{chunk-V7JOEXUC-C9Nksccs.js → chunk-V7JOEXUC-CZ70oOtp.js} +1 -1
  45. package/dist/assets/chunk-VAUOI2AC-BGvh3yIx.js +1 -0
  46. package/dist/assets/{chunk-VR4S4FIN-Xv6zfwXs.js → chunk-VR4S4FIN-B7AHEYYk.js} +1 -1
  47. package/dist/assets/{chunk-WYO6CB5R-mOJNzbWl.js → chunk-WYO6CB5R-Dn9To_OI.js} +2 -2
  48. package/dist/assets/chunk-XXDRQBXY-DaBxG5gs.js +1 -0
  49. package/dist/assets/{chunk-YOTPTUD7-1-aKSu4o.js → chunk-YOTPTUD7-BYEgRBk3.js} +1 -1
  50. package/dist/assets/{chunk-ZGVPDNZ5-OJ8veMpK.js → chunk-ZGVPDNZ5-C6YtZDU0.js} +1 -1
  51. package/dist/assets/{chunk-ZIRB5QZD-SR_Nq_PP.js → chunk-ZIRB5QZD-DMuYtnHF.js} +1 -1
  52. package/dist/assets/classDiagram-OUVF2IWQ-P6N03G2R.js +1 -0
  53. package/dist/assets/classDiagram-v2-EOCWNBFH-B1_uLvMv.js +1 -0
  54. package/dist/assets/config-split-page-CceNFvlY.js +1 -0
  55. package/dist/assets/confirm-dialog-CWeNYWZY.js +5 -0
  56. package/dist/assets/{cose-bilkent-JH36ORCC-NjVgz2Bw.js → cose-bilkent-JH36ORCC-Bc2Ex5Y3.js} +1 -1
  57. package/dist/assets/cynefin-VYW2F7L2-B-H8Qp-n.js +1 -0
  58. package/dist/assets/{cynefinDiagram-TSTJHNR4-B_17LDqD.js → cynefinDiagram-TSTJHNR4-DVysQoGz.js} +1 -1
  59. package/dist/assets/{dagre-CMe101gk.js → dagre-CMhQ1cAG.js} +1 -1
  60. package/dist/assets/{dagre-VKFMJZFB-qo8nLb3B.js → dagre-VKFMJZFB-RYyWpPJZ.js} +1 -1
  61. package/dist/assets/desktop-update-config-Dirc3bpt.js +1 -0
  62. package/dist/assets/{diagram-FQU43EPY-Ba3XIklC.js → diagram-FQU43EPY-BD6KONdF.js} +1 -1
  63. package/dist/assets/{diagram-G47NLZAW-CG45TcUx.js → diagram-G47NLZAW-CGB2ptRR.js} +1 -1
  64. package/dist/assets/{diagram-NH7WQ7WH-2F2HrwV-.js → diagram-NH7WQ7WH-DnkOI6cU.js} +1 -1
  65. package/dist/assets/{diagram-OA4YK3LP-CXfWH9NZ.js → diagram-OA4YK3LP-DF82RZ7P.js} +1 -1
  66. package/dist/assets/{diagram-WEI45ONY-CH_4yepc.js → diagram-WEI45ONY-Be2v7Ck9.js} +1 -1
  67. package/dist/assets/{dist-B4Pf5X3Q.js → dist-AYxkFx2B.js} +1 -1
  68. package/dist/assets/{dist-DHEWkGWX.js → dist-D9xtGgdL.js} +1 -1
  69. package/dist/assets/doc-browser-4Sud6dWw.js +1 -0
  70. package/dist/assets/doc-browser-D4x_yH5F.js +1 -0
  71. package/dist/assets/doc-browser-context-Cb7Z0j90.js +1 -0
  72. package/dist/assets/{docx-preview-CoM4JK7_.js → docx-preview-BqwAjrj3.js} +1 -1
  73. package/dist/assets/{ebnfDiagram-CCIWWBDH-BwiG4Ea1.js → ebnfDiagram-CCIWWBDH-CP98OYk8.js} +1 -1
  74. package/dist/assets/{erDiagram-Q63AITRT-BML3hpnQ.js → erDiagram-Q63AITRT-ZLlx8xfs.js} +1 -1
  75. package/dist/assets/eventmodeling-45OFAUF4-YVtShyFA.js +1 -0
  76. package/dist/assets/flowDiagram-23GEKE2U-BeKXabVO.js +1 -0
  77. package/dist/assets/form-actions-B2q4jgjE.js +1 -0
  78. package/dist/assets/{ganttDiagram-NO4QXBWP-80enfWbD.js → ganttDiagram-NO4QXBWP-DXCDjHR2.js} +1 -1
  79. package/dist/assets/gitGraph-TEB2WS4Q-jTSiBj-p.js +1 -0
  80. package/dist/assets/{gitGraphDiagram-IHSO6WYX-CVLqXr-b.js → gitGraphDiagram-IHSO6WYX-l2HWrTJp.js} +1 -1
  81. package/dist/assets/index-CdyTsSBu.css +1 -0
  82. package/dist/assets/index-Das_bw2h.js +107 -0
  83. package/dist/assets/info-DKCQHKI2-BIporNWb.js +1 -0
  84. package/dist/assets/{infoDiagram-FWYZ7A6U-Dyvs2t0i.js → infoDiagram-FWYZ7A6U-D-DjX-bn.js} +1 -1
  85. package/dist/assets/{ishikawaDiagram-FXEZZL3T-sSnxDKfh.js → ishikawaDiagram-FXEZZL3T-y_Xy128F.js} +1 -1
  86. package/dist/assets/{journeyDiagram-5HDEW3XC-D22V71Mf.js → journeyDiagram-5HDEW3XC-DJn5xYcQ.js} +1 -1
  87. package/dist/assets/{kanban-definition-HUTT4EX6-D3ds0p-g.js → kanban-definition-HUTT4EX6-DJVIOR21.js} +1 -1
  88. package/dist/assets/{line-CbyFs065.js → line-Cos7PIOj.js} +1 -1
  89. package/dist/assets/{linear-4DKtnZBS.js → linear-BtDLqtzF.js} +1 -1
  90. package/dist/assets/loader-circle-CpmBdaon.js +1 -0
  91. package/dist/assets/{map-CcZzEoz6.js → map-BKnQyvd0.js} +1 -1
  92. package/dist/assets/mcp-marketplace-page-CdOY3Sop.js +1 -0
  93. package/dist/assets/mcp-marketplace-page-DvjrfqEt.js +9 -0
  94. package/dist/assets/{mermaid-parser.core-DPmMOjXD.js → mermaid-parser.core-XUNZhr2W.js} +2 -2
  95. package/dist/assets/{mermaid.core-BSf-ddRa.js → mermaid.core-ySrvolIe.js} +3 -3
  96. package/dist/assets/{mindmap-definition-LN4V7U3C-BUTwWPyx.js → mindmap-definition-LN4V7U3C-BypL9tei.js} +1 -1
  97. package/dist/assets/model-config-page-DfOLyQqR.js +1 -0
  98. package/dist/assets/{navigation-link-CAFOcXNg.js → navigation-link-MiiyoIjH.js} +2 -2
  99. package/dist/assets/{ordinal-BgLYtOZE.js → ordinal-CxxVWxYU.js} +1 -1
  100. package/dist/assets/packet-7NZHBO7P-CuFMADV0.js +1 -0
  101. package/dist/assets/{pegDiagram-2B236MQR-BEu_ZBjc.js → pegDiagram-2B236MQR-D-U2KBGv.js} +1 -1
  102. package/dist/assets/pie-RZYD4A2V-XUeIXhM9.js +1 -0
  103. package/dist/assets/{pieDiagram-ENE6RG2P-CAwAwuBd.js → pieDiagram-ENE6RG2P-CBi3GusJ.js} +1 -1
  104. package/dist/assets/plus-C8FkjpSZ.js +1 -0
  105. package/dist/assets/provider-scoped-model-input-DXzjr5l0.js +1 -0
  106. package/dist/assets/providers-config-page-CaO8WfZH.js +1 -0
  107. package/dist/assets/{quadrantDiagram-ABIIQ3AL-CwE6F-_2.js → quadrantDiagram-ABIIQ3AL-H0ZuvnZL.js} +1 -1
  108. package/dist/assets/radar-I7S5WNFK-D-NNGh1k.js +1 -0
  109. package/dist/assets/railroad-3IZDKUUU-C67_uDaM.js +1 -0
  110. package/dist/assets/railroad-abnf-AHOZXSZD-BZ8Yflnd.js +1 -0
  111. package/dist/assets/railroad-ebnf-EBAXGLYW-B7zO7RoK.js +1 -0
  112. package/dist/assets/railroad-peg-LSFZ7HO6-R63PTgLz.js +1 -0
  113. package/dist/assets/{railroadDiagram-RFXS5EU6-xgLekU3B.js → railroadDiagram-RFXS5EU6-D7Y2EqSd.js} +1 -1
  114. package/dist/assets/react-C8XFFvuz.js +8 -0
  115. package/dist/assets/{refresh-cw-CWDp_JnN.js → refresh-cw-a2VVeeAF.js} +1 -1
  116. package/dist/assets/remote-BJHXa4mB.js +1 -0
  117. package/dist/assets/{requirementDiagram-TGXJPOKE-CyVUzEX5.js → requirementDiagram-TGXJPOKE-BiXNX1NN.js} +1 -1
  118. package/dist/assets/rotate-cw-DJ7UF3F2.js +1 -0
  119. package/dist/assets/runtime-config-page-BuA4A02z.js +1 -0
  120. package/dist/assets/{sankeyDiagram-HTMAVEWB-JK6bFmYB.js → sankeyDiagram-HTMAVEWB-qzDeLztW.js} +1 -1
  121. package/dist/assets/{save-Cnr71JON.js → save-CGm23Yww.js} +1 -1
  122. package/dist/assets/{search-CCX11X2m.js → search-CH2t--sH.js} +1 -1
  123. package/dist/assets/search-config-page-BAmYqoAz.js +1 -0
  124. package/dist/assets/secrets-config-page-BlPOuql_.js +3 -0
  125. package/dist/assets/security-config-CbDiY2xr.js +1 -0
  126. package/dist/assets/{select-DvwBu99K.js → select-DnxxDpcV.js} +2 -2
  127. package/dist/assets/{sequenceDiagram-DBY2YBRQ-BR5IokXV.js → sequenceDiagram-DBY2YBRQ-BtRbPQtL.js} +1 -1
  128. package/dist/assets/{settings-2-Dmv6zMne.js → settings-2-agnMYc8a.js} +1 -1
  129. package/dist/assets/{sizeCapture-X5ZJPWSS-SxG_YnMA.js → sizeCapture-X5ZJPWSS-CMYvM3SL.js} +1 -1
  130. package/dist/assets/skeleton-XpqeWL62.js +1 -0
  131. package/dist/assets/{src-vgz8E_-O.js → src-Bw-mzbQb.js} +1 -1
  132. package/dist/assets/{stateDiagram-2N3HPSRC-DD4OoYhn.js → stateDiagram-2N3HPSRC-BJ-mFeOz.js} +1 -1
  133. package/dist/assets/stateDiagram-v2-6OUMAXLB-BE-HqxOK.js +1 -0
  134. package/dist/assets/{swimlanes-5IMT3BWC-BWkFeyCT.js → swimlanes-5IMT3BWC-BsucVOO2.js} +2 -2
  135. package/dist/assets/swimlanesDiagram-G3AALYLV-Dr1H9LJH.js +8 -0
  136. package/dist/assets/{tag-chip-gMPvx7n_.js → tag-chip-CPOc8b2N.js} +1 -1
  137. package/dist/assets/{timeline-definition-FHXFAJF6-VTRPy6KA.js → timeline-definition-FHXFAJF6-Bicewlzo.js} +1 -1
  138. package/dist/assets/treeView-QDETBFTQ-npJ5dbqS.js +1 -0
  139. package/dist/assets/treemap-6X3UGDF4-pYrBx6oa.js +1 -0
  140. package/dist/assets/{vennDiagram-L72KCM5P-Bvk42Pek.js → vennDiagram-L72KCM5P-BxOOnO9x.js} +1 -1
  141. package/dist/assets/wardley-OPB4EBWU-CmSRKLR8.js +1 -0
  142. package/dist/assets/{wardleyDiagram-EHGQE667-DOFjx2s3.js → wardleyDiagram-EHGQE667-Cl7NltMv.js} +1 -1
  143. package/dist/assets/x-odTHAtLZ.js +1 -0
  144. package/dist/assets/{xychartDiagram-FW5EYKEG-DY5yRTUc.js → xychartDiagram-FW5EYKEG-DiMIxQ7N.js} +1 -1
  145. package/dist/index.html +21 -22
  146. package/package.json +8 -8
  147. package/src/features/apps/components/__tests__/app-packages-panel.test.tsx +234 -0
  148. package/src/features/apps/components/app-marketplace-dialog.tsx +262 -0
  149. package/src/features/apps/components/app-package-card.tsx +268 -0
  150. package/src/features/apps/components/app-packages-panel.tsx +301 -0
  151. package/src/features/apps/components/apps-panel.tsx +11 -4
  152. package/src/features/apps/hooks/use-app-marketplace.ts +95 -0
  153. package/src/features/apps/hooks/use-app-packages.ts +59 -0
  154. package/src/features/chat/components/chat-sidebar-list-mode-switch.tsx +27 -4
  155. package/src/features/chat/components/layout/__tests__/chat-sidebar-session-area.test.tsx +36 -5
  156. package/src/features/chat/components/layout/chat-sidebar-desktop-layout.tsx +12 -13
  157. package/src/features/chat/features/conversation/components/__tests__/session-conversation-area.test.tsx +79 -2
  158. package/src/features/chat/features/conversation/components/__tests__/session-conversation-input.streaming.test.tsx +4 -4
  159. package/src/features/chat/features/conversation/components/session-conversation-area.tsx +26 -5
  160. package/src/features/chat/features/conversation/components/session-conversation-input.tsx +3 -0
  161. package/src/features/chat/features/conversation/hooks/use-system-object-reference-select.ts +27 -0
  162. package/src/features/chat/features/conversation/utils/session-message-composer.utils.ts +5 -0
  163. package/src/features/chat/features/input/hooks/__tests__/use-chat-input-surface-state.test.tsx +102 -0
  164. package/src/features/chat/features/input/hooks/use-chat-input-surface-state.ts +71 -120
  165. package/src/features/chat/features/input/input-surface-plugins/__tests__/context-reference-plugin.test.ts +265 -18
  166. package/src/features/chat/features/input/input-surface-plugins/chat-input-product-plugin-adapters.types.ts +7 -2
  167. package/src/features/chat/features/input/input-surface-plugins/chat-input-product-plugin-adapters.utils.ts +124 -0
  168. package/src/features/chat/features/input/input-surface-plugins/context-reference-items.utils.ts +99 -15
  169. package/src/features/chat/features/input/input-surface-plugins/context-reference-plugin.utils.ts +143 -139
  170. package/src/features/chat/features/input/input-surface-plugins/panel-app-input-surface-items.utils.ts +116 -0
  171. package/src/features/chat/features/input/input-surface-plugins/slash-command-plugin.utils.ts +1 -1
  172. package/src/features/chat/features/input/utils/__tests__/chat-inline-token.utils.test.ts +53 -1
  173. package/src/features/chat/features/input/utils/chat-composer-token-protocol.utils.ts +5 -0
  174. package/src/features/chat/features/input/utils/chat-inline-token-composer.utils.ts +134 -0
  175. package/src/features/chat/features/input/utils/chat-inline-token.utils.ts +30 -101
  176. package/src/features/chat/features/input/utils/chat-system-object-reference.utils.test.ts +44 -0
  177. package/src/features/chat/features/input/utils/chat-system-object-reference.utils.ts +46 -0
  178. package/src/features/chat/features/ncp/hooks/__tests__/use-hydrated-ncp-agent.test.tsx +40 -3
  179. package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-file-preview.selection.test.tsx +66 -0
  180. package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-file-preview.test.tsx +13 -1
  181. package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-panel-content.test.tsx +653 -90
  182. package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-text-selection.test.tsx +12 -8
  183. package/src/features/chat/features/workspace/components/chat-session-workspace-directory-browser.tsx +401 -288
  184. package/src/features/chat/features/workspace/components/chat-session-workspace-file-breadcrumbs.tsx +54 -35
  185. package/src/features/chat/features/workspace/components/chat-session-workspace-file-preview.tsx +79 -148
  186. package/src/features/chat/features/workspace/components/chat-session-workspace-panel-content.tsx +156 -94
  187. package/src/features/chat/features/workspace/components/project-files/__tests__/workspace-directory-entry-menu.test.tsx +50 -0
  188. package/src/features/chat/features/workspace/components/project-files/workspace-directory-entry-menu.tsx +209 -0
  189. package/src/features/chat/features/workspace/components/project-files/workspace-directory-tree.tsx +459 -0
  190. package/src/features/chat/features/workspace/components/project-files/workspace-new-folder-tree-item.tsx +112 -0
  191. package/src/features/chat/features/workspace/components/project-files/workspace-project-files-toolbar.tsx +64 -0
  192. package/src/features/chat/features/workspace/hooks/use-workspace-explorer-layout.ts +85 -0
  193. package/src/features/chat/features/workspace/hooks/use-workspace-file-actions.ts +357 -0
  194. package/src/features/chat/features/workspace/utils/chat-workspace-file-path-mutation.utils.ts +58 -0
  195. package/src/features/chat/features/workspace/utils/chat-workspace-file-tab.utils.ts +23 -22
  196. package/src/features/chat/features/workspace/utils/chat-workspace-panel-layout.utils.ts +13 -4
  197. package/src/features/chat/index.ts +1 -1
  198. package/src/features/chat/managers/__tests__/chat-composer-intent.manager.test.ts +86 -60
  199. package/src/features/chat/managers/__tests__/chat-thread.manager.test.ts +103 -99
  200. package/src/features/chat/managers/chat-composer-intent.manager.ts +37 -33
  201. package/src/features/chat/managers/chat-draft-intent.manager.ts +18 -2
  202. package/src/features/chat/managers/chat-thread.manager.ts +132 -128
  203. package/src/features/chat/stores/__tests__/chat-thread.store.test.ts +26 -40
  204. package/src/features/chat/stores/chat-thread.store.ts +53 -74
  205. package/src/features/inbox/components/inbox-reader-dialog.test.tsx +38 -5
  206. package/src/features/inbox/components/inbox-reader-dialog.tsx +5 -3
  207. package/src/features/inbox/managers/inbox.manager.test.ts +28 -3
  208. package/src/features/inbox/managers/inbox.manager.ts +14 -4
  209. package/src/features/inbox/pages/inbox-page.test.ts +121 -2
  210. package/src/features/inbox/pages/inbox-page.tsx +5 -3
  211. package/src/features/marketplace/components/__tests__/marketplace-page.test.tsx +85 -1
  212. package/src/features/marketplace/hooks/__tests__/use-marketplace.test.tsx +44 -1
  213. package/src/features/marketplace/hooks/use-marketplace-item-actions.ts +23 -2
  214. package/src/features/marketplace/hooks/use-marketplace.ts +10 -0
  215. package/src/features/marketplace/index.ts +4 -0
  216. package/src/features/panel-apps/index.ts +5 -1
  217. package/src/features/panel-apps/utils/__tests__/panel-app-doc-browser.utils.test.ts +13 -6
  218. package/src/features/panel-apps/utils/panel-app-doc-browser.utils.tsx +6 -3
  219. package/src/features/right-panel-resources/index.ts +1 -0
  220. package/src/features/right-panel-resources/utils/right-panel-resource-uri.utils.ts +7 -4
  221. package/src/features/system-status/components/__tests__/desktop-update-config.test.tsx +20 -1
  222. package/src/features/system-status/components/desktop-update-config.tsx +14 -13
  223. package/src/features/system-status/managers/__tests__/runtime-update.manager.test.ts +99 -0
  224. package/src/features/system-status/managers/runtime-update.manager.ts +22 -0
  225. package/src/features/system-status/stores/runtime-update.store.ts +1 -0
  226. package/src/shared/components/resizable-right-panel/__tests__/resizable-right-panel.test.tsx +35 -38
  227. package/src/shared/components/resizable-right-panel/resizable-right-panel.tsx +25 -19
  228. package/src/shared/components/ui/actions/__tests__/icon-action-button.test.tsx +15 -0
  229. package/src/shared/components/ui/actions/icon-action-button.tsx +4 -2
  230. package/src/shared/components/ui/context-menu/__tests__/context-menu.test.tsx +60 -34
  231. package/src/shared/components/ui/context-menu/context-menu.tsx +95 -68
  232. package/src/shared/hooks/use-system-object-references.ts +22 -0
  233. package/src/shared/lib/api/managers/client.manager.ts +31 -17
  234. package/src/shared/lib/api/server-path/server-path.types.ts +66 -0
  235. package/src/shared/lib/api/types.ts +155 -116
  236. package/src/shared/lib/api/utils/server-path.utils.ts +35 -11
  237. package/src/shared/lib/i18n/locales/en-US/chat.json +58 -9
  238. package/src/shared/lib/i18n/locales/en-US/desktop-update.json +7 -4
  239. package/src/shared/lib/i18n/locales/en-US/doc-browser.json +40 -0
  240. package/src/shared/lib/i18n/locales/en-US/marketplace.json +3 -0
  241. package/src/shared/lib/i18n/locales/zh-CN/chat.json +60 -11
  242. package/src/shared/lib/i18n/locales/zh-CN/desktop-update.json +7 -4
  243. package/src/shared/lib/i18n/locales/zh-CN/doc-browser.json +40 -0
  244. package/src/shared/lib/i18n/locales/zh-CN/marketplace.json +3 -0
  245. package/dist/assets/appearance-settings-page-DpVJjvkB.js +0 -1
  246. package/dist/assets/architecture-TIHT7OUA-Bjp9jf0h.js +0 -1
  247. package/dist/assets/channel-5T3pdR-s.js +0 -1
  248. package/dist/assets/chat-page-BuFDmG5_.js +0 -1
  249. package/dist/assets/chunk-2Q5K7J3B-DTZ3tGfE.js +0 -1
  250. package/dist/assets/chunk-VAUOI2AC-HLGIHQ6k.js +0 -1
  251. package/dist/assets/chunk-XXDRQBXY-Dl0m6Ni-.js +0 -1
  252. package/dist/assets/classDiagram-OUVF2IWQ-DcDnzGNX.js +0 -1
  253. package/dist/assets/classDiagram-v2-EOCWNBFH-BKXKMzKM.js +0 -1
  254. package/dist/assets/config-split-page-BVWVDbvG.js +0 -1
  255. package/dist/assets/confirm-dialog-mA2iVzxh.js +0 -5
  256. package/dist/assets/cynefin-VYW2F7L2-BWg7U2UD.js +0 -1
  257. package/dist/assets/desktop-update-config-DyQb1LXr.js +0 -1
  258. package/dist/assets/doc-browser-CtO_HtRy.js +0 -1
  259. package/dist/assets/doc-browser-context-CuGI6PQc.js +0 -1
  260. package/dist/assets/doc-browser-eMUagyBV.js +0 -1
  261. package/dist/assets/eventmodeling-45OFAUF4-SB-J4tpq.js +0 -1
  262. package/dist/assets/flowDiagram-23GEKE2U-BQ_u-eLM.js +0 -1
  263. package/dist/assets/form-actions-BOfIyG3O.js +0 -1
  264. package/dist/assets/gitGraph-TEB2WS4Q-DPxNwsFd.js +0 -1
  265. package/dist/assets/index-BjBdWHV1.js +0 -107
  266. package/dist/assets/index-DmpmjAGQ.css +0 -1
  267. package/dist/assets/info-DKCQHKI2-DNlNGH90.js +0 -1
  268. package/dist/assets/loader-circle-Df8wF2Pr.js +0 -1
  269. package/dist/assets/mcp-marketplace-page-DI49IKxp.js +0 -1
  270. package/dist/assets/mcp-marketplace-page-ofDqbOIF.js +0 -9
  271. package/dist/assets/model-config-page-D73Tu3jW.js +0 -1
  272. package/dist/assets/packet-7NZHBO7P-BpeiqkBZ.js +0 -1
  273. package/dist/assets/pie-RZYD4A2V-Cy1yxsPd.js +0 -1
  274. package/dist/assets/plus-DVU5RLCS.js +0 -1
  275. package/dist/assets/provider-scoped-model-input-BaJJJYMX.js +0 -1
  276. package/dist/assets/providers-config-page-BL6IRVBm.js +0 -1
  277. package/dist/assets/radar-I7S5WNFK-CEcPKCj8.js +0 -1
  278. package/dist/assets/railroad-3IZDKUUU-CW38eNDs.js +0 -1
  279. package/dist/assets/railroad-abnf-AHOZXSZD-ByrylcXf.js +0 -1
  280. package/dist/assets/railroad-ebnf-EBAXGLYW-CNB6GwP-.js +0 -1
  281. package/dist/assets/railroad-peg-LSFZ7HO6-x6hnqlBG.js +0 -1
  282. package/dist/assets/react-BC_orpAj.js +0 -8
  283. package/dist/assets/remote-T24O58lH.js +0 -1
  284. package/dist/assets/rotate-cw-BqhwSV5p.js +0 -1
  285. package/dist/assets/runtime-config-page-CXUx017t.js +0 -1
  286. package/dist/assets/search-config-page-BB6d5gT7.js +0 -1
  287. package/dist/assets/secrets-config-page-DYsDeT9K.js +0 -3
  288. package/dist/assets/security-config-CVPgqL7G.js +0 -1
  289. package/dist/assets/skeleton-C5tWata3.js +0 -1
  290. package/dist/assets/stateDiagram-v2-6OUMAXLB-ZC6dFORv.js +0 -1
  291. package/dist/assets/swimlanesDiagram-G3AALYLV-CRkh51Im.js +0 -8
  292. package/dist/assets/treeView-QDETBFTQ-Bw0DSCH7.js +0 -1
  293. package/dist/assets/treemap-6X3UGDF4-DFWBFcfh.js +0 -1
  294. package/dist/assets/use-confirm-dialog-D_3-QpZU.js +0 -1
  295. package/dist/assets/wardley-OPB4EBWU-CoWturk0.js +0 -1
  296. package/dist/assets/x-BEWSqeux.js +0 -1
  297. /package/dist/assets/{array-NADKd9aU.js → array-BQVzeGRt.js} +0 -0
  298. /package/dist/assets/{chunk-KEIR6QF5-BuyuzJJL.js → chunk-KEIR6QF5-f9psyCXK.js} +0 -0
  299. /package/dist/assets/{chunk-Y2CYZVJY-D_B2ZRNt.js → chunk-Y2CYZVJY-D1mAU_Po.js} +0 -0
  300. /package/dist/assets/{config-hints-BcfVUMij.js → config-hints-nV5HPOvq.js} +0 -0
  301. /package/dist/assets/{cytoscape.esm-BANTlgza.js → cytoscape.esm-0uDtdD0l.js} +0 -0
  302. /package/dist/assets/{defaultLocale-C4_L0aEs.js → defaultLocale-DSWXGgt0.js} +0 -0
  303. /package/dist/assets/{dist-DAPEIJbz.js → dist--ta5rX12.js} +0 -0
  304. /package/dist/assets/{graphlib-ChqXg0dI.js → graphlib-CQ6QV4yP.js} +0 -0
  305. /package/dist/assets/{host-capabilities-D9C4CBK5.js → host-capabilities-Tk038i04.js} +0 -0
  306. /package/dist/assets/{init-D8wZg9xq.js → init-Y6h9jGtZ.js} +0 -0
  307. /package/dist/assets/{jszip.min-CkbBfwAQ.js → jszip.min-8hyJpgpx.js} +0 -0
  308. /package/dist/assets/{katex-TZJFa0J_.js → katex-ARhY9PS1.js} +0 -0
  309. /package/dist/assets/{middleware-B3k-TSmZ.js → middleware-DXsbf9xI.js} +0 -0
  310. /package/dist/assets/{path-DodfxcX7.js → path-10BjdyLh.js} +0 -0
  311. /package/dist/assets/{rough.esm-CUaa1Rbe.js → rough.esm-DxgC_14r.js} +0 -0
  312. /package/dist/assets/{xlsx-CxByi7bR.js → xlsx-DrDuDNAa.js} +0 -0
@@ -1,6 +1,6 @@
1
- import { fireEvent, render, screen } from "@testing-library/react";
2
- import { beforeEach, describe, expect, it, vi } from "vitest";
3
- import { ResizableRightPanel } from "@/shared/components/resizable-right-panel/resizable-right-panel";
1
+ import { fireEvent, render, screen } from '@testing-library/react';
2
+ import { beforeEach, describe, expect, it, vi } from 'vitest';
3
+ import { ResizableRightPanel } from '@/shared/components/resizable-right-panel/resizable-right-panel';
4
4
 
5
5
  function firePointerEvent(
6
6
  target: Window | Document | Node | Element,
@@ -15,12 +15,12 @@ function firePointerEvent(
15
15
  fireEvent(target, event);
16
16
  }
17
17
 
18
- describe("ResizableRightPanel", () => {
18
+ describe('ResizableRightPanel', () => {
19
19
  beforeEach(() => {
20
20
  HTMLElement.prototype.setPointerCapture = vi.fn();
21
21
  });
22
22
 
23
- it("resizes horizontally from the left handle and clamps to max width", () => {
23
+ it('resizes horizontally from the left handle and clamps to max width', () => {
24
24
  const onWidthCommit = vi.fn();
25
25
  render(
26
26
  <ResizableRightPanel
@@ -34,48 +34,51 @@ describe("ResizableRightPanel", () => {
34
34
  </ResizableRightPanel>,
35
35
  );
36
36
 
37
- firePointerEvent(
38
- screen.getByTestId("resizable-right-panel-handle"),
39
- "pointerdown",
40
- { clientX: 800, pointerId: 1 },
41
- );
42
- firePointerEvent(window, "pointermove", { clientX: 600, pointerId: 1 });
37
+ firePointerEvent(screen.getByTestId('resizable-right-panel-handle'), 'pointerdown', { clientX: 800, pointerId: 1 });
38
+ firePointerEvent(window, 'pointermove', { clientX: 600, pointerId: 1 });
43
39
 
44
- expect(screen.getByTestId("right-panel").style.width).toBe("500px");
45
- expect(
46
- screen.getByTestId("resizable-right-panel-resize-shield"),
47
- ).toBeTruthy();
40
+ expect(screen.getByTestId('right-panel').style.width).toBe('500px');
41
+ expect(screen.getByTestId('resizable-right-panel-resize-shield')).toBeTruthy();
48
42
 
49
- firePointerEvent(window, "pointerup", { clientX: 600, pointerId: 1 });
43
+ firePointerEvent(window, 'pointerup', { clientX: 600, pointerId: 1 });
50
44
 
51
45
  expect(onWidthCommit).toHaveBeenCalledWith(500);
52
46
 
53
- expect(
54
- screen.queryByTestId("resizable-right-panel-resize-shield"),
55
- ).toBeNull();
47
+ expect(screen.queryByTestId('resizable-right-panel-resize-shield')).toBeNull();
56
48
  });
57
49
 
58
- it("does not render resize controls in overlay mode", () => {
50
+ it('does not render resize controls in overlay mode', () => {
59
51
  render(
60
52
  <ResizableRightPanel data-testid="right-panel" overlay>
61
53
  Content
62
54
  </ResizableRightPanel>,
63
55
  );
64
56
 
65
- expect(
66
- screen.queryByTestId("resizable-right-panel-handle"),
67
- ).toBeNull();
68
- expect(screen.getByTestId("right-panel").className).toContain("fixed");
57
+ expect(screen.queryByTestId('resizable-right-panel-handle')).toBeNull();
58
+ expect(screen.getByTestId('right-panel').className).toContain('fixed');
59
+ });
60
+
61
+ it('keeps the outer resize boundary above nested panel overlays', () => {
62
+ render(
63
+ <ResizableRightPanel data-testid="right-panel">
64
+ <div className="absolute inset-0 z-20" data-testid="nested-overlay" />
65
+ </ResizableRightPanel>,
66
+ );
67
+
68
+ const panel = screen.getByTestId('right-panel');
69
+ const handle = screen.getByTestId('resizable-right-panel-handle');
70
+ expect(handle.className).toContain('z-30');
71
+ expect(panel.compareDocumentPosition(handle) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
69
72
  });
70
73
 
71
- it("applies a persisted controlled width after store rehydration", () => {
74
+ it('applies a persisted controlled width after store rehydration', () => {
72
75
  const view = render(
73
76
  <ResizableRightPanel data-testid="right-panel" width={480}>
74
77
  Content
75
78
  </ResizableRightPanel>,
76
79
  );
77
80
 
78
- expect(screen.getByTestId("right-panel").style.width).toBe("480px");
81
+ expect(screen.getByTestId('right-panel').style.width).toBe('480px');
79
82
 
80
83
  view.rerender(
81
84
  <ResizableRightPanel data-testid="right-panel" width={620}>
@@ -83,24 +86,18 @@ describe("ResizableRightPanel", () => {
83
86
  </ResizableRightPanel>,
84
87
  );
85
88
 
86
- expect(screen.getByTestId("right-panel").style.width).toBe("620px");
89
+ expect(screen.getByTestId('right-panel').style.width).toBe('620px');
87
90
  });
88
91
 
89
- it("can scope overlay positioning to its container", () => {
92
+ it('can scope overlay positioning to its container', () => {
90
93
  render(
91
- <ResizableRightPanel
92
- data-testid="right-panel"
93
- overlay
94
- overlayScope="container"
95
- >
94
+ <ResizableRightPanel data-testid="right-panel" overlay overlayScope="container">
96
95
  Content
97
96
  </ResizableRightPanel>,
98
97
  );
99
98
 
100
- expect(
101
- screen.queryByTestId("resizable-right-panel-handle"),
102
- ).toBeNull();
103
- expect(screen.getByTestId("right-panel").className).toContain("absolute");
104
- expect(screen.getByTestId("right-panel").className).not.toContain("fixed");
99
+ expect(screen.queryByTestId('resizable-right-panel-handle')).toBeNull();
100
+ expect(screen.getByTestId('right-panel').className).toContain('absolute');
101
+ expect(screen.getByTestId('right-panel').className).not.toContain('fixed');
105
102
  });
106
103
  });
@@ -1,13 +1,13 @@
1
- import { useRef, useState, type ComponentPropsWithoutRef } from "react";
2
- import { cn } from "@/shared/lib/utils";
1
+ import { useRef, useState, type ComponentPropsWithoutRef } from 'react';
2
+ import { cn } from '@/shared/lib/utils';
3
3
 
4
- type ResizableRightPanelProps = ComponentPropsWithoutRef<"aside"> & {
4
+ type ResizableRightPanelProps = ComponentPropsWithoutRef<'aside'> & {
5
5
  defaultWidth?: number;
6
6
  minWidth?: number;
7
7
  maxWidth?: number;
8
8
  onWidthCommit?: (width: number) => void;
9
9
  overlay?: boolean;
10
- overlayScope?: "viewport" | "container";
10
+ overlayScope?: 'viewport' | 'container';
11
11
  width?: number;
12
12
  };
13
13
 
@@ -20,7 +20,7 @@ export function ResizableRightPanel({
20
20
  maxWidth = 860,
21
21
  onWidthCommit,
22
22
  overlay = false,
23
- overlayScope = "viewport",
23
+ overlayScope = 'viewport',
24
24
  width: controlledWidth,
25
25
  ...props
26
26
  }: ResizableRightPanelProps) {
@@ -31,10 +31,10 @@ export function ResizableRightPanel({
31
31
  const [uncontrolledWidth, setUncontrolledWidth] = useState(defaultWidth);
32
32
  const width = dragWidth ?? controlledWidth ?? uncontrolledWidth;
33
33
  const overlayClassName = overlay
34
- ? overlayScope === "container"
35
- ? "absolute inset-0 z-30"
36
- : "fixed inset-0 z-40"
37
- : "border-l border-border";
34
+ ? overlayScope === 'container'
35
+ ? 'absolute inset-0 z-30'
36
+ : 'fixed inset-0 z-40'
37
+ : 'border-l border-border';
38
38
 
39
39
  const onResizeStart = (event: React.PointerEvent<HTMLDivElement>) => {
40
40
  if (overlay) return;
@@ -60,30 +60,36 @@ export function ResizableRightPanel({
60
60
  setDragWidth(null);
61
61
  setIsResizing(false);
62
62
  resizeRef.current = null;
63
- window.removeEventListener("pointermove", onMove);
64
- window.removeEventListener("pointerup", onUp);
65
- window.removeEventListener("pointercancel", onUp);
63
+ window.removeEventListener('pointermove', onMove);
64
+ window.removeEventListener('pointerup', onUp);
65
+ window.removeEventListener('pointercancel', onUp);
66
66
  };
67
- window.addEventListener("pointermove", onMove);
68
- window.addEventListener("pointerup", onUp);
69
- window.addEventListener("pointercancel", onUp);
67
+ window.addEventListener('pointermove', onMove);
68
+ window.addEventListener('pointerup', onUp);
69
+ window.addEventListener('pointercancel', onUp);
70
70
  };
71
71
 
72
72
  return (
73
73
  <aside
74
74
  {...props}
75
75
  className={cn(
76
- "relative flex h-full min-h-0 shrink-0 overflow-hidden bg-card text-card-foreground",
76
+ 'relative flex h-full min-h-0 shrink-0 overflow-hidden bg-card text-card-foreground',
77
77
  overlayClassName,
78
78
  className,
79
79
  )}
80
80
  style={overlay ? style : { ...style, width }}
81
81
  >
82
+ <div className="flex h-full min-h-0 w-full flex-col overflow-hidden">{children}</div>
82
83
  {!overlay ? (
83
- <div className="absolute left-0 top-0 z-20 h-full w-3 cursor-ew-resize transition-colors hover:bg-primary/10" data-testid="resizable-right-panel-handle" onPointerDown={onResizeStart} />
84
+ <div
85
+ className="absolute left-0 top-0 z-30 h-full w-3 cursor-ew-resize transition-colors hover:bg-primary/10"
86
+ data-testid="resizable-right-panel-handle"
87
+ onPointerDown={onResizeStart}
88
+ />
89
+ ) : null}
90
+ {isResizing ? (
91
+ <div className="absolute inset-0 z-10 cursor-ew-resize" data-testid="resizable-right-panel-resize-shield" />
84
92
  ) : null}
85
- <div className="flex h-full min-h-0 w-full flex-col overflow-hidden">{children}</div>
86
- {isResizing ? <div className="absolute inset-0 z-10 cursor-ew-resize" data-testid="resizable-right-panel-resize-shield" /> : null}
87
93
  </aside>
88
94
  );
89
95
  }
@@ -34,6 +34,21 @@ describe('IconActionButton', () => {
34
34
  expect(button.className).toContain('hover:bg-[var(--interaction-hover)]');
35
35
  });
36
36
 
37
+ it('uses surface-relative feedback without introducing a new surface', () => {
38
+ render(
39
+ <IconActionButton
40
+ tone="surface"
41
+ icon={<span data-testid="icon" />}
42
+ label="Add project"
43
+ />,
44
+ );
45
+
46
+ const button = screen.getByRole('button', { name: 'Add project' });
47
+ expect(button.className).toContain('hover:bg-gray-200/60');
48
+ expect(button.className).toContain('hover:text-gray-900');
49
+ expect(button.className).toContain('active:bg-gray-200/80');
50
+ });
51
+
37
52
  it('ignores restored pointer focus while preserving keyboard tooltip focus', () => {
38
53
  render(
39
54
  <IconActionButton
@@ -8,7 +8,7 @@ import {
8
8
  import { cn } from '@/shared/lib/utils';
9
9
 
10
10
  type IconActionButtonSize = 'sm' | 'md' | 'lg';
11
- type IconActionButtonTone = 'default' | 'strong';
11
+ type IconActionButtonTone = 'default' | 'surface' | 'strong';
12
12
 
13
13
  type IconActionButtonProps = Omit<
14
14
  React.ButtonHTMLAttributes<HTMLButtonElement>,
@@ -17,7 +17,7 @@ type IconActionButtonProps = Omit<
17
17
  icon: React.ReactNode;
18
18
  label: string;
19
19
  size?: IconActionButtonSize;
20
- /** default: soft accent hover. strong: denser gray hover for nested hover surfaces. */
20
+ /** default: global interaction hover. surface: relative feedback on the current surface. strong: denser feedback for nested hover surfaces. */
21
21
  tone?: IconActionButtonTone;
22
22
  tooltip?: string | false | null;
23
23
  tooltipSide?: 'top' | 'right' | 'bottom' | 'left';
@@ -32,6 +32,8 @@ const SIZE_CLASS: Record<IconActionButtonSize, string> = {
32
32
  const TONE_CLASS: Record<IconActionButtonTone, string> = {
33
33
  default:
34
34
  'text-muted-foreground hover:bg-[var(--interaction-hover)] hover:text-accent-foreground disabled:text-muted-foreground/45 disabled:hover:bg-transparent disabled:hover:text-muted-foreground/45',
35
+ surface:
36
+ 'text-muted-foreground hover:bg-gray-200/60 hover:text-gray-900 active:bg-gray-200/80 disabled:text-muted-foreground/45 disabled:hover:bg-transparent disabled:hover:text-muted-foreground/45',
35
37
  strong:
36
38
  'text-muted-foreground hover:bg-black/10 hover:text-foreground disabled:text-muted-foreground/45 disabled:hover:bg-transparent disabled:hover:text-muted-foreground/45',
37
39
  };
@@ -1,23 +1,20 @@
1
- import { fireEvent, render, screen, waitFor } from "@testing-library/react";
2
- import userEvent from "@testing-library/user-event";
3
- import { describe, expect, it, vi } from "vitest";
4
- import {
5
- ContextMenu,
6
- ContextMenuTrigger,
7
- } from "@/shared/components/ui/context-menu/context-menu";
1
+ import { fireEvent, render, screen, waitFor } from '@testing-library/react';
2
+ import userEvent from '@testing-library/user-event';
3
+ import { describe, expect, it, vi } from 'vitest';
4
+ import { ContextMenu, ContextMenuTrigger } from '@/shared/components/ui/context-menu/context-menu';
8
5
 
9
- describe("ContextMenu", () => {
10
- it("opens at the trigger and supports keyboard selection", async () => {
6
+ describe('ContextMenu', () => {
7
+ it('opens at the trigger and supports keyboard selection', async () => {
11
8
  const onSelect = vi.fn();
12
9
  render(
13
10
  <ContextMenu
14
11
  label="File actions"
15
12
  groups={[
16
13
  {
17
- key: "file",
14
+ key: 'file',
18
15
  items: [
19
- { key: "open", label: "Open", onSelect: vi.fn() },
20
- { key: "copy", label: "Copy path", onSelect },
16
+ { key: 'open', label: 'Open', onSelect: vi.fn() },
17
+ { key: 'copy', label: 'Copy path', onSelect },
21
18
  ],
22
19
  },
23
20
  ]}
@@ -26,29 +23,27 @@ describe("ContextMenu", () => {
26
23
  </ContextMenu>,
27
24
  );
28
25
 
29
- fireEvent.contextMenu(screen.getByRole("button", { name: "README.md" }), {
26
+ fireEvent.contextMenu(screen.getByRole('button', { name: 'README.md' }), {
30
27
  clientX: 120,
31
28
  clientY: 80,
32
29
  });
33
30
 
34
- expect(screen.getByRole("menu", { name: "File actions" })).toBeTruthy();
35
- expect(document.activeElement).toBe(
36
- screen.getByRole("menuitem", { name: "Open" }),
37
- );
38
- await userEvent.keyboard("{ArrowDown}{Enter}");
31
+ expect(screen.getByRole('menu', { name: 'File actions' })).toBeTruthy();
32
+ expect(document.activeElement).toBe(screen.getByRole('menuitem', { name: 'Open' }));
33
+ await userEvent.keyboard('{ArrowDown}{Enter}');
39
34
  expect(onSelect).toHaveBeenCalledTimes(1);
40
- expect(screen.queryByRole("menu")).toBeNull();
35
+ expect(screen.queryByRole('menu')).toBeNull();
41
36
  });
42
37
 
43
- it("opens the same menu from an explicit trigger", async () => {
38
+ it('opens the same menu from an explicit trigger', async () => {
44
39
  const onSelect = vi.fn();
45
40
  render(
46
41
  <ContextMenu
47
42
  label="File actions"
48
43
  groups={[
49
44
  {
50
- key: "file",
51
- items: [{ key: "add", label: "Add to chat", onSelect }],
45
+ key: 'file',
46
+ items: [{ key: 'add', label: 'Add to chat', onSelect }],
52
47
  },
53
48
  ]}
54
49
  >
@@ -61,28 +56,59 @@ describe("ContextMenu", () => {
61
56
  </ContextMenu>,
62
57
  );
63
58
 
64
- await userEvent.click(screen.getByRole("button", { name: "More actions" }));
65
- expect(screen.getByRole("menu", { name: "File actions" })).toBeTruthy();
66
- await userEvent.click(screen.getByRole("menuitem", { name: "Add to chat" }));
59
+ await userEvent.click(screen.getByRole('button', { name: 'More actions' }));
60
+ expect(screen.getByRole('menu', { name: 'File actions' })).toBeTruthy();
61
+ await userEvent.click(screen.getByRole('menuitem', { name: 'Add to chat' }));
67
62
 
68
63
  expect(onSelect).toHaveBeenCalledTimes(1);
69
64
  });
70
65
 
71
- it("does not steal focus back when an action focuses the composer", async () => {
66
+ it('keeps download actions as keyboard-focusable links', async () => {
67
+ render(
68
+ <ContextMenu
69
+ label="File actions"
70
+ groups={[
71
+ {
72
+ key: 'file',
73
+ items: [
74
+ {
75
+ key: 'download',
76
+ label: 'Download',
77
+ href: '/api/files/report.md',
78
+ download: 'report.md',
79
+ },
80
+ ],
81
+ },
82
+ ]}
83
+ >
84
+ <button type="button">report.md</button>
85
+ </ContextMenu>,
86
+ );
87
+
88
+ fireEvent.contextMenu(screen.getByRole('button', { name: 'report.md' }));
89
+ const download = screen.getByRole('menuitem', { name: 'Download' });
90
+ expect(document.activeElement).toBe(download);
91
+ expect(download.tagName).toBe('A');
92
+ expect(download.getAttribute('download')).toBe('report.md');
93
+ });
94
+
95
+ it('does not steal focus back when an action focuses the composer', async () => {
72
96
  render(
73
97
  <div>
74
- <button type="button" data-testid="composer">Composer</button>
98
+ <button type="button" data-testid="composer">
99
+ Composer
100
+ </button>
75
101
  <ContextMenu
76
102
  label="File actions"
77
103
  groups={[
78
104
  {
79
- key: "chat",
105
+ key: 'chat',
80
106
  items: [
81
107
  {
82
- key: "add",
83
- label: "Add to chat",
108
+ key: 'add',
109
+ label: 'Add to chat',
84
110
  restoreFocus: false,
85
- onSelect: () => screen.getByTestId("composer").focus(),
111
+ onSelect: () => screen.getByTestId('composer').focus(),
86
112
  },
87
113
  ],
88
114
  },
@@ -93,11 +119,11 @@ describe("ContextMenu", () => {
93
119
  </div>,
94
120
  );
95
121
 
96
- fireEvent.contextMenu(screen.getByRole("button", { name: "README.md" }));
97
- await userEvent.click(screen.getByRole("menuitem", { name: "Add to chat" }));
122
+ fireEvent.contextMenu(screen.getByRole('button', { name: 'README.md' }));
123
+ await userEvent.click(screen.getByRole('menuitem', { name: 'Add to chat' }));
98
124
 
99
125
  await waitFor(() => {
100
- expect(document.activeElement).toBe(screen.getByTestId("composer"));
126
+ expect(document.activeElement).toBe(screen.getByTestId('composer'));
101
127
  });
102
128
  });
103
129
  });