Skip to content

Commit 686fd05

Browse files
committed
ENG-1478: refresh config tree before emitter-driven rebuild
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.
1 parent 5155a2c commit 686fd05

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

apps/roam/src/components/LeftSidebarView.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ export const useConfig = () => {
340340
const [config, setConfig] = useState(() => buildConfig());
341341
useEffect(() => {
342342
const handleUpdate = () => {
343+
refreshConfigTree();
343344
setConfig(buildConfig());
344345
};
345346
const unsubGlobal = onSettingChange("global:Left sidebar", handleUpdate);

0 commit comments

Comments
 (0)