Skip to content

feat(editor): highlight inbound citation fragments#726

Open
horacioh wants to merge 6 commits into
mainfrom
fragment-citation-highlights-plan
Open

feat(editor): highlight inbound citation fragments#726
horacioh wants to merge 6 commits into
mainfrom
fragment-citation-highlights-plan

Conversation

@horacioh
Copy link
Copy Markdown
Collaborator

@horacioh horacioh commented Jun 4, 2026

Summary

  • Add editor decorations for inbound ranged citation fragments, including overlap-aware highlight styling and hover states.
  • Wire citation fragment data into document pages with a menu toggle to show or hide highlights.
  • Support click behavior for citation highlights: single citations navigate directly, while overlapping citations show a popover with document or comment context.
  • Keep citation highlight clicks disabled while editing and split highlights around inserted text so new content is not incorrectly included.
  • Add tests for overlapping decorations, click payloads, disabled interactivity, and inserted-text behavior.
  • Add a project document for fragment citation highlights and a write-project-document agent skill.

horacioh added 5 commits June 4, 2026 14:43
Render ranged inbound citations as clickable editor decorations with overlap styling, shared click payload types, and resource page handling for toggling and opening citation context.
Keep citation fragment highlights visible in edit mode without pointer styling or click handling, and avoid entering edit mode when interactive citation fragments are clicked.
Preserve citation fragment ranges on both sides of inserted content so the new text does not inherit the citation highlight or click target.
@horacioh
Copy link
Copy Markdown
Collaborator Author

horacioh commented Jun 4, 2026

@GaboHBeaumont here's the annotation highlights code

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