@vertesia/ui 1.4.0 → 1.5.0-dev.20260713.151751Z

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 (344) hide show
  1. package/lib/core/components/InputList.d.ts.map +1 -1
  2. package/lib/core/components/InputList.js +3 -2
  3. package/lib/core/components/InputList.js.map +1 -1
  4. package/lib/core/components/SelectList.d.ts.map +1 -1
  5. package/lib/core/components/SelectList.js +1 -1
  6. package/lib/core/components/SelectList.js.map +1 -1
  7. package/lib/core/components/TagsInput.d.ts.map +1 -1
  8. package/lib/core/components/TagsInput.js +36 -4
  9. package/lib/core/components/TagsInput.js.map +1 -1
  10. package/lib/core/components/popup/Popup.js +2 -1
  11. package/lib/core/components/popup/Popup.js.map +1 -1
  12. package/lib/core/components/popup/position.d.ts.map +1 -1
  13. package/lib/core/components/popup/position.js +3 -6
  14. package/lib/core/components/popup/position.js.map +1 -1
  15. package/lib/core/components/shadcn/badge.d.ts +2 -2
  16. package/lib/core/components/shadcn/badge.d.ts.map +1 -1
  17. package/lib/core/components/shadcn/badge.js +3 -0
  18. package/lib/core/components/shadcn/badge.js.map +1 -1
  19. package/lib/core/components/shadcn/breadcrumb.d.ts.map +1 -1
  20. package/lib/core/components/shadcn/breadcrumb.js +2 -2
  21. package/lib/core/components/shadcn/breadcrumb.js.map +1 -1
  22. package/lib/core/components/shadcn/filters/filterBar.d.ts.map +1 -1
  23. package/lib/core/components/shadcn/filters/filterBar.js +1 -3
  24. package/lib/core/components/shadcn/filters/filterBar.js.map +1 -1
  25. package/lib/core/components/shadcn/resizeable.d.ts +1 -1
  26. package/lib/core/components/shadcn/resizeable.d.ts.map +1 -1
  27. package/lib/core/components/shadcn/resizeable.js +12 -2
  28. package/lib/core/components/shadcn/resizeable.js.map +1 -1
  29. package/lib/core/components/shadcn/selectBox.d.ts +7 -1
  30. package/lib/core/components/shadcn/selectBox.d.ts.map +1 -1
  31. package/lib/core/components/shadcn/selectBox.js +29 -12
  32. package/lib/core/components/shadcn/selectBox.js.map +1 -1
  33. package/lib/core/components/table/index.d.ts.map +1 -1
  34. package/lib/core/components/table/index.js +1 -1
  35. package/lib/core/components/table/index.js.map +1 -1
  36. package/lib/core/hooks/useIntersectionObserver.d.ts.map +1 -1
  37. package/lib/core/hooks/useIntersectionObserver.js +3 -1
  38. package/lib/core/hooks/useIntersectionObserver.js.map +1 -1
  39. package/lib/features/agent/chat/AgentRightPanel.d.ts.map +1 -1
  40. package/lib/features/agent/chat/AgentRightPanel.js +3 -6
  41. package/lib/features/agent/chat/AgentRightPanel.js.map +1 -1
  42. package/lib/features/agent/chat/AnimatedThinkingDots.d.ts.map +1 -1
  43. package/lib/features/agent/chat/AnimatedThinkingDots.js +1 -1
  44. package/lib/features/agent/chat/AnimatedThinkingDots.js.map +1 -1
  45. package/lib/features/agent/chat/AskUserWidget.d.ts.map +1 -1
  46. package/lib/features/agent/chat/AskUserWidget.js +4 -3
  47. package/lib/features/agent/chat/AskUserWidget.js.map +1 -1
  48. package/lib/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
  49. package/lib/features/agent/chat/ModernAgentConversation.js +56 -11
  50. package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
  51. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +8 -1
  52. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
  53. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +40 -31
  54. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
  55. package/lib/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +3 -3
  56. package/lib/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +1 -1
  57. package/lib/features/agent/chat/ModernAgentOutput/MessageInput.d.ts.map +1 -1
  58. package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js +5 -1
  59. package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -1
  60. package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js +3 -7
  61. package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
  62. package/lib/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts.map +1 -1
  63. package/lib/features/agent/chat/ModernAgentOutput/PlanPanel.js +5 -5
  64. package/lib/features/agent/chat/ModernAgentOutput/PlanPanel.js.map +1 -1
  65. package/lib/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.d.ts.map +1 -1
  66. package/lib/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js +4 -4
  67. package/lib/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js.map +1 -1
  68. package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts.map +1 -1
  69. package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.js +3 -3
  70. package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.js.map +1 -1
  71. package/lib/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts.map +1 -1
  72. package/lib/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +156 -8
  73. package/lib/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -1
  74. package/lib/features/agent/chat/hooks/useFileProcessing.d.ts +1 -0
  75. package/lib/features/agent/chat/hooks/useFileProcessing.d.ts.map +1 -1
  76. package/lib/features/agent/chat/hooks/useFileProcessing.js +37 -3
  77. package/lib/features/agent/chat/hooks/useFileProcessing.js.map +1 -1
  78. package/lib/features/facets/AgentRunnerFacetsNav.d.ts.map +1 -1
  79. package/lib/features/facets/AgentRunnerFacetsNav.js +1 -1
  80. package/lib/features/facets/AgentRunnerFacetsNav.js.map +1 -1
  81. package/lib/features/facets/InteractionsFacetsNav.d.ts +10 -1
  82. package/lib/features/facets/InteractionsFacetsNav.d.ts.map +1 -1
  83. package/lib/features/facets/InteractionsFacetsNav.js +14 -5
  84. package/lib/features/facets/InteractionsFacetsNav.js.map +1 -1
  85. package/lib/features/facets/PromptsFacetsNav.d.ts.map +1 -1
  86. package/lib/features/facets/PromptsFacetsNav.js +12 -1
  87. package/lib/features/facets/PromptsFacetsNav.js.map +1 -1
  88. package/lib/features/facets/RunsFacetsNav.d.ts.map +1 -1
  89. package/lib/features/facets/RunsFacetsNav.js +1 -1
  90. package/lib/features/facets/RunsFacetsNav.js.map +1 -1
  91. package/lib/features/magic-pdf/AnnotatedImageSlider.d.ts.map +1 -1
  92. package/lib/features/magic-pdf/AnnotatedImageSlider.js +1 -3
  93. package/lib/features/magic-pdf/AnnotatedImageSlider.js.map +1 -1
  94. package/lib/features/magic-pdf/MagicPdfProvider.js +2 -3
  95. package/lib/features/magic-pdf/MagicPdfProvider.js.map +1 -1
  96. package/lib/features/store/objects/DocumentSearchResults.d.ts +6 -2
  97. package/lib/features/store/objects/DocumentSearchResults.d.ts.map +1 -1
  98. package/lib/features/store/objects/DocumentSearchResults.js +6 -6
  99. package/lib/features/store/objects/DocumentSearchResults.js.map +1 -1
  100. package/lib/features/store/objects/components/ContentOverview.js +1 -1
  101. package/lib/features/store/objects/components/ContentOverview.js.map +1 -1
  102. package/lib/features/store/objects/components/DocumentIcon.d.ts.map +1 -1
  103. package/lib/features/store/objects/components/DocumentIcon.js +1 -1
  104. package/lib/features/store/objects/components/DocumentIcon.js.map +1 -1
  105. package/lib/features/store/objects/components/DocumentInput.js.map +1 -1
  106. package/lib/features/store/objects/search/DocumentSearchContext.d.ts +4 -4
  107. package/lib/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
  108. package/lib/features/store/objects/search/DocumentSearchContext.js +1 -1
  109. package/lib/features/store/objects/search/DocumentSearchContext.js.map +1 -1
  110. package/lib/features/store/objects/selection/ObjectsActionContext.d.ts.map +1 -1
  111. package/lib/features/store/objects/selection/ObjectsActionContext.js +2 -25
  112. package/lib/features/store/objects/selection/ObjectsActionContext.js.map +1 -1
  113. package/lib/features/store/objects/selection/ObjectsActionContextClass.d.ts +0 -2
  114. package/lib/features/store/objects/selection/ObjectsActionContextClass.d.ts.map +1 -1
  115. package/lib/features/store/objects/selection/ObjectsActionContextClass.js +1 -7
  116. package/lib/features/store/objects/selection/ObjectsActionContextClass.js.map +1 -1
  117. package/lib/features/store/objects/selection/ObjectsActionHooks.d.ts +0 -1
  118. package/lib/features/store/objects/selection/ObjectsActionHooks.d.ts.map +1 -1
  119. package/lib/features/store/objects/selection/ObjectsActionHooks.js +0 -10
  120. package/lib/features/store/objects/selection/ObjectsActionHooks.js.map +1 -1
  121. package/lib/features/store/objects/selection/SelectionActions.d.ts +4 -0
  122. package/lib/features/store/objects/selection/SelectionActions.d.ts.map +1 -1
  123. package/lib/features/store/objects/selection/SelectionActions.js +4 -18
  124. package/lib/features/store/objects/selection/SelectionActions.js.map +1 -1
  125. package/lib/features/store/objects/selection/actions/DeleteObjectsAction.d.ts.map +1 -1
  126. package/lib/features/store/objects/selection/actions/DeleteObjectsAction.js +16 -7
  127. package/lib/features/store/objects/selection/actions/DeleteObjectsAction.js.map +1 -1
  128. package/lib/features/store/objects/selection/actions/StartWorkflowButton.d.ts +7 -0
  129. package/lib/features/store/objects/selection/actions/StartWorkflowButton.d.ts.map +1 -0
  130. package/lib/features/store/objects/selection/actions/StartWorkflowButton.js +51 -0
  131. package/lib/features/store/objects/selection/actions/StartWorkflowButton.js.map +1 -0
  132. package/lib/features/store/objects/selection/actions/index.d.ts +0 -1
  133. package/lib/features/store/objects/selection/actions/index.d.ts.map +1 -1
  134. package/lib/features/store/objects/selection/actions/index.js +0 -1
  135. package/lib/features/store/objects/selection/actions/index.js.map +1 -1
  136. package/lib/features/store/types/ContentObjectTypesSearch.d.ts.map +1 -1
  137. package/lib/features/store/types/ContentObjectTypesSearch.js +55 -3
  138. package/lib/features/store/types/ContentObjectTypesSearch.js.map +1 -1
  139. package/lib/features/store/types/ContentObjectTypesTable.d.ts +5 -1
  140. package/lib/features/store/types/ContentObjectTypesTable.d.ts.map +1 -1
  141. package/lib/features/store/types/ContentObjectTypesTable.js +4 -2
  142. package/lib/features/store/types/ContentObjectTypesTable.js.map +1 -1
  143. package/lib/features/store/types/search/ObjectTypeSearchContext.js +1 -1
  144. package/lib/features/store/types/search/ObjectTypeSearchContext.js.map +1 -1
  145. package/lib/i18n/locales/ar.json +17 -0
  146. package/lib/i18n/locales/de.json +17 -0
  147. package/lib/i18n/locales/en.json +33 -0
  148. package/lib/i18n/locales/es.json +17 -0
  149. package/lib/i18n/locales/fr.json +17 -0
  150. package/lib/i18n/locales/it.json +17 -0
  151. package/lib/i18n/locales/ja.json +17 -0
  152. package/lib/i18n/locales/ko.json +17 -0
  153. package/lib/i18n/locales/pt.json +17 -0
  154. package/lib/i18n/locales/ru.json +17 -0
  155. package/lib/i18n/locales/tr.json +17 -0
  156. package/lib/i18n/locales/zh-TW.json +17 -0
  157. package/lib/i18n/locales/zh.json +17 -0
  158. package/lib/layout/Sidebar.d.ts +5 -1
  159. package/lib/layout/Sidebar.d.ts.map +1 -1
  160. package/lib/layout/Sidebar.js.map +1 -1
  161. package/lib/router/NestedRouterProvider.d.ts +1 -1
  162. package/lib/router/NestedRouterProvider.d.ts.map +1 -1
  163. package/lib/router/NestedRouterProvider.js +2 -2
  164. package/lib/router/NestedRouterProvider.js.map +1 -1
  165. package/lib/router/Redirect.d.ts +13 -0
  166. package/lib/router/Redirect.d.ts.map +1 -0
  167. package/lib/router/Redirect.js +20 -0
  168. package/lib/router/Redirect.js.map +1 -0
  169. package/lib/router/Router.d.ts.map +1 -1
  170. package/lib/router/Router.js +1 -2
  171. package/lib/router/Router.js.map +1 -1
  172. package/lib/router/index.d.ts +1 -0
  173. package/lib/router/index.d.ts.map +1 -1
  174. package/lib/router/index.js +1 -0
  175. package/lib/router/index.js.map +1 -1
  176. package/lib/session/DevSessionProvider.d.ts +8 -0
  177. package/lib/session/DevSessionProvider.d.ts.map +1 -0
  178. package/lib/session/DevSessionProvider.js +33 -0
  179. package/lib/session/DevSessionProvider.js.map +1 -0
  180. package/lib/session/UserSessionProvider.d.ts.map +1 -1
  181. package/lib/session/UserSessionProvider.js +16 -2
  182. package/lib/session/UserSessionProvider.js.map +1 -1
  183. package/lib/session/auth/composable.d.ts +10 -1
  184. package/lib/session/auth/composable.d.ts.map +1 -1
  185. package/lib/session/auth/composable.js +38 -2
  186. package/lib/session/auth/composable.js.map +1 -1
  187. package/lib/session/index.d.ts +1 -0
  188. package/lib/session/index.d.ts.map +1 -1
  189. package/lib/session/index.js +1 -0
  190. package/lib/session/index.js.map +1 -1
  191. package/lib/shell/VertesiaShell.d.ts +3 -1
  192. package/lib/shell/VertesiaShell.d.ts.map +1 -1
  193. package/lib/shell/VertesiaShell.js +5 -4
  194. package/lib/shell/VertesiaShell.js.map +1 -1
  195. package/lib/shell/login/SignInRestrictedEnvStep.d.ts +14 -0
  196. package/lib/shell/login/SignInRestrictedEnvStep.d.ts.map +1 -0
  197. package/lib/shell/login/SignInRestrictedEnvStep.js +50 -0
  198. package/lib/shell/login/SignInRestrictedEnvStep.js.map +1 -0
  199. package/lib/shell/login/SigninScreen.d.ts.map +1 -1
  200. package/lib/shell/login/SigninScreen.js +16 -3
  201. package/lib/shell/login/SigninScreen.js.map +1 -1
  202. package/lib/shell/login/productionUrl.d.ts +16 -0
  203. package/lib/shell/login/productionUrl.d.ts.map +1 -0
  204. package/lib/shell/login/productionUrl.js +19 -0
  205. package/lib/shell/login/productionUrl.js.map +1 -0
  206. package/lib/shell/login/signInUtils.d.ts.map +1 -1
  207. package/lib/shell/login/signInUtils.js +14 -1
  208. package/lib/shell/login/signInUtils.js.map +1 -1
  209. package/lib/vertesia-ui-core.js +95 -2
  210. package/lib/vertesia-ui-core.js.map +1 -1
  211. package/lib/vertesia-ui-env.js +2 -2
  212. package/lib/vertesia-ui-env.js.map +1 -1
  213. package/lib/vertesia-ui-features.js +454 -2
  214. package/lib/vertesia-ui-features.js.map +1 -1
  215. package/lib/vertesia-ui-i18n.js +41 -2
  216. package/lib/vertesia-ui-i18n.js.map +1 -1
  217. package/lib/vertesia-ui-layout.js +2 -2
  218. package/lib/vertesia-ui-layout.js.map +1 -1
  219. package/lib/vertesia-ui-router.js +2 -2
  220. package/lib/vertesia-ui-router.js.map +1 -1
  221. package/lib/vertesia-ui-session.js +2 -2
  222. package/lib/vertesia-ui-session.js.map +1 -1
  223. package/lib/vertesia-ui-shell.js +2 -2
  224. package/lib/vertesia-ui-shell.js.map +1 -1
  225. package/lib/vertesia-ui-widgets.js +9 -2
  226. package/lib/vertesia-ui-widgets.js.map +1 -1
  227. package/lib/widgets/json-view/JSONCode.d.ts.map +1 -1
  228. package/lib/widgets/json-view/JSONCode.js +1 -1
  229. package/lib/widgets/json-view/JSONCode.js.map +1 -1
  230. package/lib/widgets/json-view/JSONTable.d.ts.map +1 -1
  231. package/lib/widgets/json-view/JSONTable.js +1 -1
  232. package/lib/widgets/json-view/JSONTable.js.map +1 -1
  233. package/lib/widgets/markdown/ArtifactContentRenderer.d.ts.map +1 -1
  234. package/lib/widgets/markdown/ArtifactContentRenderer.js +1 -1
  235. package/lib/widgets/markdown/ArtifactContentRenderer.js.map +1 -1
  236. package/lib/widgets/markdown/CodeBlockPlaceholder.d.ts.map +1 -1
  237. package/lib/widgets/markdown/CodeBlockPlaceholder.js +1 -1
  238. package/lib/widgets/markdown/CodeBlockPlaceholder.js.map +1 -1
  239. package/lib/widgets/monacoEditor/foldingProviders.d.ts.map +1 -1
  240. package/lib/widgets/monacoEditor/foldingProviders.js +5 -10
  241. package/lib/widgets/monacoEditor/foldingProviders.js.map +1 -1
  242. package/lib/widgets/schema-editor/ManagedSchema.d.ts.map +1 -1
  243. package/lib/widgets/schema-editor/ManagedSchema.js +1 -2
  244. package/lib/widgets/schema-editor/ManagedSchema.js.map +1 -1
  245. package/lib/widgets/upload/UploadResultCategory.d.ts.map +1 -1
  246. package/lib/widgets/upload/UploadResultCategory.js +1 -1
  247. package/lib/widgets/upload/UploadResultCategory.js.map +1 -1
  248. package/lib/widgets/xml-viewer/components/TextElement/index.d.ts.map +1 -1
  249. package/lib/widgets/xml-viewer/components/TextElement/index.js +1 -1
  250. package/lib/widgets/xml-viewer/components/TextElement/index.js.map +1 -1
  251. package/package.json +38 -43
  252. package/src/core/components/InputList.tsx +5 -10
  253. package/src/core/components/SelectList.tsx +7 -2
  254. package/src/core/components/TagsInput.tsx +41 -4
  255. package/src/core/components/popup/Popup.tsx +3 -3
  256. package/src/core/components/popup/position.ts +3 -6
  257. package/src/core/components/shadcn/badge.tsx +3 -0
  258. package/src/core/components/shadcn/breadcrumb.tsx +2 -4
  259. package/src/core/components/shadcn/filters/filterBar.tsx +2 -3
  260. package/src/core/components/shadcn/resizeable.test.tsx +77 -0
  261. package/src/core/components/shadcn/resizeable.tsx +28 -2
  262. package/src/core/components/shadcn/selectBox.tsx +70 -36
  263. package/src/core/components/table/index.tsx +1 -2
  264. package/src/core/hooks/useIntersectionObserver.tsx +3 -1
  265. package/src/features/agent/chat/AgentRightPanel.tsx +5 -6
  266. package/src/features/agent/chat/AnimatedThinkingDots.tsx +1 -2
  267. package/src/features/agent/chat/AskUserWidget.test.tsx +49 -0
  268. package/src/features/agent/chat/AskUserWidget.tsx +32 -22
  269. package/src/features/agent/chat/ModernAgentConversation.test.tsx +198 -1
  270. package/src/features/agent/chat/ModernAgentConversation.tsx +62 -15
  271. package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +60 -34
  272. package/src/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.tsx +3 -3
  273. package/src/features/agent/chat/ModernAgentOutput/MessageInput.test.tsx +25 -0
  274. package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +5 -1
  275. package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +30 -30
  276. package/src/features/agent/chat/ModernAgentOutput/PlanPanel.tsx +5 -6
  277. package/src/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.tsx +4 -5
  278. package/src/features/agent/chat/ModernAgentOutput/ToolCallGroup.tsx +3 -5
  279. package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +326 -42
  280. package/src/features/agent/chat/hooks/useFileProcessing.test.tsx +70 -0
  281. package/src/features/agent/chat/hooks/useFileProcessing.ts +37 -6
  282. package/src/features/facets/AgentRunnerFacetsNav.tsx +1 -2
  283. package/src/features/facets/InteractionsFacetsNav.tsx +30 -5
  284. package/src/features/facets/PromptsFacetsNav.tsx +13 -1
  285. package/src/features/facets/RunsFacetsNav.tsx +1 -2
  286. package/src/features/magic-pdf/AnnotatedImageSlider.tsx +1 -2
  287. package/src/features/magic-pdf/MagicPdfProvider.tsx +4 -4
  288. package/src/features/store/objects/DocumentSearchResults.tsx +11 -1
  289. package/src/features/store/objects/components/ContentOverview.tsx +1 -2
  290. package/src/features/store/objects/components/DocumentIcon.tsx +1 -2
  291. package/src/features/store/objects/components/DocumentInput.tsx +2 -2
  292. package/src/features/store/objects/search/DocumentSearchContext.test.ts +2 -2
  293. package/src/features/store/objects/search/DocumentSearchContext.ts +3 -3
  294. package/src/features/store/objects/selection/ObjectsActionContext.tsx +2 -27
  295. package/src/features/store/objects/selection/ObjectsActionContextClass.ts +1 -7
  296. package/src/features/store/objects/selection/ObjectsActionHooks.ts +0 -11
  297. package/src/features/store/objects/selection/SelectionActions.tsx +9 -34
  298. package/src/features/store/objects/selection/actions/DeleteObjectsAction.tsx +40 -7
  299. package/src/features/store/objects/selection/actions/StartWorkflowButton.tsx +104 -0
  300. package/src/features/store/objects/selection/actions/index.ts +0 -1
  301. package/src/features/store/types/ContentObjectTypesSearch.tsx +110 -1
  302. package/src/features/store/types/ContentObjectTypesTable.tsx +42 -3
  303. package/src/features/store/types/search/ObjectTypeSearchContext.tsx +1 -1
  304. package/src/i18n/locales/ar.json +17 -0
  305. package/src/i18n/locales/de.json +17 -0
  306. package/src/i18n/locales/en.json +33 -0
  307. package/src/i18n/locales/es.json +17 -0
  308. package/src/i18n/locales/fr.json +17 -0
  309. package/src/i18n/locales/it.json +17 -0
  310. package/src/i18n/locales/ja.json +17 -0
  311. package/src/i18n/locales/ko.json +17 -0
  312. package/src/i18n/locales/pt.json +17 -0
  313. package/src/i18n/locales/ru.json +17 -0
  314. package/src/i18n/locales/tr.json +17 -0
  315. package/src/i18n/locales/zh-TW.json +17 -0
  316. package/src/i18n/locales/zh.json +17 -0
  317. package/src/layout/Sidebar.tsx +6 -1
  318. package/src/router/NestedRouterProvider.tsx +2 -2
  319. package/src/router/Redirect.tsx +29 -0
  320. package/src/router/Router.tsx +1 -2
  321. package/src/router/index.ts +1 -0
  322. package/src/session/DevSessionProvider.tsx +46 -0
  323. package/src/session/UserSessionProvider.tsx +18 -2
  324. package/src/session/auth/composable.ts +41 -3
  325. package/src/session/index.ts +1 -0
  326. package/src/shell/VertesiaShell.tsx +27 -14
  327. package/src/shell/login/SignInRestrictedEnvStep.tsx +87 -0
  328. package/src/shell/login/SigninScreen.tsx +29 -16
  329. package/src/shell/login/productionUrl.test.ts +19 -0
  330. package/src/shell/login/productionUrl.ts +18 -0
  331. package/src/shell/login/signInUtils.ts +14 -1
  332. package/src/widgets/json-view/JSONCode.tsx +1 -2
  333. package/src/widgets/json-view/JSONTable.tsx +1 -2
  334. package/src/widgets/markdown/ArtifactContentRenderer.tsx +4 -7
  335. package/src/widgets/markdown/CodeBlockPlaceholder.tsx +1 -2
  336. package/src/widgets/monacoEditor/foldingProviders.ts +10 -15
  337. package/src/widgets/schema-editor/ManagedSchema.ts +1 -2
  338. package/src/widgets/upload/UploadResultCategory.tsx +2 -3
  339. package/src/widgets/xml-viewer/components/TextElement/index.tsx +1 -2
  340. package/lib/features/store/objects/selection/actions/StartWorkflowComponent.d.ts +0 -4
  341. package/lib/features/store/objects/selection/actions/StartWorkflowComponent.d.ts.map +0 -1
  342. package/lib/features/store/objects/selection/actions/StartWorkflowComponent.js +0 -77
  343. package/lib/features/store/objects/selection/actions/StartWorkflowComponent.js.map +0 -1
  344. package/src/features/store/objects/selection/actions/StartWorkflowComponent.tsx +0 -127
