Skip to content

fix(orphan-attachments): include frontmatter attachment references#95

Merged
rogerdigital merged 1 commit into
mainfrom
fix/frontmatter-attachment-references
Jul 23, 2026
Merged

fix(orphan-attachments): include frontmatter attachment references#95
rogerdigital merged 1 commit into
mainfrom
fix/frontmatter-attachment-references

Conversation

@rogerdigital

Copy link
Copy Markdown
Owner

Summary

  • include Obsidian frontmatterLinks when collecting referenced attachment paths
  • extract frontmatter wiki links in the CLI metadata adapter so plugin and CLI scans behave consistently
  • add scanner and CLI regression coverage

Root cause

The orphan attachment scanner considered links and embeds from note bodies but not Obsidian's cached frontmatter links. Attachments referenced only from frontmatter could therefore be reported as orphaned.

Impact

Attachments referenced through frontmatter wiki links are no longer false positives in either plugin or CLI scans.

Fixes #92

Validation

  • npm run lint
  • npm run lint:obsidian-warnings
  • npm run build
  • npm test — 18 test files, 166 tests
  • npm pack --dry-run
  • manual UI verification in Obsidian 1.12.7 using /Users/Roger/my-vault: a real orphan remained visible while two frontmatter-referenced SVG attachments were excluded
  • verified the developer console contained no plugin errors

@rogerdigital
rogerdigital marked this pull request as ready for review July 23, 2026 15:12
@rogerdigital
rogerdigital merged commit 99c8536 into main Jul 23, 2026
1 check passed
@rogerdigital
rogerdigital deleted the fix/frontmatter-attachment-references branch July 23, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Orphan attachments are not searched into frontmatter

1 participant