Skip to content

fix: sync reasoning effort and service tier settings in web mode#115

Open
FridayLiu wants to merge 2 commits intomainfrom
fix/sync-reasoning-effort-web
Open

fix: sync reasoning effort and service tier settings in web mode#115
FridayLiu wants to merge 2 commits intomainfrom
fix/sync-reasoning-effort-web

Conversation

@FridayLiu
Copy link
Copy Markdown
Collaborator

Summary

  • allow web clients to sync engine reasoning effort and service tier settings via shared settings
  • add shared settings route coverage for these keys, including invalid input cases
  • add renderer settings tests to verify nested shared settings PATCH back to the host

Testing

  • npm run typecheck
  • npm run lint
  • bun run test:unit
  • npm run build

FridayLiu and others added 2 commits April 16, 2026 14:45
… 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>
Copilot AI review requested due to automatic review settings April 16, 2026 16:35
@github-actions
Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 56.54% (🎯 50%) 7348 / 12996
🔵 Statements 55.68% (🎯 50%) 7795 / 13999
🔵 Functions 57.69% (🎯 50%) 1290 / 2236
🔵 Branches 51.85% (🎯 50%) 4453 / 8588
File CoverageNo changed files found.
Generated in workflow #357 for commit fe0bc8d by the Vitest Coverage Report Action

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 engineReasoningEfforts and engineServiceTiers to 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.

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.

2 participants