@@ -50,6 +50,76 @@ describe('useFileProcessing', () => {
50
50
  expect(result.current.processingFiles.has('file-1')).toBe(false);
51
51
  });
52
52
 
53
+ it('clears files on send without signaling FileRemoved and suppresses the server echo', async () => {
54
+ const client = createClient();
55
+ const toast = vi.fn();
56
+ const serverFileUpdates = new Map([['file-1', createReadyFile('file-1')]]);
57
+ const { result, rerender } = renderHook(
58
+ ({ updates }) => useFileProcessing(client, 'agent-run-1', updates, toast),
59
+ {
60
+ initialProps: { updates: serverFileUpdates },
61
+ },
62
+ );
63
+
64
+ expect(result.current.processingFiles.has('file-1')).toBe(true);
65
+
66
+ act(() => {
67
+ result.current.clearProcessingFiles();
68
+ });
69
+
70
+ // The agent already received the file via FileUploaded, so sending the message
71
+ // consumes it rather than retracting it — no FileRemoved signal.
72
+ expect(client.agents.sendSignal).not.toHaveBeenCalled();
73
+ expect(result.current.processingFiles.has('file-1')).toBe(false);
74
+
75
+ // A subsequent server echo for the same file must not re-add the chip.
76
+ rerender({ updates: new Map([['file-1', createReadyFile('file-1')]]) });
77
+ expect(result.current.processingFiles.has('file-1')).toBe(false);
78
+ });
79
+
80
+ it('preserves local artifact_path/reference when a server update omits them', async () => {
81
+ const client = createClient();
82
+ const toast = vi.fn();
83
+ const { result, rerender } = renderHook(
84
+ ({ updates }) => useFileProcessing(client, 'agent-run-1', updates, toast),
85
+ {
86
+ initialProps: { updates: new Map<string, ConversationFile>() },
87
+ },
88
+ );
89
+
90
+ const file = new File(['pdf'], 'report.pdf', { type: 'application/pdf' });
91
+ await act(async () => {
92
+ await result.current.handleFileUpload([file]);
93
+ });
94
+
95
+ const [fileId, local] = Array.from(result.current.processingFiles.entries())[0];
96
+ expect(local.artifact_path).toBe('files/report.pdf');
97
+ expect(local.reference).toBe('artifact:files/report.pdf');
98
+
99
+ // Server echoes READY but drops artifact_path/reference — the merge must backfill
100
+ // them from the local optimistic entry so the sent-message embed still resolves.
101
+ rerender({
102
+ updates: new Map<string, ConversationFile>([
103
+ [
104
+ fileId,
105
+ {
106
+ id: fileId,
107
+ name: 'report.pdf',
108
+ content_type: 'application/pdf',
109
+ size: 0,
110
+ status: FileProcessingStatus.READY,
111
+ started_at: 1_000,
112
+ },
113
+ ],
114
+ ]),
115
+ });
116
+
117
+ const merged = result.current.processingFiles.get(fileId);
118
+ expect(merged?.status).toBe(FileProcessingStatus.READY);
119
+ expect(merged?.artifact_path).toBe('files/report.pdf');
120
+ expect(merged?.reference).toBe('artifact:files/report.pdf');
121
+ });
122
+
53
123
  it('does not signal an upload that was removed before upload completion', async () => {
54
124
  const client = createClient();
55
125
  const uploadArtifact = vi.mocked(client.agents.uploadArtifact);
@@ -8,6 +8,7 @@ export interface UseFileProcessingResult {
8
8
  hasProcessingFiles: boolean;
9
9
  handleFileUpload: (files: File[]) => Promise<void>;
10
10
  removeProcessingFile: (fileId: string) => Promise<void>;
11
+ clearProcessingFiles: () => void;
11
12
  }
12
13
 
13
14
  type ToastFn = (opts: {
@@ -58,6 +59,12 @@ export function useFileProcessing(
58
59
  const removedFileIdsRef = useRef<Set<string>>(new Set());
59
60
  const previewUrlsRef = useRef<Map<string, string>>(new Map());
60
61
  const previousAgentRunId = useRef(agentRunId);
62
+ // Kept current so clearProcessingFiles() can read the latest tracked ids
63
+ // imperatively without being re-created on every render.
64
+ const localFilesRef = useRef(localFiles);
65
+ localFilesRef.current = localFiles;
66
+ const serverFileUpdatesRef = useRef(serverFileUpdates);
67
+ serverFileUpdatesRef.current = serverFileUpdates;
61
68
 
62
69
  const revokePreviewUrl = useCallback((fileId: string) => {
63
70
  const previewUrl = previewUrlsRef.current.get(fileId);
@@ -97,11 +104,17 @@ export function useFileProcessing(
97
104
  });
98
105
  serverFileUpdates.forEach((file, id) => {
99
106
  if (!removedFileIds.has(id)) {
100
- const localPreviewUrl = (localFiles.get(id) as LocalConversationFile | undefined)?.preview_url;
101
- merged.set(
102
- id,
103
- localPreviewUrl ? ({ ...file, preview_url: localPreviewUrl } as LocalConversationFile) : file,
104
- );
107
+ // Server updates are authoritative for status, but may omit fields the local
108
+ // optimistic entry already knows: preview_url is never sent by the server, and
109
+ // artifact_path/reference can be absent on some updates. Backfill them from local
110
+ // so the sent-message embed and thumbnail resolution keep working.
111
+ const local = localFiles.get(id) as LocalConversationFile | undefined;
112
+ merged.set(id, {
113
+ ...file,
114
+ artifact_path: file.artifact_path ?? local?.artifact_path,
115
+ reference: file.reference ?? local?.reference,
116
+ ...(local?.preview_url ? { preview_url: local.preview_url } : {}),
117
+ } as LocalConversationFile);
105
118
  }
106
119
  });
107
120
  return merged;
@@ -224,5 +237,23 @@ export function useFileProcessing(
224
237
  [agentRunId, client, revokePreviewUrl, t, toast],
225
238
  );
226
239
 
227
- return { processingFiles, hasProcessingFiles, handleFileUpload, removeProcessingFile };
240
+ // Clears the composer's uploaded-file chips after a message is sent. Unlike
241
+ // removeProcessingFile, this does NOT signal FileRemoved — the agent already
242
+ // received these files via FileUploaded, so the message consumes them rather
243
+ // than retracting them. The ids are added to removedFileIds so the server echo
244
+ // in the merge above cannot re-add a chip once the message has been sent.
245
+ const clearProcessingFiles = useCallback(() => {
246
+ previewUrlsRef.current.forEach(revokePreviewUrlValue);
247
+ previewUrlsRef.current.clear();
248
+ setRemovedFileIds((prev) => {
249
+ const next = new Set(prev);
250
+ for (const id of serverFileUpdatesRef.current.keys()) next.add(id);
251
+ for (const id of localFilesRef.current.keys()) next.add(id);
252
+ removedFileIdsRef.current = next;
253
+ return next;
254
+ });
255
+ setLocalFiles(new Map());
256
+ }, []);
257
+
258
+ return { processingFiles, hasProcessingFiles, handleFileUpload, removeProcessingFile, clearProcessingFiles };
228
259
  }
@@ -161,8 +161,7 @@ export function AgentRunnerFacetsNav({
161
161
  {actions && actions.length > 0 ? (
162
162
  <div className="flex items-center gap-2 mb-1 me-2">
163
163
  {actions.map((action, index) => (
164
- // biome-ignore lint/suspicious/noArrayIndexKey: list order is stable for this render
165
- <div key={index}>{action}</div>
164
+ <div key={`action-${index}`}>{action}</div>
166
165
  ))}
167
166
  </div>
168
167
  ) : null}
@@ -14,6 +14,15 @@ interface InteractionsFacetsNavProps {
14
14
  facets: ComputedFacetResponse;
15
15
  search: SearchInterface;
16
16
  env?: string | null;
17
+ /**
18
+ * Optional controlled filter state. When provided, the parent owns the filter list (and is
19
+ * responsible for translating it into the search query via {@link useInteractionsFilterHandler}).
20
+ * This lets other surfaces — e.g. per-row "quick filter" buttons in the table — add filters that
21
+ * show up in the filter bar. When omitted, the component manages its own filter state internally.
22
+ */
23
+ filters?: BaseFilter[];
24
+ setFilters?: React.Dispatch<React.SetStateAction<BaseFilter[]>>;
25
+ filterGroups?: FilterGroup[];
17
26
  }
18
27
 
19
28
  // Hook to create filter groups for interactions
@@ -84,14 +93,30 @@ export function useInteractionsFilterHandler(search: SearchInterface) {
84
93
  }
85
94
 
86
95
  // Component for interactions filtering
87
- export function InteractionsFacetsNav({ facets, search }: InteractionsFacetsNavProps) {
88
- const [filters, setFilters] = useState<BaseFilter[]>([]);
89
- const filterGroups = useInteractionsFilterGroups(facets);
96
+ export function InteractionsFacetsNav({
97
+ facets,
98
+ search,
99
+ filters: controlledFilters,
100
+ setFilters: controlledSetFilters,
101
+ filterGroups: controlledFilterGroups,
102
+ }: InteractionsFacetsNavProps) {
103
+ const [internalFilters, setInternalFilters] = useState<BaseFilter[]>([]);
104
+ const internalFilterGroups = useInteractionsFilterGroups(facets);
90
105
  const handleFilterLogic = useInteractionsFilterHandler(search);
91
106
 
107
+ // Controlled when the parent supplies both the filter list and its setter; otherwise self-managed.
108
+ const isControlled = controlledFilters !== undefined && controlledSetFilters !== undefined;
109
+ const filters = isControlled ? controlledFilters : internalFilters;
110
+ const filterGroups = controlledFilterGroups ?? internalFilterGroups;
111
+
92
112
  const handleFilterChange: React.Dispatch<React.SetStateAction<BaseFilter[]>> = (value) => {
93
- const newFilters = typeof value === 'function' ? value(filters) : value;
94
- setFilters(newFilters);
113
+ if (isControlled) {
114
+ // The parent's setter is expected to also run the filter→query translation.
115
+ controlledSetFilters(value);
116
+ return;
117
+ }
118
+ const newFilters = typeof value === 'function' ? value(internalFilters) : value;
119
+ setInternalFilters(newFilters);
95
120
  handleFilterLogic(newFilters);
96
121
  };
97
122
 
@@ -30,7 +30,6 @@ interface PromptsFacetsNavProps {
30
30
 
31
31
  // Hook to create filter groups for prompts
32
32
  export function usePromptsFilterGroups(facets: PromptsFacetsNavProps['facets']): FilterGroup[] {
33
- void facets;
34
33
  const customFilterGroups: FilterGroup[] = [];
35
34
 
36
35
  // Add name filter as text type
@@ -57,6 +56,19 @@ export function usePromptsFilterGroups(facets: PromptsFacetsNavProps['facets']):
57
56
  customFilterGroups.push(rolesFilterGroup);
58
57
  }
59
58
 
59
+ // Add tags filter as stringList type (suggestions from facets, allows custom input)
60
+ const tagsFilterGroup = {
61
+ name: 'tags',
62
+ placeholder: 'Tags',
63
+ type: 'stringList' as const,
64
+ multiple: true,
65
+ options: (facets.tags ?? []).map((facet) => ({
66
+ label: facet._id,
67
+ value: facet._id,
68
+ })),
69
+ };
70
+ customFilterGroups.push(tagsFilterGroup);
71
+
60
72
  return customFilterGroups;
61
73
  }
62
74
 
@@ -237,8 +237,7 @@ export function RunsFacetsNav({
237
237
  {actions && actions.length > 0 ? (
238
238
  <div className="flex items-center gap-2 mb-1 me-2">
239
239
  {actions.map((action, index) => (
240
- // biome-ignore lint/suspicious/noArrayIndexKey: list order is stable for this render
241
- <div key={index}>{action}</div>
240
+ <div key={`action-${index}`}>{action}</div>
242
241
  ))}
243
242
  </div>
244
243
  ) : null}
@@ -290,8 +290,7 @@ export function AnnotatedImageSlider({ className, currentPage, onChange }: Annot
290
290
  <div ref={scrollContainerRef} className="flex flex-col items-center gap-2 flex-1 overflow-y-auto px-2">
291
291
  {Array.from({ length: count }, (_, index) => (
292
292
  <PageThumbnail
293
- // biome-ignore lint/suspicious/noArrayIndexKey: list order is stable for this render
294
- key={index}
293
+ key={`page-thumb-${index}`}
295
294
  currentPage={currentPage}
296
295
  pageNumber={index + 1}
297
296
  aspectRatio={aspectRatio}
@@ -176,10 +176,10 @@ function extractMarkdownPages(content: string, totalPages: number): string[] {
176
176
 
177
177
  // Find the actual end by looking for the next delimiter or end of content
178
178
  const nextDelimiterMatch = content.slice(startIndex).match(/<!--\s*\{\s*"page"\s*:\s*\d+\s*\}\s*-->/);
179
- const actualEndIndex = nextDelimiterMatch
180
- ? // biome-ignore lint/style/noNonNullAssertion: intentional non-null assertion; TS can't prove narrowing here
181
- startIndex + nextDelimiterMatch.index!
182
- : content.length;
179
+ const actualEndIndex =
180
+ nextDelimiterMatch && nextDelimiterMatch.index !== undefined
181
+ ? startIndex + nextDelimiterMatch.index
182
+ : content.length;
183
183
 
184
184
  let pageContent = content.slice(startIndex, actualEndIndex).trim();
185
185
 
@@ -58,10 +58,13 @@ interface DocumentSearchResultsWithDropZoneProps {
58
58
  * @returns
59
59
  */
60
60
  onUploadDone?: (objectIds: string[]) => Promise<void>;
61
+ /** Extra actions rendered in the results toolbar (e.g. selection actions). */
62
+ toolbarActions?: React.ReactNode;
61
63
  }
62
64
  export function DocumentSearchResultsWithDropZone({
63
65
  onUploadDone = async () => {},
64
66
  layout,
67
+ toolbarActions,
65
68
  }: DocumentSearchResultsWithDropZoneProps) {
66
69
  const search = useDocumentSearch();
67
70
  const toast = useToast();
@@ -111,7 +114,7 @@ export function DocumentSearchResultsWithDropZone({
111
114
  [search, uploadHandler],
112
115
  );
113
116
 
114
- return <DocumentSearchResults layout={layout} onUpload={wrappedUploadHandler} />;
117
+ return <DocumentSearchResults layout={layout} onUpload={wrappedUploadHandler} toolbarActions={toolbarActions} />;
115
118
  }
116
119
 
117
120
  interface DocumentSearchResultsProps {
@@ -119,12 +122,15 @@ interface DocumentSearchResultsProps {
119
122
  allowFilter?: boolean;
120
123
  allowSearch?: boolean;
121
124
  onUpload?: (files: File[], type: string | null, collectionId?: string) => Promise<unknown>; // if defined, accept drag drop to upload
125
+ /** Extra actions rendered in the results toolbar (e.g. selection actions). */
126
+ toolbarActions?: React.ReactNode;
122
127
  }
123
128
  export function DocumentSearchResults({
124
129
  layout,
125
130
  onUpload,
126
131
  allowFilter = true,
127
132
  allowSearch = true,
133
+ toolbarActions,
128
134
  }: DocumentSearchResultsProps) {
129
135
  // Get the search context to access collectionId
130
136
  const { t } = useUITranslation();
@@ -346,6 +352,7 @@ export function DocumentSearchResults({
346
352
  handleVectorSearch={handleVectorSearch}
347
353
  handleRefetch={handleRefetch}
348
354
  setIsGridView={setIsGridView}
355
+ toolbarActions={toolbarActions}
349
356
  />
350
357
  <div className="flex flex-col w-full flex-1 min-h-0 border rounded-md mb-2">
351
358
  <div ref={scrollRef} className="flex-1 min-h-0 overflow-y-auto">
@@ -388,6 +395,7 @@ interface ToolsbarProps {
388
395
  handleVectorSearch: (query?: ComplexSearchQuery) => void;
389
396
  handleRefetch: () => void;
390
397
  setIsGridView: React.Dispatch<React.SetStateAction<boolean>>;
398
+ toolbarActions?: React.ReactNode;
391
399
  }
392
400
  function Toolsbar(props: ToolsbarProps) {
393
401
  const { t } = useUITranslation();
@@ -402,6 +410,7 @@ function Toolsbar(props: ToolsbarProps) {
402
410
  handleVectorSearch,
403
411
  handleRefetch,
404
412
  setIsGridView,
413
+ toolbarActions,
405
414
  } = props;
406
415
 
407
416
  return (
@@ -442,6 +451,7 @@ function Toolsbar(props: ToolsbarProps) {
442
451
  </div>
443
452
  )}
444
453
  <div className="flex gap-1 items-center">
454
+ {toolbarActions}
445
455
  <VTooltip description={t('store.refresh')} asChild size="xs" placement="top">
446
456
  <Button variant="outline" onClick={handleRefetch} aria-label={t('store.refresh')}>
447
457
  <RefreshCw size={16} />
@@ -831,8 +831,7 @@ function TranscriptPanel({
831
831
  {segments && segments.length > 0 ? (
832
832
  <div className="space-y-2">
833
833
  {segments.map((segment, idx) => (
834
- // biome-ignore lint/suspicious/noArrayIndexKey: list order is stable for this render
835
- <div key={idx} className="flex gap-3 text-sm">
834
+ <div key={`segment-${idx}`} className="flex gap-3 text-sm">
836
835
  <span className="text-muted font-mono text-xs shrink-0 pt-0.5">
837
836
  {formatTimestamp(segment.start)}
838
837
  {segment.end && ` - ${formatTimestamp(segment.end)}`}
@@ -25,8 +25,7 @@ export function DocumentIconSkeleton({ isLoading = false, counts = 6 }: { isLoad
25
25
  {Array(counts)
26
26
  .fill(0)
27
27
  .map((_, index) => (
28
- // biome-ignore lint/suspicious/noArrayIndexKey: list order is stable for this render
29
- <div key={index} className="w-[15vw] animate-pulse">
28
+ <div key={`skeleton-${index}`} className="w-[15vw] animate-pulse">
30
29
  <Card className="relative flex flex-col border h-fit">
31
30
  <div className="h-48 bg-muted rounded-t-xl flex items-center justify-center text-muted">
32
31
  &nbsp;
@@ -1,4 +1,4 @@
1
- import type { ContentObjectItem } from '@vertesia/common';
1
+ import type { ContentObject, ContentObjectItem } from '@vertesia/common';
2
2
  import { Button, Styles, useFlag } from '@vertesia/ui/core';
3
3
 
4
4
  import { useUserSession } from '@vertesia/ui/session';
@@ -20,7 +20,7 @@ export function DocumentInput({ object }: DocumentInputProps) {
20
20
 
21
21
  const { off, on, isOn } = useFlag();
22
22
  const [actualValue, setValue] = useState(object.value != null ? String(object.value) : '');
23
- const [doc, setDoc] = useState<ContentObjectItem | undefined>(undefined);
23
+ const [doc, setDoc] = useState<ContentObject | ContentObjectItem | undefined>(undefined);
24
24
 
25
25
  const _onChange = (event: ChangeEvent<HTMLInputElement>) => {
26
26
  const value = event.target.value;
@@ -1,5 +1,5 @@
1
1
  import type { ZenoClient } from '@vertesia/client';
2
- import type { ContentObjectItem } from '@vertesia/common';
2
+ import type { ContentObjectItemApiResponse } from '@vertesia/common';
3
3
  import { describe, expect, it, vi } from 'vitest';
4
4
  import { DocumentSearch } from './DocumentSearchContext';
5
5
 
@@ -14,7 +14,7 @@ function createClient(searchImpl: () => Promise<unknown>): ZenoClient {
14
14
  describe('DocumentSearch', () => {
15
15
  it('settles loading state and preserves current objects when search fails', async () => {
16
16
  const error = new Error('search failed');
17
- const currentObject = { id: 'object-1', name: 'Existing object' } as ContentObjectItem;
17
+ const currentObject = { id: 'object-1', name: 'Existing object' } as ContentObjectItemApiResponse;
18
18
  const search = new DocumentSearch(createClient(() => Promise.reject(error)));
19
19
  search.result.value = {
20
20
  objects: [currentObject],
@@ -4,7 +4,7 @@ import type {
4
4
  ComplexSearchQuery,
5
5
  ComputedFacetResponse,
6
6
  ComputeObjectFacetPayload,
7
- ContentObjectItem,
7
+ ContentObjectItemApiResponse,
8
8
  FacetBucket,
9
9
  FacetSpec,
10
10
  ObjectSearchQuery,
@@ -14,7 +14,7 @@ import type { SearchInterface } from '@vertesia/ui/features';
14
14
  import { createContext, useContext } from 'react';
15
15
 
16
16
  interface DocumentSearchResult {
17
- objects: ContentObjectItem[];
17
+ objects: ContentObjectItemApiResponse[];
18
18
  error?: Error;
19
19
  isLoading: boolean;
20
20
  hasMore?: boolean;
@@ -215,7 +215,7 @@ export class DocumentSearch implements SearchInterface {
215
215
  const DocumentSearchContext = createContext<DocumentSearch | undefined>(undefined);
216
216
 
217
217
  export function useDocumentSearch() {
218
- // biome-ignore lint/style/noNonNullAssertion: intentional non-null assertion; TS can't prove narrowing here
218
+ // biome-ignore lint/style/noNonNullAssertion: intentionally tolerant — called outside its Provider by shared toolbars/action menus (e.g. on the object-detail page) where the context is undefined and callers handle it; throwing here crashes those pages (regressed in PR #6024)
219
219
  return useContext(DocumentSearchContext)!;
220
220
  }
221
221
 
@@ -1,6 +1,5 @@
1
1
  import type { ContentObjectTypeItem } from '@vertesia/common';
2
- import { ErrorBox, errorMessage, useFetch, useToast } from '@vertesia/ui/core';
3
- import { useUITranslation } from '@vertesia/ui/i18n';
2
+ import { useToast } from '@vertesia/ui/core';
4
3
  import { useUserSession } from '@vertesia/ui/session';
5
4
  import { type ReactNode, useMemo } from 'react';
6
5
 
@@ -11,7 +10,6 @@ import { ChangeTypeAction } from './actions/ChangeTypeAction';
11
10
  import { DeleteObjectsAction, DeleteObjectsFromCollectionsAction } from './actions/DeleteObjectsAction';
12
11
  import { ExportPropertiesAction } from './actions/ExportPropertiesAction';
13
12
  import { RemoveFromCollectionAction } from './actions/RemoveFromCollectionAction';
14
- import { StartWorkflowAction, StartWorkflowComponent } from './actions/StartWorkflowComponent';
15
13
  import { ObjectsActionContext } from './ObjectsActionContextClass';
16
14
  import { ObjectsActionContextReact, useObjectsActionContext } from './ObjectsActionHooks';
17
15
  import type { ObjectsActionSpec } from './ObjectsActionSpec';
@@ -19,7 +17,6 @@ import type { ObjectsActionSpec } from './ObjectsActionSpec';
19
17
  const DEFAULT_ACTIONS: ObjectsActionSpec[] = [
20
18
  ExportPropertiesAction,
21
19
  ChangeTypeAction,
22
- StartWorkflowAction,
23
20
  AddToCollectionAction,
24
21
  DeleteObjectsAction,
25
22
  RemoveFromCollectionAction,
@@ -31,27 +28,11 @@ interface ObjectsActionContextProps {
31
28
  type?: ContentObjectTypeItem;
32
29
  }
33
30
  export function ObjectsActionContextProvider({ children, type }: ObjectsActionContextProps) {
34
- const { t } = useUITranslation();
35
31
  const selection = useDocumentSelection();
36
32
  const toast = useToast();
37
33
  const { client } = useUserSession();
38
34
  const search = useDocumentSearch();
39
35
 
40
- const { data: rules, error } = useFetch<ObjectsActionSpec[]>(() => {
41
- return client.workflows.rules.list().then((rules) => {
42
- return rules
43
- .map((rule) => ({
44
- id: rule.id,
45
- name: rule.name,
46
- description: rule.description,
47
- confirm: false,
48
- isWorkflow: true,
49
- component: StartWorkflowComponent,
50
- }))
51
- .sort((a, b) => a.name.localeCompare(b.name));
52
- });
53
- }, []);
54
-
55
36
  const context = useMemo(() => {
56
37
  const context = new ObjectsActionContext({
57
38
  selection,
@@ -61,14 +42,8 @@ export function ObjectsActionContextProvider({ children, type }: ObjectsActionCo
61
42
  type,
62
43
  });
63
44
  context.allActions = DEFAULT_ACTIONS;
64
- // biome-ignore lint/style/noNonNullAssertion: intentional non-null assertion; TS can't prove narrowing here
65
- context.wfRules = rules!;
66
45
  return context;
67
- }, [client, search, selection, rules, toast, type]);
68
-
69
- if (error) {
70
- return <ErrorBox title={t('store.failedToFetchWorkflows')}>{errorMessage(error)}</ErrorBox>;
71
- }
46
+ }, [client, search, selection, toast, type]);
72
47
 
73
48
  return (
74
49
  context && (
@@ -4,9 +4,7 @@ export type ObjectsActionCallback = (params: ObjectsActionParams) => Promise<unk
4
4
 
5
5
  export class ObjectsActionContext {
6
6
  allActions: ObjectsActionSpec[] = [];
7
- wfRules: ObjectsActionSpec[] = [];
8
7
  callbacks: Record<string, ObjectsActionCallback> = {};
9
- startWorkflow?: ObjectsActionCallback;
10
8
 
11
9
  constructor(public params: Omit<ObjectsActionParams, 'action'>) {}
12
10
 
@@ -34,11 +32,7 @@ export class ObjectsActionContext {
34
32
  }
35
33
 
36
34
  findAction(actionId: string) {
37
- let action = this.allActions.find((a) => a.id === actionId);
38
- if (!action) {
39
- action = this.wfRules.find((a) => a.id === actionId);
40
- }
41
- return action;
35
+ return this.allActions.find((a) => a.id === actionId);
42
36
  }
43
37
 
44
38
  async run(actionId: string): Promise<unknown> {
@@ -20,14 +20,3 @@ export function useObjectsActionCallback(name: string, cb: ObjectsActionCallback
20
20
  }, [ctx, name, cb]);
21
21
  return ctx;
22
22
  }
23
-
24
- export function useStartWorkflowCallback(cb: ObjectsActionCallback) {
25
- const ctx = useObjectsActionContext();
26
- useEffect(() => {
27
- ctx.startWorkflow = cb;
28
- return () => {
29
- ctx.startWorkflow = undefined;
30
- };
31
- }, [cb, ctx]);
32
- return ctx;
33
- }
@@ -7,7 +7,7 @@ import { useState } from 'react';
7
7
  import { type DocumentSelection, useDocumentSelection } from '../DocumentSelectionProvider.js';
8
8
  import { DocumentUploadModal } from '../upload/DocumentUploadModal.js';
9
9
  import { ExportPropertiesAction } from './actions/ExportPropertiesAction';
10
- import { StartWorkflowAction } from './actions/StartWorkflowComponent';
10
+ import { StartWorkflowButton } from './actions/StartWorkflowButton';
11
11
  import { ObjectsActionContextProvider } from './ObjectsActionContext';
12
12
  import { useObjectsActionContext } from './ObjectsActionHooks';
13
13
  import type { ObjectsActionSpec } from './ObjectsActionSpec';
@@ -16,13 +16,17 @@ interface SelectionActionsProps {
16
16
  type?: ContentObjectTypeItem;
17
17
  allowMutations?: boolean;
18
18
  allowDelete?: boolean;
19
+ /**
20
+ * Opt-in: shows the "Start Workflow" action. Defaults to `false` so it never leaks to read-only
21
+ * surfaces — callers must pass a permission-gated value (e.g. `canRunWorkflow(perms)`).
22
+ */
19
23
  allowWorkflowRun?: boolean;
20
24
  }
21
25
  export function SelectionActions({
22
26
  type,
23
27
  allowMutations = true,
24
28
  allowDelete = true,
25
- allowWorkflowRun = true,
29
+ allowWorkflowRun = false,
26
30
  }: SelectionActionsProps) {
27
31
  const selection = useDocumentSelection();
28
32
  const size = selection.size();
@@ -48,11 +52,11 @@ export function SelectionActions({
48
52
  </Button>
49
53
  </div>
50
54
  )}
55
+ {allowWorkflowRun && <StartWorkflowButton />}
51
56
  <SelectionActionsPopover
52
57
  selection={selection}
53
58
  allowMutations={allowMutations}
54
59
  allowDelete={allowDelete}
55
- allowWorkflowRun={allowWorkflowRun}
56
60
  >
57
61
  {(actions) =>
58
62
  actions.length > 0 ? (
@@ -62,21 +66,11 @@ export function SelectionActions({
62
66
  ) : null
63
67
  }
64
68
  </SelectionActionsPopover>
65
- {/* StartWorkflowButton must be inside the context */}
66
- {hasSelection && allowWorkflowRun && <ActionsWrapper selection={selection} />}
67
69
  </div>
68
70
  </ObjectsActionContextProvider>
69
71
  );
70
72
  }
71
73
 
72
- // Wrapper component that accesses the context
73
- interface ActionsWrapperProps {
74
- selection: DocumentSelection;
75
- }
76
- function ActionsWrapper(_props: ActionsWrapperProps) {
77
- return <StartWorkflowButton />;
78
- }
79
-
80
74
  export function UploadObjectsButton({
81
75
  collectionId,
82
76
  allowFolders = true,
@@ -113,19 +107,6 @@ export function UploadObjectsButton({
113
107
  );
114
108
  }
115
109
 
116
- function StartWorkflowButton() {
117
- const ctx = useObjectsActionContext();
118
- const { t } = useUITranslation();
119
-
120
- const selection = ctx.params.selection;
121
- const hasSelection = selection.hasSelection();
122
-
123
- return (
124
- hasSelection && (
125
- <Button onClick={() => ctx.run(StartWorkflowAction.id)}>{t('store.actions.startWorkflow')}</Button>
126
- )
127
- );
128
- }
129
110
  function optionLayout(option: ObjectsActionSpec) {
130
111
  return {
131
112
  label: option.name,
@@ -142,9 +123,7 @@ function SelectionActionsPopover({
142
123
  children,
143
124
  allowMutations = true,
144
125
  allowDelete = true,
145
- allowWorkflowRun = true,
146
- }: SelectionActionsPopoverProps &
147
- Required<Pick<SelectionActionsProps, 'allowMutations' | 'allowDelete' | 'allowWorkflowRun'>>) {
126
+ }: SelectionActionsPopoverProps & Required<Pick<SelectionActionsProps, 'allowMutations' | 'allowDelete'>>) {
148
127
  const context = useObjectsActionContext();
149
128
  const executeAction = (action: ObjectsActionSpec) => {
150
129
  context.run(action.id);
@@ -152,7 +131,6 @@ function SelectionActionsPopover({
152
131
  const actions = getAvailableActions(context.actions, selection, {
153
132
  allowMutations,
154
133
  allowDelete,
155
- allowWorkflowRun,
156
134
  });
157
135
  const trigger = children(actions);
158
136
 
@@ -191,7 +169,7 @@ function PopoverBody({ executeAction, actions }: PopoverBodyProps) {
191
169
  function getAvailableActions(
192
170
  actions: ObjectsActionSpec[],
193
171
  selection: DocumentSelection,
194
- permissions: Required<Pick<SelectionActionsProps, 'allowMutations' | 'allowDelete' | 'allowWorkflowRun'>>,
172
+ permissions: Required<Pick<SelectionActionsProps, 'allowMutations' | 'allowDelete'>>,
195
173
  ): ObjectsActionSpec[] {
196
174
  if (!selection?.hasSelection()) {
197
175
  return [ExportPropertiesAction];
@@ -201,9 +179,6 @@ function getAvailableActions(
201
179
  if (action.hideInList) {
202
180
  return false;
203
181
  }
204
- if (action.id === 'startWorkflow') {
205
- return permissions.allowWorkflowRun;
206
- }
207
182
  if (action.id === 'delete' || action.id === 'deleteFromCollections') {
208
183
  return permissions.allowDelete;
209
184
  }