FM-038 — Workspace Theme Defaults Ignored — Inherit Flag
useWorkspaceTheme: true objects still won via nullish precedence, ignoring updated org defaults.
| Field | Value |
|---|---|
| Severity | SEV-3 (theme drift, admin confusion) |
| Category | Frontend / Theming |
| Date | 2026-04-16 |
| Status | Archived |
Symptom
Section titled “Symptom”Admins save brand/theme role changes but active theme preview and downstream UI keep showing old colors. “Theme roles” values differ from “Active theme”.
Root cause
Section titled “Root cause”Theme resolution in use-workspace-theme.ts used userThemePref ?? orgThemeDefaults ?? null. When a user had an org-scoped theme object with useWorkspaceTheme: true (inherit mode), that object still won due to nullish precedence, so updated org defaults were ignored.
Added explicit resolver resolveWorkspaceThemeConfig():
- If personal workspace →
null - If
userThemePref.useWorkspaceTheme === false→ use user override - Else prefer
orgThemeDefaults, falling back touserThemePref
Prevention
Section titled “Prevention”- Any resolver handling “inherit default” flags must branch on the flag before fallback precedence
- Do not rely on
??chains when objects can exist in an “inherit” state