fix(dashboard): honor active compression profile in effective-pipeline preview (#12063) (#13287)

Merged as part of the 39-PR owner batch of 2026-09-11, validated as a unit.

Boarded into one consolidated worktree cut from `release/v3.8.51` with the other 38 — zero conflicts between them.

- ESLint over every changed file: no errors (the only finding was one suppression entry the batch emptied, pruned on #13243)
- `typecheck:core` clean; `check:dashboard-typecheck` OK (206 pre-existing, within baseline); `check:changelog-integrity` OK
- complexity 2821 / baseline 3218 and cognitive-complexity 1272 / baseline 1437 — both under baseline
- 256 assertions green: 246 under node:test and 10 under vitest, which is where `tests/unit/**/*.test.tsx` actually runs
- `check-file-size`: `chatCore.ts` rebaselined 6144 → 6146 for #13278 and #13276, annotated and landed on #13243

⚠️ base-red inherited: #12732 — the provider count (356 in the docs vs the 358 the modules define) and `open-sse/utils/stream.ts` at 3115 > frozen 3098 both reproduce on the pure tip with zero contribution from this batch.
This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-09-11 22:05:40 -03:00
committed by GitHub
parent 2e872c50aa
commit 39abab6681
57 changed files with 341 additions and 52 deletions

View File

@@ -0,0 +1,38 @@
#!/usr/bin/env node
// One-off, scoped i18n key insertion for issue #12063 — adds exactly the two new
// contextCombos keys (activeProfileMasterSwitchOffWarning / ...Cta) as __MISSING__
// placeholders to every non-English locale, WITHOUT touching any other pre-existing
// missing-key drift (running the full `i18n:sync-ui` would also backfill unrelated
// drift across ~1000 keys, well outside this issue's scope).
import { readFileSync, writeFileSync, readdirSync } from "node:fs";
import { join } from "node:path";
const MESSAGES_DIR = join(process.cwd(), "src/i18n/messages");
const EN = JSON.parse(readFileSync(join(MESSAGES_DIR, "en.json"), "utf8"));
const NEW_KEYS = ["activeProfileMasterSwitchOffWarning", "activeProfileMasterSwitchOffCta"];
const NAMESPACE = "contextCombos";
const enValues = Object.fromEntries(NEW_KEYS.map((k) => [k, EN[NAMESPACE][k]]));
const files = readdirSync(MESSAGES_DIR).filter((f) => f.endsWith(".json") && f !== "en.json");
let changed = 0;
for (const file of files) {
const path = join(MESSAGES_DIR, file);
const data = JSON.parse(readFileSync(path, "utf8"));
if (!data[NAMESPACE]) continue;
let touched = false;
for (const key of NEW_KEYS) {
if (!(key in data[NAMESPACE])) {
data[NAMESPACE][key] = `__MISSING__:${enValues[key]}`;
touched = true;
}
}
if (touched) {
writeFileSync(path, JSON.stringify(data, null, 2) + "\n", "utf8");
changed++;
}
}
console.log(`[add-12063-i18n-keys] updated ${changed} locale file(s)`);