Repository navigation
fix(dashboard): repair two typecheck regressions failing the gate on base - #11200
pacocartones wants to merge 1 commit into
Conversation
…base `check:dashboard-typecheck` fails on a pristine, unmodified checkout of `release/v3.8.50`, so every open PR against that branch is red through no fault of its own. Two regressions, neither covered by the frozen baseline: - `combos/page.tsx` TS2554 (baseline 0, live 187): `getI18nOrFallback()` gained a required 4th `values` parameter, but only one of its 188 call sites passes it. Made the parameter optional, which is the shape the helper already assumes -- it forwards `values` straight to `t(key, values)` and `undefined` is exactly what a 3-argument call meant before. - `HarImportButton.tsx` TS2339 (baseline 0, live 1): `!result.ok` does not narrow the `M365HarImportResult` boolean-literal discriminated union under this repo's `strict: false` config, so `result.error` is unresolved. Switched to `result.ok === false`, which narrows correctly. No runtime behaviour change. The baseline is deliberately left untouched, per the gate's own instructions.
|
Superseded by 79c5bdf ( That commit fixes both regressions, and independently arrived at the same conclusions:
Verified against the gate on a clean checkout of the new base Leaving the analysis in the PR body up, since it documents the root cause and the pristine-base reproduction if this class of regression recurs. One note that may still be worth acting on: the |
|
Following up on the offer I made when closing this PR: I said I would report the rest of the base red I ran into. It turned out to be fixable, so it is coming as PRs instead of an issue. Two, both Windows-only, both reproduced on a clean checkout of
The two branches are independent and were each verified standalone on No action needed on this closed PR. Just closing the loop on what I said I would do. |
The gate is red on
release/v3.8.50itselfcheck:dashboard-typecheck(step #9Quality gates (all, non-fail-fast)of Fast Quality Gates) fails on a pristine, unmodified checkout of the base branch. Every open PR againstrelease/v3.8.50inherits the failure through no fault of its own.Reproduction on an untouched tree
Fresh clone at
2dd20331, zero local modifications:Diffed against the frozen baseline using the gate's own exported
parseTscOutput/diffAgainstBaseline:(CI reports 188 rather than 187 for TS2554;
9689dceremoved one call site after those runs started. Same defect.)Control group
Of the open PRs against
release/v3.8.50authored by different contributors, 10 of 10 fail this identical gate: #11194, #11189, #11188, #11187, #11182, #11179, #11178, #11177, #11175, #11166. None of them touchsrc/app/(dashboard)/.Cause 1 —
combos/page.tsx, 187 × TS25546cd4d38added a 4th parameter togetI18nOrFallback():The parameter is required, but only one of the 188 call sites was updated to pass it. All 187 errors are the same message, and every one lands on a
getI18nOrFallbackcall:Fix: make
valuesoptional. This is the shape the helper already assumes — it forwardsvaluesstraight intot(key, values), andundefinedis exactly what a 3-argument call meant before the change. No call site is rewritten and no behaviour changes.Cause 2 —
HarImportButton.tsx, 1 × TS2339M365HarImportResultis a boolean-literal discriminated union. Under this repo'sstrict: false,!result.okdoes not narrow such a union. Minimal repro with the same flags (--strict false --target ES2022):result.ok === falsenarrows correctly under the same flags (verified clean). Fix: use the explicit comparison. Semantically identical, no runtime change.Verification
Full diff is 2 source lines:
Gate result after the fix:
Nothing else moved. Only the two target files changed, and every baselined error is untouched:
Dashboard test suite, including the HAR-import tests, on this branch:
The frozen baseline is deliberately left untouched, per the gate's own instructions — these are genuine regressions, so widening it would defeat the gate.
Scope: this does not make the shards green
Being explicit so this is not oversold. The affected PRs fail 6 checks, and this PR only addresses the typecheck gate inside
Fast Quality Gates. At least one other independent base failure exists, which I did not fix here:Those live in
tests/unit/cli-combo-command.test.ts(AssertionError: 1 !== 0), are unrelated tosrc/app/(dashboard)/, and also reproduce off a clean base.No new ESLint warningsis likewise still failing. Happy to open a separate issue or PR for those if useful.