diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ae4acb2ba..2a158b6eb1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -142,6 +142,7 @@ jobs: - run: npm run check:known-symbols - run: npm run check:route-guard-membership - run: npm run check:test-discovery + - run: npm run check:radar-sentinels - run: npm run check:tracked-artifacts # (gap 30) Also lives in quality.yml's PR-only "Merge integrity" job — because the # CHANGELOG half of that job needs a base to diff against. This half does NOT: the diff --git a/changelog.d/fixes/12937-radar-silent-cells.md b/changelog.d/fixes/12937-radar-silent-cells.md new file mode 100644 index 0000000000..64072b9eb8 --- /dev/null +++ b/changelog.d/fixes/12937-radar-silent-cells.md @@ -0,0 +1 @@ +- **fix(dashboard):** the Radar catalog table no longer leaves absent data unexplained — empty limits, unknown context windows, and unreported capabilities each explain themselves on hover, and a new check keeps it that way ([#12937](https://github.com/diegosouzapw/OmniRoute/pull/12937)) — thanks @maxmad64bis diff --git a/package.json b/package.json index e8f3389354..b36a825d98 100644 --- a/package.json +++ b/package.json @@ -183,6 +183,7 @@ "check:provider-assets": "node scripts/check/check-provider-assets.mjs", "check:provider-order-sync": "node scripts/check/check-provider-order-sync.mjs", "check:provider-asset-provenance": "node scripts/check/check-provider-asset-provenance.mjs", + "check:radar-sentinels": "node scripts/check/check-radar-sentinels.mjs", "check:nvidia-catalog-drift": "node --import tsx/esm scripts/check/check-nvidia-catalog-drift.ts", "check:fetch-targets": "node scripts/check/check-fetch-targets.mjs", "check:openapi-routes": "node scripts/check/check-openapi-routes.mjs", diff --git a/scripts/check/check-radar-sentinels.mjs b/scripts/check/check-radar-sentinels.mjs new file mode 100644 index 0000000000..157043d44c --- /dev/null +++ b/scripts/check/check-radar-sentinels.mjs @@ -0,0 +1,94 @@ +#!/usr/bin/env node +/** + * OmniRoute — Radar silent-cell structural gate. + * + * Asserts three structural invariants over the Radar catalog table — + * every absent-data sentinel in that table must carry an explaining title. + * (Rationale lives in the PR description; this header is self-contained on + * purpose — no local doc paths here, they would leak into the upstream diff. + * Sized to 3 known sites — extend with a 4th check if a new silent cell lands.): + * 1. limits cell wraps {formatLimits(entry)} in on the "—" branch + * 2. context cell wraps the "—" branch in + * 3. capabilityBadge's "?" span carries title={t("capabilityUnknownHelp")} + * + * Single purpose: structural invariant over one file. i18n coverage lives in + * scripts/i18n/check-ui-keys-coverage.mjs — a red run here means a sentinel + * without explanation, never a locale threshold. + * + * Usage: npm run check:radar-sentinels (exit 1 on any broken invariant) + */ + +import { readFileSync } from "node:fs"; +import path from "node:path"; +import process from "node:process"; +import { fileURLToPath } from "node:url"; + +const SCRIPT_DIR = path.dirname(fileURLToPath(import.meta.url)); +const ROOT = path.resolve(SCRIPT_DIR, "..", ".."); +const TABLE = path.join( + ROOT, + "src", + "app", + "(dashboard)", + "dashboard", + "radar", + "RadarCatalogTable.tsx" +); + +function fail(message) { + console.error(`[radar-sentinels] FAIL ${message}`); +} + +function main() { + const raw = readFileSync(TABLE, "utf8"); + const src = raw.replace(/\/\/.*|\/\*[\s\S]*?\*\//g, ""); // commented call sites must not count (no URLs in this file at pin) + const failures = []; + + // Invariant 1 — limits cell: the "—" branch of formatLimits is wrapped with the help title. + // Sized to the implementation shape (const limits + conditional span). Window {0,500}: + // prettier rewraps must not false-red. If a 4th silent cell is added one day, + // extend here with a 4th check — this gate is deliberately sized to known sites, + // not generic (static-explicit beats magic-generic for a 1-file, 3-site gate). + if ( + !/const limits = formatLimits\(entry\)[\s\S]{0,500}\{limits\}<\/span>/.test( + src + ) + ) { + failures.push( + 'limits cell: expected const limits + "—" branch wrapped in {limits}' + ); + } + + // Invariant 2 — context cell: the "—" branch carries the context help title. + if (!/—<\/span>/.test(src)) { + failures.push('context cell: expected '); + } + + // Invariant 3 — capabilityBadge: the unknown-state span carries the capability help title. + // Post-fix shape (param form): helper takes `unknownHelp: string`, + // ALL THREE call sites (tools/vision/thinking) pass t("capabilityUnknownHelp") — + // count, not exist (one dropped site must go red), and the span spreads + // `{...(unknown ? { title: unknownHelp } : {})}` (unconditional title would spam ✓/✕ badges). + const helpSites = src.match(/t\("capabilityUnknownHelp"\)/g) || []; + if (helpSites.length < 3) { + failures.push( + `capability badge: expected t("capabilityUnknownHelp") at all 3 call sites, found ${helpSites.length}` + ); + } + if (!/title:\s*unknownHelp/.test(src)) { + failures.push( + "capability badge: expected conditional title from unknownHelp on the badge span" + ); + } + + if (failures.length) { + for (const f of failures) fail(f); + console.error( + `[radar-sentinels] ${failures.length} broken invariant(s) in RadarCatalogTable.tsx` + ); + process.exit(1); + } + console.log("[radar-sentinels] all invariants hold"); +} + +main(); diff --git a/src/app/(dashboard)/dashboard/radar/RadarCatalogTable.tsx b/src/app/(dashboard)/dashboard/radar/RadarCatalogTable.tsx index 3cfe4014e2..e7e2d37eb8 100644 --- a/src/app/(dashboard)/dashboard/radar/RadarCatalogTable.tsx +++ b/src/app/(dashboard)/dashboard/radar/RadarCatalogTable.tsx @@ -96,7 +96,12 @@ function budgetLabel(entry: RadarMergedEntry): string { return `${formatTokens(entry.monthlyTokens)}/mo`; } -function capabilityBadge(label: string, value: boolean | null | undefined, trueClass: string) { +function capabilityBadge( + label: string, + value: boolean | null | undefined, + trueClass: string, + unknownHelp: string +) { const state = value === true ? "✓" : value === false ? "✕" : "?"; const stateClass = value === true @@ -104,8 +109,12 @@ function capabilityBadge(label: string, value: boolean | null | undefined, trueC : value === false ? "bg-red-500/10 text-red-400" : "bg-gray-500/10 text-gray-400"; + const unknown = value !== true && value !== false; return ( - + {label} {state} ); @@ -282,26 +291,42 @@ export function RadarCatalogTable({ entries, refreshCatalog, onError }: RadarCat )} {budgetLabel(entry)} - {formatLimits(entry)} - {entry.contextWindow ? `${(entry.contextWindow / 1000).toFixed(0)}K` : "—"} + {(() => { + const limits = formatLimits(entry); + return limits === "—" ? ( + {limits} + ) : ( + limits + ); + })()} + + + {entry.contextWindow != null ? ( + `${(entry.contextWindow / 1000).toFixed(0)}K` + ) : ( + + )}
{capabilityBadge( t("capTools"), entry.capabilities?.tools, - "bg-blue-500/10 text-blue-400" + "bg-blue-500/10 text-blue-400", + t("capabilityUnknownHelp") )} {capabilityBadge( t("capVision"), entry.capabilities?.vision, - "bg-purple-500/10 text-purple-400" + "bg-purple-500/10 text-purple-400", + t("capabilityUnknownHelp") )} {capabilityBadge( t("capThinking"), entry.capabilities?.thinking, - "bg-amber-500/10 text-amber-400" + "bg-amber-500/10 text-amber-400", + t("capabilityUnknownHelp") )}
diff --git a/src/i18n/messages/ar.json b/src/i18n/messages/ar.json index b3aeb1a4c2..bc3296b89a 100644 --- a/src/i18n/messages/ar.json +++ b/src/i18n/messages/ar.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "جديد", "setupGuide": "دليل الإعداد", "disabledByFeed": "معطل بواسطة تغذية الرادار", diff --git a/src/i18n/messages/az.json b/src/i18n/messages/az.json index 3dfc7e6f1f..faca0d6278 100644 --- a/src/i18n/messages/az.json +++ b/src/i18n/messages/az.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "yeni", "setupGuide": "Quraşdırma bələdçisi", "disabledByFeed": "Radar axını tərəfindən deaktiv edilmişdir", diff --git a/src/i18n/messages/bg.json b/src/i18n/messages/bg.json index 5c1aa55352..ef8c3023ff 100644 --- a/src/i18n/messages/bg.json +++ b/src/i18n/messages/bg.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "нов", "setupGuide": "Ръководство за настройка", "disabledByFeed": "Деактивирано от фийда на радара", diff --git a/src/i18n/messages/bn.json b/src/i18n/messages/bn.json index ab214e6cdd..5906b9e495 100644 --- a/src/i18n/messages/bn.json +++ b/src/i18n/messages/bn.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "নতুন", "setupGuide": "সেটআপ গাইড", "disabledByFeed": "রাডার ফিড দ্বারা নিষ্ক্রিয়", diff --git a/src/i18n/messages/cs.json b/src/i18n/messages/cs.json index d6990eb9fd..1290e1e172 100644 --- a/src/i18n/messages/cs.json +++ b/src/i18n/messages/cs.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "nové", "setupGuide": "Průvodce nastavením", "disabledByFeed": "Zakázáno zdrojem Radar", diff --git a/src/i18n/messages/da.json b/src/i18n/messages/da.json index 596aa37c62..d65eb7d96b 100644 --- a/src/i18n/messages/da.json +++ b/src/i18n/messages/da.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "ny", "setupGuide": "Opsætningsvejledning", "disabledByFeed": "Deaktiveret af Radar feed", diff --git a/src/i18n/messages/de.json b/src/i18n/messages/de.json index 3db932fecb..9fd735d513 100644 --- a/src/i18n/messages/de.json +++ b/src/i18n/messages/de.json @@ -13418,6 +13418,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "neu", "setupGuide": "Einrichtungsanleitung", "disabledByFeed": "Durch den Radar-Feed deaktiviert", diff --git a/src/i18n/messages/en.json b/src/i18n/messages/en.json index c5bc555860..ab6a8347bb 100644 --- a/src/i18n/messages/en.json +++ b/src/i18n/messages/en.json @@ -13436,6 +13436,9 @@ "colLimits": "Limits", "trainsOnPrompts": "Trains on prompts", "trainsOnPromptsHelp": "This provider discloses that it may use your prompts to train models", + "limitsUnknownHelp": "Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "Context window unknown for this entry", + "capabilityUnknownHelp": "Capability not reported by the feed", "colContext": "Context", "colCapabilities": "Capabilities", "colTos": "ToS Risk", diff --git a/src/i18n/messages/es.json b/src/i18n/messages/es.json index 83d8fe16ff..916769ea85 100644 --- a/src/i18n/messages/es.json +++ b/src/i18n/messages/es.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "nuevo", "setupGuide": "Guía de configuración", "disabledByFeed": "Desactivado por el feed de Radar", diff --git a/src/i18n/messages/fa.json b/src/i18n/messages/fa.json index 7144c1af46..93897b3025 100644 --- a/src/i18n/messages/fa.json +++ b/src/i18n/messages/fa.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "جدید", "setupGuide": "راهنمای راه‌اندازی", "disabledByFeed": "غیرفعال شده توسط فید رادار", diff --git a/src/i18n/messages/fi.json b/src/i18n/messages/fi.json index bab3e9eb3c..16f74b5129 100644 --- a/src/i18n/messages/fi.json +++ b/src/i18n/messages/fi.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "uusi", "setupGuide": "Asennusopas", "disabledByFeed": "Poissa käytöstä Radar-syötteen vuoksi", diff --git a/src/i18n/messages/fr.json b/src/i18n/messages/fr.json index b05b9aec04..ac177d9460 100644 --- a/src/i18n/messages/fr.json +++ b/src/i18n/messages/fr.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "nouveau", "setupGuide": "Guide de configuration", "disabledByFeed": "Désactivé par le flux Radar", diff --git a/src/i18n/messages/gu.json b/src/i18n/messages/gu.json index 5c3a54235c..6ae331a26b 100644 --- a/src/i18n/messages/gu.json +++ b/src/i18n/messages/gu.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "નવું", "setupGuide": "સેટઅપ માર્ગદર્શિકા", "disabledByFeed": "રેડાર ફીડ દ્વારા અક્ષિપ્ત", diff --git a/src/i18n/messages/he.json b/src/i18n/messages/he.json index 215e00e9eb..c43184a1df 100644 --- a/src/i18n/messages/he.json +++ b/src/i18n/messages/he.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "חדש", "setupGuide": "מדריך התקנה", "disabledByFeed": "מושבת על ידי פיד רדאר", diff --git a/src/i18n/messages/hi.json b/src/i18n/messages/hi.json index e6657b3dff..df7c596dbc 100644 --- a/src/i18n/messages/hi.json +++ b/src/i18n/messages/hi.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "नया", "setupGuide": "सेटअप गाइड", "disabledByFeed": "रडार फीड द्वारा अक्षम", diff --git a/src/i18n/messages/hu.json b/src/i18n/messages/hu.json index 960e2f7700..d199204fd1 100644 --- a/src/i18n/messages/hu.json +++ b/src/i18n/messages/hu.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "új", "setupGuide": "Beállítási útmutató", "disabledByFeed": "A Radar feed letiltotta", diff --git a/src/i18n/messages/id.json b/src/i18n/messages/id.json index caf5759880..4c7c940b4b 100644 --- a/src/i18n/messages/id.json +++ b/src/i18n/messages/id.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "baru", "setupGuide": "Panduan pengaturan", "disabledByFeed": "Dinonaktifkan oleh umpan Radar", diff --git a/src/i18n/messages/it.json b/src/i18n/messages/it.json index 7b97a52598..c5cc75c684 100644 --- a/src/i18n/messages/it.json +++ b/src/i18n/messages/it.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "nuovo", "setupGuide": "Guida alla configurazione", "disabledByFeed": "Disabilitato dal feed Radar", diff --git a/src/i18n/messages/ja.json b/src/i18n/messages/ja.json index 74a71672e5..9a15eff936 100644 --- a/src/i18n/messages/ja.json +++ b/src/i18n/messages/ja.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "新しい", "setupGuide": "セットアップガイド", "disabledByFeed": "レーダーフィードによって無効化されています", diff --git a/src/i18n/messages/ko.json b/src/i18n/messages/ko.json index 346213f9e8..d4d36ccba5 100644 --- a/src/i18n/messages/ko.json +++ b/src/i18n/messages/ko.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "새로 만들기", "setupGuide": "설정 가이드", "disabledByFeed": "레이더 피드에 의해 비활성화됨", diff --git a/src/i18n/messages/mr.json b/src/i18n/messages/mr.json index 1fe9106e9e..26abe41a3f 100644 --- a/src/i18n/messages/mr.json +++ b/src/i18n/messages/mr.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "नवीन", "setupGuide": "सेटअप मार्गदर्शक", "disabledByFeed": "रडार फीडद्वारे अक्षम", diff --git a/src/i18n/messages/ms.json b/src/i18n/messages/ms.json index c09779012a..d09067ec3b 100644 --- a/src/i18n/messages/ms.json +++ b/src/i18n/messages/ms.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "baru", "setupGuide": "Panduan penyediaan", "disabledByFeed": "Dilumpuhkan oleh suapan Radar", diff --git a/src/i18n/messages/nl.json b/src/i18n/messages/nl.json index cdd4a36b97..897eac642b 100644 --- a/src/i18n/messages/nl.json +++ b/src/i18n/messages/nl.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "nieuw", "setupGuide": "Installatiehandleiding", "disabledByFeed": "Uitgeschakeld door Radar-feed", diff --git a/src/i18n/messages/no.json b/src/i18n/messages/no.json index d2b529e060..f6e6519c8a 100644 --- a/src/i18n/messages/no.json +++ b/src/i18n/messages/no.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "ny", "setupGuide": "Oppsettsveiledning", "disabledByFeed": "Deaktivert av Radar-strøm", diff --git a/src/i18n/messages/phi.json b/src/i18n/messages/phi.json index 9e40fe8c7f..3f8f2b49ae 100644 --- a/src/i18n/messages/phi.json +++ b/src/i18n/messages/phi.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "new", "setupGuide": "Setup guide", "disabledByFeed": "Disabled by Radar feed", diff --git a/src/i18n/messages/pl.json b/src/i18n/messages/pl.json index 290b8adfa0..e986a46958 100644 --- a/src/i18n/messages/pl.json +++ b/src/i18n/messages/pl.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "nowy", "setupGuide": "Przewodnik konfiguracyjny", "disabledByFeed": "Wyłączone przez feed Radar", diff --git a/src/i18n/messages/pt-BR.json b/src/i18n/messages/pt-BR.json index 64cc4794b1..5156955d9e 100644 --- a/src/i18n/messages/pt-BR.json +++ b/src/i18n/messages/pt-BR.json @@ -13437,6 +13437,9 @@ "colLimits": "Limites", "trainsOnPrompts": "Treina com prompts", "trainsOnPromptsHelp": "Este provedor declara que pode usar seus prompts para treinar modelos", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "colContext": "Contexto", "colCapabilities": "Capacidades", "colTos": "Risco ToS", diff --git a/src/i18n/messages/pt.json b/src/i18n/messages/pt.json index 72e4cf31ce..ded9223ecd 100644 --- a/src/i18n/messages/pt.json +++ b/src/i18n/messages/pt.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "novo", "setupGuide": "Guia de configuração", "disabledByFeed": "Desativado pelo feed do Radar", diff --git a/src/i18n/messages/ro.json b/src/i18n/messages/ro.json index 5e3b569e24..aefd886507 100644 --- a/src/i18n/messages/ro.json +++ b/src/i18n/messages/ro.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "nou", "setupGuide": "Ghid de configurare", "disabledByFeed": "Dezactivat de feed-ul Radar", diff --git a/src/i18n/messages/ru.json b/src/i18n/messages/ru.json index 7cb43fc941..39593d9562 100644 --- a/src/i18n/messages/ru.json +++ b/src/i18n/messages/ru.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "новый", "setupGuide": "Руководство по настройке", "disabledByFeed": "Отключено лентой Радар", diff --git a/src/i18n/messages/sk.json b/src/i18n/messages/sk.json index 1240018c9c..cf207dca50 100644 --- a/src/i18n/messages/sk.json +++ b/src/i18n/messages/sk.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "nové", "setupGuide": "Návod na nastavenie", "disabledByFeed": "Deaktivované príspevkom Radar", diff --git a/src/i18n/messages/sv.json b/src/i18n/messages/sv.json index 02dd476be2..b15de5fa3e 100644 --- a/src/i18n/messages/sv.json +++ b/src/i18n/messages/sv.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "ny", "setupGuide": "Installationsguide", "disabledByFeed": "Inaktiverad av Radar-flödet", diff --git a/src/i18n/messages/sw.json b/src/i18n/messages/sw.json index c5a847568c..1c81e25a00 100644 --- a/src/i18n/messages/sw.json +++ b/src/i18n/messages/sw.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "ny", "setupGuide": "Installationsguide", "disabledByFeed": "Inaktiverad av Radar-flödet", diff --git a/src/i18n/messages/ta.json b/src/i18n/messages/ta.json index 9f40426d80..7313728f83 100644 --- a/src/i18n/messages/ta.json +++ b/src/i18n/messages/ta.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "புதிய", "setupGuide": "அமைப்பு வழிகாட்டி", "disabledByFeed": "ரேடார் ஊட்டத்தால் முடக்கப்பட்டுள்ளது", diff --git a/src/i18n/messages/te.json b/src/i18n/messages/te.json index 8ca6722cad..9c8fefb5ac 100644 --- a/src/i18n/messages/te.json +++ b/src/i18n/messages/te.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "కొత్త", "setupGuide": "సెటప్ గైడ్", "disabledByFeed": "రాడార్ ఫీడ్ ద్వారా అచ్ఛుతమైంది", diff --git a/src/i18n/messages/th.json b/src/i18n/messages/th.json index d8ff261119..67cb1ca41c 100644 --- a/src/i18n/messages/th.json +++ b/src/i18n/messages/th.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "ใหม่", "setupGuide": "คู่มือการตั้งค่า", "disabledByFeed": "ถูกปิดใช้งานโดยฟีดเรดาร์", diff --git a/src/i18n/messages/tr.json b/src/i18n/messages/tr.json index 66564fdc30..b034c56c9f 100644 --- a/src/i18n/messages/tr.json +++ b/src/i18n/messages/tr.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "yeni", "setupGuide": "Kurulum kılavuzu", "disabledByFeed": "Radar akışı tarafından devre dışı bırakıldı", diff --git a/src/i18n/messages/uk-UA.json b/src/i18n/messages/uk-UA.json index 3e66046ed3..f006bcf52b 100644 --- a/src/i18n/messages/uk-UA.json +++ b/src/i18n/messages/uk-UA.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "новий", "setupGuide": "Посібник з налаштування", "disabledByFeed": "Вимкнено через фід Радар", diff --git a/src/i18n/messages/ur.json b/src/i18n/messages/ur.json index 577501c631..3ac0fe80c9 100644 --- a/src/i18n/messages/ur.json +++ b/src/i18n/messages/ur.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "نیا", "setupGuide": "سیٹ اپ گائیڈ", "disabledByFeed": "ریڈار فیڈ کی وجہ سے غیر فعال", diff --git a/src/i18n/messages/vi.json b/src/i18n/messages/vi.json index 841daf9ae2..b6d7e2f640 100644 --- a/src/i18n/messages/vi.json +++ b/src/i18n/messages/vi.json @@ -13423,6 +13423,9 @@ "colLimits": "Giới hạn", "trainsOnPrompts": "Huấn luyện bằng prompt", "trainsOnPromptsHelp": "Nhà cung cấp này công bố có thể dùng prompt của bạn để huấn luyện mô hình", + "limitsUnknownHelp": "Giới hạn chỉ do nguồn Radar báo cáo; mục này không có giới hạn được công bố", + "contextUnknownHelp": "Chưa rõ cửa sổ ngữ cảnh của mục này", + "capabilityUnknownHelp": "Nguồn dữ liệu không báo cáo khả năng này", "colContext": "Ngữ cảnh", "colCapabilities": "Khả năng", "colTos": "Rủi ro ToS", diff --git a/src/i18n/messages/zh-CN.json b/src/i18n/messages/zh-CN.json index 48359658c6..6454daa09b 100644 --- a/src/i18n/messages/zh-CN.json +++ b/src/i18n/messages/zh-CN.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "新", "setupGuide": "设置指南", "disabledByFeed": "被雷达数据源禁用", diff --git a/src/i18n/messages/zh-TW.json b/src/i18n/messages/zh-TW.json index 24a68fda11..7c335e49bf 100644 --- a/src/i18n/messages/zh-TW.json +++ b/src/i18n/messages/zh-TW.json @@ -13411,6 +13411,9 @@ "colLimits": "__MISSING__:Rate limits", "trainsOnPrompts": "__MISSING__:Trains on prompts", "trainsOnPromptsHelp": "__MISSING__:This provider's terms state it may train on the prompts you send. Models without this badge either state they do not, or do not document it — an absent statement is not a guarantee.", + "limitsUnknownHelp": "__MISSING__:Limits reported by Radar feed only; no published limits for this entry", + "contextUnknownHelp": "__MISSING__:Context window unknown for this entry", + "capabilityUnknownHelp": "__MISSING__:Capability not reported by the feed", "newBadge": "新的", "setupGuide": "設置指南", "disabledByFeed": "被雷達數據源禁用", diff --git a/tests/unit/dashboard/radar-catalog-table-limits-training.test.tsx b/tests/unit/dashboard/radar-catalog-table-limits-training.test.tsx index d1010484cc..aaa4b7a38c 100644 --- a/tests/unit/dashboard/radar-catalog-table-limits-training.test.tsx +++ b/tests/unit/dashboard/radar-catalog-table-limits-training.test.tsx @@ -136,6 +136,71 @@ describe("the prompt-training badge", () => { expect(cells).toContain("20/min · 200/day"); }); + it("explains an absent limits cell instead of leaving the dash mute", () => { + renderTable([entry({ limits: null })]); + const dash = [...container.querySelectorAll("span")].find( + (element) => + element.textContent === "—" && element.getAttribute("title") === "label:limitsUnknownHelp" + ); + expect(dash).not.toBeNull(); + }); + + it("explains an unknown context window instead of leaving the dash mute", () => { + renderTable([entry({ contextWindow: null })]); + const dash = [...container.querySelectorAll("span")].find( + (element) => + element.textContent === "—" && element.getAttribute("title") === "label:contextUnknownHelp" + ); + expect(dash).not.toBeNull(); + }); + + it("explains unreported capabilities on their badges (tools, vision, thinking)", () => { + renderTable([entry({ capabilities: { tools: null, vision: null, thinking: null } })]); + const badges = [...container.querySelectorAll("span")].filter( + (element) => + element.textContent?.includes("?") && + element.getAttribute("title") === "label:capabilityUnknownHelp" + ); + expect(badges.length).toBe(3); + }); + + it("leaves an explicit false capability badge alone (no tooltip)", () => { + renderTable([entry({ capabilities: { tools: false, vision: null, thinking: null } })]); + const cross = [...container.querySelectorAll("span")].find((element) => + element.textContent?.includes("✕") + ); + expect(cross).not.toBeNull(); + expect(cross?.getAttribute("title")).toBeNull(); + }); + + it("renders reported limits with no parasitic explanation", () => { + renderTable([ + entry({ limits: { rpm: 20, rpd: 200, tpm: null, tpd: null }, contextWindow: 128_000 }), + ]); + const cell = [...container.querySelectorAll("td")].find((c) => + c.textContent?.includes("20/min") + ); + expect(cell).not.toBeNull(); + expect(cell?.querySelector("span[title]")).toBeNull(); + }); + + it("renders a feed-reported zero context window as zero, not unknown", () => { + renderTable([entry({ contextWindow: 0 })]); + const contextCell = [...container.querySelectorAll("tbody tr td")].find((cell) => + cell.textContent?.includes("0K") + ); + expect(contextCell).not.toBeNull(); + expect(contextCell?.querySelector("span[title]")).toBeNull(); + }); + + it("falls back to EN when the locale value is a __MISSING__ sentinel", async () => { + const en = (await import("@/i18n/messages/en.json")).default as Record; + const radar = (en.radarPage ?? en) as Record; + expect(radar.limitsUnknownHelp).toMatch(/^Limits reported by Radar feed/); + expect(radar.contextUnknownHelp).toMatch(/^Context window unknown/); + expect(radar.capabilityUnknownHelp).toMatch(/^Capability not reported/); + }); + it("gives every row exactly as many cells as the header has columns", () => { // A column added to the header and not to the body shifts every cell after it. renderTable([entry({ limits: { rpm: 20, rpd: null, tpm: null, tpd: null } })]);