@nextclaw/ui 0.24.1 → 0.24.3

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 (353) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/.vite/manifest.json +2477 -0
  3. package/dist/assets/{abnfDiagram-VRR7QNED-BcFJp_1X.js → abnfDiagram-VRR7QNED-Kzlh3ZEC.js} +1 -1
  4. package/dist/assets/account-panel-BRTSwNvA.js +1 -0
  5. package/dist/assets/{aiden0z-pptx-renderer.es-Dp2ezlQn.js → aiden0z-pptx-renderer.es-k1xZLzeo.js} +1 -1
  6. package/dist/assets/api-BnUzdltV.js +13 -0
  7. package/dist/assets/app-data-Bjh_zM45.js +1 -0
  8. package/dist/assets/app-presenter-provider-CBt-lyr_.js +109 -0
  9. package/dist/assets/app-presenter-provider-D3BuuOyZ.css +1 -0
  10. package/dist/assets/appearance-settings-page-BrOYSgG0.js +1 -0
  11. package/dist/assets/{arc-CkgyPMyW.js → arc-CpivM836.js} +1 -1
  12. package/dist/assets/architecture-TIHT7OUA-CVRF_cYQ.js +1 -0
  13. package/dist/assets/{architectureDiagram-ZJ3FMSHR-CMd4cIjI.js → architectureDiagram-ZJ3FMSHR-ifjW1qjI.js} +1 -1
  14. package/dist/assets/{blockDiagram-677ZJIJ3-Bz3tbhet.js → blockDiagram-677ZJIJ3-C_zeJrKF.js} +1 -1
  15. package/dist/assets/{book-open-o2x7OLiO.js → book-open-xqEj1OLE.js} +1 -1
  16. package/dist/assets/boxes-D6uPnkGo.js +1 -0
  17. package/dist/assets/{c4Diagram-LMCZKHZV-D9hFNAGv.js → c4Diagram-LMCZKHZV-CpapRftp.js} +1 -1
  18. package/dist/assets/card-CS8su2Zh.js +1 -0
  19. package/dist/assets/channel-CBrWRr4N.js +1 -0
  20. package/dist/assets/channels-list-page-BE0TxB3B.js +8 -0
  21. package/dist/assets/chevron-down-BL-yMYcX.js +1 -0
  22. package/dist/assets/chunk-2Q5K7J3B-B8mmRk7d.js +1 -0
  23. package/dist/assets/{chunk-32BRIVSS-7NrjEITq.js → chunk-32BRIVSS-BKBwdmKR.js} +1 -1
  24. package/dist/assets/{chunk-52WLFC77-viIcqj9q.js → chunk-52WLFC77-BgZRCpDx.js} +1 -1
  25. package/dist/assets/{chunk-5FCAYU7R-Vsu4J-VM.js → chunk-5FCAYU7R-YWfOINJi.js} +1 -1
  26. package/dist/assets/{chunk-5HE753X5-C-w6CQZK.js → chunk-5HE753X5-BZ6I07d2.js} +1 -1
  27. package/dist/assets/{chunk-5JV3BV7I-CuKgJQ4W.js → chunk-5JV3BV7I-B7QYgZU5.js} +1 -1
  28. package/dist/assets/{chunk-5TONJI2A-CYeiWZKb.js → chunk-5TONJI2A-DjyQwgL2.js} +1 -1
  29. package/dist/assets/{chunk-5VM5RSS4-DRCbfwIn.js → chunk-5VM5RSS4-DheHV7X2.js} +1 -1
  30. package/dist/assets/{chunk-7BUUIJ7U-BvydOcm3.js → chunk-7BUUIJ7U-D6bq2PKF.js} +1 -1
  31. package/dist/assets/{chunk-BIQX33UG-RlppOXKo.js → chunk-BIQX33UG-CL9x0ibm.js} +1 -1
  32. package/dist/assets/{chunk-C7G6YPKG-DAizzYwr.js → chunk-C7G6YPKG-8z3B6RUH.js} +1 -1
  33. package/dist/assets/{chunk-CQNSW5MT-5eChJHca.js → chunk-CQNSW5MT-DpHkxY3n.js} +1 -1
  34. package/dist/assets/{chunk-CYSBUYHQ-YHPr53fv.js → chunk-CYSBUYHQ-DIJDLsdJ.js} +1 -1
  35. package/dist/assets/{chunk-EMLP6XTP-CK4D7Hz5.js → chunk-EMLP6XTP-B-LjAyVd.js} +1 -1
  36. package/dist/assets/{chunk-EX3LRPZG-BmlDFIRW.js → chunk-EX3LRPZG-BChuEPvO.js} +1 -1
  37. package/dist/assets/{chunk-FWX5IMBZ-D0ksHZZ9.js → chunk-FWX5IMBZ-fBFt0u3f.js} +2 -2
  38. package/dist/assets/{chunk-HOUHSVGY-DPkq8FCm.js → chunk-HOUHSVGY-MD0SpW5A.js} +1 -1
  39. package/dist/assets/{chunk-ICXQ74PX-FAatv5fC.js → chunk-ICXQ74PX-DvCcw_hz.js} +1 -1
  40. package/dist/assets/{chunk-JG7HCLWE-DLkIi4F7.js → chunk-JG7HCLWE-B8zqBnU9.js} +1 -1
  41. package/dist/assets/{chunk-JWPE2WC7-DawOjNE3.js → chunk-JWPE2WC7-C9efnkGb.js} +1 -1
  42. package/dist/assets/{chunk-MOJQB5TN-Di52TorW.js → chunk-MOJQB5TN-gXbfqoqq.js} +1 -1
  43. package/dist/assets/{chunk-MOZMSUNE-PfyK9w1-.js → chunk-MOZMSUNE-twIwdkqC.js} +1 -1
  44. package/dist/assets/{chunk-OGEWGWER-C3jdH3Ty.js → chunk-OGEWGWER-DdR0_cWK.js} +1 -1
  45. package/dist/assets/{chunk-OSBZ3O6U-CecHo-f0.js → chunk-OSBZ3O6U-D7D58Foa.js} +1 -1
  46. package/dist/assets/{chunk-PUDLZKDR-f3IJh3sN.js → chunk-PUDLZKDR-DPILgOVY.js} +1 -1
  47. package/dist/assets/{chunk-Q4XR5HBZ-DQFeUPxZ.js → chunk-Q4XR5HBZ-C0JJx7lW.js} +1 -1
  48. package/dist/assets/{chunk-QBLGF6JB-BhUeG0y2.js → chunk-QBLGF6JB-Dbsf69ng.js} +1 -1
  49. package/dist/assets/{chunk-R7FJI6CG-C3XpZ-2u.js → chunk-R7FJI6CG-Bb8n616-.js} +1 -1
  50. package/dist/assets/{chunk-RYQCIY6F-CAqa5klQ.js → chunk-RYQCIY6F-1HOsOrSl.js} +1 -1
  51. package/dist/assets/{chunk-U6XO7XAA-D_WXezeD.js → chunk-U6XO7XAA-BAFDVb1v.js} +1 -1
  52. package/dist/assets/{chunk-V7JOEXUC-CZ70oOtp.js → chunk-V7JOEXUC-8-g68lu5.js} +1 -1
  53. package/dist/assets/chunk-VAUOI2AC-Cpml0inz.js +1 -0
  54. package/dist/assets/{chunk-VR4S4FIN-B7AHEYYk.js → chunk-VR4S4FIN-P6UGmaYd.js} +1 -1
  55. package/dist/assets/{chunk-WYO6CB5R-Dn9To_OI.js → chunk-WYO6CB5R-6wjFTXNP.js} +2 -2
  56. package/dist/assets/chunk-XXDRQBXY-nCiqnCpF.js +1 -0
  57. package/dist/assets/{chunk-YOTPTUD7-BYEgRBk3.js → chunk-YOTPTUD7-CLYXVZAi.js} +1 -1
  58. package/dist/assets/{chunk-ZGVPDNZ5-C6YtZDU0.js → chunk-ZGVPDNZ5-BRTmSAhp.js} +1 -1
  59. package/dist/assets/{chunk-ZIRB5QZD-DMuYtnHF.js → chunk-ZIRB5QZD-CH_1eoSV.js} +1 -1
  60. package/dist/assets/circle-alert-lSa3LRvS.js +1 -0
  61. package/dist/assets/circle-dashed-CU3yApvP.js +1 -0
  62. package/dist/assets/classDiagram-OUVF2IWQ-C-DRqAaW.js +1 -0
  63. package/dist/assets/classDiagram-v2-EOCWNBFH-DXCcZ42U.js +1 -0
  64. package/dist/assets/client-BtGBwLTs.js +1 -0
  65. package/dist/assets/config-split-page-BxDwwAGa.js +1 -0
  66. package/dist/assets/confirm-dialog-S5JxZcS1.js +1 -0
  67. package/dist/assets/{cose-bilkent-JH36ORCC-Bc2Ex5Y3.js → cose-bilkent-JH36ORCC-L7w_qScX.js} +1 -1
  68. package/dist/assets/{createLucideIcon-rwwpqyks.js → createLucideIcon-BNKf0_kc.js} +1 -1
  69. package/dist/assets/cynefin-VYW2F7L2-2SOTgxxC.js +1 -0
  70. package/dist/assets/{cynefinDiagram-TSTJHNR4-DVysQoGz.js → cynefinDiagram-TSTJHNR4-Bay7uDSR.js} +1 -1
  71. package/dist/assets/{dagre-CMhQ1cAG.js → dagre-CJ_hX8xv.js} +1 -1
  72. package/dist/assets/{dagre-VKFMJZFB-RYyWpPJZ.js → dagre-VKFMJZFB-DDhk-2B3.js} +1 -1
  73. package/dist/assets/desktop-capabilities-page-BwHxJpbl.js +1 -0
  74. package/dist/assets/desktop-update-config-Bfg7OdJ2.js +1 -0
  75. package/dist/assets/{diagram-FQU43EPY-BD6KONdF.js → diagram-FQU43EPY-somFq5y8.js} +1 -1
  76. package/dist/assets/{diagram-G47NLZAW-CGB2ptRR.js → diagram-G47NLZAW-hzgyQsPd.js} +1 -1
  77. package/dist/assets/{diagram-NH7WQ7WH-DnkOI6cU.js → diagram-NH7WQ7WH-BkJ4gEQJ.js} +1 -1
  78. package/dist/assets/{diagram-OA4YK3LP-DF82RZ7P.js → diagram-OA4YK3LP-CS3ZkK4w.js} +1 -1
  79. package/dist/assets/{diagram-WEI45ONY-Be2v7Ck9.js → diagram-WEI45ONY-BApo-JHS.js} +1 -1
  80. package/dist/assets/dialog-Xe73hpQz.js +5 -0
  81. package/dist/assets/dist-BiIcnf9j.js +1 -0
  82. package/dist/assets/dist-C5I0v8Qn.js +1 -0
  83. package/dist/assets/{dist--ta5rX12.js → dist-Cnhwure9.js} +1 -1
  84. package/dist/assets/{dist-aNN3iQxV.js → dist-czPa8xFO.js} +1 -1
  85. package/dist/assets/doc-browser-BgRP0Wni.js +1 -0
  86. package/dist/assets/doc-browser-C8eqJLi_.js +1 -0
  87. package/dist/assets/doc-browser-context-BPCDFcC-.js +1 -0
  88. package/dist/assets/{docx-preview-BqwAjrj3.js → docx-preview-ByCKKIVT.js} +1 -1
  89. package/dist/assets/{ebnfDiagram-CCIWWBDH-CP98OYk8.js → ebnfDiagram-CCIWWBDH-DWjfeEie.js} +1 -1
  90. package/dist/assets/ellipsis-C5YXdOUx.js +1 -0
  91. package/dist/assets/{erDiagram-Q63AITRT-ZLlx8xfs.js → erDiagram-Q63AITRT-DR7vWYHM.js} +1 -1
  92. package/dist/assets/es2015-cuwbYI-l.js +41 -0
  93. package/dist/assets/eventmodeling-45OFAUF4-CXZNG56U.js +1 -0
  94. package/dist/assets/extensions-DgKQRebe.js +1 -0
  95. package/dist/assets/eye-C84inPcV.js +1 -0
  96. package/dist/assets/flowDiagram-23GEKE2U-2065oyKr.js +1 -0
  97. package/dist/assets/form-actions-AIdXOoCL.js +1 -0
  98. package/dist/assets/{ganttDiagram-NO4QXBWP-DXCDjHR2.js → ganttDiagram-NO4QXBWP-E3l9tuaL.js} +1 -1
  99. package/dist/assets/gitGraph-TEB2WS4Q-B0Ln3ZuK.js +1 -0
  100. package/dist/assets/{gitGraphDiagram-IHSO6WYX-l2HWrTJp.js → gitGraphDiagram-IHSO6WYX-DiMvbHKf.js} +1 -1
  101. package/dist/assets/i18n-CKvm9zyk.js +2 -0
  102. package/dist/assets/i18n-provider-CPV43pMX.js +1 -0
  103. package/dist/assets/info-DKCQHKI2-B06uqGM4.js +1 -0
  104. package/dist/assets/{infoDiagram-FWYZ7A6U-D-DjX-bn.js → infoDiagram-FWYZ7A6U-BZDL0NDJ.js} +1 -1
  105. package/dist/assets/{ishikawaDiagram-FXEZZL3T-y_Xy128F.js → ishikawaDiagram-FXEZZL3T-BZ9WvJb2.js} +1 -1
  106. package/dist/assets/{journeyDiagram-5HDEW3XC-DJn5xYcQ.js → journeyDiagram-5HDEW3XC-C3TZvKM8.js} +1 -1
  107. package/dist/assets/{jszip.min-8hyJpgpx.js → jszip.min-D_AtKL_8.js} +1 -1
  108. package/dist/assets/{kanban-definition-HUTT4EX6-DJVIOR21.js → kanban-definition-HUTT4EX6-9FqauDEi.js} +1 -1
  109. package/dist/assets/{line-Cos7PIOj.js → line-Ca49mj80.js} +1 -1
  110. package/dist/assets/{linear-BtDLqtzF.js → linear-DlCeG66S.js} +1 -1
  111. package/dist/assets/loader-circle-K1BDdHR5.js +1 -0
  112. package/dist/assets/login-page-ClcrvN04.js +1 -0
  113. package/dist/assets/login-page-DeDQjVxv.js +1 -0
  114. package/dist/assets/logo-badge-C-5-zim6.js +1 -0
  115. package/dist/assets/main-DGqlaAaI.css +1 -0
  116. package/dist/assets/main-i18n-catalog.config-CpNF5aVc.js +1 -0
  117. package/dist/assets/main-nMVfHb5K.js +2 -0
  118. package/dist/assets/{map-BKnQyvd0.js → map-WMnNq9UV.js} +1 -1
  119. package/dist/assets/mcp-marketplace-page-CWjJGp_D.js +10 -0
  120. package/dist/assets/mcp-marketplace-page-fvu2NcXT.js +1 -0
  121. package/dist/assets/{mermaid-parser.core-XUNZhr2W.js → mermaid-parser.core-B8xk4hpS.js} +2 -2
  122. package/dist/assets/{mermaid.core-ySrvolIe.js → mermaid.core-CFPiczKH.js} +3 -3
  123. package/dist/assets/{mindmap-definition-LN4V7U3C-BypL9tei.js → mindmap-definition-LN4V7U3C-CnxA52L6.js} +1 -1
  124. package/dist/assets/model-config-page-Dv_zE7HN.js +1 -0
  125. package/dist/assets/{navigation-link-C_6oj3zz.js → navigation-link-BAQjgx2F.js} +1 -1
  126. package/dist/assets/{ordinal-CxxVWxYU.js → ordinal-PgiFlfBJ.js} +1 -1
  127. package/dist/assets/packet-7NZHBO7P-CHx-igbz.js +1 -0
  128. package/dist/assets/panel-app-BUUle0gP.js +1 -0
  129. package/dist/assets/panel-app-i18n-catalog.config-BzxE3tZb.js +1 -0
  130. package/dist/assets/panelStandalone-CFRBHV94.js +2 -0
  131. package/dist/assets/panelStandalone-Y91OJkgV.css +1 -0
  132. package/dist/assets/{pegDiagram-2B236MQR-D-U2KBGv.js → pegDiagram-2B236MQR-A8oz7dTH.js} +1 -1
  133. package/dist/assets/pie-RZYD4A2V-DOaMc-x9.js +1 -0
  134. package/dist/assets/{pieDiagram-ENE6RG2P-CBi3GusJ.js → pieDiagram-ENE6RG2P-mtBnkYY0.js} +1 -1
  135. package/dist/assets/plus-LA8-jpxP.js +1 -0
  136. package/dist/assets/popover-NkrFlWHp.js +1 -0
  137. package/dist/assets/privacy-settings-page-D6uc9f-A.js +1 -0
  138. package/dist/assets/projects-BD1rG75R.js +1 -0
  139. package/dist/assets/provider-models-5PGHb6mP.js +1 -0
  140. package/dist/assets/provider-scoped-model-input-DUa_9uwg.js +1 -0
  141. package/dist/assets/providers-config-page-DAiqxlF_.js +1 -0
  142. package/dist/assets/puzzle-D6gulz7u.js +1 -0
  143. package/dist/assets/pwa-C_Zte1xe.js +1 -0
  144. package/dist/assets/{quadrantDiagram-ABIIQ3AL-H0ZuvnZL.js → quadrantDiagram-ABIIQ3AL-DE1VybGO.js} +1 -1
  145. package/dist/assets/radar-I7S5WNFK-CXsdndDk.js +1 -0
  146. package/dist/assets/railroad-3IZDKUUU-DxgXdrYP.js +1 -0
  147. package/dist/assets/railroad-abnf-AHOZXSZD-CR1tnyjz.js +1 -0
  148. package/dist/assets/railroad-ebnf-EBAXGLYW-CjjxZR2U.js +1 -0
  149. package/dist/assets/railroad-peg-LSFZ7HO6-DgVGJCHN.js +1 -0
  150. package/dist/assets/{railroadDiagram-RFXS5EU6-D7Y2EqSd.js → railroadDiagram-RFXS5EU6-u9EMg14B.js} +1 -1
  151. package/dist/assets/{refresh-cw-DsT2kvXi.js → refresh-cw-h9Xq3LY3.js} +1 -1
  152. package/dist/assets/remote-BO0QP7ua.js +1 -0
  153. package/dist/assets/{requirementDiagram-TGXJPOKE-BiXNX1NN.js → requirementDiagram-TGXJPOKE-BAWHAqEi.js} +1 -1
  154. package/dist/assets/{rotate-cw-BCAs6c3R.js → rotate-cw-B6xm41Wn.js} +1 -1
  155. package/dist/assets/runtime-config-page-w1UAkGF_.js +1 -0
  156. package/dist/assets/{sankeyDiagram-HTMAVEWB-qzDeLztW.js → sankeyDiagram-HTMAVEWB-aDy-jdwF.js} +1 -1
  157. package/dist/assets/{save-CadRMTMQ.js → save-fff_WpY2.js} +1 -1
  158. package/dist/assets/{search-B6tB4fzB.js → search-CUe41wjm.js} +1 -1
  159. package/dist/assets/search-config-page-3xbhRlW2.js +1 -0
  160. package/dist/assets/secrets-config-page-Dn8_rdOj.js +3 -0
  161. package/dist/assets/security-config-Y1nEGM3A.js +1 -0
  162. package/dist/assets/select-CG5YWnwe.js +1 -0
  163. package/dist/assets/{sequenceDiagram-DBY2YBRQ-BtRbPQtL.js → sequenceDiagram-DBY2YBRQ-DwHC4mbX.js} +1 -1
  164. package/dist/assets/service-apps-panel-CGc04aMn.js +1 -0
  165. package/dist/assets/settings-2-CE3ELQyk.js +1 -0
  166. package/dist/assets/{sizeCapture-X5ZJPWSS-CMYvM3SL.js → sizeCapture-X5ZJPWSS-oOMY0Fag.js} +1 -1
  167. package/dist/assets/skeleton-BL9h32W7.js +1 -0
  168. package/dist/assets/{src-Bw-mzbQb.js → src-CLPoo5iL.js} +1 -1
  169. package/dist/assets/{stateDiagram-2N3HPSRC-BJ-mFeOz.js → stateDiagram-2N3HPSRC-B0Epk-VR.js} +1 -1
  170. package/dist/assets/stateDiagram-v2-6OUMAXLB-Ct4zTw8P.js +1 -0
  171. package/dist/assets/{swimlanes-5IMT3BWC-BsucVOO2.js → swimlanes-5IMT3BWC-T0w-Iuzf.js} +2 -2
  172. package/dist/assets/swimlanesDiagram-G3AALYLV-CdmN0PBd.js +8 -0
  173. package/dist/assets/tabs-BuE0qKMh.js +1 -0
  174. package/dist/assets/{tag-chip-BZKk0UkK.js → tag-chip-BDzpHEli.js} +1 -1
  175. package/dist/assets/theme-provider-B6FinATQ.js +1 -0
  176. package/dist/assets/{timeline-definition-FHXFAJF6-Bicewlzo.js → timeline-definition-FHXFAJF6-BEonB5Np.js} +1 -1
  177. package/dist/assets/tooltip-DYcuWhuP.js +1 -0
  178. package/dist/assets/trash-2-BPPYt2NV.js +1 -0
  179. package/dist/assets/treeView-QDETBFTQ-Dad4_Wc7.js +1 -0
  180. package/dist/assets/treemap-6X3UGDF4-9_GWWZsY.js +1 -0
  181. package/dist/assets/use-config-BPUM2lbo.js +1 -0
  182. package/dist/assets/use-desktop-capabilities-BDjArQP3.js +1 -0
  183. package/dist/assets/use-panel-app-scroll-restoration-DsV1IJx-.js +1 -0
  184. package/dist/assets/use-viewport-layout-BS18drMT.js +1 -0
  185. package/dist/assets/utils-CBZPzC_b.js +8 -0
  186. package/dist/assets/{vennDiagram-L72KCM5P-BxOOnO9x.js → vennDiagram-L72KCM5P-BDvcOCo2.js} +1 -1
  187. package/dist/assets/wardley-OPB4EBWU-BXpvyee9.js +1 -0
  188. package/dist/assets/{wardleyDiagram-EHGQE667-Cl7NltMv.js → wardleyDiagram-EHGQE667-jMLMgjzE.js} +1 -1
  189. package/dist/assets/x-DdXOqLnX.js +1 -0
  190. package/dist/assets/{xychartDiagram-FW5EYKEG-DiMIxQ7N.js → xychartDiagram-FW5EYKEG-pzrpclEv.js} +1 -1
  191. package/dist/index.html +56 -25
  192. package/dist/panel-standalone.html +30 -0
  193. package/package.json +4 -4
  194. package/panel-standalone.html +13 -0
  195. package/panel-standalone.tailwind.config.js +16 -0
  196. package/src/app/components/app-presenter-provider.tsx +8 -1
  197. package/src/app/components/theme-provider.tsx +0 -5
  198. package/src/app/index.tsx +18 -4
  199. package/src/app/presenters/app.presenter.ts +4 -4
  200. package/src/app/styles/panel-app-standalone.css +31 -0
  201. package/src/app/test/vitest-setup.ts +3 -0
  202. package/src/features/account/hooks/use-auth.ts +7 -57
  203. package/src/features/account/index.ts +3 -2
  204. package/src/features/apps/components/__tests__/apps-panel.test.tsx +7 -5
  205. package/src/features/apps/components/apps-panel.tsx +9 -3
  206. package/src/features/chat/features/message/utils/__tests__/chat-message-timeline.utils.test.ts +10 -0
  207. package/src/features/chat/features/session/components/__tests__/chat-sidebar-project-groups.test.tsx +90 -6
  208. package/src/features/chat/features/session/components/chat-sidebar-project-groups.tsx +64 -2
  209. package/src/features/chat/features/session/utils/__tests__/chat-sidebar-session-groups.utils.test.ts +27 -2
  210. package/src/features/chat/features/session/utils/chat-sidebar-session-groups.utils.ts +0 -11
  211. package/src/features/panel-apps/components/__tests__/panel-app-list-item.test.tsx +18 -0
  212. package/src/features/panel-apps/components/__tests__/panel-app-open-standalone-menu-item.test.tsx +57 -0
  213. package/src/features/panel-apps/components/__tests__/panel-app-toolbar.test.tsx +15 -0
  214. package/src/features/panel-apps/components/panel-app-list-item.tsx +5 -0
  215. package/src/features/panel-apps/components/panel-app-open-standalone-menu-item.tsx +32 -0
  216. package/src/features/panel-apps/components/panel-app-runtime-surface.tsx +141 -0
  217. package/src/features/{service-apps/components/service-action-authorization-dialog.tsx → panel-apps/components/panel-app-service-action-authorization-dialog.tsx} +4 -4
  218. package/src/features/panel-apps/components/panel-app-toolbar.tsx +5 -0
  219. package/src/features/panel-apps/hooks/use-panel-app-client-grant.ts +2 -2
  220. package/src/features/panel-apps/hooks/{use-panel-app-main-runtime.ts → use-panel-app-runtime.ts} +7 -5
  221. package/src/features/panel-apps/hooks/use-panel-apps.ts +14 -0
  222. package/src/features/panel-apps/index.ts +5 -0
  223. package/src/features/panel-apps/managers/__tests__/panel-app-bridge.manager.test.ts +2 -2
  224. package/src/features/panel-apps/managers/panel-app-bridge.manager.ts +2 -2
  225. package/src/features/panel-apps/managers/panel-app-service-action-authorization.manager.ts +10 -0
  226. package/src/features/panel-apps/pages/__tests__/panel-app-main-page.test.tsx +12 -3
  227. package/src/features/panel-apps/pages/__tests__/panel-app-standalone-page.test.tsx +63 -0
  228. package/src/features/panel-apps/pages/panel-app-main-page.tsx +9 -121
  229. package/src/features/panel-apps/pages/panel-app-standalone-page.tsx +29 -0
  230. package/src/features/panel-apps/presenters/panel-app-host.presenter.ts +9 -0
  231. package/src/features/panel-apps/providers/panel-app-host.provider.tsx +45 -0
  232. package/src/features/panel-apps/routes/__tests__/panel-app-standalone.route.test.tsx +50 -0
  233. package/src/features/panel-apps/routes/panel-app-standalone.route.tsx +94 -0
  234. package/src/features/{service-apps/stores/service-action-authorization.store.ts → panel-apps/stores/panel-app-service-action-authorization.store.ts} +6 -6
  235. package/src/features/projects/AGENTS.md +1 -2
  236. package/src/features/projects/components/project-agreement.tsx +36 -77
  237. package/src/features/projects/components/project-artifacts.test.tsx +90 -62
  238. package/src/features/projects/components/project-artifacts.tsx +81 -160
  239. package/src/features/projects/components/project-materials.test.tsx +80 -0
  240. package/src/features/projects/components/project-overview.test.tsx +80 -0
  241. package/src/features/projects/components/project-overview.tsx +115 -56
  242. package/src/features/projects/components/project-skills.tsx +24 -14
  243. package/src/features/projects/components/work/project-work-item-drawer.test.tsx +3 -2
  244. package/src/features/projects/components/work/project-work-item-drawer.tsx +8 -10
  245. package/src/features/projects/components/work/project-work-items.test.tsx +180 -4
  246. package/src/features/projects/components/work/project-work-items.tsx +278 -50
  247. package/src/features/projects/components/work/project-work-state-settings.tsx +7 -3
  248. package/src/features/projects/hooks/use-project-materials.test.tsx +65 -0
  249. package/src/features/projects/hooks/use-project-materials.ts +24 -0
  250. package/src/features/projects/hooks/use-project-work.test.tsx +165 -7
  251. package/src/features/projects/hooks/use-project-work.ts +88 -9
  252. package/src/features/projects/pages/project-home-page.tsx +52 -89
  253. package/src/features/projects/pages/projects-page.test.tsx +81 -32
  254. package/src/features/projects/presenters/project-home.presenter.test.ts +1 -64
  255. package/src/features/projects/presenters/project-home.presenter.ts +17 -54
  256. package/src/features/projects/utils/project-artifact-view.utils.test.ts +19 -53
  257. package/src/features/projects/utils/project-artifact-view.utils.ts +17 -47
  258. package/src/features/projects/utils/project-work-state-label.utils.test.ts +28 -0
  259. package/src/features/projects/utils/project-work-state-label.utils.ts +20 -0
  260. package/src/features/service-apps/index.ts +3 -3
  261. package/src/main.tsx +3 -0
  262. package/src/shared/hooks/use-auth-status.ts +49 -0
  263. package/src/shared/hooks/use-projects.ts +15 -1
  264. package/src/shared/lib/api/projects/project.utils.ts +4 -0
  265. package/src/shared/lib/i18n/configs/main-i18n-catalog.config.ts +78 -0
  266. package/src/shared/lib/i18n/configs/panel-app-i18n-catalog.config.ts +12 -0
  267. package/src/shared/lib/i18n/index.ts +30 -82
  268. package/src/shared/lib/i18n/locales/en-US/doc-browser.json +0 -55
  269. package/src/shared/lib/i18n/locales/en-US/panel-app.json +59 -0
  270. package/src/shared/lib/i18n/locales/en-US/projects.json +24 -59
  271. package/src/shared/lib/i18n/locales/zh-CN/doc-browser.json +0 -55
  272. package/src/shared/lib/i18n/locales/zh-CN/panel-app.json +59 -0
  273. package/src/shared/lib/i18n/locales/zh-CN/projects.json +24 -59
  274. package/vite.config.ts +36 -1
  275. package/dist/assets/api-BqVIq0lF.js +0 -13
  276. package/dist/assets/appearance-settings-page-CTWn1eAT.js +0 -1
  277. package/dist/assets/architecture-TIHT7OUA-DO2x53FK.js +0 -1
  278. package/dist/assets/channel-nBvMaVyP.js +0 -1
  279. package/dist/assets/channels-list-page-Bzn-pzyJ.js +0 -8
  280. package/dist/assets/chunk-2Q5K7J3B-CJgqFDS4.js +0 -1
  281. package/dist/assets/chunk-VAUOI2AC-BGvh3yIx.js +0 -1
  282. package/dist/assets/chunk-XXDRQBXY-DaBxG5gs.js +0 -1
  283. package/dist/assets/classDiagram-OUVF2IWQ-P6N03G2R.js +0 -1
  284. package/dist/assets/classDiagram-v2-EOCWNBFH-B1_uLvMv.js +0 -1
  285. package/dist/assets/config-split-page-CnRbXXlh.js +0 -1
  286. package/dist/assets/confirm-dialog-B_Hbcra2.js +0 -5
  287. package/dist/assets/cynefin-VYW2F7L2-B-H8Qp-n.js +0 -1
  288. package/dist/assets/desktop-capabilities-page-C2ayYQTr.js +0 -1
  289. package/dist/assets/desktop-update-config-C13czpyL.js +0 -1
  290. package/dist/assets/dist-BsF3hfOi.js +0 -1
  291. package/dist/assets/doc-browser-D8dIOo9E.js +0 -1
  292. package/dist/assets/doc-browser-DcuOOtpP.js +0 -1
  293. package/dist/assets/doc-browser-context-Dhsit2Ma.js +0 -1
  294. package/dist/assets/eventmodeling-45OFAUF4-YVtShyFA.js +0 -1
  295. package/dist/assets/extensions-CD6xvKF_.js +0 -1
  296. package/dist/assets/flowDiagram-23GEKE2U-BeKXabVO.js +0 -1
  297. package/dist/assets/form-actions-CC4Wz_lL.js +0 -1
  298. package/dist/assets/gitGraph-TEB2WS4Q-jTSiBj-p.js +0 -1
  299. package/dist/assets/index-BTsbdtv6.js +0 -109
  300. package/dist/assets/index-Bcfy2kTh.css +0 -1
  301. package/dist/assets/info-DKCQHKI2-BIporNWb.js +0 -1
  302. package/dist/assets/loader-circle-B6aFbB-8.js +0 -1
  303. package/dist/assets/mcp-marketplace-page-BtUAypA7.js +0 -1
  304. package/dist/assets/mcp-marketplace-page-r2MmD9xO.js +0 -10
  305. package/dist/assets/model-config-page-DboxoT-I.js +0 -1
  306. package/dist/assets/packet-7NZHBO7P-CuFMADV0.js +0 -1
  307. package/dist/assets/pie-RZYD4A2V-XUeIXhM9.js +0 -1
  308. package/dist/assets/plus-DRsq9Kvs.js +0 -1
  309. package/dist/assets/privacy-settings-page-C2sDBqhb.js +0 -1
  310. package/dist/assets/projects-BcPcx-uD.js +0 -1
  311. package/dist/assets/providers-config-page-CmUFl9RF.js +0 -1
  312. package/dist/assets/radar-I7S5WNFK-D-NNGh1k.js +0 -1
  313. package/dist/assets/railroad-3IZDKUUU-C67_uDaM.js +0 -1
  314. package/dist/assets/railroad-abnf-AHOZXSZD-BZ8Yflnd.js +0 -1
  315. package/dist/assets/railroad-ebnf-EBAXGLYW-B7zO7RoK.js +0 -1
  316. package/dist/assets/railroad-peg-LSFZ7HO6-R63PTgLz.js +0 -1
  317. package/dist/assets/react-BjO9I4WZ.js +0 -8
  318. package/dist/assets/remote-Ci6x91ES.js +0 -1
  319. package/dist/assets/runtime-config-page-cQKNeAjL.js +0 -1
  320. package/dist/assets/search-config-page-C8lOIkxn.js +0 -1
  321. package/dist/assets/secrets-config-page-8clzAag2.js +0 -3
  322. package/dist/assets/security-config-DPbM6IVT.js +0 -1
  323. package/dist/assets/select-CO9S_C2C.js +0 -41
  324. package/dist/assets/skeleton-IHILNhIW.js +0 -1
  325. package/dist/assets/stateDiagram-v2-6OUMAXLB-BE-HqxOK.js +0 -1
  326. package/dist/assets/swimlanesDiagram-G3AALYLV-Dr1H9LJH.js +0 -8
  327. package/dist/assets/treeView-QDETBFTQ-npJ5dbqS.js +0 -1
  328. package/dist/assets/treemap-6X3UGDF4-pYrBx6oa.js +0 -1
  329. package/dist/assets/wardley-OPB4EBWU-CmSRKLR8.js +0 -1
  330. package/dist/assets/x-BuvHIb1d.js +0 -1
  331. package/src/features/projects/components/project-requests.tsx +0 -57
  332. package/src/features/projects/components/project-runs.tsx +0 -60
  333. package/src/features/projects/hooks/use-project-observation.test.tsx +0 -93
  334. package/src/features/projects/hooks/use-project-observation.ts +0 -115
  335. package/src/features/projects/utils/project-request-response.utils.test.ts +0 -44
  336. package/src/features/projects/utils/project-request-response.utils.ts +0 -39
  337. package/src/features/service-apps/managers/service-action-authorization.manager.ts +0 -10
  338. /package/dist/assets/{array-BQVzeGRt.js → array-BHDgItFN.js} +0 -0
  339. /package/dist/assets/{chunk-DseTPa7n.js → chunk-DF37yw5_.js} +0 -0
  340. /package/dist/assets/{chunk-KEIR6QF5-f9psyCXK.js → chunk-KEIR6QF5-DstBw0Hk.js} +0 -0
  341. /package/dist/assets/{chunk-Y2CYZVJY-D1mAU_Po.js → chunk-Y2CYZVJY-CA3ymQuH.js} +0 -0
  342. /package/dist/assets/{config-hints-nV5HPOvq.js → config-hints-CBPHrfYk.js} +0 -0
  343. /package/dist/assets/{cytoscape.esm-0uDtdD0l.js → cytoscape.esm-C7xr90o_.js} +0 -0
  344. /package/dist/assets/{defaultLocale-DSWXGgt0.js → defaultLocale-BG1oDVag.js} +0 -0
  345. /package/dist/assets/{graphlib-CQ6QV4yP.js → graphlib-CNMGfuTb.js} +0 -0
  346. /package/dist/assets/{host-capabilities-Tk038i04.js → host-capabilities-B107nwS3.js} +0 -0
  347. /package/dist/assets/{init-Y6h9jGtZ.js → init-wQIZuRSH.js} +0 -0
  348. /package/dist/assets/{katex-ARhY9PS1.js → katex-J8JuvgNl.js} +0 -0
  349. /package/dist/assets/{middleware-DXsbf9xI.js → middleware-0o3JF3tS.js} +0 -0
  350. /package/dist/assets/{path-10BjdyLh.js → path-N-C4MRP0.js} +0 -0
  351. /package/dist/assets/{preload-helper-D4M6sveU.js → preload-helper-ca-nBW7U.js} +0 -0
  352. /package/dist/assets/{rough.esm-DxgC_14r.js → rough.esm-BeWA068d.js} +0 -0
  353. /package/dist/assets/{xlsx-DrDuDNAa.js → xlsx-CwUXNtD3.js} +0 -0
