You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6713291
Browse filesBrowse the repository at this point in the historyBrowse files
fix: preserve legacy sidebar v2 opt-in and gate on hydration
Review caught two real regressions in the per-channel default.
Legacy opt-in was silently discarded: users who had turned sidebar v2 on
before `sidebarV2ConfiguredByUser` existed have `sidebarV2Enabled: true`
with no companion flag, so they fell back to the channel default and lost
the beta on production. `true` was never the schema default, so it can only
come from the toggle — treat it as an explicit choice, matching how
`normalizeDesktopSettingsDocument` reads a legacy stored `updateChannel`.
Both platforms also resolved against pre-load state, mounting one sidebar
and swapping it a tick later. Web now gates on client-settings hydration
and mobile on the preferences atom having loaded; both hold v1 until then.
The web flash predates this PR — the pre-hydration snapshot was always
`false`, so opted-in users already saw a v1→v2 flip.
Resolution moves into `resolveSidebarV2Enabled` alongside the mobile
counterpart, so both are covered by pure tests. Also adds patch-decoder
coverage for the field the beta toggle actually writes.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
0 commit comments