From bc3dd56e00d7275392a26a213967f5492ff1a304 Mon Sep 17 00:00:00 2001 From: livdebus Date: Wed, 11 Nov 2026 18:39:18 +0100 Subject: [PATCH] Hide LLM Gateway / Connectors / Usage tabs in user settings Client manages these centrally, so end users should not see them. Filter the settings tab list in app/app/settings/layout.tsx (patchFile, string- anchored + idempotent). The routes still exist but are no longer linked. Verified the anchors against the v5.0.3 source. --- .env.example | 2 +- branding/apply-branding.mjs | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 69aa5e0..b71e132 100644 --- a/.env.example +++ b/.env.example @@ -9,7 +9,7 @@ ## Version of Onyx to deploy, default is latest (main built nightly). ## Craft uses this same tag for the sandbox image; do not set a separate ## sandbox image for normal deployments. -IMAGE_TAG=4.8.2 +IMAGE_TAG=5.0.3 ## Onyx Craft Configuration (off by default). ## When enabling Craft through install.sh --include-craft or by manually adding diff --git a/branding/apply-branding.mjs b/branding/apply-branding.mjs index 38d71c3..70a777f 100644 --- a/branding/apply-branding.mjs +++ b/branding/apply-branding.mjs @@ -404,6 +404,33 @@ await patchFile("views/SettingsPage.tsx", [ }, ]); +// (a4) Whitelabel: hide the LLM Gateway, Connectors and Usage tabs in the user +// settings. The client manages these centrally, so end users should not see them. +// Filters the tab list; the routes still exist but are no longer linked. +await patchFile("app/app/settings/layout.tsx", [ + { + desc: "rename the settings tab list so it can be filtered", + done: "const allTabs: SettingsTab[] = [", + find: ` const tabs: SettingsTab[] = [`, + replace: ` const allTabs: SettingsTab[] = [`, + }, + { + desc: "hide the LLM Gateway, Connectors and Usage settings tabs", + done: "AIDO: hide the LLM Gateway, Connectors and Usage", + find: ` const activeTab = tabs.find((tab) => tab.href === pathname);`, + replace: ` // AIDO: hide the LLM Gateway, Connectors and Usage settings tabs. + const tabs = allTabs.filter( + (tab) => + ![ + "/app/settings/llm-gateway", + "/app/settings/connectors", + "/app/settings/usage", + ].includes(tab.href) + ); + const activeTab = tabs.find((tab) => tab.href === pathname);`, + }, +]); + // (b) Notifications: their text is generated by the backend (official image we do // NOT rebuild), so rebrand/suppress it at render time. Generate a tiny runtime // helper from config, then route the notifications list through it.