Skip to content

7.4 billion tokens per month. 34 free LLM providers. 635 free model endpoints. All behind one /v1 endpoint, plus any custom OpenAI-compatible endpoint. Smart routing, automatic failover, encrypted keys. Personal experimentation only.

TypeScript

fix(ui): tooltip cleanup, custom-endpoint type labels, routeViaProxy wording (#826 #837 #825) (#841)

suantea (asuan_suan)23bd4af9c49f
diff --git a/client/src/components/keys/custom-provider-section.tsx b/client/src/components/keys/custom-provider-section.tsx
index 0acb0030..ee3a8aed 100644
--- a/client/src/components/keys/custom-provider-section.tsx
+++ b/client/src/components/keys/custom-provider-section.tsx
@@ -148,10 +148,13 @@ export function CustomProviderSection({ onAdded }: { onAdded?: () => void } = {}
<SelectValue />
</SelectTrigger>
<SelectContent>
- <SelectItem value="chat">{t('keys.customTypeChat')}</SelectItem>
- <SelectItem value="embedding">{t('keys.customTypeEmbedding')}</SelectItem>
- <SelectItem value="image">{t('keys.customTypeImage')}</SelectItem>
- <SelectItem value="audio">{t('keys.customTypeAudio')}</SelectItem>
+ {/* label prop drives the trigger's SelectValue text (Base UI falls
+ back to the raw value without it, showing "chat" instead of
+ the translated label — #837). */}
+ <SelectItem value="chat" label={t('keys.customTypeChat')}>{t('keys.customTypeChat')}</SelectItem>
+ <SelectItem value="embedding" label={t('keys.customTypeEmbedding')}>{t('keys.customTypeEmbedding')}</SelectItem>
+ <SelectItem value="image" label={t('keys.customTypeImage')}>{t('keys.customTypeImage')}</SelectItem>
+ <SelectItem value="audio" label={t('keys.customTypeAudio')}>{t('keys.customTypeAudio')}</SelectItem>
</SelectContent>
</Select>
</div>
diff --git a/client/src/components/tooltip.tsx b/client/src/components/tooltip.tsx
index 50a69b76..0c6f4fcc 100644
--- a/client/src/components/tooltip.tsx
+++ b/client/src/components/tooltip.tsx
@@ -1,4 +1,4 @@
-import { useRef, useState, type ReactNode } from 'react'
+import { useEffect, useRef, useState, type ReactNode } from 'react'
import { createPortal } from 'react-dom'
// Hover tooltip rendered through a portal to document.body, so it's never
@@ -24,6 +24,26 @@ export function Tooltip({ text, children, side = 'top', className }: {
}
const hide = () => setCoords(null)
+ // #826: a modal (copy-key / model-scope dialog) opening on top of the
+ // trigger swallows the mouseleave, so the tooltip state survives the dialog
+ // and the black box lingers after it closes. While visible, also hide on any
+ // mousemove that leaves the trigger's rect (with a small tolerance to avoid
+ // flicker at the edge) — the pointer-events-none tooltip itself never
+ // intercepts events, so this is the reliable cleanup.
+ useEffect(() => {
+ if (!coords) return
+ const onMove = (e: MouseEvent) => {
+ const el = ref.current
+ if (!el) return
+ const r = el.getBoundingClientRect()
+ const inside = e.clientX >= r.left - 4 && e.clientX <= r.right + 4
+ && e.clientY >= r.top - 4 && e.clientY <= r.bottom + 4
+ if (!inside) hide()
+ }
+ document.addEventListener('mousemove', onMove)
+ return () => document.removeEventListener('mousemove', onMove)
+ }, [coords])
+
return (
<span
ref={ref}
diff --git a/client/src/i18n/locales/zh-CN.json b/client/src/i18n/locales/zh-CN.json
index fab10342..a94410db 100644
--- a/client/src/i18n/locales/zh-CN.json
+++ b/client/src/i18n/locales/zh-CN.json
@@ -446,7 +446,7 @@
"summaryIssueOne": "{count} 个问题",
"summaryIssueOther": "{count} 个问题",
"providerActions": "提供方操作",
- "routeViaProxy": "通过代理路由",
+ "routeViaProxy": "经由代理转发",
"checkNow": "立即检查",
"proxyEnvHintBefore": "也可通过 ",
"proxyEnvHintAfter": " 环境变量配置(优先生效)。留空则禁用。示例:",
diff --git a/client/src/i18n/locales/zh-TW.json b/client/src/i18n/locales/zh-TW.json
index 7e64cd85..aac341b9 100644
--- a/client/src/i18n/locales/zh-TW.json
+++ b/client/src/i18n/locales/zh-TW.json
@@ -446,7 +446,7 @@
"summaryIssueOne": "{count} 個問題",
"summaryIssueOther": "{count} 個問題",
"providerActions": "提供者操作",
- "routeViaProxy": "透過代理路由",
+ "routeViaProxy": "經由代理轉發",
"checkNow": "立即檢查",
"proxyEnvHintBefore": "也可透過 ",
"proxyEnvHintAfter": " 環境變數設定(優先生效)。留空則停用。範例:",