ENG-1478: Port left sidebar to dual-readers + reactivity#844
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
📝 WalkthroughWalkthroughThis PR implements dual-read and dual-write support for left sidebar configuration. It adds a buildConfig helper to merge accessor-based values with legacy UID-backed settings, modifies useConfig to rebuild state from this merged config, wires dual-write support for folding state across global and per-section levels, and integrates feature flag handling into the extension lifecycle with proper cleanup. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
c97dff8 to
00eb897
Compare
…er-based reactivity - Extract mergeGlobalSectionWithAccessor/mergePersonalSectionsWithAccessor to getLeftSidebarSettings.ts (used by LeftSidebarView, GlobalSettings, PersonalSettings) - Settings panels now actually use accessor values (not fire-and-forget) - Replace setLeftSidebarFlagHandler with settingsEmitter pub/sub - useConfig subscribes to emitter instead of old subscribe() - Wire up global/personal/flag handlers in pullWatchers to emit - Remove dead newValue===oldValue guard (hasPropChanged already checks) - Remove dead ?./?? in personal merge (Zod defaults guarantee values)
toggleFoldedState mutates folded.uid in-place then dual-writes to block props, triggering pull watch → emitter → buildConfig(). Without refreshConfigTree(), buildConfig() reads stale UIDs from the cached tree, overwriting the in-place mutation and orphaning Roam blocks.
21b6000 to
3b4c80a
Compare
4411ee5 to
686fd05
Compare
…on personal panels
https://www.loom.com/share/6258dfb98cd0424a9c1b3ef7794955c3
Summary by CodeRabbit
Release Notes
New Features
Improvements