@vertesia/ui 1.5.0-dev.20260901.052906Z → 1.5.0-dev.20260910.051115Z

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 (563) hide show
  1. package/lib/core/components/Avatar.d.ts.map +1 -1
  2. package/lib/core/components/Avatar.js +3 -3
  3. package/lib/core/components/Avatar.js.map +1 -1
  4. package/lib/core/components/ComboBox.js +1 -1
  5. package/lib/core/components/ComboBox.js.map +1 -1
  6. package/lib/core/components/FileUpload.js +1 -1
  7. package/lib/core/components/FileUpload.js.map +1 -1
  8. package/lib/core/components/Link.js +1 -1
  9. package/lib/core/components/Link.js.map +1 -1
  10. package/lib/core/components/SelectList.js +1 -1
  11. package/lib/core/components/SelectList.js.map +1 -1
  12. package/lib/core/components/SidePanel.js +1 -1
  13. package/lib/core/components/SidePanel.js.map +1 -1
  14. package/lib/core/components/Spinner.js +1 -1
  15. package/lib/core/components/Spinner.js.map +1 -1
  16. package/lib/core/components/TagsInput.js +8 -8
  17. package/lib/core/components/TagsInput.js.map +1 -1
  18. package/lib/core/components/shadcn/MessageBox.js +1 -1
  19. package/lib/core/components/shadcn/MessageBox.js.map +1 -1
  20. package/lib/core/components/shadcn/button.js +1 -1
  21. package/lib/core/components/shadcn/button.js.map +1 -1
  22. package/lib/core/components/shadcn/card.d.ts.map +1 -1
  23. package/lib/core/components/shadcn/card.js +1 -1
  24. package/lib/core/components/shadcn/card.js.map +1 -1
  25. package/lib/core/components/shadcn/command.js +5 -5
  26. package/lib/core/components/shadcn/command.js.map +1 -1
  27. package/lib/core/components/shadcn/filters/DynamicLabel.js +1 -1
  28. package/lib/core/components/shadcn/filters/DynamicLabel.js.map +1 -1
  29. package/lib/core/components/shadcn/filters/comboBox/DateCombobox.js +3 -3
  30. package/lib/core/components/shadcn/filters/comboBox/DateCombobox.js.map +1 -1
  31. package/lib/core/components/shadcn/input.js +3 -3
  32. package/lib/core/components/shadcn/input.js.map +1 -1
  33. package/lib/core/components/shadcn/modal/ConfirmModal.js +1 -1
  34. package/lib/core/components/shadcn/modal/ConfirmModal.js.map +1 -1
  35. package/lib/core/components/shadcn/modal/dialog.d.ts.map +1 -1
  36. package/lib/core/components/shadcn/modal/dialog.js +2 -2
  37. package/lib/core/components/shadcn/modal/dialog.js.map +1 -1
  38. package/lib/core/components/shadcn/overflowTabs.js +2 -2
  39. package/lib/core/components/shadcn/overflowTabs.js.map +1 -1
  40. package/lib/core/components/shadcn/popover.js +1 -1
  41. package/lib/core/components/shadcn/popover.js.map +1 -1
  42. package/lib/core/components/shadcn/radioGroup.d.ts.map +1 -1
  43. package/lib/core/components/shadcn/radioGroup.js +3 -3
  44. package/lib/core/components/shadcn/radioGroup.js.map +1 -1
  45. package/lib/core/components/shadcn/selectBox.js +1 -1
  46. package/lib/core/components/shadcn/selectBox.js.map +1 -1
  47. package/lib/core/components/shadcn/tabs.d.ts.map +1 -1
  48. package/lib/core/components/shadcn/tabs.js +5 -2
  49. package/lib/core/components/shadcn/tabs.js.map +1 -1
  50. package/lib/core/components/styles.js +1 -1
  51. package/lib/core/components/styles.js.map +1 -1
  52. package/lib/core/components/table/index.js +1 -1
  53. package/lib/core/hooks/useFetch.d.ts.map +1 -1
  54. package/lib/core/hooks/useFetch.js +2 -0
  55. package/lib/core/hooks/useFetch.js.map +1 -1
  56. package/lib/features/activity-doc/ActivityDoc.js +8 -8
  57. package/lib/features/activity-doc/ActivityDoc.js.map +1 -1
  58. package/lib/features/agent/chat/AgentChart.js +1 -1
  59. package/lib/features/agent/chat/AgentChart.js.map +1 -1
  60. package/lib/features/agent/chat/AgentRightPanel.d.ts +2 -3
  61. package/lib/features/agent/chat/AgentRightPanel.d.ts.map +1 -1
  62. package/lib/features/agent/chat/AgentRightPanel.js +3 -3
  63. package/lib/features/agent/chat/AgentRightPanel.js.map +1 -1
  64. package/lib/features/agent/chat/AskUserWidget.d.ts.map +1 -1
  65. package/lib/features/agent/chat/AskUserWidget.js +13 -13
  66. package/lib/features/agent/chat/AskUserWidget.js.map +1 -1
  67. package/lib/features/agent/chat/DocumentPanel.d.ts +7 -7
  68. package/lib/features/agent/chat/DocumentPanel.d.ts.map +1 -1
  69. package/lib/features/agent/chat/DocumentPanel.js +6 -12
  70. package/lib/features/agent/chat/DocumentPanel.js.map +1 -1
  71. package/lib/features/agent/chat/DocumentsTab.d.ts +15 -0
  72. package/lib/features/agent/chat/DocumentsTab.d.ts.map +1 -0
  73. package/lib/features/agent/chat/DocumentsTab.js +33 -0
  74. package/lib/features/agent/chat/DocumentsTab.js.map +1 -0
  75. package/lib/features/agent/chat/JumpingDots.js +1 -1
  76. package/lib/features/agent/chat/JumpingDots.js.map +1 -1
  77. package/lib/features/agent/chat/ModernAgentConversation.js +3 -3
  78. package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
  79. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
  80. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +22 -9
  81. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
  82. package/lib/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js +5 -5
  83. package/lib/features/agent/chat/ModernAgentOutput/BatchProgressPanel.js.map +1 -1
  84. package/lib/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
  85. package/lib/features/agent/chat/ModernAgentOutput/Header.js +16 -11
  86. package/lib/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
  87. package/lib/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js +1 -1
  88. package/lib/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js.map +1 -1
  89. package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js +1 -1
  90. package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -1
  91. package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
  92. package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js +7 -7
  93. package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
  94. package/lib/features/agent/chat/ModernAgentOutput/MessagesContainer.js +1 -1
  95. package/lib/features/agent/chat/ModernAgentOutput/MessagesContainer.js.map +1 -1
  96. package/lib/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts.map +1 -1
  97. package/lib/features/agent/chat/ModernAgentOutput/PlanPanel.js +10 -10
  98. package/lib/features/agent/chat/ModernAgentOutput/PlanPanel.js.map +1 -1
  99. package/lib/features/agent/chat/ModernAgentOutput/SlideInPanel.js +1 -1
  100. package/lib/features/agent/chat/ModernAgentOutput/SlideInPanel.js.map +1 -1
  101. package/lib/features/agent/chat/ModernAgentOutput/SlidingMessages.d.ts.map +1 -1
  102. package/lib/features/agent/chat/ModernAgentOutput/SlidingMessages.js +1 -1
  103. package/lib/features/agent/chat/ModernAgentOutput/SlidingMessages.js.map +1 -1
  104. package/lib/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js +17 -17
  105. package/lib/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js.map +1 -1
  106. package/lib/features/agent/chat/ModernAgentOutput/StreamingMessage.js +1 -1
  107. package/lib/features/agent/chat/ModernAgentOutput/StreamingMessage.js.map +1 -1
  108. package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.d.ts.map +1 -1
  109. package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.js +14 -2
  110. package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.js.map +1 -1
  111. package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts.map +1 -1
  112. package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.js +15 -15
  113. package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.js.map +1 -1
  114. package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.d.ts.map +1 -1
  115. package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.js +18 -0
  116. package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.js.map +1 -1
  117. package/lib/features/agent/chat/SlidingThinkingIndicator.d.ts.map +1 -1
  118. package/lib/features/agent/chat/SlidingThinkingIndicator.js +5 -2
  119. package/lib/features/agent/chat/SlidingThinkingIndicator.js.map +1 -1
  120. package/lib/features/agent/chat/VegaLiteChart.d.ts.map +1 -1
  121. package/lib/features/agent/chat/VegaLiteChart.js +6 -2
  122. package/lib/features/agent/chat/VegaLiteChart.js.map +1 -1
  123. package/lib/features/agent/chat/hooks/useDocumentPanel.d.ts +2 -2
  124. package/lib/features/agent/chat/hooks/useDocumentPanel.d.ts.map +1 -1
  125. package/lib/features/agent/chat/hooks/useDocumentPanel.js +0 -18
  126. package/lib/features/agent/chat/hooks/useDocumentPanel.js.map +1 -1
  127. package/lib/features/errors/RowErrorBoundary.js +1 -1
  128. package/lib/features/errors/RowErrorBoundary.js.map +1 -1
  129. package/lib/features/facets/AgentRunnerFacetsNav.js +1 -1
  130. package/lib/features/facets/AgentRunnerFacetsNav.js.map +1 -1
  131. package/lib/features/facets/utils/VInteractionFacet.d.ts +3 -5
  132. package/lib/features/facets/utils/VInteractionFacet.d.ts.map +1 -1
  133. package/lib/features/facets/utils/VInteractionFacet.js +10 -23
  134. package/lib/features/facets/utils/VInteractionFacet.js.map +1 -1
  135. package/lib/features/facets/utils/VUserFacet.js +1 -1
  136. package/lib/features/facets/utils/VUserFacet.js.map +1 -1
  137. package/lib/features/layout/GenericPageNavHeader.d.ts.map +1 -1
  138. package/lib/features/layout/GenericPageNavHeader.js +4 -1
  139. package/lib/features/layout/GenericPageNavHeader.js.map +1 -1
  140. package/lib/features/layout/NotFoundView.js +1 -1
  141. package/lib/features/layout/NotFoundView.js.map +1 -1
  142. package/lib/features/magic-pdf/AnnotatedImageSlider.js +4 -12
  143. package/lib/features/magic-pdf/AnnotatedImageSlider.js.map +1 -1
  144. package/lib/features/magic-pdf/ExtractedContentView.js +4 -4
  145. package/lib/features/magic-pdf/ExtractedContentView.js.map +1 -1
  146. package/lib/features/magic-pdf/MagicPdfView.js +1 -1
  147. package/lib/features/magic-pdf/MagicPdfView.js.map +1 -1
  148. package/lib/features/oauth/McpConnectionsButton.d.ts.map +1 -1
  149. package/lib/features/oauth/McpConnectionsButton.js +4 -1
  150. package/lib/features/oauth/McpConnectionsButton.js.map +1 -1
  151. package/lib/features/oauth/McpConnectionsDialog.d.ts.map +1 -1
  152. package/lib/features/oauth/McpConnectionsDialog.js +3 -2
  153. package/lib/features/oauth/McpConnectionsDialog.js.map +1 -1
  154. package/lib/features/oauth/useMcpConnections.d.ts +6 -7
  155. package/lib/features/oauth/useMcpConnections.d.ts.map +1 -1
  156. package/lib/features/oauth/useMcpConnections.js +27 -20
  157. package/lib/features/oauth/useMcpConnections.js.map +1 -1
  158. package/lib/features/pdf-viewer/PdfPageRenderer.js +2 -2
  159. package/lib/features/pdf-viewer/PdfPageRenderer.js.map +1 -1
  160. package/lib/features/pdf-viewer/PdfPageSlider.js +3 -3
  161. package/lib/features/pdf-viewer/PdfPageSlider.js.map +1 -1
  162. package/lib/features/pdf-viewer/SimplePdfViewer.js +1 -1
  163. package/lib/features/pdf-viewer/SimplePdfViewer.js.map +1 -1
  164. package/lib/features/permissions/UserPermissionsProvider.d.ts +2 -1
  165. package/lib/features/permissions/UserPermissionsProvider.d.ts.map +1 -1
  166. package/lib/features/permissions/UserPermissionsProvider.js +35 -22
  167. package/lib/features/permissions/UserPermissionsProvider.js.map +1 -1
  168. package/lib/features/permissions/useRoleMappings.d.ts +19 -0
  169. package/lib/features/permissions/useRoleMappings.d.ts.map +1 -0
  170. package/lib/features/permissions/useRoleMappings.js +87 -0
  171. package/lib/features/permissions/useRoleMappings.js.map +1 -0
  172. package/lib/features/store/collections/SelectCollection.js +1 -1
  173. package/lib/features/store/collections/SelectCollection.js.map +1 -1
  174. package/lib/features/store/objects/DocumentPreviewPanel.d.ts.map +1 -1
  175. package/lib/features/store/objects/DocumentPreviewPanel.js +9 -9
  176. package/lib/features/store/objects/DocumentPreviewPanel.js.map +1 -1
  177. package/lib/features/store/objects/DocumentTable.js +1 -1
  178. package/lib/features/store/objects/DocumentTable.js.map +1 -1
  179. package/lib/features/store/objects/components/DocumentIcon.js +2 -2
  180. package/lib/features/store/objects/components/DocumentIcon.js.map +1 -1
  181. package/lib/features/store/objects/components/DocumentInput.js +1 -1
  182. package/lib/features/store/objects/components/DocumentInput.js.map +1 -1
  183. package/lib/features/store/objects/components/PropertiesEditorModal.js +1 -1
  184. package/lib/features/store/objects/components/PropertiesEditorModal.js.map +1 -1
  185. package/lib/features/store/objects/components/SaveVersionConfirmModal.js +1 -1
  186. package/lib/features/store/objects/components/SaveVersionConfirmModal.js.map +1 -1
  187. package/lib/features/store/objects/layout/documentLayout.d.ts.map +1 -1
  188. package/lib/features/store/objects/layout/documentLayout.js +2 -2
  189. package/lib/features/store/objects/layout/documentLayout.js.map +1 -1
  190. package/lib/features/store/objects/selection/SelectionActions.js +1 -1
  191. package/lib/features/store/objects/selection/SelectionActions.js.map +1 -1
  192. package/lib/features/store/types/IntakePolicyEditor.d.ts +10 -1
  193. package/lib/features/store/types/IntakePolicyEditor.d.ts.map +1 -1
  194. package/lib/features/store/types/IntakePolicyEditor.js +29 -19
  195. package/lib/features/store/types/IntakePolicyEditor.js.map +1 -1
  196. package/lib/features/store/types/IntakePolicyForm.d.ts +1 -1
  197. package/lib/features/store/types/IntakePolicyForm.d.ts.map +1 -1
  198. package/lib/features/store/types/IntakePolicyForm.js +5 -3
  199. package/lib/features/store/types/IntakePolicyForm.js.map +1 -1
  200. package/lib/features/store/types/SelectContentTypeModal.js +1 -1
  201. package/lib/features/store/types/SelectContentTypeModal.js.map +1 -1
  202. package/lib/features/store/types/TypeRegistry.d.ts +10 -5
  203. package/lib/features/store/types/TypeRegistry.d.ts.map +1 -1
  204. package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts +10 -5
  205. package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts.map +1 -1
  206. package/lib/features/user/UserAvatar.js +2 -2
  207. package/lib/features/user/UserAvatar.js.map +1 -1
  208. package/lib/features/user/UserInfo.d.ts.map +1 -1
  209. package/lib/features/user/UserInfo.js +7 -7
  210. package/lib/features/user/UserInfo.js.map +1 -1
  211. package/lib/features/utils/index.d.ts +1 -0
  212. package/lib/features/utils/index.d.ts.map +1 -1
  213. package/lib/features/utils/index.js +1 -0
  214. package/lib/features/utils/index.js.map +1 -1
  215. package/lib/features/utils/interaction.d.ts +55 -0
  216. package/lib/features/utils/interaction.d.ts.map +1 -0
  217. package/lib/features/utils/interaction.js +77 -0
  218. package/lib/features/utils/interaction.js.map +1 -0
  219. package/lib/features/views/ViewResults.js +2 -2
  220. package/lib/features/views/ViewResults.js.map +1 -1
  221. package/lib/i18n/locales/ar.json +17 -1
  222. package/lib/i18n/locales/de.json +13 -1
  223. package/lib/i18n/locales/en.json +13 -1
  224. package/lib/i18n/locales/es.json +13 -1
  225. package/lib/i18n/locales/fr.json +13 -1
  226. package/lib/i18n/locales/it.json +13 -1
  227. package/lib/i18n/locales/ja.json +13 -1
  228. package/lib/i18n/locales/ko.json +13 -1
  229. package/lib/i18n/locales/pt.json +13 -1
  230. package/lib/i18n/locales/ru.json +15 -1
  231. package/lib/i18n/locales/tr.json +13 -1
  232. package/lib/i18n/locales/zh-TW.json +13 -1
  233. package/lib/i18n/locales/zh.json +13 -1
  234. package/lib/layout/FullHeightLayout.js +2 -2
  235. package/lib/layout/FullHeightLayout.js.map +1 -1
  236. package/lib/layout/Navbar.js +4 -4
  237. package/lib/layout/Navbar.js.map +1 -1
  238. package/lib/layout/Sidebar.js +1 -1
  239. package/lib/layout/Sidebar.js.map +1 -1
  240. package/lib/router/NestedNavigationContext.d.ts +3 -1
  241. package/lib/router/NestedNavigationContext.d.ts.map +1 -1
  242. package/lib/router/NestedNavigationContext.js +2 -2
  243. package/lib/router/NestedNavigationContext.js.map +1 -1
  244. package/lib/session/UserSessionProvider.d.ts.map +1 -1
  245. package/lib/session/UserSessionProvider.js +2 -13
  246. package/lib/session/UserSessionProvider.js.map +1 -1
  247. package/lib/session/auth/authState.d.ts +13 -0
  248. package/lib/session/auth/authState.d.ts.map +1 -0
  249. package/lib/session/auth/authState.js +37 -0
  250. package/lib/session/auth/authState.js.map +1 -0
  251. package/lib/session/auth/domainRouting.d.ts +39 -0
  252. package/lib/session/auth/domainRouting.d.ts.map +1 -1
  253. package/lib/session/auth/domainRouting.js +85 -0
  254. package/lib/session/auth/domainRouting.js.map +1 -1
  255. package/lib/session/auth/useAuthState.d.ts +4 -7
  256. package/lib/session/auth/useAuthState.d.ts.map +1 -1
  257. package/lib/session/auth/useAuthState.js +5 -41
  258. package/lib/session/auth/useAuthState.js.map +1 -1
  259. package/lib/session/index.d.ts +1 -0
  260. package/lib/session/index.d.ts.map +1 -1
  261. package/lib/session/index.js +2 -0
  262. package/lib/session/index.js.map +1 -1
  263. package/lib/shell/SplashScreen.d.ts +1 -1
  264. package/lib/shell/SplashScreen.d.ts.map +1 -1
  265. package/lib/shell/SplashScreen.js +6 -2
  266. package/lib/shell/SplashScreen.js.map +1 -1
  267. package/lib/shell/VertesiaShell.js +1 -1
  268. package/lib/shell/VertesiaShell.js.map +1 -1
  269. package/lib/shell/apps/AppProjectSelector.js +1 -1
  270. package/lib/shell/apps/AppProjectSelector.js.map +1 -1
  271. package/lib/shell/apps/StandaloneApp.js +2 -2
  272. package/lib/shell/apps/StandaloneApp.js.map +1 -1
  273. package/lib/shell/login/SignInPrimitives.js +2 -2
  274. package/lib/shell/login/SignInPrimitives.js.map +1 -1
  275. package/lib/shell/login/SigninScreen.js +1 -1
  276. package/lib/shell/login/SigninScreen.js.map +1 -1
  277. package/lib/shell/login/SignupForm.js +1 -1
  278. package/lib/shell/login/SignupForm.js.map +1 -1
  279. package/lib/shell/login/TerminalLogin.js +2 -2
  280. package/lib/shell/login/TerminalLogin.js.map +1 -1
  281. package/lib/shell/login/UserInfo.d.ts.map +1 -1
  282. package/lib/shell/login/UserInfo.js +1 -1
  283. package/lib/shell/login/UserInfo.js.map +1 -1
  284. package/lib/shell/login/UserSessionMenu.js +1 -1
  285. package/lib/shell/login/UserSessionMenu.js.map +1 -1
  286. package/lib/vertesia-ui-core.js +7 -7
  287. package/lib/vertesia-ui-core.js.map +1 -1
  288. package/lib/vertesia-ui-features.js +179 -182
  289. package/lib/vertesia-ui-features.js.map +1 -1
  290. package/lib/vertesia-ui-i18n.BfN7iOHb.chunk.js +5 -0
  291. package/lib/vertesia-ui-i18n.BfN7iOHb.chunk.js.map +1 -0
  292. package/lib/vertesia-ui-i18n.BjH2zEZw.chunk.js +5 -0
  293. package/lib/vertesia-ui-i18n.BjH2zEZw.chunk.js.map +1 -0
  294. package/lib/vertesia-ui-i18n.BjSwAZXl.chunk.js +5 -0
  295. package/lib/vertesia-ui-i18n.BjSwAZXl.chunk.js.map +1 -0
  296. package/lib/vertesia-ui-i18n.C7PUm5Au.chunk.js +5 -0
  297. package/lib/vertesia-ui-i18n.C7PUm5Au.chunk.js.map +1 -0
  298. package/lib/vertesia-ui-i18n.CF_1mUS5.chunk.js +5 -0
  299. package/lib/vertesia-ui-i18n.CF_1mUS5.chunk.js.map +1 -0
  300. package/lib/vertesia-ui-i18n.ChfUl3_-.chunk.js +5 -0
  301. package/lib/vertesia-ui-i18n.ChfUl3_-.chunk.js.map +1 -0
  302. package/lib/vertesia-ui-i18n.D-Sk-5d1.chunk.js +5 -0
  303. package/lib/vertesia-ui-i18n.D-Sk-5d1.chunk.js.map +1 -0
  304. package/lib/vertesia-ui-i18n.D4rnu1_S.chunk.js +5 -0
  305. package/lib/vertesia-ui-i18n.D4rnu1_S.chunk.js.map +1 -0
  306. package/lib/vertesia-ui-i18n.DDf0-laK.chunk.js +5 -0
  307. package/lib/vertesia-ui-i18n.DDf0-laK.chunk.js.map +1 -0
  308. package/lib/vertesia-ui-i18n.DN79y06J.chunk.js +5 -0
  309. package/lib/vertesia-ui-i18n.DN79y06J.chunk.js.map +1 -0
  310. package/lib/vertesia-ui-i18n.DWLIciYQ.chunk.js +5 -0
  311. package/lib/vertesia-ui-i18n.DWLIciYQ.chunk.js.map +1 -0
  312. package/lib/vertesia-ui-i18n.DvF_YaAJ.chunk.js +5 -0
  313. package/lib/vertesia-ui-i18n.DvF_YaAJ.chunk.js.map +1 -0
  314. package/lib/vertesia-ui-i18n.js +2 -2
  315. package/lib/vertesia-ui-layout.js +1 -1
  316. package/lib/vertesia-ui-layout.js.map +1 -1
  317. package/lib/vertesia-ui-rich-text.js +24 -24
  318. package/lib/vertesia-ui-rich-text.js.map +1 -1
  319. package/lib/vertesia-ui-router.js +1 -1
  320. package/lib/vertesia-ui-router.js.map +1 -1
  321. package/lib/vertesia-ui-session.js +1 -1
  322. package/lib/vertesia-ui-session.js.map +1 -1
  323. package/lib/vertesia-ui-shell.js +3 -3
  324. package/lib/vertesia-ui-shell.js.map +1 -1
  325. package/lib/vertesia-ui-widgets.js +54 -54
  326. package/lib/vertesia-ui-widgets.js.map +1 -1
  327. package/lib/widgets/Progress.js +1 -1
  328. package/lib/widgets/Progress.js.map +1 -1
  329. package/lib/widgets/form/Form.js +2 -2
  330. package/lib/widgets/form/Form.js.map +1 -1
  331. package/lib/widgets/form/fields.js +2 -2
  332. package/lib/widgets/form/fields.js.map +1 -1
  333. package/lib/widgets/json-view/JSONView.js +1 -1
  334. package/lib/widgets/json-view/JSONView.js.map +1 -1
  335. package/lib/widgets/markdown/MermaidDiagram.js +1 -1
  336. package/lib/widgets/markdown/MermaidDiagram.js.map +1 -1
  337. package/lib/widgets/markdown/remarkDirectiveHandler.d.ts +7 -2
  338. package/lib/widgets/markdown/remarkDirectiveHandler.d.ts.map +1 -1
  339. package/lib/widgets/markdown/remarkDirectiveHandler.js +19 -4
  340. package/lib/widgets/markdown/remarkDirectiveHandler.js.map +1 -1
  341. package/lib/widgets/monacoEditor/MonacoEditor.d.ts.map +1 -1
  342. package/lib/widgets/monacoEditor/MonacoEditor.js +4 -2
  343. package/lib/widgets/monacoEditor/MonacoEditor.js.map +1 -1
  344. package/lib/widgets/monacoEditor/index.d.ts +1 -0
  345. package/lib/widgets/monacoEditor/index.d.ts.map +1 -1
  346. package/lib/widgets/monacoEditor/index.js +1 -0
  347. package/lib/widgets/monacoEditor/index.js.map +1 -1
  348. package/lib/widgets/monacoEditor/loadMonaco.d.ts +45 -0
  349. package/lib/widgets/monacoEditor/loadMonaco.d.ts.map +1 -0
  350. package/lib/widgets/monacoEditor/loadMonaco.js +62 -0
  351. package/lib/widgets/monacoEditor/loadMonaco.js.map +1 -0
  352. package/lib/widgets/properties/PropertiesView.js +1 -1
  353. package/lib/widgets/properties/PropertiesView.js.map +1 -1
  354. package/lib/widgets/schema-editor/editor/Editable.js +2 -2
  355. package/lib/widgets/schema-editor/editor/Editable.js.map +1 -1
  356. package/lib/widgets/schema-editor/editor/PropertyEditor.js +1 -1
  357. package/lib/widgets/schema-editor/editor/PropertyEditor.js.map +1 -1
  358. package/lib/widgets/schema-editor/editor/SchemaEditor.js +2 -2
  359. package/lib/widgets/schema-editor/editor/SchemaEditor.js.map +1 -1
  360. package/lib/widgets/upload/DropZone.js +1 -1
  361. package/lib/widgets/upload/DropZone.js.map +1 -1
  362. package/lib/widgets/upload/UploadResultCategory.d.ts +1 -1
  363. package/lib/widgets/upload/UploadResultCategory.d.ts.map +1 -1
  364. package/lib/widgets/upload/UploadResultCategory.js +3 -3
  365. package/lib/widgets/upload/UploadResultCategory.js.map +1 -1
  366. package/lib/widgets/upload/UploadSummary.js +1 -1
  367. package/lib/widgets/upload/UploadSummary.js.map +1 -1
  368. package/lib/widgets/xml-viewer/components/XMLViewer.d.ts.map +1 -1
  369. package/lib/widgets/xml-viewer/components/XMLViewer.js +7 -3
  370. package/lib/widgets/xml-viewer/components/XMLViewer.js.map +1 -1
  371. package/lib/widgets/xml-viewer/hooks/useCollapsible.d.ts +1 -1
  372. package/lib/widgets/xml-viewer/hooks/useXMLViewer.d.ts +11 -13
  373. package/lib/widgets/xml-viewer/hooks/useXMLViewer.d.ts.map +1 -1
  374. package/lib/widgets/xml-viewer/hooks/useXMLViewer.js +41 -14
  375. package/lib/widgets/xml-viewer/hooks/useXMLViewer.js.map +1 -1
  376. package/package.json +7 -7
  377. package/src/__tests__/contrast.test.ts +1 -0
  378. package/src/core/components/Avatar.tsx +3 -3
  379. package/src/core/components/ComboBox.tsx +1 -1
  380. package/src/core/components/FileUpload.tsx +4 -4
  381. package/src/core/components/Link.tsx +1 -1
  382. package/src/core/components/SelectList.tsx +1 -1
  383. package/src/core/components/SidePanel.tsx +1 -1
  384. package/src/core/components/Spinner.tsx +1 -1
  385. package/src/core/components/TagsInput.tsx +8 -8
  386. package/src/core/components/shadcn/MessageBox.tsx +1 -1
  387. package/src/core/components/shadcn/button.tsx +1 -1
  388. package/src/core/components/shadcn/card.tsx +1 -3
  389. package/src/core/components/shadcn/command.tsx +5 -5
  390. package/src/core/components/shadcn/filters/DynamicLabel.tsx +1 -1
  391. package/src/core/components/shadcn/filters/comboBox/DateCombobox.tsx +3 -3
  392. package/src/core/components/shadcn/input.tsx +3 -3
  393. package/src/core/components/shadcn/modal/ConfirmModal.tsx +3 -3
  394. package/src/core/components/shadcn/modal/dialog.tsx +2 -4
  395. package/src/core/components/shadcn/overflowTabs.tsx +2 -2
  396. package/src/core/components/shadcn/popover.tsx +1 -1
  397. package/src/core/components/shadcn/radioGroup.tsx +5 -7
  398. package/src/core/components/shadcn/selectBox.tsx +1 -1
  399. package/src/core/components/shadcn/tabs.tsx +4 -2
  400. package/src/core/components/styles.ts +1 -1
  401. package/src/core/components/table/index.tsx +1 -1
  402. package/src/core/hooks/useFetch.test.ts +20 -0
  403. package/src/core/hooks/useFetch.ts +2 -0
  404. package/src/css/base.css +1 -1
  405. package/src/css/color.css +4 -0
  406. package/src/css/theme.css +1 -0
  407. package/src/css/typography.css +2 -2
  408. package/src/features/activity-doc/ActivityDoc.tsx +11 -11
  409. package/src/features/agent/chat/AgentChart.tsx +1 -1
  410. package/src/features/agent/chat/AgentRightPanel.tsx +4 -8
  411. package/src/features/agent/chat/AskUserWidget.tsx +19 -23
  412. package/src/features/agent/chat/DocumentPanel.tsx +39 -48
  413. package/src/features/agent/chat/DocumentsTab.test.tsx +87 -0
  414. package/src/features/agent/chat/DocumentsTab.tsx +124 -0
  415. package/src/features/agent/chat/JumpingDots.tsx +3 -3
  416. package/src/features/agent/chat/ModernAgentConversation.test.tsx +0 -1
  417. package/src/features/agent/chat/ModernAgentConversation.tsx +3 -5
  418. package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.test.tsx +60 -1
  419. package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +44 -24
  420. package/src/features/agent/chat/ModernAgentOutput/BatchProgressPanel.tsx +12 -12
  421. package/src/features/agent/chat/ModernAgentOutput/Header.tsx +28 -15
  422. package/src/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.tsx +4 -4
  423. package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +2 -2
  424. package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +7 -12
  425. package/src/features/agent/chat/ModernAgentOutput/MessagesContainer.tsx +1 -1
  426. package/src/features/agent/chat/ModernAgentOutput/PlanPanel.tsx +16 -22
  427. package/src/features/agent/chat/ModernAgentOutput/SlideInPanel.tsx +4 -4
  428. package/src/features/agent/chat/ModernAgentOutput/SlidingMessages.tsx +2 -4
  429. package/src/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.tsx +21 -21
  430. package/src/features/agent/chat/ModernAgentOutput/StreamingMessage.tsx +4 -4
  431. package/src/features/agent/chat/ModernAgentOutput/SummaryConversation.ts +16 -1
  432. package/src/features/agent/chat/ModernAgentOutput/ToolCallGroup.tsx +19 -40
  433. package/src/features/agent/chat/ModernAgentOutput/requestInputMessages.test.ts +41 -0
  434. package/src/features/agent/chat/ModernAgentOutput/requestInputMessages.ts +19 -0
  435. package/src/features/agent/chat/ModernAgentOutput/utils.test.ts +93 -0
  436. package/src/features/agent/chat/SlidingThinkingIndicator.tsx +5 -2
  437. package/src/features/agent/chat/VegaLiteChart.tsx +6 -2
  438. package/src/features/agent/chat/hooks/useDocumentPanel.test.tsx +33 -0
  439. package/src/features/agent/chat/hooks/useDocumentPanel.ts +3 -20
  440. package/src/features/errors/RowErrorBoundary.tsx +1 -1
  441. package/src/features/facets/AgentRunnerFacetsNav.tsx +1 -1
  442. package/src/features/facets/utils/VInteractionFacet.tsx +22 -34
  443. package/src/features/facets/utils/VUserFacet.tsx +1 -1
  444. package/src/features/layout/GenericPageNavHeader.tsx +9 -1
  445. package/src/features/layout/NotFoundView.tsx +1 -1
  446. package/src/features/magic-pdf/AnnotatedImageSlider.tsx +8 -16
  447. package/src/features/magic-pdf/ExtractedContentView.tsx +4 -4
  448. package/src/features/magic-pdf/MagicPdfView.tsx +1 -1
  449. package/src/features/oauth/McpConnectionsButton.test.tsx +79 -8
  450. package/src/features/oauth/McpConnectionsButton.tsx +6 -3
  451. package/src/features/oauth/McpConnectionsDialog.tsx +9 -3
  452. package/src/features/oauth/useMcpConnections.ts +33 -27
  453. package/src/features/pdf-viewer/PdfPageRenderer.tsx +2 -2
  454. package/src/features/pdf-viewer/PdfPageSlider.tsx +4 -4
  455. package/src/features/pdf-viewer/SimplePdfViewer.tsx +1 -1
  456. package/src/features/permissions/UserPermissionsProvider.test.tsx +172 -0
  457. package/src/features/permissions/UserPermissionsProvider.tsx +68 -21
  458. package/src/features/permissions/useRoleMappings.ts +105 -0
  459. package/src/features/store/collections/SelectCollection.tsx +1 -1
  460. package/src/features/store/objects/DocumentPreviewPanel.tsx +43 -53
  461. package/src/features/store/objects/DocumentTable.tsx +2 -2
  462. package/src/features/store/objects/components/DocumentIcon.tsx +4 -4
  463. package/src/features/store/objects/components/DocumentInput.tsx +3 -3
  464. package/src/features/store/objects/components/PropertiesEditorModal.tsx +2 -2
  465. package/src/features/store/objects/components/SaveVersionConfirmModal.tsx +2 -2
  466. package/src/features/store/objects/layout/documentLayout.tsx +2 -4
  467. package/src/features/store/objects/selection/SelectionActions.tsx +1 -1
  468. package/src/features/store/types/IntakePolicyEditor.tsx +70 -36
  469. package/src/features/store/types/IntakePolicyForm.tsx +11 -3
  470. package/src/features/store/types/SelectContentTypeModal.tsx +1 -1
  471. package/src/features/user/UserAvatar.tsx +3 -3
  472. package/src/features/user/UserInfo.tsx +11 -16
  473. package/src/features/utils/index.ts +1 -0
  474. package/src/features/utils/interaction.test.tsx +93 -0
  475. package/src/features/utils/interaction.tsx +125 -0
  476. package/src/features/views/ViewResults.tsx +3 -3
  477. package/src/i18n/locales/ar.json +17 -1
  478. package/src/i18n/locales/de.json +13 -1
  479. package/src/i18n/locales/en.json +13 -1
  480. package/src/i18n/locales/es.json +13 -1
  481. package/src/i18n/locales/fr.json +13 -1
  482. package/src/i18n/locales/it.json +13 -1
  483. package/src/i18n/locales/ja.json +13 -1
  484. package/src/i18n/locales/ko.json +13 -1
  485. package/src/i18n/locales/pt.json +13 -1
  486. package/src/i18n/locales/ru.json +15 -1
  487. package/src/i18n/locales/tr.json +13 -1
  488. package/src/i18n/locales/zh-TW.json +13 -1
  489. package/src/i18n/locales/zh.json +13 -1
  490. package/src/layout/FullHeightLayout.tsx +2 -2
  491. package/src/layout/Navbar.tsx +5 -5
  492. package/src/layout/Sidebar.tsx +1 -1
  493. package/src/router/NestedNavigationContext.test.tsx +54 -0
  494. package/src/router/NestedNavigationContext.tsx +9 -2
  495. package/src/session/UserSessionProvider.tsx +2 -15
  496. package/src/session/auth/authState.test.ts +35 -0
  497. package/src/session/auth/authState.ts +42 -0
  498. package/src/session/auth/domainRouting.test.ts +169 -1
  499. package/src/session/auth/domainRouting.ts +89 -0
  500. package/src/session/auth/useAuthState.ts +5 -49
  501. package/src/session/index.ts +6 -0
  502. package/src/shell/SplashScreen.test.tsx +22 -0
  503. package/src/shell/SplashScreen.tsx +6 -2
  504. package/src/shell/VertesiaShell.tsx +1 -1
  505. package/src/shell/apps/AppProjectSelector.tsx +1 -1
  506. package/src/shell/apps/StandaloneApp.tsx +9 -9
  507. package/src/shell/login/SignInPrimitives.tsx +2 -2
  508. package/src/shell/login/SigninScreen.tsx +1 -1
  509. package/src/shell/login/SignupForm.tsx +2 -2
  510. package/src/shell/login/TerminalLogin.tsx +5 -5
  511. package/src/shell/login/UserInfo.tsx +2 -5
  512. package/src/shell/login/UserSessionMenu.tsx +2 -2
  513. package/src/widgets/Progress.tsx +2 -2
  514. package/src/widgets/form/Form.tsx +4 -4
  515. package/src/widgets/form/fields.tsx +2 -2
  516. package/src/widgets/json-view/JSONView.tsx +1 -6
  517. package/src/widgets/markdown/ArtifactEditingSurface.test.tsx +33 -29
  518. package/src/widgets/markdown/MarkdownRenderer.test.tsx +52 -0
  519. package/src/widgets/markdown/MermaidDiagram.tsx +2 -2
  520. package/src/widgets/markdown/remarkDirectiveHandler.ts +21 -5
  521. package/src/widgets/monacoEditor/MonacoEditor.tsx +4 -2
  522. package/src/widgets/monacoEditor/index.ts +1 -0
  523. package/src/widgets/monacoEditor/loadMonaco.test.ts +63 -0
  524. package/src/widgets/monacoEditor/loadMonaco.ts +70 -0
  525. package/src/widgets/properties/PropertiesView.tsx +1 -1
  526. package/src/widgets/schema-editor/editor/Editable.tsx +2 -2
  527. package/src/widgets/schema-editor/editor/PropertyEditor.tsx +1 -1
  528. package/src/widgets/schema-editor/editor/SchemaEditor.tsx +2 -2
  529. package/src/widgets/upload/DropZone.tsx +1 -1
  530. package/src/widgets/upload/UploadResultCategory.tsx +7 -7
  531. package/src/widgets/upload/UploadSummary.tsx +4 -4
  532. package/src/widgets/xml-viewer/components/XMLViewer.tsx +7 -3
  533. package/src/widgets/xml-viewer/hooks/useXMLViewer.test.ts +60 -7
  534. package/src/widgets/xml-viewer/hooks/useXMLViewer.ts +70 -16
  535. package/lib/features/agent/chat/DocumentTabBar.d.ts +0 -9
  536. package/lib/features/agent/chat/DocumentTabBar.d.ts.map +0 -1
  537. package/lib/features/agent/chat/DocumentTabBar.js +0 -9
  538. package/lib/features/agent/chat/DocumentTabBar.js.map +0 -1
  539. package/lib/vertesia-ui-i18n.BJBGsq-8.chunk.js +0 -5
  540. package/lib/vertesia-ui-i18n.BJBGsq-8.chunk.js.map +0 -1
  541. package/lib/vertesia-ui-i18n.BY5YG5cX.chunk.js +0 -5
  542. package/lib/vertesia-ui-i18n.BY5YG5cX.chunk.js.map +0 -1
  543. package/lib/vertesia-ui-i18n.Bd5_1BXO.chunk.js +0 -5
  544. package/lib/vertesia-ui-i18n.Bd5_1BXO.chunk.js.map +0 -1
  545. package/lib/vertesia-ui-i18n.Bvwej2HH.chunk.js +0 -5
  546. package/lib/vertesia-ui-i18n.Bvwej2HH.chunk.js.map +0 -1
  547. package/lib/vertesia-ui-i18n.CMT3f4gf.chunk.js +0 -5
  548. package/lib/vertesia-ui-i18n.CMT3f4gf.chunk.js.map +0 -1
  549. package/lib/vertesia-ui-i18n.D56DNPJW.chunk.js +0 -5
  550. package/lib/vertesia-ui-i18n.D56DNPJW.chunk.js.map +0 -1
  551. package/lib/vertesia-ui-i18n.DDzKLNx6.chunk.js +0 -5
  552. package/lib/vertesia-ui-i18n.DDzKLNx6.chunk.js.map +0 -1
  553. package/lib/vertesia-ui-i18n.D_Am1LpF.chunk.js +0 -5
  554. package/lib/vertesia-ui-i18n.D_Am1LpF.chunk.js.map +0 -1
  555. package/lib/vertesia-ui-i18n.DrZizgGV.chunk.js +0 -5
  556. package/lib/vertesia-ui-i18n.DrZizgGV.chunk.js.map +0 -1
  557. package/lib/vertesia-ui-i18n.DwHsq86z.chunk.js +0 -5
  558. package/lib/vertesia-ui-i18n.DwHsq86z.chunk.js.map +0 -1
  559. package/lib/vertesia-ui-i18n.PLpo0Bbz.chunk.js +0 -5
  560. package/lib/vertesia-ui-i18n.PLpo0Bbz.chunk.js.map +0 -1
  561. package/lib/vertesia-ui-i18n.xVbXALqz.chunk.js +0 -5
  562. package/lib/vertesia-ui-i18n.xVbXALqz.chunk.js.map +0 -1
  563. package/src/features/agent/chat/DocumentTabBar.tsx +0 -41
