From f79ab2c3d15fed6d9d16b3f2ffa2a9a88f6d0f77 Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Fri, 15 May 2026 01:57:17 -0300 Subject: [PATCH] fix(settings): default debugMode to true on fresh installations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Debug sidebar section (Translator, Playground, Search Tools) was hidden on new installs because debugMode was not in the settings defaults object. This made data?.debugMode === true evaluate to false, while the toggle in System & Storage appeared active — an inconsistency. Changes: - Add debugMode: true to getSettings() defaults in settings.ts - Align SystemStorageTab useState initial value to true - Update CHANGELOG with fix entry --- CHANGELOG.md | 1 + .../dashboard/settings/components/SystemStorageTab.tsx | 2 +- src/lib/db/settings.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb16cdad7a..f8e16641e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ - **fix(providers/blackbox-web):** add `BLACKBOX_WEB_VALIDATED_TOKEN` env override and 403 token-error disambiguation. Blackbox `/api/chat` started rejecting requests whose `validated` field didn't match the frontend `tk` token, even with a valid cookie + active subscription. Operators with the real token can now set the env var; otherwise the previous random-UUID fallback still ships, and a 403 with a token-specific body now surfaces a one-line "set BLACKBOX_WEB_VALIDATED_TOKEN" hint instead of the generic "cookie expired" message. (#2252) - **fix(guardrails/vision-bridge):** add `VISION_BRIDGE_BASE_URL` + `VISION_BRIDGE_API_KEY` env overrides so non-Anthropic vision-bridge calls can be routed through OmniRoute's own `/v1` self-loop, Google's Gemini OpenAI-compat endpoint, OpenRouter, or any other OpenAI-compatible URL — instead of being hardcoded to `https://api.openai.com/v1` (which failed with 401 for users without an OpenAI key, even when they configured `visionBridgeModel: "google/gemini-2.0-flash"`). Anthropic models keep their dedicated path. (#2232) - **docs(security):** document the ToS-violation hot spot of `ANTIGRAVITY_CREDITS=always` in `STEALTH_GUIDE.md`, including why it draws Google abuse detection more aggressively than free-tier-only usage and the recommended posture (`=retry`, Auto-Combo spread, per-connection RPM caps). (#2246) +- **fix(settings):** default `debugMode` to `true` on fresh installations — the Debug sidebar section (Translator, Playground, Search Tools) was hidden on new installs because `debugMode` was not in the settings defaults object, making `data?.debugMode === true` evaluate to `false`. The toggle in System & Storage appeared active but had no effect until manually set. Now all sidebar sections are visible out of the box. ### Changed diff --git a/src/app/(dashboard)/dashboard/settings/components/SystemStorageTab.tsx b/src/app/(dashboard)/dashboard/settings/components/SystemStorageTab.tsx index 3154ab2951..53271f5129 100644 --- a/src/app/(dashboard)/dashboard/settings/components/SystemStorageTab.tsx +++ b/src/app/(dashboard)/dashboard/settings/components/SystemStorageTab.tsx @@ -73,7 +73,7 @@ export default function SystemStorageTab() { const [dbSettingsLoading, setDbSettingsLoading] = useState(true); const [dbSettingsSaving, setDbSettingsSaving] = useState(false); const [dbStatsRefreshing, setDbStatsRefreshing] = useState(false); - const [debugMode, setDebugMode] = useState(false); + const [debugMode, setDebugMode] = useState(true); const [usageTokenBuffer, setUsageTokenBuffer] = useState(null); const [bufferInput, setBufferInput] = useState(""); const [bufferSaving, setBufferSaving] = useState(false); diff --git a/src/lib/db/settings.ts b/src/lib/db/settings.ts index 7ac957d04a..ddd7475408 100644 --- a/src/lib/db/settings.ts +++ b/src/lib/db/settings.ts @@ -102,6 +102,7 @@ export async function getSettings() { idempotencyWindowMs: 5000, wsAuth: false, maxBodySizeMb: requestBodyLimitMbFromEnv(process.env.MAX_BODY_SIZE_BYTES), + debugMode: true, }; for (const row of rows) { const record = toRecord(row);