diff --git a/libraries/Repositories/Std.md b/libraries/Repositories/Std.md index 2c7a147f..ee2411d2 100644 --- a/libraries/Repositories/Std.md +++ b/libraries/Repositories/Std.md @@ -47,12 +47,6 @@ description: Reformats markdown in a "SilverBullet"-y style website: https://github.com/silverbulletmd/silverbullet-markdown-prettify uri: ghr:silverbulletmd/silverbullet-markdown-prettify/Prettify.md --- -name: Object Graph -author: Zef Hemel -description: Object Graph view -website: https://github.com/silverbulletmd/silverbullet-object-graph -uri: ghr:silverbulletmd/silverbullet-object-graph/ObjectGraph.md ---- name: Basic Full-Text Search author: Zef Hemel description: Basic full-text search engine for SilverBullet (previously a built-in plug) diff --git a/plugs/object-graph/ui/components/sidebar.tsx b/plugs/object-graph/ui/components/sidebar.tsx index 8c44fc20..8c9d1930 100644 --- a/plugs/object-graph/ui/components/sidebar.tsx +++ b/plugs/object-graph/ui/components/sidebar.tsx @@ -134,7 +134,15 @@ function ObjectSection({ selected }: { selected: ObjectNode | null }) { useEffect(() => { if (!selected) return; let cancelled = false; - void syscall("yaml.stringify", selected.attributes).then((text: string) => { + // Always lead with the object's `tag`. Real page/item/block objects + // carry it in their indexed attributes; stub nodes (dangling refs, + // URL/file targets) don't, so fall back to the node's structural tag + // (or kind). Spreading `attributes` last keeps the real value when set. + const display = { + tag: selected.rootTag ?? selected.kind, + ...selected.attributes, + }; + void syscall("yaml.stringify", display).then((text: string) => { if (!cancelled) setYamlText(text); }); return () => {