[Document-URI: 2] Sync checkpoints with document identity - #7412
Draft
karenrasmussen wants to merge 12 commits into
Draft
[Document-URI: 2] Sync checkpoints with document identity#7412karenrasmussen wants to merge 12 commits into
karenrasmussen wants to merge 12 commits into
Conversation
karenrasmussen
commented
Jul 24, 2026
karenrasmussen
force-pushed
the
hnr-document-uri
branch
from
July 28, 2026 14:39
afc2361 to
30ca2e7
Compare
karenrasmussen
marked this pull request as ready for review
July 29, 2026 13:51
Elimpizza
marked this pull request as draft
July 30, 2026 13:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for tracking and reporting the canonical document identity (URI) for assignments, particularly to enable reliable Hide & Reveal (checkpoint) functionality. The changes ensure that the backend and frontend coordinate on the document's true identity as computed by the Hypothesis client, rather than just the launch URL. This is crucial for syncing checkpoint state and revealing assignments accurately, especially in cases where the launch URL does not uniquely identify the document in Hypothesis.
Key changes include:
Database and Model Updates
document_uricolumn to theassignmenttable and model to store the canonical document identity as determined by the Hypothesis client. This value is cleared and reset if the assignment's document URL changes. [1] [2] [3]Backend API and Service Changes
/api/syncendpoint to accept and store the reporteddocument_urifrom the frontend, and to use this value (if present) for checkpoint syncing. The checkpoint payloads and reveal logic now consistently usedocument_uriinstead ofdocument_url. [1] [2] [3] [4] [5] [6]Frontend/Client Coordination
document_uri) via RPC before syncing checkpoints. This is handled via new client-RPC infrastructure and ensures that checkpoint syncs are keyed to the correct document. [1] [2] [3] [4] [5]