diff --git a/src/web-ui/src/infrastructure/config/components/ModelServiceCollapse.presentation.test.ts b/src/web-ui/src/infrastructure/config/components/ModelServiceCollapse.presentation.test.ts index 6291c9c4cf..03678c1466 100644 --- a/src/web-ui/src/infrastructure/config/components/ModelServiceCollapse.presentation.test.ts +++ b/src/web-ui/src/infrastructure/config/components/ModelServiceCollapse.presentation.test.ts @@ -80,6 +80,23 @@ describe('model service collapsed presentation', () => { expect(modelSettingsSource).toContain('toggleOnRowClick'); }); + it('keeps model connection test progress and results visible without hover or expansion', () => { + const badgeStart = modelSettingsSource.indexOf('const badge = ('); + const detailsStart = modelSettingsSource.indexOf('const details = (', badgeStart); + const badgeSource = modelSettingsSource.slice(badgeStart, detailsStart); + + expect(badgeSource).toContain('{(isTesting || testResult) && ('); + expect(badgeSource).toContain('openbitfun-model-settings__status-dot'); + expect(badgeSource).not.toContain(' { expect(modelSettingsStyles).toMatch( /&__provider-group-count\s*\{[\s\S]*?color:\s*var\(--openbitfun-color-content-required-indicator\)/, diff --git a/src/web-ui/src/infrastructure/config/components/ModelSettingsPage.scss b/src/web-ui/src/infrastructure/config/components/ModelSettingsPage.scss index 7d7a2db57a..b476171203 100644 --- a/src/web-ui/src/infrastructure/config/components/ModelSettingsPage.scss +++ b/src/web-ui/src/infrastructure/config/components/ModelSettingsPage.scss @@ -313,7 +313,10 @@ border-radius: 999px; margin-left: 4px; flex-shrink: 0; - background: var(--openbitfun-color-content-muted); + + &.is-testing { + background: var(--openbitfun-color-status-warning-emphasis); + } &.is-success { background: var(--openbitfun-color-status-success-emphasis); diff --git a/src/web-ui/src/infrastructure/config/components/ModelSettingsPage.tsx b/src/web-ui/src/infrastructure/config/components/ModelSettingsPage.tsx index 73b341f22b..c0ac2e6ad6 100644 --- a/src/web-ui/src/infrastructure/config/components/ModelSettingsPage.tsx +++ b/src/web-ui/src/infrastructure/config/components/ModelSettingsPage.tsx @@ -3230,6 +3230,9 @@ const ModelSettingsPage: React.FC = () => { const providerDisplayName = getProviderDisplayName(config); const modelDisplayName = getModelDisplayName(config); const modelLabel = config.model_name || modelDisplayName; + const testStatusLabel = isTesting + ? t('messages.testing') + : testResult?.message.split('\n', 1)[0]; const badge = ( <> @@ -3240,15 +3243,18 @@ const ModelSettingsPage: React.FC = () => { > {t(`category.${config.category}`)} - {testResult && ( + {(isTesting || testResult) && ( )} diff --git a/src/web-ui/src/locales/en-US/settings/models.json b/src/web-ui/src/locales/en-US/settings/models.json index 38783ce321..715f031629 100644 --- a/src/web-ui/src/locales/en-US/settings/models.json +++ b/src/web-ui/src/locales/en-US/settings/models.json @@ -517,6 +517,7 @@ "referenceCheckFailed": "OpenBitFun could not verify whether other settings still reference this model, so deletion was cancelled", "providerReferenceCheckFailed": "OpenBitFun could not verify whether other settings still reference this provider's models, so deletion was cancelled", "loadFailed": "Failed to load AI configuration", + "testing": "Testing…", "testSuccess": "Test successful", "testFailed": "Test failed", "testUnsupportedOnHost": "Configuration saved; the current CLI device does not support model connection tests", diff --git a/src/web-ui/src/locales/zh-CN/settings/models.json b/src/web-ui/src/locales/zh-CN/settings/models.json index 289272fbaa..365ce51f37 100644 --- a/src/web-ui/src/locales/zh-CN/settings/models.json +++ b/src/web-ui/src/locales/zh-CN/settings/models.json @@ -517,6 +517,7 @@ "referenceCheckFailed": "无法确认此模型是否仍被其他设置引用,已取消删除", "providerReferenceCheckFailed": "无法确认该服务商的模型是否仍被其他设置引用,已取消删除", "loadFailed": "加载AI配置失败", + "testing": "测试中…", "testSuccess": "测试成功", "testFailed": "测试失败", "testUnsupportedOnHost": "配置已保存,当前 CLI 设备不支持模型连接测试", diff --git a/src/web-ui/src/locales/zh-TW/settings/models.json b/src/web-ui/src/locales/zh-TW/settings/models.json index 014c2b41e1..7404126154 100644 --- a/src/web-ui/src/locales/zh-TW/settings/models.json +++ b/src/web-ui/src/locales/zh-TW/settings/models.json @@ -517,6 +517,7 @@ "referenceCheckFailed": "無法確認此模型是否仍被其他設定引用,已取消刪除", "providerReferenceCheckFailed": "無法確認該服務商的模型是否仍被其他設定引用,已取消刪除", "loadFailed": "載入AI設定失敗", + "testing": "測試中…", "testSuccess": "測試成功", "testFailed": "測試失敗", "testUnsupportedOnHost": "設定已儲存,目前 CLI 裝置不支援模型連接測試",