Bug Report: Canvas "Narrow to Heading" Fails with Duplicate Heading Names, Even at Different Levels

Excellent! Thank you for providing the debug info. This is exactly what’s needed.

Based on your debug info, you have a custom theme and 23 plugins enabled. As the template notes, it’s critical that you have confirmed the bug still happens in the Sandbox Vault (or with Restricted Mode on) to ensure it’s not caused by a plugin or theme.

Assuming you have done that, here is the final, complete bug report with your debug information included. You can copy and paste this entire block directly into the Obsidian forum.


Steps to reproduce

  1. Create a new note in the sandbox vault.
  2. Paste the following markdown content into the note:
    ## General
    - iOS stuff is pretty iterative.
    ### New Design Language
    - across the apple ecosystem
    - Liquid Glass (Transparency)
    - looks good on static elements but not as good on non-static elements
    #### iOS
    - status bar transparent
    ## Apple Intelligence
    - surprised it was covered first
    - more info later this year
    ## OSs
    ### iOS
    - camera app redesign
    - polls in iMessage
    #### iPadOS
    - iPad get a full window manager
    	- tiling
    	- Android tablets have had windowing like that for years
    ### Mac
    - Tahoe
    - Intelligent actions for shortcuts
    - actions in Spotlight (like Raycast)
    #### Continuity
    - Live Activities from your iPhone
    - Phone App
    #### Games App
    - so trying to be Steam
    ### VisionOS
    - 
    ### WatchOS
    - Workout Buddy (AI Coach)
    ## IOT
    
  3. Create a new Canvas file.
  4. Drag the note from Step 1 onto the canvas to create a card.
  5. Right-click the card, select “Narrow to heading…”, and choose the first iOS heading (the #### iOS under New Design Language).
  6. Drag the same note onto the canvas again to create a second card.
  7. Right-click this second card and attempt to narrow it to the other iOS heading (the ### iOS under OSs).

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

The second card on the canvas should narrow to the ### iOS section and display its specific content:

  • camera app redesign
  • polls in iMessage

The canvas should allow for two distinct cards, one for each “iOS” section, reflecting their different content and positions within the note.

Actual result

The second card, when narrowed to the second iOS heading, incorrectly displays the content of the first iOS heading (- status bar transparent). It is impossible to link a card to any but the first occurrence of a heading with a given name, regardless of its level or parent.

Environment

SYSTEM INFO:
	Obsidian version: v1.9.1
	Installer version: v1.8.10
	Operating system: Windows 11 Home 10.0.26100
	Login status: logged in
	Language: en
	Catalyst license: insider
	Insider build toggle: on
	Live preview: on
	Base theme: dark
	Community theme: Material 3 v1.9.1
	Snippets enabled: 0
	Restricted mode: off
	Plugins installed: 28
	Plugins enabled: 23
		1: Periodic Notes v0.0.17
		2: Calendar v1.5.10
		3: Discord Rich Presence v1.5.1
		4: Outliner v4.9.0
		5: Advanced new file v1.5.1
		6: MetaEdit v1.8.2
		7: Natural Language Dates v0.6.2
		8: Dynamic Table of Contents v0.0.27
		9: Better Word Count v0.10.1
		10: Focus Mode v1.11.5
		11: WordPress v0.18.0
		12: File Hider v1.1.1
		13: Auto Link Title v1.5.5
		14: Canvas Links v1.1.4
		15: Better Command Palette v0.17.1
		16: Table Extended v1.6.1
		17: Book Search v0.6.3
		18: Iconize v2.11.11
		19: Dataview v0.5.68
		20: Projects v1.17.3
		21: Advanced Tables v0.19.1
		22: Obsidian Charts v3.7.1
		23: Self-hosted LiveSync v0.24.26

RECOMMENDATIONS:
	Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Additional information

This bug prevents the effective use of Canvas for visualizing complex notes where topics may be revisited. The feature appears to resolve headings by name only, without considering their structural uniqueness (level or hierarchy). The issue was confirmed to be reproducible in the Sandbox Vault.

Here is a screenshot illustrating the issue with a similar file structure:

There appears to be a feature request for this here:

This is expected. You’ll see similar behavior when you try to do a normal link to a heading in a note. Obsidian has no way to determine which heading of that name you want the link to point to, so it uses the first one it finds. (Fragment links on the Web behave the same way: the link https://example.com/about#details will link to the first item with the ID “details”.)

It would be good if Obsidian at least alerted the user when linking to a duplicated heading.

1 Like