Skip to content

Conversation

@acelaya
Copy link
Contributor

@acelaya acelaya commented Dec 19, 2025

We have discovered that page notes created via the button rendered when enableExperimentalNewNoteButton is true, do not include the document metadata, since the logic is not triggered in the guest document, as it happens with the regular page notes button or annotations and highlights created from the adder.

This PR adds a new RPC message that can be used for the sidebar to request the guest document info on demand, allowing those page notes to properly include the document metadata.

Test steps

  1. Go to http://localhost:3000/document/comments-mode
  2. Open the browser console, and go to the network tab
  3. Create a comment via "Add comment" button
    image
  4. Inspect the request payload from the POST http://localhost:5000/api/annotations call, and verify it includes all document metadata.
    image
  5. If you do the same in main branch, the document will be "empty"
    image

TODO

  • Add tests

@acelaya acelaya force-pushed the comment-with-metadata branch from f170e27 to 880b2c7 Compare December 19, 2025 09:54
@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.50%. Comparing base (aaeb9a5) to head (ec5eb13).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7477   +/-   ##
=======================================
  Coverage   99.50%   99.50%           
=======================================
  Files         271      271           
  Lines       11017    11028   +11     
  Branches     2655     2656    +1     
=======================================
+ Hits        10962    10973   +11     
  Misses         55       55           

☔ 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.

@acelaya acelaya force-pushed the comment-with-metadata branch from 880b2c7 to ec5eb13 Compare December 19, 2025 10:03
@acelaya acelaya marked this pull request as ready for review December 19, 2025 10:04
@acelaya acelaya merged commit ce660b0 into main Dec 19, 2025
4 checks passed
@acelaya acelaya deleted the comment-with-metadata branch December 19, 2025 10:05
acelaya pushed a commit that referenced this pull request Dec 19, 2025
acelaya pushed a commit that referenced this pull request Dec 19, 2025
acelaya pushed a commit that referenced this pull request Dec 19, 2025
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.

2 participants