@@ -0,0 +1,141 @@
1
+ import { useEffect, useMemo, useRef } from "react";
2
+ import { Boxes, RotateCcw } from "lucide-react";
3
+ import { usePanelAppHostPresenter } from "@/features/panel-apps/providers/panel-app-host.provider";
4
+ import { usePanelAppRuntime } from "@/features/panel-apps/hooks/use-panel-app-runtime";
5
+ import { usePanelApp } from "@/features/panel-apps/hooks/use-panel-apps";
6
+ import {
7
+ PANEL_APP_IFRAME_SANDBOX,
8
+ focusPanelAppIframe,
9
+ } from "@/features/panel-apps/utils/panel-app-iframe.utils";
10
+ import { usePanelAppScrollRestoration } from "@/shared/hooks/use-panel-app-scroll-restoration";
11
+ import { t } from "@/shared/lib/i18n";
12
+
13
+ type PanelAppUnavailableAction = {
14
+ label: string;
15
+ onAction: () => void;
16
+ };
17
+
18
+ export function PanelAppRuntimeSurface({
19
+ appId,
20
+ restorationScope,
21
+ unavailableAction,
22
+ }: {
23
+ appId: string;
24
+ restorationScope: "main" | "standalone";
25
+ unavailableAction?: PanelAppUnavailableAction;
26
+ }) {
27
+ const presenter = usePanelAppHostPresenter();
28
+ const panelApp = usePanelApp(appId);
29
+ const iframeRef = useRef<HTMLIFrameElement>(null);
30
+ const entry = useMemo(
31
+ () => panelApp.data,
32
+ [panelApp.data],
33
+ );
34
+ const runtime = usePanelAppRuntime(entry);
35
+ const restoreScroll = usePanelAppScrollRestoration({
36
+ currentUrl: entry?.contentPath ?? null,
37
+ iframeRef,
38
+ isEnabled: Boolean(entry),
39
+ restorationKey: entry
40
+ ? `panel-app:${restorationScope}:${entry.appId}`
41
+ : null,
42
+ });
43
+
44
+ useEffect(() => {
45
+ const handleMessage = (event: MessageEvent) => {
46
+ presenter.panelAppBridgeManager.handleIframeMessage({
47
+ event,
48
+ iframe: iframeRef.current,
49
+ });
50
+ };
51
+ window.addEventListener("message", handleMessage);
52
+ return () => window.removeEventListener("message", handleMessage);
53
+ }, [presenter]);
54
+
55
+ if (panelApp.isLoading) {
56
+ return <PanelAppRuntimeStatus message={t("panelAppsLoading")} />;
57
+ }
58
+
59
+ if (panelApp.isError) {
60
+ return (
61
+ <PanelAppRuntimeStatus
62
+ message={panelApp.error instanceof Error
63
+ ? panelApp.error.message
64
+ : t("panelAppsLoadFailed")}
65
+ actionLabel={t("panelAppsTryAgain")}
66
+ onAction={() => void panelApp.refetch()}
67
+ />
68
+ );
69
+ }
70
+
71
+ if (!entry) {
72
+ return (
73
+ <PanelAppRuntimeStatus
74
+ message={t("panelAppsMainUnavailable")}
75
+ actionLabel={unavailableAction?.label}
76
+ onAction={unavailableAction?.onAction}
77
+ />
78
+ );
79
+ }
80
+
81
+ if (runtime.state === "checking" || runtime.state === "idle") {
82
+ return <PanelAppRuntimeStatus message={t("panelAppsCheckingPermission")} />;
83
+ }
84
+
85
+ if (runtime.state === "denied" || runtime.state === "error") {
86
+ return (
87
+ <PanelAppRuntimeStatus
88
+ message={runtime.state === "denied"
89
+ ? t("panelAppsPermissionDenied")
90
+ : t("panelAppsPermissionFailed")}
91
+ actionLabel={t("panelAppsTryAgain")}
92
+ onAction={() => void runtime.retryClientGrant()}
93
+ />
94
+ );
95
+ }
96
+
97
+ return (
98
+ <div className="h-full min-h-0 bg-background">
99
+ <iframe
100
+ key={entry.appId}
101
+ ref={iframeRef}
102
+ src={entry.contentPath}
103
+ title={entry.title}
104
+ sandbox={PANEL_APP_IFRAME_SANDBOX}
105
+ className="block h-full w-full border-0 bg-background"
106
+ onLoad={restoreScroll}
107
+ onPointerOver={(event) => focusPanelAppIframe(event.currentTarget)}
108
+ />
109
+ </div>
110
+ );
111
+ }
112
+
113
+ function PanelAppRuntimeStatus({
114
+ actionLabel,
115
+ message,
116
+ onAction,
117
+ }: {
118
+ actionLabel?: string;
119
+ message: string;
120
+ onAction?: () => void;
121
+ }) {
122
+ return (
123
+ <div className="flex h-full min-h-0 items-center justify-center bg-background px-6 text-center">
124
+ <div className="max-w-sm">
125
+ <div className="mx-auto flex h-10 w-10 items-center justify-center rounded-lg bg-muted text-muted-foreground">
126
+ {onAction ? <RotateCcw className="h-5 w-5" /> : <Boxes className="h-5 w-5" />}
127
+ </div>
128
+ <p className="mt-3 text-sm leading-6 text-muted-foreground">{message}</p>
129
+ {actionLabel && onAction ? (
130
+ <button
131
+ type="button"
132
+ className="mt-4 rounded-md border border-border px-3 py-1.5 text-xs font-medium text-foreground transition-colors hover:bg-[var(--interaction-hover)] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border"
133
+ onClick={onAction}
134
+ >
135
+ {actionLabel}
136
+ </button>
137
+ ) : null}
138
+ </div>
139
+ </div>
140
+ );
141
+ }
@@ -9,11 +9,11 @@ import {
9
9
  } from '@/shared/components/ui/dialog';
