Skip to content

Fix reading mode note widget stability#2103

Open
martin-forge wants to merge 1 commit into
callumalpass:mainfrom
martin-forge:martin-forge/reading-card-widget-stability
Open

Fix reading mode note widget stability#2103
martin-forge wants to merge 1 commit into
callumalpass:mainfrom
martin-forge:martin-forge/reading-card-widget-stability

Conversation

@martin-forge

@martin-forge martin-forge commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Added a shared reading-mode widget observer that schedules re-injection when Obsidian removes or rebuilds the preview widget DOM.
  • Refreshed task card and relationships widgets on file-open events to support navigation within the same leaf.
  • Refreshed visible reading-mode widgets immediately on metadata changes to eliminate rendering lag.
  • Preserved same-file note widgets through transient metadata cache misses while still removing stale widgets for confirmed non-task/non-relationship notes.

Closes #2081.

Testing

  • Added unit tests covering same-leaf file reuse, MutationObserver re-injection, immediate metadata refresh, and transient cache misses.
  • Ran plugin test suites (npm run lint:ts, npm run build:test, and internal unit tests).

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.

[Bug]: Task card and relationship widgets are removed from a note on scroll in reading mode

1 participant