docs(theme): record deterministic state evidence
This commit is contained in:
@@ -319,3 +319,13 @@
|
||||
- **Consequences:** login presentation becomes simpler without changing backend identity ownership. Provider account management remains available only in its existing authenticated surfaces. Real-provider and production verification are still required.
|
||||
- **User approval required:** No; this is the smallest implementation of the explicit UX-001 requirement and preserves the prior security contracts.
|
||||
- **Reversible:** Yes. Reverting UX-001 restores the tabbed presentation; no provider link, session, schema or configuration data changes.
|
||||
|
||||
## DEC-033 — Theme preference is application-owned; MUI only renders resolved mode
|
||||
|
||||
- **Date:** 2026-08-09
|
||||
- **Decision:** Keep the existing `themeMode:<user>` storage keys as the only preference store, resolve user → anonymous → System explicitly, and feed the resulting Light/Dark mode into MUI without MUI storage or provider/router remounts. Use a dedicated auth-user event and read-only cross-tab storage subscription; apply the same resolution in a pre-paint Next script.
|
||||
- **Reason/evidence:** the trace proved the general auth event fired before the new user key was stored and no later theme event occurred. Refresh therefore changed namespace and appeared random. Provider keys/router dependencies also discarded state, while MUI's default storage could become a second source of truth.
|
||||
- **Alternatives considered:** keep provider keys; emit another general auth event; store one global preference; let MUI own `mui-mode`; add a server profile migration. These retain remounts/request loops, lose user isolation, create competing precedence or add unnecessary backend scope.
|
||||
- **Consequences:** users without a saved scoped choice inherit the explicit anonymous choice, otherwise the documented default is System. Explicit Light/Dark ignore OS changes. The pre-paint script must remain behaviorally aligned with `themePrefs`; tests cover both.
|
||||
- **User approval required:** No; this directly implements the approved UX-002 contract without schema, dependency or production changes.
|
||||
- **Reversible:** Yes. Revert `11734ee`; existing preference values remain unchanged and readable.
|
||||
|
||||
Reference in New Issue
Block a user