fix(dashboard): clear the two TS2345 dashboard-typecheck regressions on the release tip (#16000)
Some checks are pending
CI / Change Classification (push) Waiting to run
CI / Lint (push) Blocked by required conditions
CI / Quality Ratchet (push) Blocked by required conditions
CI / Quality Gates (Extended) (push) Blocked by required conditions
CI / Docs Sync (Strict) (push) Blocked by required conditions
CI / Docs Lint (prose — advisory) (push) Blocked by required conditions
CI / i18n Glossary (zh-CN, ko) (push) Blocked by required conditions
CI / i18n UI Coverage (push) Blocked by required conditions
CI / i18n Validation (all languages) (push) Blocked by required conditions
CI / PR Test Policy (push) Waiting to run
CI / Build (push) Blocked by required conditions
CI / Package Artifact (push) Blocked by required conditions
CI / Electron Package Smoke (ubuntu-latest) (push) Blocked by required conditions
CI / Electron Package Smoke (windows-latest) (push) Blocked by required conditions
CI / Unit Tests (1/8) (push) Blocked by required conditions
CI / Unit Tests (2/8) (push) Blocked by required conditions
CI / Unit Tests (3/8) (push) Blocked by required conditions
CI / Unit Tests (4/8) (push) Blocked by required conditions
CI / Unit Tests (5/8) (push) Blocked by required conditions
CI / Unit Tests (6/8) (push) Blocked by required conditions
CI / Unit Tests (7/8) (push) Blocked by required conditions
CI / Unit Tests (8/8) (push) Blocked by required conditions
CI / Bun SQLite Compatibility (push) Blocked by required conditions
CI / Bun SQLite Compatibility-1 (push) Blocked by required conditions
CI / Vitest (MCP / autoCombo / UI components) (push) Blocked by required conditions
CI / Coverage (push) Blocked by required conditions
CI / SonarQube (push) Blocked by required conditions
CI / PR Coverage Comment (push) Blocked by required conditions
CI / E2E Tests (1/9) (push) Blocked by required conditions
CI / E2E Tests (2/9) (push) Blocked by required conditions
CI / E2E Tests (3/9) (push) Blocked by required conditions
CI / E2E Tests (4/9) (push) Blocked by required conditions
CI / E2E Tests (5/9) (push) Blocked by required conditions
CI / E2E Tests (6/9) (push) Blocked by required conditions
CI / E2E Tests (7/9) (push) Blocked by required conditions
CI / E2E Tests (8/9) (push) Blocked by required conditions
CI / E2E Tests (9/9) (push) Blocked by required conditions
CI / Integration Tests (1/2) (push) Blocked by required conditions
CI / Integration Tests (2/2) (push) Blocked by required conditions
CI / Security Tests (push) Blocked by required conditions
CI / Ecosystem E2E (live server) (push) Blocked by required conditions
CI / Protocol Clients E2E (live server, advisory) (push) Blocked by required conditions
CI / Gate / CI (push) Blocked by required conditions
CI / CI Dashboard (push) Blocked by required conditions
Publish to Docker Hub / Resolve Docker release metadata (push) Waiting to run
Publish to Docker Hub / Preflight — amd64 runner availability (push) Blocked by required conditions
Publish to Docker Hub / Build Docker (linux/amd64) (push) Blocked by required conditions
Publish to Docker Hub / Build Docker (linux/arm64) (push) Blocked by required conditions
Publish to Docker Hub / Publish multi-arch manifests (push) Blocked by required conditions
Publish to Docker Hub / omni-build runner offline alert (push) Waiting to run
Lock released branch / lock-branch (push) Waiting to run
Lock released branch / guard-no-push-after-release (push) Waiting to run
Release-Green (continuous) / Validate active release branch (push) Waiting to run
Release-Green (continuous) / Validate main branch (push) Waiting to run
Release-Green (continuous) / Bank ratchet shrinks (push) Waiting to run
Release-Green (continuous) / Baseline headroom (push) Waiting to run
Quality Gates / Change Classification (push) Waiting to run
Quality Gates / Docs Gates (fast-path) (push) Blocked by required conditions
Quality Gates / Fast Quality Gates (push) Blocked by required conditions
Quality Gates / Vitest (fast-path) (push) Blocked by required conditions
Quality Gates / Unit Tests fast-path (1/4) (push) Blocked by required conditions
Quality Gates / Unit Tests fast-path (2/4) (push) Blocked by required conditions
Quality Gates / Unit Tests fast-path (3/4) (push) Blocked by required conditions
Quality Gates / Unit Tests fast-path (4/4) (push) Blocked by required conditions
Quality Gates / No new ESLint warnings (push) Blocked by required conditions
Quality Gates / Merge integrity (changelog + generated skills) (push) Waiting to run
Quality Gates / Gate / Quality (push) Blocked by required conditions
Release acceptance / Release acceptance (push) Waiting to run
OpenSSF Scorecard / Scorecard analysis (push) Waiting to run

Validated on the branch: check-dashboard-typecheck red → green, 32/32 focused tests, eslint clean.
This commit is contained in:
Diego Rodrigues de Sa e Souza 2026-10-08 19:29:53 -03:00 • committed by GitHub
parent 61e07fb7e0
commit 4ea24a2f8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 4 deletions

View file

@ -72,8 +72,16 @@ export type ClassifyModelImportInput = {
export type ModelImportOutcome = "no-models" | "nothing-new" | "import";
/** A model entry as discovery returns it; the id may be under any of these keys. */
export type DiscoveredModel = { id?: unknown; name?: unknown; model?: unknown };
/**
* A model entry as discovery returns it; the id may be under any of these keys. The rest of the
* entry (apiFormat, dimensions, inputTokenLimit, …) is forwarded to the import call as-is.
*/
export type DiscoveredModel = {
id?: unknown;
name?: unknown;
model?: unknown;
[field: string]: unknown;
};
export type ModelImportClassification = {
outcome: ModelImportOutcome;

View file

@ -234,7 +234,9 @@ export function useModelImportHandlers({
const failures: string[] = [];
for (let i = 0; i < newModels.length; i++) {
const model = newModels[i];
const modelId = model.id || model.name || model.model;
const rawId = model.id || model.name || model.model;
// Same coercion classifyModelImport uses for the "already imported" check.
const modelId = typeof rawId === "string" ? rawId : String(rawId ?? "");
if (!modelId) continue;
const parts = modelId.split("/");
const baseAlias = parts[parts.length - 1];

View file

@ -65,7 +65,10 @@ export function buildEngineDetailUpdate(
return {
compressToolResults: next.compressToolResults !== false,
...("maxToolLength" in next
? { maxToolLength: typeof cap === "number" && Number.isNaN(cap) ? null : Math.floor(cap) }
? {
maxToolLength:
typeof cap === "number" && Number.isNaN(cap) ? null : Math.floor(Number(cap)),
}
: {}),
};
}