Repository navigation
fix(compression): one Auto-Clarity control on the caveman page, no stale saves - #15571
Merged
diegosouzapw merged 13 commits intoOct 6, 2026
Conversation
… page The caveman page's Advanced view embeds CompressionSettingsTab, which renders its own Auto-Clarity switch beside the page's Output Mode checkbox. Each control loads its own copy of cavemanOutputMode, so a change made in one leaves the other showing the old value until reload. The test renders the page with compression on and an output mode stored, opens Advanced, and expects one Auto-Clarity control. It fails on the current code with two.
CompressionSettingsTab renders only inside the caveman page, and the page's Output Mode card already carries the Auto-Clarity checkbox in both the Simple and Advanced views. Drop the tab's caveman output-mode section (its heading, description, and switch) so the page checkbox is the only Auto-Clarity control. The partial-save test case that clicked the tab's switch goes with it, along with the helper only that case used. The aggressive case still covers filling a nested save from the stored row.
…iRoute into fix/caveman-page-single-auto-clarity
…ping
Nothing in CompressionSettingsTab reads cavemanOutputMode.autoClarity since its
Auto-Clarity switch was removed. Drop the CavemanOutputModeConfig interface, its
override on CompressionConfig, and the autoClarity default, so cavemanOutputMode
takes the { enabled; intensity } type the token saver card reads.
…s controls The caveman page sends the whole output-mode and language objects it loaded, so a change saved in another tab after the page loaded is written back. Add cases that save in another tab and then use the page's Auto-Clarity checkbox, its auto-detect toggle, and a pack toggle, plus a case where the re-read fails. Fold the single Auto-Clarity control check into the existing caveman-page case, with a load anchor and a match on "clarity", and remove the standalone file it duplicated.
Each save on the caveman page now re-reads the stored settings row and merges its change into it, the way the settings tab builds a nested save. An output-mode or language change saved elsewhere since the page loaded stays, and a failed re-read sends nothing.
The settings tab's caveman output-mode section was the only user of settings.compressionSettingsCavemanOutputMode and settings.compressionSettingsAutoClarityBypass. Remove both keys from every UI catalog, so each locale still carries exactly the en.json key set.
…iRoute into fix/caveman-page-single-auto-clarity
…ish pack Since cheaper-inference#15206 the store merges a partial cavemanOutputMode into its row, so the fake server does the same, and the Auto-Clarity case now requires the page to send only { autoClarity }. Add a case that turns a pack off and keeps English, and make the failed-read case a language save that starts from a failed first read.
…nglish
The Auto-Clarity checkbox now sends { cavemanOutputMode: { autoClarity } } and
lets the store merge it into the stored row inside its write transaction, so a
panel change made between a re-read and the write is not overwritten. Language
saves still re-read the row first, because the store replaces languageConfig
whole. Turning a pack off no longer removes English, which the page cannot
turn back on.
The failed-read case starts from a failed first read, so the page never holds a loaded copy and a save that fell back to that copy would still send nothing. Add the case where the page loaded a row, the re-read then fails, and a language save must send nothing.
The after-load case failed the re-read with an error status only, so the page's catch handler ran in no case and a fallback written there would pass. Let the fake server fail a read with a network error too, and run the after-load case for both kinds of failure.
Describe the single Auto-Clarity control on the caveman page, its saves that keep changes saved elsewhere, English kept when a pack is turned off, and the two removed translation keys.
Contributor
Author
|
CI triage: all reds here are infra except one pre-existing flake. No code change needed. On head a635c77, and identically on the previous head e73fc11 (the delta between them is a changelog fragment):
Verified green locally at head: check:changelog-integrity and check:agent-skills-sync (the fragment push fixed the Merge integrity failure the previous head had), and the API route typecheck (276 diagnostics, all inside the frozen baseline). Ask: admin re-run of runs 37372281456, 37372281302, 37372281384, and 37372281292. A full re-run is the safer option since several jobs sit in cancelled state rather than failed. |
diegosouzapw
merged commit Oct 6, 2026
11f8c29
into
cheaper-inference:release/v3.8.52
33 of 42 checks passed
fouadSalkini
added a commit
to fouadSalkini/OmniRoute
that referenced
this pull request
Oct 20, 2026
Resolves the locale catalog conflicts with a three-way JSON merge: each catalog keeps the release branch's content plus this PR's own keys, and drops keys the release branch deleted on purpose (cheaper-inference#15571, cheaper-inference#15605, cheaper-inference#15386).
fouadSalkini
added a commit
to fouadSalkini/OmniRoute
that referenced
this pull request
Oct 20, 2026
Resolves the locale catalog conflicts with a three-way JSON merge: each catalog keeps the release branch's content plus this PR's own keys, and drops keys the release branch deleted on purpose (cheaper-inference#15571, cheaper-inference#15605, cheaper-inference#15386).
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.
Summary
CavemanContextPageClient.tsx) showed two Auto-Clarity controls in its Advanced view: its own checkbox, and a switch in the embedded compression settings tab (CompressionSettingsTab.tsx). Each kept its own copy ofcavemanOutputMode, so after one changed the setting the other showed the old value until a reload. This PR deletes the tab's caveman output-mode section (heading, description, switch) and its now-unused typing, so the page checkbox is the only Auto-Clarity control. The tab renders only on that page, and the checkbox shows in both the Simple and the Advanced view.{ cavemanOutputMode: { autoClarity } }, which the store merges into its row inside the write transaction since fix(db): merge partial cavemanOutputMode writes with the stored row #15206. The language controls and pack toggles re-read the stored row and buildlanguageConfigfrom it, because the store replaces that object whole; when the re-read fails they send nothing.enabledPacks. Before,"en"vanished whenever another pack was turned off, the page's English checkbox is always disabled so it could not bring English back, and with auto-detect off the caveman engine checks for"en"(open-sse/services/compression/caveman.ts:400).settings.compressionSettingsCavemanOutputModeandsettings.compressionSettingsAutoClarityBypass, used only by the deleted section, are removed from all 67 UI catalogs (2 lines each, nothing else).Related Issues
cavemanOutputModewrite would be stored as is and reads would resetenabledandintensityto defaults, so do not cherry-pick this PR to a branch that lacks fix(db): merge partial cavemanOutputMode writes with the stored row #15206.Validation
npm run lint(ESLint withconfig/quality/eslint-suppressions.json, and Prettier, on the changed files)tests/unit/ui/compression-settings-tab-partial-save.test.tsxnpm run test:vitest:uiwindow is not definederrors fromproviderCardAudioBadge.test.tsx, a file this PR does not touch; the base tip's own run reports 2 fromflowCanvas.test.tsxthe same waycheck-key-completeness,check-ui-keys-coverage --threshold=65,check-translation-ratio,check-ui-value-drift,check-new-key-coveragepass{"cavemanOutputMode":{"autoClarity":false}}and a panel change to on/off and level made after the page loaded survives it; a language change from another tab survives an auto-detect click; turning Spanish off keeps English; a tab Cache TTL save leaves Auto-Clarity aloneTests Added Or Updated
tests/unit/ui/compression-settings-tab-partial-save.test.tsx: the caveman-page case now checks for one Auto-Clarity control after the embedded tab loads; new cases cover the output-mode save sending onlyautoClarity, language and pack saves keeping fields saved in another tab, English kept when a pack is turned off, and no language save when the page cannot read the settings row, both before its first load and after it, for a read that returns an error status and one that throws. The fake server merges a partialcavemanOutputModethe way the store does.Coverage Notes
Reviewer Notes
audit:depson a critical advisory innext16.2.0 to 16.3.5, Docs Sync (Strict) fails on translation drift indocs/architecture/QUALITY_GATES.md, and the UI Vitest job fails on 2 unhandled errors while all tests pass.languageConfigwhole, so alanguageConfigwrite that lands in the milliseconds between the page's re-read and its PUT is lost. Closing that needs a store-side merge plus an add or remove operation for the pack list.