Skip to content

feat(app): unified customization system — local prefs + cloud overrides#1773

Open
benjaminshafii wants to merge 2 commits into
devfrom
feat/unified-customization
Open

feat(app): unified customization system — local prefs + cloud overrides#1773
benjaminshafii wants to merge 2 commits into
devfrom
feat/unified-customization

Conversation

@benjaminshafii
Copy link
Copy Markdown
Member

Summary

Unifies the two separate customization systems (localStorage ShellConfig + Den DesktopConfig) into a single EffectiveConfigProvider where cloud always takes precedence.

Architecture

User local prefs (localStorage)  ──┐
                                    ├── EffectiveConfigProvider ──▶ useEffectiveConfig()
Cloud org config (Den API)       ──┘
  • Category A (UI visibility): user-togglable locally, overridable by cloud. When cloud sets a value, toggle is locked with "Managed by your organization" badge.
  • Category B (org policies): cloud-only, shown as read-only indicators.

Changes

New files:

  • apps/app/src/react-app/shell/effective-config.tsxEffectiveConfigProvider + useEffectiveConfig hook
  • apps/app/src/app/defaults/ — model defaults (from previous PR, included in branch)

Shared types (packages/types):

  • Added Category A cloud override keys to desktopAppRestrictionsSchema: showStatusBar, showDocsButton, showFeedbackButton, showCloudSignin, showStarterCards, showModelPicker, showAddWorkspace
  • Added future Category B keys: blockSettingsAccess, restrictExtensions
  • Updated normalizeDesktopAppRestrictions to pass through all explicitly-set keys

Removed dead config:

  • appName — whitelabeling, removed
  • sidebar toggle — sidebar is always on, collapsible via standard UI
  • browser toggle — browser panel is hidden by default, shown on click

Migrated consumers:

  • session-page.tsxuseEffectiveConfig() for statusBar
  • status-bar.tsxuseEffectiveConfig() for cloudSignin, docsButton, feedbackButton
  • session-surface.tsxuseEffectiveConfig() for starterCards
  • composer.tsxuseEffectiveConfig() for modelPicker (now actually gated!)

Rewritten customization page (shell-view.tsx):

  • Section 1: "Layout" — 7 toggles, each lockable by cloud override
  • Section 2: "Organization policies" — read-only indicators for disallowNonCloudModels, blockZenModel, blockMultipleWorkspaces + link to Den dashboard
  • Removed SVG wireframe preview, branding section, sidebar/browser toggles

Server-side (Omar)

No API changes required. The GET /v1/me/desktop-config endpoint already returns the raw desktop_app_restrictions JSON column. When Omar adds the new keys to the DB (via the new desktop_app_policies table or existing org column), they flow through automatically.

…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.
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-app Ready Ready Preview, Comment May 13, 2026 0:12am
openwork-den Ready Ready Preview, Comment May 13, 2026 0:12am
openwork-den-worker-proxy Ready Ready Preview, Comment May 13, 2026 0:12am
openwork-landing Ready Ready Preview, Comment, Open in v0 May 13, 2026 0:12am
openwork-share Ready Ready Preview, Comment May 13, 2026 0:12am

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.

1 participant