feat(app): unified customization system — local prefs + cloud overrides#1773
Open
benjaminshafii wants to merge 2 commits into
Open
feat(app): unified customization system — local prefs + cloud overrides#1773benjaminshafii wants to merge 2 commits into
benjaminshafii wants to merge 2 commits into
Conversation
…es, remove dead config, rewrite settings page - New EffectiveConfigProvider merges ShellConfig (localStorage) with DesktopConfig (Den API) - Cloud always takes precedence when set; local is fallback - Removed dead config: appName, sidebar toggle, browser toggle - Migrated session-page, status-bar, session-surface, composer to useEffectiveConfig - Model picker gated on effectiveConfig.modelPicker - Expanded DesktopAppRestrictions schema with Category A cloud override keys - Customization page: Layout section (toggleable, cloud-lockable) + Org policies section (read-only) - Added future-ready keys: blockSettingsAccess, restrictExtensions, showStatusBar, showDocsButton, etc.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… overrides for all Category A keys
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
Unifies the two separate customization systems (localStorage ShellConfig + Den DesktopConfig) into a single
EffectiveConfigProviderwhere cloud always takes precedence.Architecture
Changes
New files:
apps/app/src/react-app/shell/effective-config.tsx—EffectiveConfigProvider+useEffectiveConfighookapps/app/src/app/defaults/— model defaults (from previous PR, included in branch)Shared types (
packages/types):desktopAppRestrictionsSchema:showStatusBar,showDocsButton,showFeedbackButton,showCloudSignin,showStarterCards,showModelPicker,showAddWorkspaceblockSettingsAccess,restrictExtensionsnormalizeDesktopAppRestrictionsto pass through all explicitly-set keysRemoved dead config:
appName— whitelabeling, removedsidebartoggle — sidebar is always on, collapsible via standard UIbrowsertoggle — browser panel is hidden by default, shown on clickMigrated consumers:
session-page.tsx→useEffectiveConfig()forstatusBarstatus-bar.tsx→useEffectiveConfig()forcloudSignin,docsButton,feedbackButtonsession-surface.tsx→useEffectiveConfig()forstarterCardscomposer.tsx→useEffectiveConfig()formodelPicker(now actually gated!)Rewritten customization page (
shell-view.tsx):disallowNonCloudModels,blockZenModel,blockMultipleWorkspaces+ link to Den dashboardServer-side (Omar)
No API changes required. The
GET /v1/me/desktop-configendpoint already returns the rawdesktop_app_restrictionsJSON column. When Omar adds the new keys to the DB (via the newdesktop_app_policiestable or existing org column), they flow through automatically.