@vertesia/ui 1.5.0-dev.20260910.052912Z → 1.6.0-dev.20260912.110338Z
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +125 -0
- package/lib/boot/branding.d.ts +58 -0
- package/lib/boot/branding.d.ts.map +1 -0
- package/lib/boot/branding.js +62 -0
- package/lib/boot/branding.js.map +1 -0
- package/lib/boot/index.d.ts +27 -0
- package/lib/boot/index.d.ts.map +1 -0
- package/lib/boot/index.js +325 -0
- package/lib/boot/index.js.map +1 -0
- package/lib/boot/vite.d.ts +63 -0
- package/lib/boot/vite.d.ts.map +1 -0
- package/lib/boot/vite.js +108 -0
- package/lib/boot/vite.js.map +1 -0
- package/lib/core/components/Link.js +1 -1
- package/lib/core/components/Link.js.map +1 -1
- package/lib/core/components/Spinner.js +1 -1
- package/lib/core/components/Spinner.js.map +1 -1
- package/lib/core/components/TagsInput.js +7 -7
- package/lib/core/components/TagsInput.js.map +1 -1
- package/lib/core/components/shadcn/badge.js +1 -1
- package/lib/core/components/shadcn/badge.js.map +1 -1
- package/lib/core/components/shadcn/button.d.ts.map +1 -1
- package/lib/core/components/shadcn/button.js +3 -4
- package/lib/core/components/shadcn/button.js.map +1 -1
- package/lib/core/components/shadcn/filters/comboBox/DateCombobox.js +2 -2
- package/lib/core/components/shadcn/filters/comboBox/DateCombobox.js.map +1 -1
- package/lib/core/components/shadcn/filters/comboBox/SelectCombobox.js +1 -1
- package/lib/core/components/shadcn/filters/comboBox/SelectCombobox.js.map +1 -1
- package/lib/core/components/shadcn/filters/comboBox/StringListCombobox.js +1 -1
- package/lib/core/components/shadcn/filters/comboBox/StringListCombobox.js.map +1 -1
- package/lib/core/components/shadcn/filters/comboBox/TextCombobox.js +1 -1
- package/lib/core/components/shadcn/filters/comboBox/TextCombobox.js.map +1 -1
- package/lib/core/components/shadcn/filters/filter/dateFilter.js +1 -1
- package/lib/core/components/shadcn/filters/filter/dateFilter.js.map +1 -1
- package/lib/core/components/shadcn/filters/filter-styles.d.ts +1 -1
- package/lib/core/components/shadcn/filters/filter-styles.d.ts.map +1 -1
- package/lib/core/components/shadcn/filters/filter-styles.js +4 -4
- package/lib/core/components/shadcn/filters/filters.js +1 -1
- package/lib/core/components/shadcn/filters/filters.js.map +1 -1
- package/lib/core/components/shadcn/label.js +1 -1
- package/lib/core/components/shadcn/label.js.map +1 -1
- package/lib/core/components/shadcn/overflowTabs.js +2 -2
- package/lib/core/components/shadcn/overflowTabs.js.map +1 -1
- package/lib/core/components/shadcn/tabs.js +1 -1
- package/lib/core/components/shadcn/tabs.js.map +1 -1
- package/lib/env/index.d.ts +28 -1
- package/lib/env/index.d.ts.map +1 -1
- package/lib/env/index.js +51 -3
- package/lib/env/index.js.map +1 -1
- package/lib/features/activity-doc/ActivityDoc.js +1 -1
- package/lib/features/activity-doc/ActivityDoc.js.map +1 -1
- package/lib/features/agent/PayloadBuilder.d.ts +4 -0
- package/lib/features/agent/PayloadBuilder.d.ts.map +1 -1
- package/lib/features/agent/PayloadBuilder.js.map +1 -1
- package/lib/features/agent/chat/AgentRunFeedback.d.ts +59 -0
- package/lib/features/agent/chat/AgentRunFeedback.d.ts.map +1 -0
- package/lib/features/agent/chat/AgentRunFeedback.js +286 -0
- package/lib/features/agent/chat/AgentRunFeedback.js.map +1 -0
- package/lib/features/agent/chat/AskUserWidget.d.ts +1 -0
- package/lib/features/agent/chat/AskUserWidget.d.ts.map +1 -1
- package/lib/features/agent/chat/AskUserWidget.js +15 -4
- package/lib/features/agent/chat/AskUserWidget.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.js +3 -2
- package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +3 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +16 -13
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts +3 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js +30 -8
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.js +2 -0
- package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.js.map +1 -1
- package/lib/features/agent/chat/index.d.ts +1 -0
- package/lib/features/agent/chat/index.d.ts.map +1 -1
- package/lib/features/agent/chat/index.js +1 -0
- package/lib/features/agent/chat/index.js.map +1 -1
- package/lib/features/facets/AgentRunnerFacetsNav.d.ts +8 -0
- package/lib/features/facets/AgentRunnerFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/AgentRunnerFacetsNav.js +12 -0
- package/lib/features/facets/AgentRunnerFacetsNav.js.map +1 -1
- package/lib/features/layout/GenericPageNavHeader.js +1 -1
- package/lib/features/layout/GenericPageNavHeader.js.map +1 -1
- package/lib/features/magic-pdf/AnnotatedImageSlider.js +1 -1
- package/lib/features/magic-pdf/AnnotatedImageSlider.js.map +1 -1
- package/lib/features/magic-pdf/GroundedExtractionView.js +3 -3
- package/lib/features/magic-pdf/GroundedExtractionView.js.map +1 -1
- package/lib/features/permissions/UserPermissionsProvider.d.ts +15 -1
- package/lib/features/permissions/UserPermissionsProvider.d.ts.map +1 -1
- package/lib/features/permissions/UserPermissionsProvider.js +20 -12
- package/lib/features/permissions/UserPermissionsProvider.js.map +1 -1
- package/lib/features/store/objects/DocumentPreviewPanel.js +5 -5
- package/lib/features/store/objects/DocumentPreviewPanel.js.map +1 -1
- package/lib/features/store/objects/components/DocumentInput.js +1 -1
- package/lib/features/store/objects/components/DocumentInput.js.map +1 -1
- package/lib/features/store/objects/selection/SelectionActions.js +1 -1
- package/lib/features/store/objects/selection/SelectionActions.js.map +1 -1
- package/lib/features/store/objects/upload/DocumentUploadModal.js +1 -1
- package/lib/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
- package/lib/features/store/types/TypeRegistry.d.ts +130 -0
- package/lib/features/store/types/TypeRegistry.d.ts.map +1 -1
- package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts +130 -0
- package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts.map +1 -1
- package/lib/features/user/UserInfo.js +1 -1
- package/lib/features/user/UserInfo.js.map +1 -1
- package/lib/i18n/index.d.ts +5 -4
- package/lib/i18n/index.d.ts.map +1 -1
- package/lib/i18n/index.js +16 -2
- package/lib/i18n/index.js.map +1 -1
- package/lib/i18n/locales/ar.json +30 -0
- package/lib/i18n/locales/de.json +30 -0
- package/lib/i18n/locales/en.json +30 -0
- package/lib/i18n/locales/es.json +30 -0
- package/lib/i18n/locales/fr.json +30 -0
- package/lib/i18n/locales/it.json +30 -0
- package/lib/i18n/locales/ja.json +30 -0
- package/lib/i18n/locales/ko.json +30 -0
- package/lib/i18n/locales/pt.json +30 -0
- package/lib/i18n/locales/ru.json +30 -0
- package/lib/i18n/locales/tr.json +30 -0
- package/lib/i18n/locales/zh-TW.json +30 -0
- package/lib/i18n/locales/zh.json +30 -0
- package/lib/layout/ErrorPage.js +1 -1
- package/lib/layout/ErrorPage.js.map +1 -1
- package/lib/layout/Navbar.d.ts.map +1 -1
- package/lib/layout/Navbar.js +3 -2
- package/lib/layout/Navbar.js.map +1 -1
- package/lib/router/RouteComponent.d.ts.map +1 -1
- package/lib/router/RouteComponent.js +15 -12
- package/lib/router/RouteComponent.js.map +1 -1
- package/lib/session/UserSession.d.ts.map +1 -1
- package/lib/session/UserSession.js +6 -3
- package/lib/session/UserSession.js.map +1 -1
- package/lib/session/UserSessionProvider.d.ts +2 -1
- package/lib/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/session/UserSessionProvider.js +10 -1
- package/lib/session/UserSessionProvider.js.map +1 -1
- package/lib/session/auth/composable.d.ts.map +1 -1
- package/lib/session/auth/composable.js +88 -3
- package/lib/session/auth/composable.js.map +1 -1
- package/lib/session/auth/domainRouting.d.ts +22 -12
- package/lib/session/auth/domainRouting.d.ts.map +1 -1
- package/lib/session/auth/domainRouting.js +35 -21
- package/lib/session/auth/domainRouting.js.map +1 -1
- package/lib/session/auth/useAuthState.d.ts +9 -4
- package/lib/session/auth/useAuthState.d.ts.map +1 -1
- package/lib/session/auth/useAuthState.js +9 -4
- package/lib/session/auth/useAuthState.js.map +1 -1
- package/lib/session/index.d.ts.map +1 -1
- package/lib/session/index.js +3 -1
- package/lib/session/index.js.map +1 -1
- package/lib/shell/AuthScreenPreview.d.ts +12 -0
- package/lib/shell/AuthScreenPreview.d.ts.map +1 -0
- package/lib/shell/AuthScreenPreview.js +140 -0
- package/lib/shell/AuthScreenPreview.js.map +1 -0
- package/lib/shell/BrandedAuthScreens.d.ts +19 -0
- package/lib/shell/BrandedAuthScreens.d.ts.map +1 -0
- package/lib/shell/BrandedAuthScreens.js +64 -0
- package/lib/shell/BrandedAuthScreens.js.map +1 -0
- package/lib/shell/SplashScreen.d.ts +13 -2
- package/lib/shell/SplashScreen.d.ts.map +1 -1
- package/lib/shell/SplashScreen.js +21 -20
- package/lib/shell/SplashScreen.js.map +1 -1
- package/lib/shell/VertesiaShell.d.ts +15 -4
- package/lib/shell/VertesiaShell.d.ts.map +1 -1
- package/lib/shell/VertesiaShell.js +8 -3
- package/lib/shell/VertesiaShell.js.map +1 -1
- package/lib/shell/apps/StandaloneApp.js +5 -1
- package/lib/shell/apps/StandaloneApp.js.map +1 -1
- package/lib/shell/index.d.ts +6 -0
- package/lib/shell/index.d.ts.map +1 -1
- package/lib/shell/index.js +5 -0
- package/lib/shell/index.js.map +1 -1
- package/lib/shell/login/SignInFlow.d.ts +68 -0
- package/lib/shell/login/SignInFlow.d.ts.map +1 -0
- package/lib/shell/login/SignInFlow.js +108 -0
- package/lib/shell/login/SignInFlow.js.map +1 -0
- package/lib/shell/login/SignInPageShell.d.ts +13 -0
- package/lib/shell/login/SignInPageShell.d.ts.map +1 -0
- package/lib/shell/login/SignInPageShell.js +14 -0
- package/lib/shell/login/SignInPageShell.js.map +1 -0
- package/lib/shell/login/SignInPrimitives.d.ts +3 -3
- package/lib/shell/login/SignInPrimitives.d.ts.map +1 -1
- package/lib/shell/login/SignInPrimitives.js +13 -11
- package/lib/shell/login/SignInPrimitives.js.map +1 -1
- package/lib/shell/login/SignInRestrictedEnvStep.d.ts +5 -0
- package/lib/shell/login/SignInRestrictedEnvStep.d.ts.map +1 -1
- package/lib/shell/login/SignInRestrictedEnvStep.js +8 -4
- package/lib/shell/login/SignInRestrictedEnvStep.js.map +1 -1
- package/lib/shell/login/SigninScreen.d.ts +38 -3
- package/lib/shell/login/SigninScreen.d.ts.map +1 -1
- package/lib/shell/login/SigninScreen.js +33 -86
- package/lib/shell/login/SigninScreen.js.map +1 -1
- package/lib/shell/login/SignupForm.d.ts +3 -1
- package/lib/shell/login/SignupForm.d.ts.map +1 -1
- package/lib/shell/login/SignupForm.js +7 -3
- package/lib/shell/login/SignupForm.js.map +1 -1
- package/lib/shell/login/signInUtils.d.ts +11 -0
- package/lib/shell/login/signInUtils.d.ts.map +1 -1
- package/lib/shell/login/signInUtils.js +29 -5
- package/lib/shell/login/signInUtils.js.map +1 -1
- package/lib/vertesia-ui-boot.js +237 -0
- package/lib/vertesia-ui-boot.js.map +1 -0
- package/lib/vertesia-ui-core.js +46 -46
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-env.js +1 -1
- package/lib/vertesia-ui-env.js.map +1 -1
- package/lib/vertesia-ui-features.js +222 -208
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-i18n.B3NFclwl.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.B3NFclwl.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.BWSrNIxc.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BWSrNIxc.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.BWvWeB1p.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BWvWeB1p.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.BZCXvTC1.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BZCXvTC1.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.BbJMvFZW.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BbJMvFZW.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.CE5ldwpt.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.CE5ldwpt.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.CMC0IShY.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.CMC0IShY.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.CkcRqBKU.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.CkcRqBKU.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.D-Mq1sw_.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.D-Mq1sw_.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.DkK68-A-.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.DkK68-A-.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.XE_dcCg6.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.XE_dcCg6.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.js +2 -2
- package/lib/vertesia-ui-i18n.js.map +1 -1
- package/lib/vertesia-ui-i18n.qgNqMPvK.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.qgNqMPvK.chunk.js.map +1 -0
- package/lib/vertesia-ui-layout.js +13 -13
- package/lib/vertesia-ui-layout.js.map +1 -1
- package/lib/vertesia-ui-rich-text.js +68 -68
- package/lib/vertesia-ui-rich-text.js.map +1 -1
- package/lib/vertesia-ui-router.js +1 -1
- package/lib/vertesia-ui-router.js.map +1 -1
- package/lib/vertesia-ui-session.js +1 -1
- package/lib/vertesia-ui-session.js.map +1 -1
- package/lib/vertesia-ui-shell.js +58 -33
- package/lib/vertesia-ui-shell.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +94 -94
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/lib/widgets/json-view/JSONCode.js +1 -1
- package/lib/widgets/json-view/JSONCode.js.map +1 -1
- package/lib/widgets/upload/DropZone.d.ts.map +1 -1
- package/lib/widgets/upload/DropZone.js +1 -1
- package/lib/widgets/upload/DropZone.js.map +1 -1
- package/llms.txt +6 -2
- package/package.json +44 -35
- package/src/__tests__/a11y.test.tsx +25 -0
- package/src/__tests__/theme.test.ts +91 -0
- package/src/boot/branding.test.ts +72 -0
- package/src/boot/branding.ts +108 -0
- package/src/boot/index.test.ts +216 -0
- package/src/boot/index.ts +356 -0
- package/src/boot/vite.test.ts +93 -0
- package/src/boot/vite.ts +118 -0
- package/src/core/components/Link.tsx +1 -1
- package/src/core/components/Spinner.tsx +1 -1
- package/src/core/components/TagsInput.tsx +7 -7
- package/src/core/components/shadcn/badge.tsx +1 -1
- package/src/core/components/shadcn/button.tsx +3 -5
- package/src/core/components/shadcn/filters/comboBox/DateCombobox.tsx +2 -2
- package/src/core/components/shadcn/filters/comboBox/SelectCombobox.tsx +1 -1
- package/src/core/components/shadcn/filters/comboBox/StringListCombobox.tsx +1 -1
- package/src/core/components/shadcn/filters/comboBox/TextCombobox.tsx +1 -1
- package/src/core/components/shadcn/filters/filter/dateFilter.tsx +1 -1
- package/src/core/components/shadcn/filters/filter-styles.ts +4 -4
- package/src/core/components/shadcn/filters/filters.tsx +1 -1
- package/src/core/components/shadcn/label.tsx +1 -1
- package/src/core/components/shadcn/overflowTabs.tsx +2 -2
- package/src/core/components/shadcn/tabs.tsx +1 -1
- package/src/css/utilities.css +7 -0
- package/src/env/index.test.ts +100 -0
- package/src/env/index.ts +66 -3
- package/src/features/activity-doc/ActivityDoc.tsx +1 -1
- package/src/features/agent/PayloadBuilder.tsx +4 -0
- package/src/features/agent/chat/AgentRunFeedback.test.tsx +330 -0
- package/src/features/agent/chat/AgentRunFeedback.tsx +452 -0
- package/src/features/agent/chat/AskUserWidget.test.tsx +24 -2
- package/src/features/agent/chat/AskUserWidget.tsx +19 -4
- package/src/features/agent/chat/ModernAgentConversation.tsx +46 -42
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.test.tsx +207 -0
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +50 -31
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +4 -0
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +42 -8
- package/src/features/agent/chat/ModernAgentOutput/SummaryConversation.ts +2 -0
- package/src/features/agent/chat/ModernAgentOutput/utils.test.ts +14 -0
- package/src/features/agent/chat/hooks/useFileProcessing.test.tsx +0 -5
- package/src/features/agent/chat/index.ts +6 -0
- package/src/features/facets/AgentRunnerFacetsNav.tsx +26 -0
- package/src/features/layout/GenericPageNavHeader.test.tsx +36 -0
- package/src/features/layout/GenericPageNavHeader.tsx +1 -1
- package/src/features/magic-pdf/AnnotatedImageSlider.tsx +1 -1
- package/src/features/magic-pdf/GroundedExtractionView.tsx +3 -3
- package/src/features/permissions/UserPermissionsProvider.test.tsx +50 -1
- package/src/features/permissions/UserPermissionsProvider.tsx +82 -44
- package/src/features/store/objects/DocumentPreviewPanel.tsx +10 -10
- package/src/features/store/objects/components/DocumentInput.tsx +1 -1
- package/src/features/store/objects/selection/SelectionActions.tsx +4 -1
- package/src/features/store/objects/upload/DocumentUploadModal.tsx +1 -1
- package/src/features/user/UserInfo.tsx +1 -1
- package/src/i18n/index.tsx +25 -2
- package/src/i18n/locales/ar.json +30 -0
- package/src/i18n/locales/de.json +30 -0
- package/src/i18n/locales/en.json +30 -0
- package/src/i18n/locales/es.json +30 -0
- package/src/i18n/locales/fr.json +30 -0
- package/src/i18n/locales/it.json +30 -0
- package/src/i18n/locales/ja.json +30 -0
- package/src/i18n/locales/ko.json +30 -0
- package/src/i18n/locales/pt.json +30 -0
- package/src/i18n/locales/ru.json +30 -0
- package/src/i18n/locales/tr.json +30 -0
- package/src/i18n/locales/zh-TW.json +30 -0
- package/src/i18n/locales/zh.json +30 -0
- package/src/layout/ErrorPage.tsx +1 -1
- package/src/layout/Navbar.test.tsx +58 -0
- package/src/layout/Navbar.tsx +5 -2
- package/src/router/RouteComponent.test.tsx +65 -1
- package/src/router/RouteComponent.tsx +18 -15
- package/src/session/UserSession.test.ts +65 -0
- package/src/session/UserSession.ts +6 -4
- package/src/session/UserSessionProvider.strict-mode.test.tsx +44 -0
- package/src/session/UserSessionProvider.test.ts +62 -1
- package/src/session/UserSessionProvider.tsx +9 -1
- package/src/session/auth/composable.renewal.test.ts +170 -0
- package/src/session/auth/composable.test.ts +23 -1
- package/src/session/auth/composable.ts +101 -2
- package/src/session/auth/domainRouting.test.ts +35 -65
- package/src/session/auth/domainRouting.ts +51 -34
- package/src/session/auth/useAuthState.ts +11 -4
- package/src/session/index.ts +3 -1
- package/src/shell/AuthScreenPreview.test.tsx +44 -0
- package/src/shell/AuthScreenPreview.tsx +228 -0
- package/src/shell/BrandedAuthScreens.test.tsx +181 -0
- package/src/shell/BrandedAuthScreens.tsx +117 -0
- package/src/shell/SplashScreen.test.tsx +37 -0
- package/src/shell/SplashScreen.tsx +45 -40
- package/src/shell/VertesiaShell.tsx +49 -22
- package/src/shell/apps/StandaloneApp.tsx +5 -1
- package/src/shell/index.tsx +6 -0
- package/src/shell/login/SignInFlow.tsx +213 -0
- package/src/shell/login/SignInPageShell.tsx +62 -0
- package/src/shell/login/SignInPrimitives.tsx +14 -11
- package/src/shell/login/SignInRestrictedEnvStep.tsx +19 -7
- package/src/shell/login/SigninScreen.test.tsx +104 -0
- package/src/shell/login/SigninScreen.tsx +115 -145
- package/src/shell/login/SignupForm.tsx +8 -3
- package/src/shell/login/signInUtils.ts +30 -5
- package/src/widgets/json-view/JSONCode.test.tsx +2 -2
- package/src/widgets/json-view/JSONCode.tsx +1 -1
- package/src/widgets/markdown/markdown.css +21 -21
- package/src/widgets/upload/DropZone.tsx +2 -4
- package/lib/vertesia-ui-i18n.BfN7iOHb.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.BfN7iOHb.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.BjH2zEZw.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.BjH2zEZw.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.BjSwAZXl.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.BjSwAZXl.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.C7PUm5Au.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.C7PUm5Au.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.CF_1mUS5.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.CF_1mUS5.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.ChfUl3_-.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.ChfUl3_-.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.D-Sk-5d1.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.D-Sk-5d1.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.D4rnu1_S.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.D4rnu1_S.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DDf0-laK.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DDf0-laK.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DN79y06J.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DN79y06J.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DWLIciYQ.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DWLIciYQ.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DvF_YaAJ.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DvF_YaAJ.chunk.js.map +0 -1
- package/src/session/auth/authState.test.ts +0 -35
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
import { fireEvent, screen, waitFor } from '@testing-library/react';
|
|
2
|
+
import type { AgentRunFeedbackEntry, AgentRunFeedbackPayload, AgentRunFeedbackStatus } from '@vertesia/common';
|
|
3
|
+
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
4
|
+
import { renderWithProviders } from '../../../__tests__/test-utils.js';
|
|
5
|
+
import { AgentRunFeedback, AgentRunFeedbackProvider, agentRunFeedbackReasonCodes } from './AgentRunFeedback';
|
|
6
|
+
|
|
7
|
+
const mocks = vi.hoisted(() => {
|
|
8
|
+
const recordFeedback = vi.fn();
|
|
9
|
+
const retrieve = vi.fn();
|
|
10
|
+
// One session object for the whole file: the real session is stable across renders, and the
|
|
11
|
+
// provider reads the run again only when the client or the user changes.
|
|
12
|
+
const session = { client: { agents: { recordFeedback, retrieve } }, user: { sub: 'me' } };
|
|
13
|
+
return { recordFeedback, retrieve, session };
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
vi.mock('@vertesia/ui/session', () => ({
|
|
17
|
+
useUserSession: () => mocks.session,
|
|
18
|
+
}));
|
|
19
|
+
|
|
20
|
+
function entry(overrides: Partial<AgentRunFeedbackEntry>): AgentRunFeedbackEntry {
|
|
21
|
+
return {
|
|
22
|
+
feedback_id: 'fb',
|
|
23
|
+
rating: 'up',
|
|
24
|
+
message_scoped: false,
|
|
25
|
+
user_id: 'user:me',
|
|
26
|
+
rated_at: '2026-09-11T10:00:00.000Z',
|
|
27
|
+
...overrides,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function respondWith(...statuses: AgentRunFeedbackStatus[]) {
|
|
32
|
+
for (const status of statuses) {
|
|
33
|
+
mocks.recordFeedback.mockResolvedValueOnce({ status });
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function payloadOf(call: number): AgentRunFeedbackPayload {
|
|
38
|
+
return mocks.recordFeedback.mock.calls[call][1] as AgentRunFeedbackPayload;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
describe('AgentRunFeedback', () => {
|
|
42
|
+
beforeEach(() => {
|
|
43
|
+
mocks.recordFeedback.mockReset();
|
|
44
|
+
mocks.retrieve.mockReset();
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it('records the rating on the click itself, before asking for any detail', async () => {
|
|
48
|
+
// The rating is the signal being collected; requiring a form first would cost most of it.
|
|
49
|
+
respondWith('recorded');
|
|
50
|
+
renderWithProviders(<AgentRunFeedback agentRunId="run-1" />);
|
|
51
|
+
|
|
52
|
+
fireEvent.click(screen.getByRole('button', { name: 'Rate this run up' }));
|
|
53
|
+
|
|
54
|
+
await waitFor(() => expect(mocks.recordFeedback).toHaveBeenCalledTimes(1));
|
|
55
|
+
expect(mocks.recordFeedback).toHaveBeenCalledWith('run-1', { feedback_id: expect.any(String), rating: 'up' });
|
|
56
|
+
|
|
57
|
+
// Nothing opens on its own: the thumb lights and a quiet "Tell us more" link appears.
|
|
58
|
+
await waitFor(() =>
|
|
59
|
+
expect(screen.getByRole('button', { name: 'Rate this run up' }).getAttribute('aria-pressed')).toBe('true'),
|
|
60
|
+
);
|
|
61
|
+
expect(screen.queryByPlaceholderText('What went well, or what went wrong?')).toBeNull();
|
|
62
|
+
expect(screen.getByRole('button', { name: 'Tell us more' })).toBeTruthy();
|
|
63
|
+
expect(mocks.recordFeedback).toHaveBeenCalledTimes(1);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
it('offers the detail dialog only behind the "Tell us more" link', async () => {
|
|
67
|
+
respondWith('recorded');
|
|
68
|
+
renderWithProviders(<AgentRunFeedback agentRunId="run-1" />);
|
|
69
|
+
|
|
70
|
+
expect(screen.queryByRole('button', { name: 'Tell us more' })).toBeNull();
|
|
71
|
+
fireEvent.click(screen.getByRole('button', { name: 'Rate this run up' }));
|
|
72
|
+
fireEvent.click(await screen.findByRole('button', { name: 'Tell us more' }));
|
|
73
|
+
|
|
74
|
+
await screen.findByPlaceholderText('What went well, or what went wrong?');
|
|
75
|
+
// Dismissing the dialog keeps the bare rating: it was already written.
|
|
76
|
+
fireEvent.click(screen.getByRole('button', { name: 'Not now' }));
|
|
77
|
+
await waitFor(() => expect(screen.queryByPlaceholderText('What went well, or what went wrong?')).toBeNull());
|
|
78
|
+
expect(screen.getByRole('button', { name: 'Rate this run up' }).getAttribute('aria-pressed')).toBe('true');
|
|
79
|
+
expect(mocks.recordFeedback).toHaveBeenCalledTimes(1);
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it('drops the previous run’s rating when the run it is showing changes', async () => {
|
|
83
|
+
// The control is exported from `@vertesia/ui` and cannot assume its parent keys it by run.
|
|
84
|
+
// Without an internal reset the lit thumb followed the user into the next conversation.
|
|
85
|
+
respondWith('recorded');
|
|
86
|
+
const { rerender } = renderWithProviders(<AgentRunFeedback agentRunId="run-1" />);
|
|
87
|
+
|
|
88
|
+
fireEvent.click(screen.getByRole('button', { name: 'Rate this run up' }));
|
|
89
|
+
await waitFor(() =>
|
|
90
|
+
expect(screen.getByRole('button', { name: 'Rate this run up' }).getAttribute('aria-pressed')).toBe('true'),
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
rerender(<AgentRunFeedback agentRunId="run-2" />);
|
|
94
|
+
|
|
95
|
+
expect(screen.getByRole('button', { name: 'Rate this run up' }).getAttribute('aria-pressed')).toBe('false');
|
|
96
|
+
expect(screen.getByRole('button', { name: 'Rate this run down' }).getAttribute('aria-pressed')).toBe('false');
|
|
97
|
+
// And the "Tell us more" link does not survive the switch: there is no rating to add to.
|
|
98
|
+
expect(screen.queryByRole('button', { name: 'Tell us more' })).toBeNull();
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it('does not send a comment written about one run against another', async () => {
|
|
102
|
+
// `send` reads `agentRunId` at call time, so a dialog left open across a switch submitted
|
|
103
|
+
// the previous run's text under the new run's id.
|
|
104
|
+
respondWith('recorded', 'recorded');
|
|
105
|
+
const { rerender } = renderWithProviders(<AgentRunFeedback agentRunId="run-1" />);
|
|
106
|
+
|
|
107
|
+
fireEvent.click(screen.getByRole('button', { name: 'Rate this run down' }));
|
|
108
|
+
fireEvent.click(await screen.findByRole('button', { name: 'Tell us more' }));
|
|
109
|
+
fireEvent.change(await screen.findByPlaceholderText('What went well, or what went wrong?'), {
|
|
110
|
+
target: { value: 'this was about run one' },
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
rerender(<AgentRunFeedback agentRunId="run-2" />);
|
|
114
|
+
|
|
115
|
+
// The dialog is gone, so there is nothing left to submit the stale draft from.
|
|
116
|
+
expect(screen.queryByPlaceholderText('What went well, or what went wrong?')).toBeNull();
|
|
117
|
+
expect(screen.queryByRole('button', { name: 'Tell us more' })).toBeNull();
|
|
118
|
+
expect(mocks.recordFeedback).toHaveBeenCalledTimes(1);
|
|
119
|
+
expect(mocks.recordFeedback).toHaveBeenCalledWith('run-1', {
|
|
120
|
+
feedback_id: expect.any(String),
|
|
121
|
+
rating: 'down',
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
it('sends the reason and comment as a revision of the same rating', async () => {
|
|
126
|
+
respondWith('recorded', 'recorded');
|
|
127
|
+
renderWithProviders(<AgentRunFeedback agentRunId="run-1" />);
|
|
128
|
+
|
|
129
|
+
fireEvent.click(screen.getByRole('button', { name: 'Rate this run down' }));
|
|
130
|
+
fireEvent.click(await screen.findByRole('button', { name: 'Tell us more' }));
|
|
131
|
+
|
|
132
|
+
fireEvent.change(await screen.findByPlaceholderText('What went well, or what went wrong?'), {
|
|
133
|
+
target: { value: ' it deleted the wrong collection ' },
|
|
134
|
+
});
|
|
135
|
+
fireEvent.click(screen.getByRole('button', { name: 'Send' }));
|
|
136
|
+
|
|
137
|
+
await waitFor(() => expect(mocks.recordFeedback).toHaveBeenCalledTimes(2));
|
|
138
|
+
expect(payloadOf(1)).toEqual({
|
|
139
|
+
feedback_id: expect.any(String),
|
|
140
|
+
rating: 'down',
|
|
141
|
+
comment: 'it deleted the wrong collection',
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
it('carries the message identifiers when a single message is rated', async () => {
|
|
146
|
+
respondWith('recorded');
|
|
147
|
+
renderWithProviders(<AgentRunFeedback agentRunId="run-1" messageId="m-7" messageSeq={7} />);
|
|
148
|
+
|
|
149
|
+
fireEvent.click(screen.getByRole('button', { name: 'Rate this answer up' }));
|
|
150
|
+
|
|
151
|
+
await waitFor(() => expect(mocks.recordFeedback).toHaveBeenCalledTimes(1));
|
|
152
|
+
expect(payloadOf(0)).toEqual({
|
|
153
|
+
feedback_id: expect.any(String),
|
|
154
|
+
rating: 'up',
|
|
155
|
+
message_id: 'm-7',
|
|
156
|
+
message_seq: 7,
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
it('treats a replaced rating as accepted', async () => {
|
|
161
|
+
// A second vote by the same user on the same scope supersedes the first server-side; the
|
|
162
|
+
// rating is in, so the thumb lights and "Tell us more" is offered exactly as for `recorded`.
|
|
163
|
+
respondWith('replaced');
|
|
164
|
+
const onRecorded = vi.fn();
|
|
165
|
+
renderWithProviders(<AgentRunFeedback agentRunId="run-1" onRecorded={onRecorded} />);
|
|
166
|
+
|
|
167
|
+
fireEvent.click(screen.getByRole('button', { name: 'Rate this run down' }));
|
|
168
|
+
|
|
169
|
+
await waitFor(() =>
|
|
170
|
+
expect(onRecorded).toHaveBeenCalledWith({ feedback_id: expect.any(String), rating: 'down' }, 'replaced'),
|
|
171
|
+
);
|
|
172
|
+
await screen.findByRole('button', { name: 'Tell us more' });
|
|
173
|
+
expect(screen.getByRole('button', { name: 'Rate this run down' }).getAttribute('aria-pressed')).toBe('true');
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
it('gives every submission its own idempotency key', async () => {
|
|
177
|
+
// The bare rating and its detail revision are two requests; a retry of either must not
|
|
178
|
+
// count twice, and the server tells them apart by `feedback_id`.
|
|
179
|
+
respondWith('recorded', 'replaced');
|
|
180
|
+
renderWithProviders(<AgentRunFeedback agentRunId="run-1" />);
|
|
181
|
+
|
|
182
|
+
fireEvent.click(screen.getByRole('button', { name: 'Rate this run down' }));
|
|
183
|
+
fireEvent.click(await screen.findByRole('button', { name: 'Tell us more' }));
|
|
184
|
+
fireEvent.change(await screen.findByPlaceholderText('What went well, or what went wrong?'), {
|
|
185
|
+
target: { value: 'it stopped halfway' },
|
|
186
|
+
});
|
|
187
|
+
fireEvent.click(screen.getByRole('button', { name: 'Send' }));
|
|
188
|
+
|
|
189
|
+
await waitFor(() => expect(mocks.recordFeedback).toHaveBeenCalledTimes(2));
|
|
190
|
+
expect(payloadOf(0).feedback_id).toEqual(expect.any(String));
|
|
191
|
+
expect(payloadOf(1).feedback_id).toEqual(expect.any(String));
|
|
192
|
+
expect(payloadOf(1).feedback_id).not.toBe(payloadOf(0).feedback_id);
|
|
193
|
+
expect(payloadOf(1)).toMatchObject({ rating: 'down', comment: 'it stopped halfway' });
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
it('stops offering itself once the deployment says ratings are not collected', async () => {
|
|
197
|
+
respondWith('disabled');
|
|
198
|
+
const onRecorded = vi.fn();
|
|
199
|
+
renderWithProviders(<AgentRunFeedback agentRunId="run-1" onRecorded={onRecorded} />);
|
|
200
|
+
|
|
201
|
+
fireEvent.click(screen.getByRole('button', { name: 'Rate this run up' }));
|
|
202
|
+
|
|
203
|
+
await waitFor(() => expect(screen.queryByRole('button', { name: 'Rate this run up' })).toBeNull());
|
|
204
|
+
// Nothing was recorded, so the "recorded" callback does not fire.
|
|
205
|
+
expect(onRecorded).not.toHaveBeenCalled();
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
it('keeps the control usable after a network failure', async () => {
|
|
209
|
+
mocks.recordFeedback.mockRejectedValueOnce(new Error('boom'));
|
|
210
|
+
renderWithProviders(<AgentRunFeedback agentRunId="run-1" />);
|
|
211
|
+
|
|
212
|
+
fireEvent.click(screen.getByRole('button', { name: 'Rate this run down' }));
|
|
213
|
+
|
|
214
|
+
await waitFor(() => expect(mocks.recordFeedback).toHaveBeenCalledTimes(1));
|
|
215
|
+
const button = (await screen.findByRole('button', { name: 'Rate this run down' })) as HTMLButtonElement;
|
|
216
|
+
await waitFor(() => expect(button.disabled).toBe(false));
|
|
217
|
+
expect(button.getAttribute('aria-pressed')).toBe('false');
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
it('shows the rating the user already gave once the run is read back', async () => {
|
|
221
|
+
// The thumbs used to live only in component memory: a reload of the conversation showed
|
|
222
|
+
// them blank while the run list already carried the rating. The provider reads the run's
|
|
223
|
+
// retained entries once and every control under it picks up its own scope.
|
|
224
|
+
mocks.retrieve.mockResolvedValue({
|
|
225
|
+
feedback: [
|
|
226
|
+
entry({ feedback_id: 'a', rating: 'down', message_scoped: true, message_id: 'main:1' }),
|
|
227
|
+
entry({ feedback_id: 'b', rating: 'up' }),
|
|
228
|
+
],
|
|
229
|
+
});
|
|
230
|
+
renderWithProviders(
|
|
231
|
+
<AgentRunFeedbackProvider agentRunId="run-1">
|
|
232
|
+
<AgentRunFeedback agentRunId="run-1" messageId="main:1" />
|
|
233
|
+
<AgentRunFeedback agentRunId="run-1" />
|
|
234
|
+
</AgentRunFeedbackProvider>,
|
|
235
|
+
);
|
|
236
|
+
|
|
237
|
+
await waitFor(() =>
|
|
238
|
+
expect(screen.getByRole('button', { name: 'Rate this answer down' }).getAttribute('aria-pressed')).toBe(
|
|
239
|
+
'true',
|
|
240
|
+
),
|
|
241
|
+
);
|
|
242
|
+
expect(screen.getByRole('button', { name: 'Rate this run up' }).getAttribute('aria-pressed')).toBe('true');
|
|
243
|
+
expect(screen.getByRole('button', { name: 'Rate this answer up' }).getAttribute('aria-pressed')).toBe('false');
|
|
244
|
+
// A stored rating is a rating: the detail link is offered on it too.
|
|
245
|
+
expect(screen.getAllByRole('button', { name: 'Tell us more' })).toHaveLength(2);
|
|
246
|
+
expect(mocks.retrieve).toHaveBeenCalledTimes(1);
|
|
247
|
+
expect(mocks.recordFeedback).not.toHaveBeenCalled();
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
it('ignores other raters, superseded entries and unrelated scopes when reading the run back', async () => {
|
|
251
|
+
mocks.retrieve.mockResolvedValue({
|
|
252
|
+
feedback: [
|
|
253
|
+
entry({ feedback_id: 'theirs', rating: 'up', user_id: 'user:someone-else' }),
|
|
254
|
+
entry({ feedback_id: 'old', rating: 'up', replaced_at: '2026-09-11T10:01:00.000Z' }),
|
|
255
|
+
entry({ feedback_id: 'other-message', rating: 'up', message_scoped: true, message_id: 'main:2' }),
|
|
256
|
+
entry({ feedback_id: 'first', rating: 'up', rated_at: '2026-09-11T09:00:00.000Z' }),
|
|
257
|
+
entry({ feedback_id: 'latest', rating: 'down', rated_at: '2026-09-11T10:00:00.000Z' }),
|
|
258
|
+
],
|
|
259
|
+
});
|
|
260
|
+
renderWithProviders(
|
|
261
|
+
<AgentRunFeedbackProvider agentRunId="run-1">
|
|
262
|
+
<AgentRunFeedback agentRunId="run-1" />
|
|
263
|
+
</AgentRunFeedbackProvider>,
|
|
264
|
+
);
|
|
265
|
+
|
|
266
|
+
await waitFor(() => expect(mocks.retrieve).toHaveBeenCalledTimes(1));
|
|
267
|
+
await waitFor(() =>
|
|
268
|
+
expect(screen.getByRole('button', { name: 'Rate this run down' }).getAttribute('aria-pressed')).toBe(
|
|
269
|
+
'true',
|
|
270
|
+
),
|
|
271
|
+
);
|
|
272
|
+
expect(screen.getByRole('button', { name: 'Rate this run up' }).getAttribute('aria-pressed')).toBe('false');
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
it('lets a click made now win over the stored rating, and keeps it for a remounted control', async () => {
|
|
276
|
+
mocks.retrieve.mockResolvedValue({ feedback: [entry({ rating: 'up' })] });
|
|
277
|
+
respondWith('replaced');
|
|
278
|
+
const { rerender } = renderWithProviders(
|
|
279
|
+
<AgentRunFeedbackProvider agentRunId="run-1">
|
|
280
|
+
<AgentRunFeedback agentRunId="run-1" key="a" />
|
|
281
|
+
</AgentRunFeedbackProvider>,
|
|
282
|
+
);
|
|
283
|
+
await waitFor(() =>
|
|
284
|
+
expect(screen.getByRole('button', { name: 'Rate this run up' }).getAttribute('aria-pressed')).toBe('true'),
|
|
285
|
+
);
|
|
286
|
+
|
|
287
|
+
fireEvent.click(screen.getByRole('button', { name: 'Rate this run down' }));
|
|
288
|
+
await waitFor(() =>
|
|
289
|
+
expect(screen.getByRole('button', { name: 'Rate this run down' }).getAttribute('aria-pressed')).toBe(
|
|
290
|
+
'true',
|
|
291
|
+
),
|
|
292
|
+
);
|
|
293
|
+
|
|
294
|
+
// A fresh control for the same scope (the message list re-keyed, say) shows the new vote,
|
|
295
|
+
// not the one the run document held when it was read.
|
|
296
|
+
rerender(
|
|
297
|
+
<AgentRunFeedbackProvider agentRunId="run-1">
|
|
298
|
+
<AgentRunFeedback agentRunId="run-1" key="b" />
|
|
299
|
+
</AgentRunFeedbackProvider>,
|
|
300
|
+
);
|
|
301
|
+
expect(screen.getByRole('button', { name: 'Rate this run down' }).getAttribute('aria-pressed')).toBe('true');
|
|
302
|
+
expect(mocks.retrieve).toHaveBeenCalledTimes(1);
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
it('starts blank when the run cannot be read back', async () => {
|
|
306
|
+
mocks.retrieve.mockRejectedValue(new Error('403'));
|
|
307
|
+
renderWithProviders(
|
|
308
|
+
<AgentRunFeedbackProvider agentRunId="run-1">
|
|
309
|
+
<AgentRunFeedback agentRunId="run-1" />
|
|
310
|
+
</AgentRunFeedbackProvider>,
|
|
311
|
+
);
|
|
312
|
+
await waitFor(() => expect(mocks.retrieve).toHaveBeenCalledTimes(1));
|
|
313
|
+
expect(screen.getByRole('button', { name: 'Rate this run up' }).getAttribute('aria-pressed')).toBe('false');
|
|
314
|
+
expect(screen.queryByRole('button', { name: 'Tell us more' })).toBeNull();
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
it('offers every reason code the API accepts, on the side it belongs to', () => {
|
|
318
|
+
// A code the picker never offers is a code the warehouse never counts.
|
|
319
|
+
expect(agentRunFeedbackReasonCodes('up')).toEqual(['accurate', 'helpful', 'fast', 'well_explained', 'other']);
|
|
320
|
+
expect(agentRunFeedbackReasonCodes('down')).toEqual([
|
|
321
|
+
'wrong_result',
|
|
322
|
+
'incomplete',
|
|
323
|
+
'misunderstood_request',
|
|
324
|
+
'too_slow',
|
|
325
|
+
'tool_failure',
|
|
326
|
+
'unsafe_action',
|
|
327
|
+
'other',
|
|
328
|
+
]);
|
|
329
|
+
});
|
|
330
|
+
});
|