Skip to content

Hide orphaned comments from margins#43

Merged
kylemcd merged 1 commit into
mainfrom
codex/hide-orphan-margin-comments
Jul 22, 2026
Merged

Hide orphaned comments from margins#43
kylemcd merged 1 commit into
mainfrom
codex/hide-orphan-margin-comments

Conversation

@kylemcd

@kylemcd kylemcd commented Jul 22, 2026

Copy link
Copy Markdown
Owner

What changed

  • Render floating margin cards only for threads with both a comment body and a valid text anchor.
  • Stop orphaned threads from reserving margin width in editor and reading views.
  • Keep orphaned threads available in the comments sidebar.
  • Add regression coverage for orphan detection and margin layout.

Why

A comment body can remain after its inline anchor markers are removed. The margin previously pinned these orphaned threads to the top of the editor, making an unrelated card appear stuck and then disappear while scrolling.

Validation

  • npm run check
  • npm run build
  • Verified both anchored table comments in the reference note render beside their highlights, while orphan xbl0b never enters the margin DOM.
  • Confirmed the reference note was unchanged during testing.

@kylemcd
kylemcd marked this pull request as ready for review July 22, 2026 13:56
@kylemcd
kylemcd merged commit fd3fc98 into main Jul 22, 2026
1 check passed
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.

1 participant