Skip to content

Add versioning support to annotation creation/editing and search#7518

Draft
karenrasmussen wants to merge 1 commit intomainfrom
document-equivalence
Draft

Add versioning support to annotation creation/editing and search#7518
karenrasmussen wants to merge 1 commit intomainfrom
document-equivalence

Conversation

@karenrasmussen
Copy link
Contributor

This pull request introduces support for extracting and handling document version information in the metadata processing and frame URI generation logic. The main changes involve parsing version numbers from specific metadata fields, storing this version in the document metadata, and incorporating it into the generated URIs for frames.

Metadata version extraction and propagation:

  • Added a version field to the HTMLDocumentMetadata and DocumentMetadata types to store the document version if detected. [1] [2]
  • Implemented logic in the HTMLMetadata class to extract a version number from highwire.id, highwire.public_url, and the canonical link, ensuring all three sources agree on the version (must end with v1–v25).

Frame URI handling:

  • Updated the searchUrisForFrame function to append the version information to each URI in the format :v0:v{version} if a version is present in the frame's metadata.

@codecov
Copy link

codecov bot commented Mar 24, 2026

Codecov Report

❌ Patch coverage is 48.57143% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.46%. Comparing base (b07c1b8) to head (89cec3c).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
src/annotator/integrations/html-metadata.ts 46.87% 17 Missing ⚠️
src/sidebar/store/modules/frames.ts 66.66% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (48.57%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7518      +/-   ##
==========================================
- Coverage   99.61%   99.46%   -0.15%     
==========================================
  Files         283      283              
  Lines       11877    11914      +37     
  Branches     2898     2908      +10     
==========================================
+ Hits        11831    11850      +19     
- Misses         46       64      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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