@@ -213,7 +213,7 @@ function ObjectTableWithDropZone({
213
213
  {/* Loading overlay */}
214
214
  <div
215
215
  className={clsx(
216
- 'bg-white dark:bg-gray-800 opacity-40 absolute inset-0 z-50 flex justify-center items-center',
216
+ 'bg-white dark:bg-muted opacity-40 absolute inset-0 z-50 flex justify-center items-center',
217
217
  isLoading ? 'block' : 'hidden',
218
218
  )}
219
219
  >
@@ -230,7 +230,7 @@ function ObjectTableWithDropZone({
230
230
  onDrop={handleFileDrop}
231
231
  message="Drop files or folders here to upload"
232
232
  className={clsx(
233
- 'absolute inset-0 bg-white/90 dark:bg-gray-800/90 pointer-events-auto',
233
+ 'absolute inset-0 bg-white/90 dark:bg-muted/90 pointer-events-auto',
234
234
  isDragging ? 'flex' : 'hidden',
235
235
  )}
236
236
  buttonLabel="Select Files or Folders"
@@ -80,12 +80,12 @@ export function DocumentIcon({
80
80
 
81
81
  return (
82
82
  <Card
83
- className={`relative flex flex-col border h-fit w-full ${selectedObject?.id === document.id ? 'border-attention border-4' : ''} ${isHighlighted ? 'border-blue-400 dark:border-blue-500 bg-blue-50/50 dark:bg-blue-900/20' : ''}`}
83
+ className={`relative flex flex-col border h-fit w-full ${selectedObject?.id === document.id ? 'border-attention border-4' : ''} ${isHighlighted ? 'border-info bg-info/50 dark:bg-info/20' : ''}`}
84
84
  onClick={() => onRowClick?.(document)}
85
85
  >
86
86
  {isHighlighted && (
87
87
  <div className="absolute top-2 end-8 z-10">
88
- <CheckIcon className="size-4 text-blue-600 dark:text-blue-400" />
88
+ <CheckIcon className="size-4 text-info" />
89
89
  </div>
90
90
  )}
91
91
  {selection && (
@@ -116,11 +116,11 @@ export function DocumentIcon({
116
116
  {renditionUrl && renditionStatus === 'ready' ? (
117
117
  <img src={renditionUrl} alt={renditionAlt} className="w-auto h-48 object-cover rounded-t-xl" />
118
118
  ) : (
119
- <div className="h-48 bg-gray-700 rounded-t-xl flex items-center justify-center text-muted">
119
+ <div className="h-48 bg-muted rounded-t-xl flex items-center justify-center text-muted">
120
120
  {renditionStatus}
121
121
  </div>
122
122
  )}
123
- <Separator className="bg-gray-200 h-[2px]" />
123
+ <Separator className="bg-muted h-[2px]" />
124
124
  <CardContent className="p-2 flex flex-col">
125
125
  <div className="flex flex-col overflow-hidden">
126
126
  <VTooltip placement="top" description={title}>
@@ -73,21 +73,21 @@ export function DocumentInput({ object }: DocumentInputProps) {
73
73
  <Button
74
74
  onClick={clearValue}
75
75
  variant="unstyled"
76
- className="hover:text-red-500 hover:bg-gray-100 dark:hover:bg-gray-600"
76
+ className="hover:text-destructive hover:bg-muted"
77
77
  >
78
78
  <X className="size-5" />
79
79
  </Button>
80
80
  </div>
81
81
  )}
82
82
  <div className="absolute inset-y-0 end-0 flex items-center justify-center">
83
- <Button onClick={on} variant="unstyled" className="hover:bg-gray-100 dark:hover:bg-gray-600">
83
+ <Button onClick={on} variant="unstyled" className="hover:bg-muted">
84
84
  <ChevronsUpDown className="size-5" />
85
85
  </Button>
86
86
  </div>
87
87
  <SelectDocumentModal value={actualValue} isOpen={isOn} onClose={onSelect} />
88
88
  </div>
89
89
  {doc && (
90
- <div className="p-1 semibold text-sm text-gray-600 dark:text-slate-300">
90
+ <div className="p-1 semibold text-sm text-muted dark:text-foreground">
91
91
  {typeof doc.properties?.title === 'string' ? doc.properties.title : doc.name}
92
92
  </div>
93
93
  )}
@@ -196,7 +196,7 @@ export function PropertiesEditorModal({ isOpen, onClose, object, refetch }: Prop
196
196
  >
197
197
  <ModalTitle>{t('store.editProperties')}</ModalTitle>
198
198
  <ModalBody>
199
- <div className="mb-2 text-sm text-gray-500">
199
+ <div className="mb-2 text-sm text-muted">
200
200
  {object.type?.name ? (
201
201
  <span>
202
202
  Editing properties for object type: <strong>{object.type.name}</strong>
@@ -205,7 +205,7 @@ export function PropertiesEditorModal({ isOpen, onClose, object, refetch }: Prop
205
205
  <span>{t('store.editingGenericDocument')}</span>
206
206
  )}
207
207
  {jsonSchema !== null && (
208
- <span className="ms-2 text-green-600">(JSON schema validation enabled)</span>
208
+ <span className="ms-2 text-success">(JSON schema validation enabled)</span>
209
209
  )}
210
210
  </div>
211
211
  <div className="h-[75vh] border rounded-md overflow-hidden">
@@ -100,8 +100,8 @@ export function SaveVersionConfirmModal({
100
100
  <ModalBody>
101
101
  <div className="space-y-4">
102
102
  {uploadedFileName && (
103
- <div className="mb-4 p-3 bg-blue-50 dark:bg-blue-900/20 rounded-md">
104
- <p className="text-sm text-blue-700 dark:text-blue-300 font-medium">
103
+ <div className="mb-4 p-3 bg-info rounded-md">
104
+ <p className="text-sm text-info font-medium">
105
105
  {t('modal.saveVersion.replaceFile')}{' '}
106
106
  <span className="font-bold">{uploadedFileName}</span>
107
107
  </p>
@@ -53,7 +53,7 @@ export function DocumentTableView({
53
53
  return (
54
54
  <tr
55
55
  key={obj.id}
56
- className={`group cursor-pointer hover:bg-muted ${selectedObject?.id === obj.id ? 'bg-muted' : ''} ${isHighlighted ? 'bg-blue-50 dark:bg-blue-900/20' : ''}`}
56
+ className={`group cursor-pointer hover:bg-muted ${selectedObject?.id === obj.id ? 'bg-muted' : ''} ${isHighlighted ? 'bg-info' : ''}`}
57
57
  onClick={() => {
58
58
  onRowClick?.(obj);
59
59
  }}
@@ -71,9 +71,7 @@ export function DocumentTableView({
71
71
  )}
72
72
  {columns.map((col, index) => col.render(obj, index))}
73
73
  <td className="w-8 text-center">
74
- {isHighlighted && (
75
- <CheckIcon className="size-4 text-blue-600 dark:text-blue-400 inline-block" />
76
- )}
74
+ {isHighlighted && <CheckIcon className="size-4 text-info inline-block" />}
77
75
  </td>
78
76
  </tr>
79
77
  );
@@ -110,7 +110,7 @@ export function UploadObjectsButton({
110
110
  function optionLayout(option: ObjectsActionSpec) {
111
111
  return {
112
112
  label: option.name,
113
- className: clsx('flex-1 px-2 py-2 hover:bg-accent nowrap', option.destructive ? 'text-destructive' : ''),
113
+ className: clsx('flex-1 px-2 py-2 hover:bg-muted nowrap', option.destructive ? 'text-destructive' : ''),
114
114
  };
115
115
  }
116
116
 
@@ -23,10 +23,17 @@ import { type EditorApi, type Monaco, MonacoEditor } from '@vertesia/ui/widgets'
23
23
  import Ajv, { type ErrorObject, type ValidateFunction } from 'ajv';
24
24
  import addFormats from 'ajv-formats';
25
25
  import type { TFunction } from 'i18next';
26
- import { Braces, CheckCircle2, FileText, RotateCcw, Save, WandSparkles } from 'lucide-react';
27
- import { useMemo, useRef, useState } from 'react';
26
+ import { Braces, CheckCircle2, FileText, RotateCcw, WandSparkles } from 'lucide-react';
27
+ import { type ReactNode, useMemo, useRef, useState } from 'react';
28
28
  import { IntakePolicyForm, type IntakePolicyFormSection } from './IntakePolicyForm.js';
29
29
 
30
+ /** A tab rendered above the policy tabs. The owner supplies its own Panel and actions. */
31
+ export interface IntakePolicyEditorTab {
32
+ name: string;
33
+ label: string;
34
+ content: ReactNode;
35
+ }
36
+
30
37
  interface IntakePolicyEditorProps {
31
38
  /** Content type whose intake policy is edited; omit when editing a standalone policy. */
32
39
  objectType?: ContentObjectTypeCatalogEntry;
@@ -36,6 +43,8 @@ interface IntakePolicyEditorProps {
36
43
  * Defaults to saving the objectType's intake when objectType is provided. */
37
44
  onSave?: (policy: ContentTypeIntakePolicy) => Promise<ContentTypeIntakePolicy | undefined>;
38
45
  onIntakeUpdate?: (value: ContentTypeIntakePolicy | undefined) => void;
46
+ /** Extra tabs shown above the policy tabs, each owning its panel and actions. */
47
+ leadingTabs?: IntakePolicyEditorTab[];
39
48
  readonly?: boolean;
40
49
  }
41
50
 
@@ -279,6 +288,7 @@ export function IntakePolicyEditor({
279
288
  value,
280
289
  onSave: onSaveProp,
281
290
  onIntakeUpdate,
291
+ leadingTabs,
282
292
  readonly = false,
283
293
  }: IntakePolicyEditorProps) {
284
294
  const { store } = useUserSession();
@@ -293,7 +303,9 @@ export function IntakePolicyEditor({
293
303
  const [editorValue, setEditorValue] = useState(() => stringifyPolicy(initialPolicy));
294
304
  const [savedValue, setSavedValue] = useState(() => stringifyPolicy(initialPolicy));
295
305
  const [validationMessage, setValidationMessage] = useState<string | undefined>(undefined);
296
- const [activeTab, setActiveTab] = useState<IntakePolicyFormSection | 'json'>('overview');
306
+ // Open on the first leading tab when a consumer supplies one (settings opens on General);
307
+ // otherwise the policy sections start at their first tab.
308
+ const [activeTab, setActiveTab] = useState<string>(leadingTabs?.[0]?.name ?? 'classification');
297
309
 
298
310
  const isDirty = editorValue !== savedValue;
299
311
  const currentPolicy = useMemo(() => {
@@ -421,7 +433,7 @@ export function IntakePolicyEditor({
421
433
  setEditorValue(value);
422
434
  editorRef.current?.setValue(value);
423
435
  setValidationMessage(undefined);
424
- setActiveTab('overview');
436
+ setActiveTab('classification');
425
437
  };
426
438
 
427
439
  const onFormChange = (policy: ContentTypeIntakePolicy) => {
@@ -430,6 +442,11 @@ export function IntakePolicyEditor({
430
442
  };
431
443
 
432
444
  const onTabChange = (tab: string) => {
445
+ // Leading tabs are not policy sections, so invalid policy JSON must not trap the user there.
446
+ if (leadingTabs?.some((leading) => leading.name === tab)) {
447
+ setActiveTab(tab);
448
+ return;
449
+ }
433
450
  const nextTab = tab as IntakePolicyFormSection | 'json';
434
451
  if (nextTab !== 'json' && !currentPolicy) {
435
452
  setValidationMessage(t('intakePolicy.error.fixJsonBeforeForm'));
@@ -441,7 +458,7 @@ export function IntakePolicyEditor({
441
458
 
442
459
  const title = (
443
460
  <div className="flex items-center gap-2">
444
- <div className="text-base font-semibold">{t('intakePolicy.title')}</div>
461
+ <div>{t('intakePolicy.title')}</div>
445
462
  {isDirty && <Badge variant="attention">{t('intakePolicy.status.unsaved')}</Badge>}
446
463
  </div>
447
464
  );
@@ -451,7 +468,7 @@ export function IntakePolicyEditor({
451
468
  <Dropdown
452
469
  align="right"
453
470
  trigger={
454
- <Button variant="outline" size="sm">
471
+ <Button variant="outline" size="md">
455
472
  <WandSparkles className="size-4" />
456
473
  {t('intakePolicy.action.examples')}
457
474
  </Button>
@@ -473,58 +490,74 @@ export function IntakePolicyEditor({
473
490
  </Dropdown>
474
491
  {activeTab === 'json' && (
475
492
  <>
476
- <Button variant="outline" size="sm" onClick={onFormat}>
493
+ <Button variant="outline" size="md" onClick={onFormat}>
477
494
  <Braces className="size-4" />
478
495
  {t('intakePolicy.action.format')}
479
496
  </Button>
480
- <Button variant="outline" size="sm" onClick={onValidate}>
497
+ <Button variant="outline" size="md" onClick={onValidate}>
481
498
  <CheckCircle2 className="size-4" />
482
499
  {t('intakePolicy.action.validate')}
483
500
  </Button>
484
501
  </>
485
502
  )}
486
- <Button variant="outline" size="sm" onClick={onRevert} disabled={!isDirty}>
503
+ <Button variant="outline" size="md" onClick={onRevert} disabled={!isDirty}>
487
504
  <RotateCcw className="size-4" />
488
505
  {t('intakePolicy.action.revert')}
489
506
  </Button>
490
- <Button isLoading={isUpdating} size="sm" onClick={onSave} disabled={!isDirty}>
491
- <Save className="size-4" />
507
+ <Button isLoading={isUpdating} size="md" onClick={onSave} disabled={!isDirty}>
492
508
  {t('intakePolicy.action.save')}
493
509
  </Button>
494
510
  </>
495
511
  ) : undefined;
496
512
 
497
- return (
513
+ /** Panel chrome for the policy tabs. Each tab owns its panel now that the switcher is outside. */
514
+ const withPolicyPanel = (content: ReactNode) => (
498
515
  <Panel title={title} className="bg-background! h-full" action={action}>
499
516
  <div className="flex h-full min-h-0 flex-col gap-3">
500
- <IntakeSummary policy={summaryPolicy} />
501
517
  {validationMessage && (
502
518
  <div className="rounded-sm border border-destructive bg-mixer-destructive/10 px-3 py-2 text-sm whitespace-pre-line text-destructive">
503
519
  {validationMessage}
504
520
  </div>
505
521
  )}
506
- <Tabs
507
- tabs={createEditorTabs(t, currentPolicy ?? EMPTY_POLICY, readonly, onFormChange, editorValue, {
508
- editorRef,
509
- beforeMount,
510
- onChange: (value) => {
511
- setEditorValue(value);
512
- setValidationMessage(undefined);
513
- },
514
- theme,
515
- })}
516
- current={activeTab}
517
- onTabChange={onTabChange}
518
- updateHash={false}
519
- fullHeight
520
- className="px-0 flex-row!"
521
- >
522
- <TabsBar className="py-2 w-48 shrink-0" direction="vertical" />
523
- <TabsPanel className="min-h-0 min-w-0 flex-1 overflow-auto pt-1 ps-4" />
524
- </Tabs>
522
+ {content}
525
523
  </div>
526
524
  </Panel>
527
525
  );
526
+
527
+ const policyTabs = createEditorTabs(
528
+ t,
529
+ currentPolicy ?? EMPTY_POLICY,
530
+ readonly,
531
+ onFormChange,
532
+ editorValue,
533
+ {
534
+ editorRef,
535
+ beforeMount,
536
+ onChange: (value) => {
537
+ setEditorValue(value);
538
+ setValidationMessage(undefined);
539
+ },
540
+ theme,
541
+ },
542
+ withPolicyPanel,
543
+ );
544
+
545
+ return (
546
+ <div className="flex h-full min-h-0 w-full flex-col gap-3">
547
+ <IntakeSummary policy={summaryPolicy} />
548
+ <Tabs
549
+ tabs={leadingTabs ? [...leadingTabs, ...policyTabs] : policyTabs}
550
+ current={activeTab}
551
+ onTabChange={onTabChange}
552
+ updateHash={false}
553
+ fullHeight
554
+ className="px-0 min-h-0 flex-1 flex-row!"
555
+ >
556
+ <TabsBar className="py-2 w-48 shrink-0" direction="vertical" />
557
+ <TabsPanel className="min-h-0 min-w-0 flex-1 overflow-auto ps-4" />
558
+ </Tabs>
559
+ </div>
560
+ );
528
561
  }
529
562
 
530
563
  function createEditorTabs(
@@ -539,15 +572,16 @@ function createEditorTabs(
539
572
  onChange: (value: string) => void;
540
573
  theme: string;
541
574
  },
575
+ wrap: (content: ReactNode) => ReactNode,
542
576
  ) {
543
577
  const formTab = (name: IntakePolicyFormSection, label: string) => ({
544
578
  name,
545
579
  label,
546
- content: <IntakePolicyForm policy={policy} section={name} onChange={onChange} readonly={readonly} />,
580
+ content: wrap(<IntakePolicyForm policy={policy} section={name} onChange={onChange} readonly={readonly} />),
547
581
  });
548
582
 
549
583
  return [
550
- formTab('overview', t('intakePolicy.tab.overview')),
584
+ formTab('classification', t('intakePolicy.tab.classification')),
551
585
  formTab('conversion', t('intakePolicy.tab.conversion')),
552
586
  formTab('extraction', t('intakePolicy.tab.extraction')),
553
587
  formTab('grounding', t('intakePolicy.tab.grounding')),
@@ -555,7 +589,7 @@ function createEditorTabs(
555
589
  {
556
590
  name: 'json',
557
591
  label: t('intakePolicy.tab.json'),
558
- content: (
592
+ content: wrap(
559
593
  <div className="flex h-full min-h-[36rem] gap-4 py-3">
560
594
  <div className="min-w-0 flex-1 overflow-hidden rounded-sm border">
561
595
  <MonacoEditor
@@ -579,7 +613,7 @@ function createEditorTabs(
579
613
  />
580
614
  </div>
581
615
  <IntakeHelp />
582
- </div>
616
+ </div>,
583
617
  ),
584
618
  },
585
619
  ];
@@ -27,7 +27,7 @@ import {
27
27
  updateIntakePolicy,
28
28
  } from './intake-policy-editor.logic.js';
29
29
 
30
- export type IntakePolicyFormSection = 'overview' | 'conversion' | 'extraction' | 'grounding' | 'output';
30
+ export type IntakePolicyFormSection = 'classification' | 'conversion' | 'extraction' | 'grounding' | 'output';
31
31
 
32
32
  interface IntakePolicyFormProps {
33
33
  policy: ContentTypeIntakePolicy;
@@ -45,7 +45,7 @@ export function IntakePolicyForm({ policy, section, onChange, readonly = false }
45
45
  const { t } = useUITranslation();
46
46
  const setValue = (path: IntakePolicyPath, value: unknown) => onChange(updateIntakePolicy(policy, path, value));
47
47
 
48
- if (section === 'overview') {
48
+ if (section === 'classification') {
49
49
  return (
50
50
  <FormSurface>
51
51
  <FormSection
@@ -317,6 +317,8 @@ export function IntakePolicyForm({ policy, section, onChange, readonly = false }
317
317
  <FormSection
318
318
  title={t('intakePolicy.section.visionBudget')}
319
319
  description={t('intakePolicy.help.section.visionBudget')}
320
+ // `last` only because Verification below is hidden; drop it when that is restored.
321
+ last
320
322
  >
321
323
  <div className="grid gap-4 md:grid-cols-2 xl:grid-cols-3">
322
324
  <SelectField
@@ -359,6 +361,11 @@ export function IntakePolicyForm({ policy, section, onChange, readonly = false }
359
361
  </div>
360
362
  </FormSection>
361
363
 
364
+ {/* Verification is hidden until the feature is wired up. The policy schema, the
365
+ API contract and this form all still carry it; nothing here consumes the values
366
+ at processing time yet. Uncomment as-is to bring the section back, and remove
367
+ the `last` prop added to the Vision evidence budget section above.
368
+
362
369
  <FormSection title={t('intakePolicy.section.verification')} last>
363
370
  <div className="grid gap-4 md:grid-cols-2 xl:grid-cols-3">
364
371
  <TriStateField
@@ -410,6 +417,7 @@ export function IntakePolicyForm({ policy, section, onChange, readonly = false }
410
417
  readonly={readonly}
411
418
  />
412
419
  </FormSection>
420
+ */}
413
421
  </FormSurface>
414
422
  );
415
423
  }
@@ -636,7 +644,7 @@ export function IntakePolicyForm({ policy, section, onChange, readonly = false }
636
644
  }
637
645
 
638
646
  function FormSurface({ children }: { children: ReactNode }) {
639
- return <div className="mx-auto w-full max-w-6xl px-1 py-4">{children}</div>;
647
+ return <div className="w-full px-1 py-4">{children}</div>;
640
648
  }
641
649
 
642
650
  function FormSection({
@@ -71,7 +71,7 @@ export function SelectContentTypeModal({
71
71
  <div className="mb-4 mt-4">
72
72
  <div className="block text-sm font-medium mb-2">
73
73
  {t('store.contentType')}{' '}
74
- {allowNone && <span className="text-gray-500 font-normal">{t('store.optional')}</span>}
74
+ {allowNone && <span className="text-muted font-normal">{t('store.optional')}</span>}
75
75
  </div>
76
76
  {allowNone ? (
77
77
  <SelectBox
@@ -13,7 +13,7 @@ export function UserAvatar({ user }: { user: AuthTokenPayload | UserRef }) {
13
13
  .map((n) => n[0])
14
14
  .join('');
15
15
  return (
16
- <span className="inline-flex h-8 w-8 items-center justify-center rounded-full bg-indigo-600">
16
+ <span className="inline-flex h-8 w-8 items-center justify-center rounded-full bg-primary">
17
17
  <span className="text-sm font-medium leading-none text-white">{initials}</span>
18
18
  </span>
19
19
  );
@@ -26,10 +26,10 @@ export function UserAvatar({ user }: { user: AuthTokenPayload | UserRef }) {
26
26
  <div className="flex items-center">
27
27
  <div className="w-9 h-9">{userPicture()}</div>
28
28
  <div className="ms-3">
29
- <p className="text-sm font-medium text-gray-700 dark:text-slate-50 group-hover:text-gray-900">
29
+ <p className="text-sm font-medium text-foreground group-hover:text-foreground">
30
30
  {user.name ?? 'Deleted User'}
31
31
  </p>
32
- <p className="text-xs font-medium text-gray-500 dark:text-slate-300 group-hover:text-gray-700">
32
+ <p className="text-xs font-medium text-muted dark:text-foreground group-hover:text-foreground">
33
33
  {user.email ?? 'Deleted User'}
34
34
  </p>
35
35
  </div>
@@ -148,10 +148,10 @@ function EmailAgentAvatar({ email, showTitle = false, size = 'md' }: EmailAgentA
148
148
  <Avatar
149
149
  src="/cloud.svg"
150
150
  color="bg-amber-500"
151
- className="px-[5px] text-white border-2 border-white dark:border-gray-800"
151
+ className="px-[5px] text-white border-2 border-background"
152
152
  size={size}
153
153
  />
154
- <Avatar name={email} size={size} className="border-2 border-white dark:border-gray-800" />
154
+ <Avatar name={email} size={size} className="border-2 border-background" />
155
155
  </div>
156
156
  {showTitle && <div className="text-sm font-semibold truncate">Agent&#8194;({email})</div>}
157
157
  </div>
@@ -208,13 +208,13 @@ function AgentAvatar({
208
208
  {apiKey && (
209
209
  <div>
210
210
  <div className="font-medium">{apiKey.name}</div>
211
- <div className="text-xs text-muted-foreground">Key ID: {apiKey.id}</div>
211
+ <div className="text-xs text-muted">Key ID: {apiKey.id}</div>
212
212
  </div>
213
213
  )}
214
214
  {!user && !apiKey && (
215
215
  <>
216
216
  <div>{t('user.serviceAccountDescription')}</div>
217
- <div className="text-gray-800 dark:text-gray-500 text-sm">
217
+ <div className="text-foreground dark:text-muted text-sm">
218
218
  <span className="font-semibold">ID:</span> {agentId}
219
219
  </div>
220
220
  </>
@@ -229,7 +229,7 @@ function AgentAvatar({
229
229
  <Avatar
230
230
  src="/cloud.svg"
231
231
  color="bg-amber-500"
232
- className="px-[5px] text-white border-2 border-white dark:border-gray-800"
232
+ className="px-[5px] text-white border-2 border-background"
233
233
  size={size}
234
234
  />
235
235
  {user && (
@@ -237,16 +237,11 @@ function AgentAvatar({
237
237
  src={user.picture}
238
238
  name={user.name}
239
239
  size={size}
240
- className="border-2 border-white dark:border-gray-800"
240
+ className="border-2 border-background"
241
241
  />
242
242
  )}
243
243
  {apiKey && (
244
- <Avatar
245
- name="API"
246
- color="bg-gray-400"
247
- size={size}
248
- className="border-2 border-white dark:border-gray-800"
249
- />
244
+ <Avatar name="API" color="bg-gray-400" size={size} className="border-2 border-background" />
250
245
  )}
251
246
  </div>
252
247
  {showTitle && (
@@ -455,7 +450,7 @@ function GroupAvatar({ userId, showTitle = false, size = 'md' }: GroupAvatarProp
455
450
  const description = (
456
451
  <div className="space-y-1">
457
452
  {group.description && <div className="text-sm">{group.description}</div>}
458
- <div className="text-xs text-muted-foreground">{t('user.groupId', { id: group.id })}</div>
453
+ <div className="text-xs text-muted">{t('user.groupId', { id: group.id })}</div>
459
454
  {group.tags && group.tags.length > 0 && (
460
455
  <div className="flex flex-wrap gap-1">
461
456
  {group.tags.map((tag) => (
@@ -471,7 +466,7 @@ function GroupAvatar({ userId, showTitle = false, size = 'md' }: GroupAvatarProp
471
466
  return (
472
467
  <UserPopoverPanel title={group.name || t('user.unnamedGroup')} description={description}>
473
468
  <div className="flex flex-row items-center gap-2">
474
- <Users className="size-6 text-indigo-500" size={size} />
469
+ <Users className="size-6 text-primary" size={size} />
475
470
  {showTitle && <div className="text-sm font-semibold ps-2">{group.name || t('user.unnamedGroup')}</div>}
476
471
  </div>
477
472
  </UserPopoverPanel>
@@ -540,7 +535,7 @@ export function ApiKeyAvatar({ keyId, showTitle = false, size = 'md' }: ApiKeyAv
540
535
  const title = t('user.privateKey');
541
536
  const avatar = <Avatar name={'PK'} color="bg-pink-500" size={size} />;
542
537
  const description = (
543
- <Table className="dark:bg-gray-800 dark:text-gray-200 table-fixed w-full">
538
+ <Table className="dark:bg-muted dark:text-foreground table-fixed w-full">
544
539
  <tr>
545
540
  <td className="font-semibold w-20">{t('user.key')}</td>
546
541
  <td className="truncate max-w-0">{data?.name}</td>
@@ -583,7 +578,7 @@ function UserPopoverPanel({ title, description, children }: UserPopoverPanelProp
583
578
  </PopoverTrigger>
584
579
  <PopoverContent align="center" sideOffset={8} side="right">
585
580
  <div className="flex flex-col gap-1 rounded-md shadow-md p-2">
586
- <div className="text-md font-semibold">{title}</div>
581
+ <div className="text-base font-semibold">{title}</div>
587
582
  {description}
588
583
  </div>
589
584
  </PopoverContent>
@@ -1,3 +1,4 @@
1
+ export * from './interaction.js';
1
2
  export * from './mimeType.js';
2
3
  export * from './print.js';
3
4
  export * from './rendition.js';
@@ -0,0 +1,93 @@
1
+ import { cleanup, render, screen } from '@testing-library/react';
2
+ import { InteractionStatus } from '@vertesia/common';
3
+ import { afterEach, describe, expect, it } from 'vitest';
4
+ import {
5
+ InteractionLabel,
6
+ isUnresolvedInteractionRef,
7
+ resolveInteractionName,
8
+ splitInteractionType,
9
+ } from './interaction.js';
10
+
11
+ describe('splitInteractionType', () => {
12
+ it('splits a known namespace off the name', () => {
13
+ expect(splitInteractionType('sys:code_agent')).toEqual({ type: 'sys', label: 'code_agent' });
14
+ });
15
+
16
+ it('keeps colons that are part of the name', () => {
17
+ expect(splitInteractionType('nfwf-chatbot:main:rag-agent')).toEqual({ label: 'nfwf-chatbot:main:rag-agent' });
18
+ expect(splitInteractionType('WhatColor')).toEqual({ label: 'WhatColor' });
19
+ });
20
+ });
21
+
22
+ describe('resolveInteractionName', () => {
23
+ it('prefers the resolved ref name over the run snapshot', () => {
24
+ const name = resolveInteractionName({ name: 'Current Name' }, 'Stale Name', '682a822c4dbfdc27017ff6cd');
25
+ expect(name).toBe('Current Name');
26
+ });
27
+
28
+ it('falls back when the ref name is the bare ObjectId the resolver left behind', () => {
29
+ const name = resolveInteractionName({ name: '682a822c4dbfdc27017ff6cd' }, 'Legacy Name');
30
+ expect(name).toBe('Legacy Name');
31
+ });
32
+
33
+ it('skips empty fallbacks and returns undefined when nothing is usable', () => {
34
+ expect(resolveInteractionName(undefined, '', 'ref-string')).toBe('ref-string');
35
+ expect(resolveInteractionName(undefined, undefined, '')).toBeUndefined();
36
+ });
37
+
38
+ it('names a deleted interaction from its id, from either the ref or a bare bucket id', () => {
39
+ // The run row has the ref the server left behind; the facet bucket has only its `_id`.
40
+ // Both must produce the same label or the option stops matching the row it filters for.
41
+ const fromRow = resolveInteractionName({ name: '682a822c4dbfdc27017ff6cd' });
42
+ const fromBucket = resolveInteractionName(undefined, '682a822c4dbfdc27017ff6cd');
43
+ expect(fromRow).toBe('Deleted interaction (~017ff6cd)');
44
+ expect(fromBucket).toBe(fromRow);
45
+ });
46
+ });
47
+
48
+ describe('isUnresolvedInteractionRef', () => {
49
+ it('flags only refs with neither a version nor a status', () => {
50
+ expect(isUnresolvedInteractionRef({ version: 0, status: InteractionStatus.unknown })).toBe(true);
51
+ expect(isUnresolvedInteractionRef({ version: 0, status: InteractionStatus.code })).toBe(false);
52
+ expect(isUnresolvedInteractionRef({ version: 2, status: InteractionStatus.unknown })).toBe(false);
53
+ expect(isUnresolvedInteractionRef(undefined)).toBe(false);
54
+ });
55
+ });
56
+
57
+ describe('InteractionLabel', () => {
58
+ afterEach(cleanup);
59
+
60
+ it('lifts the namespace out of the name and badges the version and status', () => {
61
+ render(
62
+ <InteractionLabel interaction={{ name: 'sys:code_agent', version: 3, status: InteractionStatus.code }} />,
63
+ );
64
+ expect(screen.getByText('code_agent')).toBeTruthy();
65
+ expect(screen.getByText('sys')).toBeTruthy();
66
+ expect(screen.getByText('v3 code')).toBeTruthy();
67
+ });
68
+
69
+ it('badges nothing for a ref the server could not resolve', () => {
70
+ const { container } = render(
71
+ <InteractionLabel
72
+ interaction={{ name: '682a822c4dbfdc27017ff6cd', version: 0, status: InteractionStatus.unknown }}
73
+ fallbacks={['Legacy Name']}
74
+ />,
75
+ );
76
+ expect(container.textContent).toBe('Legacy Name');
77
+ });
78
+
79
+ it('renders the fallback node only when there is no reference at all', () => {
80
+ render(<InteractionLabel fallbackNode={<span>Interaction not found</span>} />);
81
+ expect(screen.getByText('Interaction not found')).toBeTruthy();
82
+ });
83
+
84
+ it('names a deleted interaction rather than falling through to the fallback node', () => {
85
+ const { container } = render(
86
+ <InteractionLabel
87
+ interaction={{ name: '682a822c4dbfdc27017ff6cd', version: 0, status: InteractionStatus.unknown }}
88
+ fallbackNode={<span>Interaction not found</span>}
89
+ />,
90
+ );
91
+ expect(container.textContent).toBe('Deleted interaction (~017ff6cd)');
92
+ });
93
+ });