From 8006cc5db398878ed50d7f82e1a156ea9808e468 Mon Sep 17 00:00:00 2001 From: Ark0N Date: Tue, 28 Apr 2026 03:29:48 +0200 Subject: [PATCH] fix: allowlist opusContext1mEnabled in SettingsUpdateSchema (#78) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same root cause as the thinkingEffort fix in #73: the schema is .strict(), so unknown keys in PUT /api/settings are rejected with INVALID_INPUT and the toggle never persists. Verified live: pre-fix returned {"errorCode":"INVALID_INPUT"}, post-fix accepts. The frontend has been reading and writing this key for a while (settings-ui.js:336, :1137; session-ui.js:331), so saves were silently failing — users never noticed because the load path falls back to false on missing keys. Co-authored-by: Claude Opus 4.7 (1M context) --- src/web/schemas.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/web/schemas.ts b/src/web/schemas.ts index ab851f25..71474319 100644 --- a/src/web/schemas.ts +++ b/src/web/schemas.ts @@ -268,6 +268,7 @@ export const SettingsUpdateSchema = z tunnelEnabled: z.boolean().optional(), tabTwoRows: z.boolean().optional(), agentTeamsEnabled: z.boolean().optional(), + opusContext1mEnabled: z.boolean().optional(), thinkingEffort: z.string().max(20).optional(), // UI visibility showFontControls: z.boolean().optional(),