Skip to content

fix(dashboard): surface combined-pipeline error in Compression Studio Run (#12061) - #13288

Merged
diegosouzapw merged 1 commit into
release/v3.8.51from
fix/12061-compression-studio-run
Sep 12, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.51from
fix/12061-compression-studio-run

Conversation

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Closes #12061

Root cause

Compression Studio's Play tab runs a combined-pipeline preview request in parallel with
per-lane preview requests. runPreviewBatch() (src/hooks/usePreviewCompression.ts)
wrapped the combined-pipeline POST /api/compression/preview call in
try { ... } catch { combined = null; }, discarding the caught error entirely. PlayView
only rendered the combined-result section when batch?.combined was truthy
(src/app/(dashboard)/dashboard/compression/studio/PlayView.tsx:102), so a failed combined
request rendered nothing — no error, no placeholder — indistinguishable from an idle state.
Per-lane failures did show a terse "⚠ error", but the primary combined section stayed
completely silent on failure, matching the reported "Run returns no result" behavior.

Fix

  • src/hooks/usePreviewCompression.ts: PreviewBatch gained a combinedError: string | null
    field; the combined-pipeline catch now captures the error message instead of dropping it.
  • src/app/(dashboard)/dashboard/compression/studio/PlayView.tsx: added a
    data-testid="play-combined-error" fallback section, rendered only after a run has
    completed (batch non-null) with no combined result and a captured error — never on the
    initial/idle state.
  • src/i18n/messages/en.json: added compressionStudio.combinedError ("Combined pipeline
    preview failed: {reason}"). Propagated to the other 49 locales via
    node scripts/i18n/sync-ui-keys.mjs (English source only; other locales carry the tracked
    __MISSING__: placeholder per the project's i18n convention — no hand-translation).

Scope: this only addresses the silent-failure defect on the combined-result section, per the
issue's own final scoping comment. The separately reported "input gets cleared" symptom does
not reproduce in code (the text state lives in the parent page.tsx and nothing in
PlayView.tsx/PlaygroundInput touches it) and is out of scope here.

Regression test

tests/unit/ui/playViewCombinedError.test.tsx — mocks per-lane preview calls as succeeding
while the combined-pipeline call returns a 500, renders PlayView, clicks Run, and asserts a
visible error is shown for the combined section instead of nothing.

RED (before fix):

AssertionError: expected false to be true
 ❯ tests/unit/ui/playViewCombinedError.test.tsx:102:53

GREEN (after fix):

 Test Files  1 passed (1)
      Tests  1 passed (1)

Gates run

  • node scripts/check/check-file-size.mjs — no violations on touched files
  • node scripts/check/check-complexity.mjs — OK (2798 violations, baseline 3218)
  • node scripts/check/check-cognitive-complexity.mjs — OK (1265 violations, baseline 1437)
  • npm run typecheck:core — clean
  • npm run check:dashboard-typecheck — OK, 206 pre-existing errors, all within frozen baseline (no new regressions)
  • npx eslint --suppressions-location config/quality/eslint-suppressions.json <changed files> — clean
  • npx vitest run --config vitest.config.ts tests/unit/ui/playViewCombinedError.test.tsx — 1 passed
  • Existing tests of the touched area — tests/unit/ui/usePreviewCompression.test.tsx,
    tests/unit/ui/fidelityGateToggle.test.tsx, tests/unit/ui/fuzzyDedupToggle.test.tsx — all
    still pass (3 files, 5 tests)
  • node scripts/i18n/check-ui-keys-coverage.mjs — PASS, all 50 locales ≥ 80% coverage
  • node scripts/check/check-changelog-integrity.mjs — OK

Note: tests/unit/ui/playView.test.tsx is pre-existing-excluded from the vitest UI config
under issue #8618 (unrelated to this change) and was left untouched.

⚠️ base-red inherited: #12732 — unit #12058, integration codex-cache, package-artifact, tarball-smoke, agent-skills-sync

… Run (#12061)

The combined-pipeline preview request's error was discarded (catch { combined = null; }), so a failed Run silently rendered nothing in the Play tab. Capture the error message on PreviewBatch.combinedError and render a visible error section when a run completes with no combined result.

Regression test: tests/unit/ui/playViewCombinedError.test.tsx (RED before the fix, GREEN after).
@diegosouzapw
diegosouzapw force-pushed the fix/12061-compression-studio-run branch from d4fde16 to 14823b8 Compare September 10, 2026 19:13
@diegosouzapw
diegosouzapw merged commit 2e872c5 into release/v3.8.51 Sep 12, 2026
15 of 21 checks passed
Githab-capibara added a commit to Githab-capibara/OmniRoute that referenced this pull request Sep 17, 2026
… Run (cheaper-inference#12061) (cheaper-inference#13288)

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 cheaper-inference#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 cheaper-inference#13278 and cheaper-inference#13276, annotated and landed on cheaper-inference#13243

⚠️ base-red inherited: cheaper-inference#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.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
… Run (cheaper-inference#12061) (cheaper-inference#13288)

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 cheaper-inference#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 cheaper-inference#13278 and cheaper-inference#13276, annotated and landed on cheaper-inference#13243

⚠️ base-red inherited: cheaper-inference#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.
@diegosouzapw
diegosouzapw deleted the fix/12061-compression-studio-run branch October 18, 2026 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: Compression Studio "Run" returns no result when the preview request fails

1 participant