Repository navigation
fix(compression): surface failed settings loads on Hub, Combos and RTK - #15583
Merged
diegosouzapw merged 2 commits intoOct 6, 2026
Merged
diegosouzapw merged 2 commits into
diegosouzapw merged 2 commits into
Conversation
GET /api/settings/compression failures were swallowed on three dashboard surfaces: a non-OK reply became null and a thrown fetch hit an empty catch, so each rendered hard-coded defaults as if they were the stored settings — the Hub showed Default (from panel) and Context Editing off with both controls live, the combos manager suppressed the master-switch warning, hid the Active badge and disabled the override selects, and the RTK page showed the master-switch-OFF banner even when the stored flag was on. Each surface now keeps a loadFailed/loadAttempt pair and re-runs its load per attempt with an ignore flag in the effect cleanup, mirroring diegosouzapw#15346 in CompressionPanel.tsx and CompressionSettingsTab.tsx: a failed load shows Prompt Compression: Failed To Load with a Retry, and every control that depends on the loaded settings stays off screen until a GET succeeds.
diegosouzapw
merged commit Oct 6, 2026
a9dbbb0
into
diegosouzapw:release/v3.8.52
34 of 42 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three dashboard surfaces load
GET /api/settings/compressionand swallow a failure: a non-OK reply becomesnull, a thrown fetch lands in an empty catch, and each renders hard-coded defaults as if they were the stored settings. None shows an error:{ enabled: false, defaultMode: "off", contextEditing: { enabled: false } }, showed "Default (from panel)" and Context Editing off, and kept its active-profile select and context-editing toggle live. Each save sent only its own patch, so no default was written, but the user acted on a wrong view.activeComboId: nullandcompressionEnabled: false, which suppressed the master-switch warning, hid the Active badge and disabled the per-combo override selects.Fix
Mirrors #15346 in
CompressionPanel.tsxandCompressionSettingsTab.tsx. Each component keeps aloadFailedstate and aloadAttemptcounter in the load effect's dependencies, with anignoreflag in the cleanup so a retry drops answers from the run it replaced. A failed load renders "Prompt Compression: Failed To Load" (existing keyssettings.compressionTitle,common.failedToLoad,settings.retry) with a Retry button, and every control that depends on the loaded settings stays off screen until a GET succeeds.Tests (TDD per Hard Rule #18)
Failing-first vitest jsdom cases per component, one where the settings GET answers 500 and one where it throws. Each expects an error state with a Retry in place of the defaulted view:
tests/unit/ui/compressionHub.test.tsx: the default-profile select and Context Editing toggle stay off screen; Retry reloads the stored settings (the toggle reflects the stored row, the combo list fills).tests/unit/ui/namedCombos-active-badge.test.tsx: the defaulted manager is replaced; Retry restores the master-switch warning and the Active badge, and a routing-combos answer from the superseded load is ignored.tests/unit/ui/rtk-context-page-load-failure.test.tsx(new): the master-switch-OFF banner is replaced; Retry brings the controls back and keeps the banner hidden when the stored flag is on.Focused runs: 14/14 across the three files, 21/21 across the seven adjacent suites (
compressionHub-active-selector,compressionHub-context-editing,CompressionHub-patch-only,compression-combos-routing-mode-6760,combos-page-smoke,rtkLearnDiscoverCard,rtkTomlImportCard). ESLint clean on the six changed files;npm run typecheck:coreclean.Coordination with the two open branches
git merge-tree --write-tree HEAD <head>was checked against both before opening this PR:fix/compression-hub-overlapping-saves(edits CompressionHub's load path) andfix/exclusions-rtk-save-failures(edits RtkContextPageClient's RTK config load) both merge clean. Neither branch is modified here. If either lands first, this PR can rebase on it without conflict.