fix: sync reasoning effort and service tier settings in web mode#115
Open
fix: sync reasoning effort and service tier settings in web mode#115
Conversation
… mode engineReasoningEfforts and engineServiceTiers were not included in SHARED_SETTINGS_KEYS, so they were only stored in browser localStorage in web mode. On server restart or when using a new browser, these settings were lost and reset to defaults. Add both keys to SHARED_SETTINGS_KEYS with proper validation so they are persisted to the server's settings.json and restored on page load. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add unit coverage for shared settings GET/PATCH handling and web write-back for engine reasoning effort and service tier settings. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Coverage Report
File CoverageNo changed files found. |
There was a problem hiding this comment.
Pull request overview
This PR extends the host↔web-client “shared settings” synchronization to include per-engine reasoning effort and Codex service tier, ensuring both the /api/settings/shared route and renderer write-back behavior cover these settings.
Changes:
- Added
engineReasoningEffortsandengineServiceTiersto the shared settings allowlist and implemented value validation (including prototype-pollution key rejection). - Expanded route handler unit tests to cover GET filtering plus PATCH accept/reject cases for the new keys.
- Expanded renderer settings unit tests to verify bootstrap ingestion and nested-key PATCH write-back for the new settings.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/unit/src/lib/settings.test.ts | Adds bootstrap + write-back test coverage for engineReasoningEfforts / engineServiceTiers. |
| tests/unit/shared/auth-route-handlers.test.ts | Adds GET filtering expectations and PATCH validation coverage for the new shared keys. |
| shared/settings-keys.ts | Adds the new keys to SHARED_SETTINGS_KEYS and validates their PATCH payload shapes/values safely. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Testing