From b645caa0f361d8e9998e96b1e295133c778d8776 Mon Sep 17 00:00:00 2001 From: sid597 Date: Wed, 20 May 2026 21:57:07 +0530 Subject: [PATCH 1/4] ENG-949: Add query sections to left sidebar --- apps/roam/src/components/LeftSidebarView.tsx | 195 +++++++++++++++++- .../settings/LeftSidebarPersonalSettings.tsx | 180 +++++++++++++++- .../components/settings/utils/accessors.ts | 2 + .../settings/utils/zodSchema.example.ts | 10 + .../components/settings/utils/zodSchema.ts | 2 + apps/roam/src/utils/getExportSettings.ts | 14 ++ apps/roam/src/utils/getLeftSidebarSettings.ts | 35 ++++ 7 files changed, 422 insertions(+), 16 deletions(-) diff --git a/apps/roam/src/components/LeftSidebarView.tsx b/apps/roam/src/components/LeftSidebarView.tsx index 14305fd1b..f4965877e 100644 --- a/apps/roam/src/components/LeftSidebarView.tsx +++ b/apps/roam/src/components/LeftSidebarView.tsx @@ -30,11 +30,13 @@ import { settingKeys, } from "~/components/settings/utils/settingsEmitter"; import { + isQueryBlockRef, type LeftSidebarConfig, type LeftSidebarPersonalSectionConfig, mergeGlobalSectionWithAccessor, mergePersonalSectionsWithAccessor, } from "~/utils/getLeftSidebarSettings"; +import runQuery from "~/utils/runQuery"; import { sectionsToBlockProps } from "./settings/LeftSidebarPersonalSettings"; import discourseConfigRef, { notify } from "~/utils/discourseConfigRef"; import { getLeftSidebarSettings } from "~/utils/getLeftSidebarSettings"; @@ -362,6 +364,168 @@ const PersonalSectionItem = ({ ); }; +const QuerySectionItem = ({ + section, + sectionIndex, + dragHandle, + onloadArgs, +}: { + section: LeftSidebarPersonalSectionConfig; + sectionIndex: number; + dragHandle: SortableHandle; + onloadArgs: OnloadArgs; +}) => { + const queryUid = extractRef(section.text); + const alias = section.settings?.alias?.value; + const queryLabel = useMemo(() => getTextByBlockUid(queryUid), [queryUid]); + const displayName = alias || queryLabel || section.text; + const truncateAt = section.settings?.truncateResult.value; + const resultLimit = section.settings?.resultLimit?.value ?? 0; + + const [isOpen, setIsOpen] = useState( + !!section.settings?.folded.value, + ); + const [results, setResults] = useState([]); + const [isLoading, setIsLoading] = useState(false); + const [hasLoaded, setHasLoaded] = useState(false); + const [error, setError] = useState(null); + const [isMenuOpen, setIsMenuOpen] = useState(false); + const isTogglingRef = useRef(false); + + const loadResults = useCallback(async () => { + setIsLoading(true); + setError(null); + try { + const { allProcessedResults } = await runQuery({ + parentUid: queryUid, + extensionAPI: onloadArgs.extensionAPI, + }); + const children: ChildNode[] = allProcessedResults.map((r) => { + const isPage = !!getPageTitleByPageUid(r.uid); + return { + uid: r.uid, + text: isPage ? r.uid : `((${r.uid}))`, + }; + }); + setResults(children); + } catch (e) { + console.error(e); + setError("Query failed to run"); + } finally { + setIsLoading(false); + setHasLoaded(true); + } + }, [queryUid, onloadArgs.extensionAPI]); + + useEffect(() => { + if (isOpen && !hasLoaded) { + void loadResults(); + } + }, [isOpen, hasLoaded, loadResults]); + + const handleChevronClick = async () => { + if (!section.settings) return; + if (isTogglingRef.current) return; + isTogglingRef.current = true; + try { + await toggleFoldedState({ + isOpen, + setIsOpen, + folded: section.settings.folded, + parentUid: section.settings.uid || "", + sectionIndex, + }); + } finally { + isTogglingRef.current = false; + } + }; + + const limitedResults = + resultLimit > 0 ? results.slice(0, resultLimit) : results; + + let body: React.ReactNode = null; + if (isLoading) { + body =
Loading…
; + } else if (error) { + body =
{error}
; + } else if (limitedResults.length > 0) { + body = limitedResults.map((child) => ( + + )); + } else if (hasLoaded) { + body =
No results
; + } + + return ( + <> +
+
+
void handleChevronClick()} + > + {displayName.toUpperCase()} +
+ void handleChevronClick()} + > + + + setIsMenuOpen(next)} + onClose={() => setIsMenuOpen(false)} + popoverClassName="dg-leftsidebar-popover" + minimal + content={ + + { + void loadResults(); + setIsMenuOpen(false); + }} + /> + { + void window.roamAlphaAPI.ui.mainWindow.openBlock({ + block: { uid: queryUid }, + }); + setIsMenuOpen(false); + }} + /> + + } + > + + + + +
+
+ {body} + + ); +}; + const PersonalSections = ({ config, setConfig, @@ -439,15 +603,28 @@ const PersonalSections = ({ getId={(s) => s.uid} onReorder={reorderSections} className="personal-left-sidebar-sections" - renderItem={(section, handle) => ( - s.uid === section.uid)} - dragHandle={handle} - onChildrenReorder={reorderChildren} - onloadArgs={onloadArgs} - /> - )} + renderItem={(section, handle) => { + const sectionIndex = sections.findIndex((s) => s.uid === section.uid); + if (isQueryBlockRef(section.text)) { + return ( + + ); + } + return ( + + ); + }} /> ); }; diff --git a/apps/roam/src/components/settings/LeftSidebarPersonalSettings.tsx b/apps/roam/src/components/settings/LeftSidebarPersonalSettings.tsx index df95487cc..1be0ed58a 100644 --- a/apps/roam/src/components/settings/LeftSidebarPersonalSettings.tsx +++ b/apps/roam/src/components/settings/LeftSidebarPersonalSettings.tsx @@ -30,6 +30,7 @@ import { PersonalTextPanel, } from "~/components/settings/components/BlockPropSettingPanels"; import { + isQueryBlockRef, LeftSidebarPersonalSectionConfig, getLeftSidebarPersonalSectionConfig, mergePersonalSectionsWithAccessor, @@ -71,6 +72,8 @@ export const sectionsToBlockProps = ( Settings: { "Truncate-result?": s.settings?.truncateResult?.value ?? 75, Folded: s.settings?.folded?.value ?? false, + Alias: s.settings?.alias?.value ?? "", + "Result-limit": s.settings?.resultLimit?.value ?? 0, }, })); /* eslint-enable @typescript-eslint/naming-convention */ @@ -112,6 +115,11 @@ const SectionItem = memo( new Set(initiallyExpanded ? [section.uid] : []), ); const isExpanded = expandedChildLists.has(section.uid); + const isQuery = isQueryBlockRef(section.text); + const [aliasValue, setAliasValue] = useState( + section.settings?.alias?.value ?? "", + ); + const aliasUpdateTimeoutRef = useRef>(); const [childSettingsUid, setChildSettingsUid] = useState( null, ); @@ -337,6 +345,54 @@ const SectionItem = memo( setChildInputKey((prev) => prev + 1); }, []); + const handleAliasChange = useCallback( + (newValue: string) => { + setAliasValue(newValue); + + clearTimeout(aliasUpdateTimeoutRef.current); + aliasUpdateTimeoutRef.current = setTimeout(() => { + const currentSection = sectionsRef.current.find( + (s) => s.uid === section.uid, + ); + const alias = currentSection?.settings?.alias; + if (!alias?.uid) return; + const aliasUid = alias.uid; + + void (async () => { + let valueUid = alias.valueUid; + if (valueUid) { + await updateBlock({ uid: valueUid, text: newValue }); + } else { + valueUid = await createBlock({ + parentUid: aliasUid, + order: 0, + node: { text: newValue }, + }); + } + const nextSections = sectionsRef.current.map((s) => + s.uid === section.uid && s.settings + ? { + ...s, + settings: { + ...s.settings, + alias: { + ...s.settings.alias, + valueUid, + value: newValue, + }, + }, + } + : s, + ); + setSections(nextSections); + syncAllSectionsToBlockProps(nextSections); + refreshAndNotify(); + })(); + }, 300); + }, + [section.uid, sectionsRef, setSections], + ); + const handleAddChild = useCallback(async () => { if (childInput && section.childrenUid) { await addChildToSection(section, section.childrenUid, childInput); @@ -349,6 +405,45 @@ const SectionItem = memo( (!section.settings && section.children?.length === 0) || !section.children; + if (isQuery) { + return ( +
+
+ handleAliasChange(e.target.value)} + placeholder="Alias…" + small + /> + + {section.text} + +
+ +
+
+ ); + } + return (
+ { + const updatedSections = sectionsRef.current.map((s) => + s.uid === activeDialogSection.uid + ? { + ...s, + settings: s.settings + ? { + ...s.settings, + resultLimit: { + ...s.settings.resultLimit, + value, + }, + } + : s.settings, + } + : s, + ); + setSections(updatedSections); + syncAllSectionsToBlockProps(updatedSections); + }} + />
diff --git a/apps/roam/src/components/settings/utils/accessors.ts b/apps/roam/src/components/settings/utils/accessors.ts index 083720d8c..10085df6c 100644 --- a/apps/roam/src/components/settings/utils/accessors.ts +++ b/apps/roam/src/components/settings/utils/accessors.ts @@ -254,6 +254,8 @@ const getLegacyPersonalLeftSidebarSetting = (): unknown[] => { Settings: { "Truncate-result?": section.settings?.truncateResult.value ?? 75, Folded: section.settings?.folded.value ?? false, + Alias: section.settings?.alias?.value ?? "", + "Result-limit": section.settings?.resultLimit?.value ?? 0, }, })); /* eslint-enable @typescript-eslint/naming-convention */ diff --git a/apps/roam/src/components/settings/utils/zodSchema.example.ts b/apps/roam/src/components/settings/utils/zodSchema.example.ts index 718a20929..6abf0dcea 100644 --- a/apps/roam/src/components/settings/utils/zodSchema.example.ts +++ b/apps/roam/src/components/settings/utils/zodSchema.example.ts @@ -286,6 +286,8 @@ const personalSection: PersonalSection = { Settings: { "Truncate-result?": 100, Folded: false, + Alias: "", + "Result-limit": 0, }, }; @@ -299,6 +301,8 @@ const leftSidebarPersonalSettings: LeftSidebarPersonalSettings = [ Settings: { "Truncate-result?": 75, Folded: false, + Alias: "", + "Result-limit": 0, }, }, { @@ -311,6 +315,8 @@ const leftSidebarPersonalSettings: LeftSidebarPersonalSettings = [ Settings: { "Truncate-result?": 50, Folded: true, + Alias: "", + "Result-limit": 0, }, }, ]; @@ -347,6 +353,8 @@ const personalSettings: PersonalSettings = { Settings: { "Truncate-result?": 75, Folded: false, + Alias: "", + "Result-limit": 0, }, }, { @@ -358,6 +366,8 @@ const personalSettings: PersonalSettings = { Settings: { "Truncate-result?": 50, Folded: true, + Alias: "", + "Result-limit": 0, }, }, ], diff --git a/apps/roam/src/components/settings/utils/zodSchema.ts b/apps/roam/src/components/settings/utils/zodSchema.ts index 733493cbf..e0eac7142 100644 --- a/apps/roam/src/components/settings/utils/zodSchema.ts +++ b/apps/roam/src/components/settings/utils/zodSchema.ts @@ -221,6 +221,8 @@ export const PersonalSectionSchema = z.object({ .object({ "Truncate-result?": z.number().default(75), Folded: z.boolean().default(false), + Alias: z.string().default(""), + "Result-limit": z.number().default(0), }) .default({}), }); diff --git a/apps/roam/src/utils/getExportSettings.ts b/apps/roam/src/utils/getExportSettings.ts index 06284a9a5..410493eb5 100644 --- a/apps/roam/src/utils/getExportSettings.ts +++ b/apps/roam/src/utils/getExportSettings.ts @@ -81,6 +81,20 @@ export const getUidAndStringSetting = (props: Props): StringSetting => { }; }; +export type StringSettingWithValueUid = StringSetting & { valueUid?: string }; + +export const getUidAndStringSettingWithValueUid = ( + props: Props, +): StringSettingWithValueUid => { + const node = props.tree.find((node) => node.text === props.text); + const valueChild = node?.children?.[0]; + return { + uid: node?.uid, + value: valueChild?.text ?? "", + valueUid: valueChild?.uid, + }; +}; + export const getExportSettingsAndUids = ( configTreeOverride?: RoamBasicNode[], ): ExportConfigWithUids => { diff --git a/apps/roam/src/utils/getLeftSidebarSettings.ts b/apps/roam/src/utils/getLeftSidebarSettings.ts index af4e7a53c..e9414ef03 100644 --- a/apps/roam/src/utils/getLeftSidebarSettings.ts +++ b/apps/roam/src/utils/getLeftSidebarSettings.ts @@ -1,12 +1,17 @@ import { RoamBasicNode } from "roamjs-components/types"; +import { BLOCK_REF_REGEX } from "roamjs-components/dom/constants"; +import extractRef from "roamjs-components/util/extractRef"; import { BooleanSetting, getUidAndBooleanSetting, IntSetting, getUidAndIntSetting, StringSetting, + StringSettingWithValueUid, getUidAndStringSetting, + getUidAndStringSettingWithValueUid, } from "./getExportSettings"; +import { isSmartBlockUid } from "./isSmartBlockUid"; import { getSubTree } from "roamjs-components/util"; import type { LeftSidebarGlobalSettings, @@ -17,6 +22,15 @@ type LeftSidebarPersonalSectionSettings = { uid: string; truncateResult: IntSetting; folded: BooleanSetting; + alias?: StringSettingWithValueUid; + resultLimit?: IntSetting; +}; + +const BLOCK_REF_FULL_MATCH = new RegExp(`^${BLOCK_REF_REGEX.source}$`); + +export const isQueryBlockRef = (text: string): boolean => { + if (!BLOCK_REF_FULL_MATCH.test(text)) return false; + return !isSmartBlockUid(extractRef(text)); }; export type PersonalSectionChild = RoamBasicNode & { @@ -123,10 +137,22 @@ const getPersonalSectionSettings = ( text: "Folded", }); + const aliasSetting = getUidAndStringSettingWithValueUid({ + tree: settingsTree, + text: "Alias", + }); + + const resultLimitSetting = getUidAndIntSetting({ + tree: settingsTree, + text: "Result-limit", + }); + return { uid: settingsNode.uid, truncateResult: truncateResultSetting, folded: foldedSetting, + alias: aliasSetting, + resultLimit: resultLimitSetting, }; }; @@ -267,6 +293,15 @@ export const mergePersonalSectionsWithAccessor = ( uid: legacy?.settings?.folded.uid ?? "", value: snap.Settings.Folded, }, + alias: { + uid: legacy?.settings?.alias?.uid, + valueUid: legacy?.settings?.alias?.valueUid, + value: snap.Settings.Alias, + }, + resultLimit: { + uid: legacy?.settings?.resultLimit?.uid, + value: snap.Settings["Result-limit"], + }, }, children: snap.Children.length > 0 From a2592b4db51c418e3dc0b7b409ea5b1d4bc69b35 Mon Sep 17 00:00:00 2001 From: sid597 Date: Wed, 20 May 2026 22:13:11 +0530 Subject: [PATCH 2/4] ENG-949: Suppress lint warning on new Result-limit setter --- .../src/components/settings/LeftSidebarPersonalSettings.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/roam/src/components/settings/LeftSidebarPersonalSettings.tsx b/apps/roam/src/components/settings/LeftSidebarPersonalSettings.tsx index 1be0ed58a..6868df2b7 100644 --- a/apps/roam/src/components/settings/LeftSidebarPersonalSettings.tsx +++ b/apps/roam/src/components/settings/LeftSidebarPersonalSettings.tsx @@ -956,7 +956,8 @@ const LeftSidebarPersonalSectionsContent = ({ order={2} uid={activeDialogSection.settings.resultLimit?.uid} parentUid={activeDialogSection.settings.uid || ""} - setter={(_keys, value) => { + // eslint-disable-next-line @typescript-eslint/naming-convention + setter={(_, value) => { const updatedSections = sectionsRef.current.map((s) => s.uid === activeDialogSection.uid ? { From 5c5f06fd900a92ff736127ad9253a75c8a014b60 Mon Sep 17 00:00:00 2001 From: sid597 Date: Wed, 20 May 2026 22:24:32 +0530 Subject: [PATCH 3/4] ENG-949: Gate query-section detection on {{query block}} marker --- apps/roam/src/utils/getLeftSidebarSettings.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/roam/src/utils/getLeftSidebarSettings.ts b/apps/roam/src/utils/getLeftSidebarSettings.ts index e9414ef03..bf1ecd304 100644 --- a/apps/roam/src/utils/getLeftSidebarSettings.ts +++ b/apps/roam/src/utils/getLeftSidebarSettings.ts @@ -1,6 +1,7 @@ import { RoamBasicNode } from "roamjs-components/types"; import { BLOCK_REF_REGEX } from "roamjs-components/dom/constants"; import extractRef from "roamjs-components/util/extractRef"; +import getTextByBlockUid from "roamjs-components/queries/getTextByBlockUid"; import { BooleanSetting, getUidAndBooleanSetting, @@ -11,7 +12,6 @@ import { getUidAndStringSetting, getUidAndStringSettingWithValueUid, } from "./getExportSettings"; -import { isSmartBlockUid } from "./isSmartBlockUid"; import { getSubTree } from "roamjs-components/util"; import type { LeftSidebarGlobalSettings, @@ -27,10 +27,14 @@ type LeftSidebarPersonalSectionSettings = { }; const BLOCK_REF_FULL_MATCH = new RegExp(`^${BLOCK_REF_REGEX.source}$`); +const QUERY_BLOCK_MARKER = /\{\{query block(?::[^}]*)?\}\}/; export const isQueryBlockRef = (text: string): boolean => { if (!BLOCK_REF_FULL_MATCH.test(text)) return false; - return !isSmartBlockUid(extractRef(text)); + const blockText = getTextByBlockUid(extractRef(text)); + if (!blockText) return false; + if (blockText.includes(":SmartBlock:")) return false; + return QUERY_BLOCK_MARKER.test(blockText); }; export type PersonalSectionChild = RoamBasicNode & { From 398e2306d5aa8f6045414062f07b7b852fda4941 Mon Sep 17 00:00:00 2001 From: sid597 Date: Fri, 22 May 2026 16:23:33 +0530 Subject: [PATCH 4/4] Address query sidebar review feedback --- apps/roam/src/components/LeftSidebarView.tsx | 7 ++- .../settings/LeftSidebarPersonalSettings.tsx | 57 ++++++++++++++++--- .../settings/utils/zodSchema.example.ts | 10 ++-- .../components/settings/utils/zodSchema.ts | 2 +- apps/roam/src/utils/getLeftSidebarSettings.ts | 1 + 5 files changed, 60 insertions(+), 17 deletions(-) diff --git a/apps/roam/src/components/LeftSidebarView.tsx b/apps/roam/src/components/LeftSidebarView.tsx index f4965877e..59ff81bd0 100644 --- a/apps/roam/src/components/LeftSidebarView.tsx +++ b/apps/roam/src/components/LeftSidebarView.tsx @@ -380,7 +380,10 @@ const QuerySectionItem = ({ const queryLabel = useMemo(() => getTextByBlockUid(queryUid), [queryUid]); const displayName = alias || queryLabel || section.text; const truncateAt = section.settings?.truncateResult.value; - const resultLimit = section.settings?.resultLimit?.value ?? 0; + const resultLimit = Math.max( + 0, + Math.trunc(section.settings?.resultLimit?.value ?? 10), + ); const [isOpen, setIsOpen] = useState( !!section.settings?.folded.value, @@ -605,7 +608,7 @@ const PersonalSections = ({ className="personal-left-sidebar-sections" renderItem={(section, handle) => { const sectionIndex = sections.findIndex((s) => s.uid === section.uid); - if (isQueryBlockRef(section.text)) { + if (isQueryBlockRef(section.text) && section.settings?.uid) { return ( ( null, ); + + useEffect(() => { + return () => { + clearTimeout(aliasUpdateTimeoutRef.current); + aliasUpdateTimeoutRef.current = undefined; + }; + }, []); + const toggleChildrenList = useCallback((sectionUid: string) => { setExpandedChildLists((prev) => { const next = new Set(prev); @@ -354,12 +362,28 @@ const SectionItem = memo( const currentSection = sectionsRef.current.find( (s) => s.uid === section.uid, ); - const alias = currentSection?.settings?.alias; - if (!alias?.uid) return; - const aliasUid = alias.uid; + if (!currentSection?.uid) return; void (async () => { - let valueUid = alias.valueUid; + let settingsUid = currentSection.settings?.uid; + if (!settingsUid) { + settingsUid = await createBlock({ + parentUid: currentSection.uid, + order: 0, + node: { text: "Settings" }, + }); + } + + let aliasUid = currentSection.settings?.alias?.uid; + if (!aliasUid) { + aliasUid = await createBlock({ + parentUid: settingsUid, + order: 0, + node: { text: "Alias" }, + }); + } + + let valueUid = currentSection.settings?.alias?.valueUid; if (valueUid) { await updateBlock({ uid: valueUid, text: newValue }); } else { @@ -370,20 +394,34 @@ const SectionItem = memo( }); } const nextSections = sectionsRef.current.map((s) => - s.uid === section.uid && s.settings + s.uid === section.uid ? { ...s, settings: { - ...s.settings, + uid: settingsUid, + folded: s.settings?.folded ?? { + uid: undefined, + value: false, + }, + truncateResult: s.settings?.truncateResult ?? { + uid: undefined, + value: 75, + }, alias: { - ...s.settings.alias, + ...(s.settings?.alias ?? {}), + uid: aliasUid, valueUid, value: newValue, }, + resultLimit: s.settings?.resultLimit ?? { + uid: undefined, + value: 10, + }, }, } : s, ); + sectionsRef.current = nextSections; setSections(nextSections); syncAllSectionsToBlockProps(nextSections); refreshAndNotify(); @@ -951,8 +989,9 @@ const LeftSidebarPersonalSectionsContent = ({ description="Maximum number of children to display" settingKeys={[]} initialValue={ - activeDialogSection.settings.resultLimit?.value ?? 0 + activeDialogSection.settings.resultLimit?.value ?? 10 } + min={0} order={2} uid={activeDialogSection.settings.resultLimit?.uid} parentUid={activeDialogSection.settings.uid || ""} diff --git a/apps/roam/src/components/settings/utils/zodSchema.example.ts b/apps/roam/src/components/settings/utils/zodSchema.example.ts index 6abf0dcea..0b32304b5 100644 --- a/apps/roam/src/components/settings/utils/zodSchema.example.ts +++ b/apps/roam/src/components/settings/utils/zodSchema.example.ts @@ -287,7 +287,7 @@ const personalSection: PersonalSection = { "Truncate-result?": 100, Folded: false, Alias: "", - "Result-limit": 0, + "Result-limit": 10, }, }; @@ -302,7 +302,7 @@ const leftSidebarPersonalSettings: LeftSidebarPersonalSettings = [ "Truncate-result?": 75, Folded: false, Alias: "", - "Result-limit": 0, + "Result-limit": 10, }, }, { @@ -316,7 +316,7 @@ const leftSidebarPersonalSettings: LeftSidebarPersonalSettings = [ "Truncate-result?": 50, Folded: true, Alias: "", - "Result-limit": 0, + "Result-limit": 10, }, }, ]; @@ -354,7 +354,7 @@ const personalSettings: PersonalSettings = { "Truncate-result?": 75, Folded: false, Alias: "", - "Result-limit": 0, + "Result-limit": 10, }, }, { @@ -367,7 +367,7 @@ const personalSettings: PersonalSettings = { "Truncate-result?": 50, Folded: true, Alias: "", - "Result-limit": 0, + "Result-limit": 10, }, }, ], diff --git a/apps/roam/src/components/settings/utils/zodSchema.ts b/apps/roam/src/components/settings/utils/zodSchema.ts index e0eac7142..917b518de 100644 --- a/apps/roam/src/components/settings/utils/zodSchema.ts +++ b/apps/roam/src/components/settings/utils/zodSchema.ts @@ -222,7 +222,7 @@ export const PersonalSectionSchema = z.object({ "Truncate-result?": z.number().default(75), Folded: z.boolean().default(false), Alias: z.string().default(""), - "Result-limit": z.number().default(0), + "Result-limit": z.number().int().min(0).default(10), }) .default({}), }); diff --git a/apps/roam/src/utils/getLeftSidebarSettings.ts b/apps/roam/src/utils/getLeftSidebarSettings.ts index bf1ecd304..0d3cab4b2 100644 --- a/apps/roam/src/utils/getLeftSidebarSettings.ts +++ b/apps/roam/src/utils/getLeftSidebarSettings.ts @@ -149,6 +149,7 @@ const getPersonalSectionSettings = ( const resultLimitSetting = getUidAndIntSetting({ tree: settingsTree, text: "Result-limit", + defaultValue: 10, }); return {