10
10
  import { Button } from '@/shared/components/ui/button';
11
11
  import { t } from '@/shared/lib/i18n';
12
- import { useServiceActionAuthorizationStore } from '@/features/service-apps/stores/service-action-authorization.store';
12
+ import { usePanelAppServiceActionAuthorizationStore } from '@/features/panel-apps/stores/panel-app-service-action-authorization.store';
13
13
 
14
- export function ServiceActionAuthorizationDialog() {
15
- const pending = useServiceActionAuthorizationStore((state) => state.pending);
16
- const resolveAuthorization = useServiceActionAuthorizationStore(
14
+ export function PanelAppServiceActionAuthorizationDialog() {
15
+ const pending = usePanelAppServiceActionAuthorizationStore((state) => state.pending);
16
+ const resolveAuthorization = usePanelAppServiceActionAuthorizationStore(
17
17
  (state) => state.resolveAuthorization,
18
18
  );
19
19
 
@@ -1,6 +1,7 @@
1
1
  import { useMemo, useState } from 'react';
2
2
  import { MoreVertical, RefreshCw } from 'lucide-react';
3
3
  import { PanelAppMainSidebarMenuItem } from '@/features/panel-apps/components/panel-app-main-sidebar-menu-item';
4
+ import { PanelAppOpenStandaloneMenuItem } from '@/features/panel-apps/components/panel-app-open-standalone-menu-item';
4
5
  import { usePanelApps } from '@/features/panel-apps/hooks/use-panel-apps';
5
6
  import { readPanelAppIdFromTab } from '@/features/right-panel-resources';
6
7
  import { IconActionButton } from '@/shared/components/ui/actions/icon-action-button';
@@ -39,6 +40,10 @@ export function PanelAppToolbar({
39
40
  />
40
41
  </PopoverTrigger>
41
42
  <PopoverContent align="end" className="w-48 rounded-xl p-1.5">
43
+ <PanelAppOpenStandaloneMenuItem
44
+ entry={entry}
45
+ onSelect={() => setIsMenuOpen(false)}
46
+ />
42
47
  <PanelAppMainSidebarMenuItem
43
48
  entry={entry}
44
49
  onSelect={() => setIsMenuOpen(false)}
@@ -1,11 +1,11 @@
1
1
  import { useCallback, useRef } from "react";
2
- import { useAppPresenter } from "@/app/components/app-presenter-provider";
2
+ import { usePanelAppHostPresenter } from "@/features/panel-apps/providers/panel-app-host.provider";
3
3
  import { useGrantPanelAppClient } from "@/features/panel-apps/hooks/use-panel-apps";
4
4
  import type { PanelAppEntryView } from "@/shared/lib/api";
5
5
  import { t } from "@/shared/lib/i18n";
6
6
 
7
7
  export function usePanelAppClientGrant() {
8
- const presenter = useAppPresenter();
8
+ const presenter = usePanelAppHostPresenter();
9
9
  const { isPending, mutateAsync: grantPanelAppClient } = useGrantPanelAppClient();
10
10
  const pendingGrantsRef = useRef(new Map<string, Promise<boolean>>());
11
11
 
@@ -2,6 +2,7 @@ import { useId } from "react";
2
2
  import { useQuery, useQueryClient } from "@tanstack/react-query";
3
3
  import { usePanelAppClientGrant } from "@/features/panel-apps/hooks/use-panel-app-client-grant";
4
4
  import {
5
+ PANEL_APP_QUERY_KEY,
5
6
  PANEL_APPS_QUERY_KEY,
6
7
  replacePanelAppListEntry,
7
8
  } from "@/features/panel-apps/hooks/use-panel-apps";
@@ -11,9 +12,9 @@ import {
11
12
  type PanelAppListView,
12
13
  } from "@/shared/lib/api";
13
14
 
14
- export type PanelAppMainRuntimeState = "allowed" | "checking" | "denied" | "error" | "idle";
15
+ export type PanelAppRuntimeState = "allowed" | "checking" | "denied" | "error" | "idle";
15
16
 
16
- export function usePanelAppMainRuntime(entry: PanelAppEntryView | undefined) {
17
+ export function usePanelAppRuntime(entry: PanelAppEntryView | undefined) {
17
18
  const queryClient = useQueryClient();
18
19
  const runtimeInstanceId = useId();
19
20
  const { ensurePanelAppClientGrant } = usePanelAppClientGrant();
@@ -22,7 +23,7 @@ export function usePanelAppMainRuntime(entry: PanelAppEntryView | undefined) {
22
23
  );
23
24
  const grantQuery = useQuery({
24
25
  queryKey: [
25
- "panel-app-main-client-grant",
26
+ "panel-app-client-grant",
26
27
  entry?.appId ?? "none",
27
28
  entry?.clientGranted ?? false,
28
29
  ],
@@ -32,7 +33,7 @@ export function usePanelAppMainRuntime(entry: PanelAppEntryView | undefined) {
32
33
  retry: false,
33
34
  staleTime: Number.POSITIVE_INFINITY,
34
35
  });
35
- const state: PanelAppMainRuntimeState = !entry
36
+ const state: PanelAppRuntimeState = !entry
36
37
  ? "idle"
37
38
  : !requiresClientGrant
38
39
  ? "allowed"
@@ -45,13 +46,14 @@ export function usePanelAppMainRuntime(entry: PanelAppEntryView | undefined) {
45
46
  : "denied";
46
47
 
47
48
  useQuery({
48
- queryKey: ["panel-app-main-open", runtimeInstanceId, entry?.appId ?? "none"],
49
+ queryKey: ["panel-app-open", runtimeInstanceId, entry?.appId ?? "none"],
49
50
  queryFn: async () => {
50
51
  const opened = await nextclawClient.panelApps.recordPanelAppOpened(entry!.id);
51
52
  queryClient.setQueryData<PanelAppListView>(
52
53
  PANEL_APPS_QUERY_KEY,
53
54
  (current) => replacePanelAppListEntry(current, opened),
54
55
  );
56
+ queryClient.setQueryData([...PANEL_APP_QUERY_KEY, opened.appId], opened);
55
57
  return opened;
56
58
  },
57
59
  enabled: Boolean(entry && state === "allowed"),
@@ -9,6 +9,7 @@ import type {
9
9
  import { t } from '@/shared/lib/i18n';
10
10
 
11
11
  export const PANEL_APPS_QUERY_KEY = ['panel-apps'] as const;
12
+ export const PANEL_APP_QUERY_KEY = ['panel-app'] as const;
12
13
 
13
14
  type PanelAppPreferencesMutation = {
14
15
  id: string;
@@ -75,6 +76,15 @@ export function usePanelApps(options: { enabled?: boolean } = {}) {
75
76
  });
76
77
  }
77
78
 
79
+ export function usePanelApp(id: string, options: { enabled?: boolean } = {}) {
80
+ return useQuery({
81
+ queryKey: [...PANEL_APP_QUERY_KEY, id],
82
+ queryFn: () => nextclawClient.panelApps.getPanelApp(id),
83
+ enabled: Boolean(id) && (options.enabled ?? true),
84
+ staleTime: 5_000,
85
+ });
86
+ }
87
+
78
88
  export function useUpdatePanelAppPreferences() {
79
89
  const queryClient = useQueryClient();
80
90
  return useMutation({
@@ -96,6 +106,7 @@ export function useUpdatePanelAppPreferences() {
96
106
  PANEL_APPS_QUERY_KEY,
97
107
  (current) => replacePanelAppListEntry(current, entry),
98
108
  );
109
+ queryClient.setQueryData([...PANEL_APP_QUERY_KEY, entry.appId], entry);
99
110
  },
100
111
  onError: (error, mutation, context) => {
101
112
  const previousEntry = context?.previousEntry;
@@ -124,6 +135,7 @@ export function useRecordPanelAppOpened() {
124
135
  PANEL_APPS_QUERY_KEY,
125
136
  (current) => replacePanelAppListEntry(current, entry),
126
137
  );
138
+ queryClient.setQueryData([...PANEL_APP_QUERY_KEY, entry.appId], entry);
127
139
  },
128
140
  });
129
141
  }
@@ -134,6 +146,7 @@ export function useGrantPanelAppClient() {
134
146
  mutationFn: (appId: string) => nextclawClient.panelApps.grantClient(appId),
135
147
  onSuccess: () => {
136
148
  void queryClient.invalidateQueries({ queryKey: PANEL_APPS_QUERY_KEY });
149
+ void queryClient.invalidateQueries({ queryKey: PANEL_APP_QUERY_KEY });
137
150
  },
138
151
  });
139
152
  }
@@ -144,6 +157,7 @@ export function useDeletePanelApp() {
144
157
  mutationFn: (id: string) => nextclawClient.panelApps.deletePanelApp(id),
145
158
  onSuccess: () => {
146
159
  void queryClient.invalidateQueries({ queryKey: PANEL_APPS_QUERY_KEY });
160
+ void queryClient.invalidateQueries({ queryKey: PANEL_APP_QUERY_KEY });
147
161
  },
148
162
  });
149
163
  }
@@ -1,7 +1,12 @@
1
1
  export { PanelAppsList } from './components/panel-apps-list';
2
2
  export { PanelAppMainSidebarNav } from './components/panel-app-main-sidebar-nav';
3
3
  export { PanelAppMainPage } from './pages/panel-app-main-page';
4
+ export { PanelAppStandalonePage } from './pages/panel-app-standalone-page';
5
+ export { PanelAppServiceActionAuthorizationDialog } from './components/panel-app-service-action-authorization-dialog';
6
+ export { PanelAppHostPresenter } from './presenters/panel-app-host.presenter';
7
+ export { PanelAppHostProvider } from './providers/panel-app-host.provider';
4
8
  export {
9
+ usePanelApp,
5
10
  useGrantPanelAppClient,
6
11
  usePanelApps,
7
12
  useRecordPanelAppOpened,
@@ -2,7 +2,7 @@ import { NextClawClientError } from '@nextclaw/client-sdk';
2
2
  import { waitFor } from '@testing-library/react';
3
3
  import { afterEach, describe, expect, it, vi } from 'vitest';
4
4
  import { PanelAppBridgeManager } from '@/features/panel-apps/managers/panel-app-bridge.manager';
5
- import type { ServiceActionAuthorizationManager } from '@/features/service-apps';
5
+ import type { PanelAppServiceActionAuthorizationManager } from '@/features/panel-apps/managers/panel-app-service-action-authorization.manager';
6
6
 
7
7
  const mocks = vi.hoisted(() => ({
8
8
  generateAgentObject: vi.fn(),
@@ -45,7 +45,7 @@ afterEach(() => {
45
45
  function createManager(): PanelAppBridgeManager {
46
46
  return new PanelAppBridgeManager({
47
47
  requestAuthorization: mocks.requestAuthorization,
48
- } as unknown as ServiceActionAuthorizationManager);
48
+ } as unknown as PanelAppServiceActionAuthorizationManager);
49
49
  }
50
50
 
51
51
  function createIframeHarness(manager: PanelAppBridgeManager) {
@@ -13,7 +13,7 @@ import type {
13
13
  PortableRuntimeAcceptanceStatusApiView,
14
14
  RuntimeVerificationRecordListView,
15
15
  } from '@nextclaw/client-sdk';
16
- import type { ServiceActionAuthorizationManager } from '@/features/service-apps';
16
+ import type { PanelAppServiceActionAuthorizationManager } from '@/features/panel-apps/managers/panel-app-service-action-authorization.manager';
17
17
  import { nextclawClient } from '@/shared/lib/api';
18
18
 
19
19
  export type PanelAppIframeMessageParams = {
@@ -71,7 +71,7 @@ type PanelAppBridgeResponse =
71
71
  };
72
72
 
73
73
  export class PanelAppBridgeManager {
74
- constructor(private readonly authorizationManager: ServiceActionAuthorizationManager) {}
74
+ constructor(private readonly authorizationManager: PanelAppServiceActionAuthorizationManager) {}
75
75
 
76
76
  handleIframeMessage = ({ event, iframe }: PanelAppIframeMessageParams): void => {
77
77
  if (!this.isBridgeRequest(event.data)) {
@@ -0,0 +1,10 @@
1
+ import { usePanelAppServiceActionAuthorizationStore } from '@/features/panel-apps/stores/panel-app-service-action-authorization.store';
2
+ import type { PanelAppServiceActionAuthorizationRequest } from '@/features/panel-apps/stores/panel-app-service-action-authorization.store';
3
+
4
+ export class PanelAppServiceActionAuthorizationManager {
5
+ requestAuthorization = async (
6
+ request: Omit<PanelAppServiceActionAuthorizationRequest, 'id'>,
7
+ ): Promise<boolean> => {
8
+ return await usePanelAppServiceActionAuthorizationStore.getState().requestAuthorization(request);
9
+ };
10
+ }
@@ -19,8 +19,8 @@ const mocks = vi.hoisted(() => ({
19
19
  updatePreferences: vi.fn(),
20
20
  }));
21
21
 
22
- vi.mock("@/app/components/app-presenter-provider", () => ({
23
- useAppPresenter: () => ({
22
+ vi.mock("@/features/panel-apps/providers/panel-app-host.provider", () => ({
23
+ usePanelAppHostPresenter: () => ({
24
24
  panelAppBridgeManager: { handleIframeMessage: mocks.bridgeMessage },
25
25
  }),
26
26
  }));
@@ -33,6 +33,15 @@ vi.mock("@/features/panel-apps/hooks/use-panel-app-client-grant", () => ({
33
33
  }));
34
34
 
35
35
  vi.mock("@/features/panel-apps/hooks/use-panel-apps", () => ({
36
+ PANEL_APP_QUERY_KEY: ["panel-app"],
37
+ PANEL_APPS_QUERY_KEY: ["panel-apps"],
38
+ usePanelApp: (appId: string) => ({
39
+ data: mocks.entries.find((entry) => entry.appId === appId),
40
+ error: null,
41
+ isError: false,
42
+ isLoading: false,
43
+ refetch: mocks.refetch,
44
+ }),
36
45
  usePanelApps: () => ({
37
46
  data: { entries: mocks.entries },
38
47
  error: null,
@@ -161,7 +170,7 @@ describe("PanelAppMainPage", () => {
161
170
 
162
171
  first.unmount();
163
172
  await waitFor(() => expect(queryClient.getQueryData([
164
- "panel-app-main-client-grant",
173
+ "panel-app-client-grant",
165
174
  "publisher.todo",
166
175
  false,
167
176
  ])).toBeUndefined());
@@ -0,0 +1,63 @@
1
+ import { render, screen } from "@testing-library/react";
2
+ import { afterEach, describe, expect, it, vi } from "vitest";
3
+ import { PanelAppStandalonePage } from "@/features/panel-apps/pages/panel-app-standalone-page";
4
+ import type { PanelAppEntryView } from "@/shared/lib/api";
5
+
6
+ const entry: PanelAppEntryView = {
7
+ appId: "publisher.todo",
8
+ clientDeclared: false,
9
+ clientGranted: false,
10
+ contentPath: "/api/panel-apps/publisher.todo/content",
11
+ createdAt: "2026-09-03T00:00:00.000Z",
12
+ favorite: false,
13
+ fileName: "todo.panel.html",
14
+ id: "todo",
15
+ kind: "single-file",
16
+ mainSidebar: false,
17
+ openCount: 0,
18
+ sizeBytes: 10,
19
+ title: "Rust Todo",
20
+ updatedAt: "2026-09-03T00:00:00.000Z",
21
+ };
22
+
23
+ vi.mock("@/features/panel-apps/hooks/use-panel-apps", () => ({
24
+ usePanelApp: () => ({
25
+ data: entry,
26
+ }),
27
+ }));
28
+
29
+ vi.mock("@/features/panel-apps/components/panel-app-runtime-surface", () => ({
30
+ PanelAppRuntimeSurface: ({
31
+ appId,
32
+ restorationScope,
33
+ }: {
34
+ appId: string;
35
+ restorationScope: string;
36
+ }) => (
37
+ <div
38
+ data-testid="panel-app-runtime-surface"
39
+ data-app-id={appId}
40
+ data-restoration-scope={restorationScope}
41
+ />
42
+ ),
43
+ }));
44
+
45
+ describe("PanelAppStandalonePage", () => {
46
+ const originalTitle = document.title;
47
+
48
+ afterEach(() => {
49
+ document.title = originalTitle;
50
+ });
51
+
52
+ it("renders only the standalone runtime surface and sets the tab title", () => {
53
+ const { container } = render(
54
+ <PanelAppStandalonePage appId="publisher.todo" />,
55
+ );
56
+
57
+ const surface = screen.getByTestId("panel-app-runtime-surface");
58
+ expect(surface.getAttribute("data-app-id")).toBe("publisher.todo");
59
+ expect(surface.getAttribute("data-restoration-scope")).toBe("standalone");
60
+ expect(document.title).toBe("Rust Todo · NextClaw");
61
+ expect(container.querySelector("main")?.children).toHaveLength(1);
62
+ });
63
+ });
@@ -1,133 +1,21 @@
1
- import { useEffect, useMemo, useRef } from "react";
2
- import { Boxes, RotateCcw } from "lucide-react";
3
1
  import { useParams } from "react-router-dom";
4
- import { useAppPresenter } from "@/app/components/app-presenter-provider";
5
- import { usePanelAppMainRuntime } from "@/features/panel-apps/hooks/use-panel-app-main-runtime";
6
- import {
7
- usePanelApps,
8
- } from "@/features/panel-apps/hooks/use-panel-apps";
9
- import {
10
- PANEL_APP_IFRAME_SANDBOX,
11
- focusPanelAppIframe,
12
- } from "@/features/panel-apps/utils/panel-app-iframe.utils";
2
+ import { PanelAppRuntimeSurface } from "@/features/panel-apps/components/panel-app-runtime-surface";
13
3
  import { openApps } from "@/features/panel-apps/utils/panel-app-doc-browser.utils";
14
4
  import { useDocBrowser } from "@/shared/components/doc-browser";
15
- import { usePanelAppScrollRestoration } from "@/shared/hooks/use-panel-app-scroll-restoration";
16
5
  import { t } from "@/shared/lib/i18n";
17
6
 
18
7
  export function PanelAppMainPage() {
19
8
  const { appId = "" } = useParams<{ appId: string }>();
20
- const presenter = useAppPresenter();
21
9
  const docBrowser = useDocBrowser();
22
- const panelApps = usePanelApps();
23
- const iframeRef = useRef<HTMLIFrameElement>(null);
24
- const entry = useMemo(
25
- () => panelApps.data?.entries.find((candidate) => candidate.appId === appId),
26
- [appId, panelApps.data?.entries],
27
- );
28
- const runtime = usePanelAppMainRuntime(entry);
29
- const restoreScroll = usePanelAppScrollRestoration({
30
- currentUrl: entry?.contentPath ?? null,
31
- iframeRef,
32
- isEnabled: Boolean(entry),
33
- restorationKey: entry ? `panel-app:main:${entry.appId}` : null,
34
- });
35
-
36
- useEffect(() => {
37
- const handleMessage = (event: MessageEvent) => {
38
- presenter.panelAppBridgeManager.handleIframeMessage({
39
- event,
40
- iframe: iframeRef.current,
41
- });
42
- };
43
- window.addEventListener("message", handleMessage);
44
- return () => window.removeEventListener("message", handleMessage);
45
- }, [presenter]);
46
-
47
- if (panelApps.isLoading) {
48
- return <PanelAppMainStatus message={t("panelAppsLoading")} />;
49
- }
50
-
51
- if (panelApps.isError) {
52
- return (
53
- <PanelAppMainStatus
54
- message={panelApps.error instanceof Error
55
- ? panelApps.error.message
56
- : t("panelAppsLoadFailed")}
57
- actionLabel={t("panelAppsTryAgain")}
58
- onAction={() => void panelApps.refetch()}
59
- />
60
- );
61
- }
62
-
63
- if (!entry) {
64
- return (
65
- <PanelAppMainStatus
66
- message={t("panelAppsMainUnavailable")}
67
- actionLabel={t("panelAppsOpenApps")}
68
- onAction={() => openApps(docBrowser)}
69
- />
70
- );
71
- }
72
-
73
- if (runtime.state === "checking" || runtime.state === "idle") {
74
- return <PanelAppMainStatus message={t("panelAppsCheckingPermission")} />;
75
- }
76
-
77
- if (runtime.state === "denied" || runtime.state === "error") {
78
- return (
79
- <PanelAppMainStatus
80
- message={runtime.state === "denied"
81
- ? t("panelAppsPermissionDenied")
82
- : t("panelAppsPermissionFailed")}
83
- actionLabel={t("panelAppsTryAgain")}
84
- onAction={() => void runtime.retryClientGrant()}
85
- />
86
- );
87
- }
88
-
89
- return (
90
- <div className="h-full min-h-0 bg-background">
91
- <iframe
92
- key={entry.appId}
93
- ref={iframeRef}
94
- src={entry.contentPath}
95
- title={entry.title}
96
- sandbox={PANEL_APP_IFRAME_SANDBOX}
97
- className="block h-full w-full border-0 bg-background"
98
- onLoad={restoreScroll}
99
- onPointerOver={(event) => focusPanelAppIframe(event.currentTarget)}
100
- />
101
- </div>
102
- );
103
- }
104
10
 
105
- function PanelAppMainStatus({
106
- actionLabel,
107
- message,
108
- onAction,
109
- }: {
110
- actionLabel?: string;
111
- message: string;
112
- onAction?: () => void;
113
- }) {
114
11
  return (
115
- <div className="flex h-full min-h-0 items-center justify-center bg-background px-6 text-center">
116
- <div className="max-w-sm">
117
- <div className="mx-auto flex h-10 w-10 items-center justify-center rounded-lg bg-muted text-muted-foreground">
118
- {onAction ? <RotateCcw className="h-5 w-5" /> : <Boxes className="h-5 w-5" />}
119
- </div>
120
- <p className="mt-3 text-sm leading-6 text-muted-foreground">{message}</p>
121
- {actionLabel && onAction ? (
122
- <button
123
- type="button"
124
- className="mt-4 rounded-md border border-border px-3 py-1.5 text-xs font-medium text-foreground transition-colors hover:bg-[var(--interaction-hover)] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border"
125
- onClick={onAction}
126
- >
127
- {actionLabel}
128
- </button>
129
- ) : null}
130
- </div>
131
- </div>
12
+ <PanelAppRuntimeSurface
13
+ appId={appId}
14
+ restorationScope="main"
15
+ unavailableAction={{
16
+ label: t("panelAppsOpenApps"),
17
+ onAction: () => openApps(docBrowser),
18
+ }}
19
+ />
132
20
  );
133
21
  }
@@ -0,0 +1,29 @@
1
+ import { useEffect, useMemo } from "react";
2
+ import { PanelAppRuntimeSurface } from "@/features/panel-apps/components/panel-app-runtime-surface";
3
+ import { usePanelApp } from "@/features/panel-apps/hooks/use-panel-apps";
4
+ import { t } from "@/shared/lib/i18n";
5
+
6
+ export function PanelAppStandalonePage({ appId }: { appId: string }) {
7
+ const panelApp = usePanelApp(appId);
8
+ const entry = useMemo(
9
+ () => panelApp.data,
10
+ [panelApp.data],
11
+ );
12
+
13
+ useEffect(() => {
14
+ const previousTitle = document.title;
15
+ document.title = `${entry?.title ?? t("panelAppsTitle")} · NextClaw`;
16
+ return () => {
17
+ document.title = previousTitle;
18
+ };
19
+ }, [entry?.title]);
20
+
21
+ return (
22
+ <main className="h-dvh min-h-0 w-full overflow-hidden bg-background">
23
+ <PanelAppRuntimeSurface
24
+ appId={appId}
25
+ restorationScope="standalone"
26
+ />
27
+ </main>
28
+ );
29
+ }
@@ -0,0 +1,9 @@
1
+ import { PanelAppBridgeManager } from "@/features/panel-apps/managers/panel-app-bridge.manager";
2
+ import { PanelAppServiceActionAuthorizationManager } from "@/features/panel-apps/managers/panel-app-service-action-authorization.manager";
3
+
4
+ export class PanelAppHostPresenter {
5
+ readonly serviceActionAuthorizationManager = new PanelAppServiceActionAuthorizationManager();
6
+ readonly panelAppBridgeManager = new PanelAppBridgeManager(
7
+ this.serviceActionAuthorizationManager,
8
+ );
9
+ }