Feature
Support a ```visual-notes markdown fence in any watched note that becomes an inline-rendered graph at that location in the note's preview. Currently the renderer mounts a single graph at the top of the markdown preview; this feature gives users explicit control over where the graph appears, and supports multiple sidecar-bound graphs per note (e.g., an AI session summary that wants its visual in a dedicated ## Session Visual section).
Motivation
docs/design.md lists this as an existing capability:
explicit visual-notes code blocks can reserve a persistent visual slot in AI session summary templates
The obsidian-notes skill's session-summary template already includes the empty \``visual-notes\n```block expecting this to work. Today the plugin'sregisterMarkdownPostProcessor` mounts a single auto-positioned container per note instead — the code-block path was started but never landed.
Current state — WIP on feat/visual-notes-codeblock
Branch feat/visual-notes-codeblock at commit 3f85310 carries the in-flight implementation (~140 lines):
src/main.ts — registerMarkdownCodeBlockProcessor("visual-notes", ...) + mountVisualNotesCodeBlock lifecycle
src/renderer.ts — added removeContainerOnUnload / removeDuplicates options to VisualNotesRenderChild so code-block mounts can manage their own container lifecycle
src/anthropic.ts (new) — extracted validateAnthropicApiKey + classifyAnthropicFailure from extractor.ts into a dedicated module
test/feature/anthropic.test.ts (new) — tests for the extracted helpers
styles.css — .visual-notes-codeblock-container + .visual-notes-codeblock-host mount styles
- Doc updates across README + design.md + skill docs
What's left to ship
Branch + worktree
- Branch:
feat/visual-notes-codeblock (pushed to origin)
- Local worktree:
~/Repositories/visual-notes-codeblock
Risk / dependencies
Out of scope
- Multiple distinct sidecars per note. The current sidecar contract is one
*-overview.json per *.md file; multiple code blocks in one note all bind to that single sidecar (or fail loudly). Multi-sidecar is a separate, larger feature.
Feature
Support a
```visual-notesmarkdown fence in any watched note that becomes an inline-rendered graph at that location in the note's preview. Currently the renderer mounts a single graph at the top of the markdown preview; this feature gives users explicit control over where the graph appears, and supports multiple sidecar-bound graphs per note (e.g., an AI session summary that wants its visual in a dedicated## Session Visualsection).Motivation
docs/design.mdlists this as an existing capability:The
obsidian-notesskill's session-summary template already includes the empty\``visual-notes\n```block expecting this to work. Today the plugin'sregisterMarkdownPostProcessor` mounts a single auto-positioned container per note instead — the code-block path was started but never landed.Current state — WIP on
feat/visual-notes-codeblockBranch
feat/visual-notes-codeblockat commit3f85310carries the in-flight implementation (~140 lines):src/main.ts—registerMarkdownCodeBlockProcessor("visual-notes", ...)+mountVisualNotesCodeBlocklifecyclesrc/renderer.ts— addedremoveContainerOnUnload/removeDuplicatesoptions toVisualNotesRenderChildso code-block mounts can manage their own container lifecyclesrc/anthropic.ts(new) — extractedvalidateAnthropicApiKey+classifyAnthropicFailurefrom extractor.ts into a dedicated moduletest/feature/anthropic.test.ts(new) — tests for the extracted helpersstyles.css—.visual-notes-codeblock-container+.visual-notes-codeblock-hostmount stylesWhat's left to ship
test/feature/main.test.ts(or equivalent) covering the code-block processor: detect, mount, unmount, dedup-against-postprocessor-mountvisual-notescode block, confirm the graph mounts inline at the block's position (not at the top of the preview), confirm unmount cleans up correctly when the note is closed122d26d) — the branch was forked fromeb7c152before PR feat(obsidian): #21 visual fidelity pass — styling parity + layout repair #23 merged, so it needs a rebase to pick up the post-Improve plugin visual generation to match legacy hook-rendered boards #21 changes (label-sized nodes, hover handler, edge fixes, repair-pass refactor)Branch + worktree
feat/visual-notes-codeblock(pushed to origin)~/Repositories/visual-notes-codeblockRisk / dependencies
main(after feat(obsidian): #21 visual fidelity pass — styling parity + layout repair #23) is the first step.anthropic.tsextraction is generally useful even if the code-block feature is deferred — could be split into its own PR if this issue languishes.Out of scope
*-overview.jsonper*.mdfile; multiple code blocks in one note all bind to that single sidecar (or fail loudly). Multi-sidecar is a separate, larger feature.