Add annotation subject and review-state support - #788
Open
bobsingor wants to merge 7 commits into
Open
Conversation
Adds `/Subj` to annotation DTOs, drafts, and patches and reads/writes it across annotation base fields. Text annotations now support ISO 32000 review-state `/State` and `/StateModel`, including lowercase canonicalization for standard values, passthrough for custom models/states, and faithful `null`-vs-absent handling. The patch also marks these fields as appearance-inert and adds conformance coverage for round-trips, invalid drafts, null-clears, and custom state models.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Adds a doc-level annotationsVersion pin for immutable whole-document annotation snapshots, using manifest refresh/retry on stale 404s and carrying auditHead through bulk reads. This also updates the server schema/migrations, exposes versioned bulk/page annotation reads, emits stream.desynced on full-refresh gaps, and adds comment-thread composition and conformance coverage.
This change adds whole-document annotation hydration via listRawAll, tracks hydration status, and replays remote events during the hydration window to avoid stale snapshots and delete resurrection. It also handles desync recovery by rehydrating on stream.desynced and reloads affected pages for page-level events. A shared conversation-plane filter is introduced so replies and review-state annotations are kept in the model but never painted, hit-tested, marquee-selected, or counted in page appearance epochs. The capability and reducer now expose hydration state, while the effects layer routes remote streams through the hydration-aware delivery path.
Track every state annotation in a thread by adding statusRefs to CommentThreadReview and populating it in computeReview; update core tests. Introduce the CommentsApi surface and supporting types (CommentPermissions, ThreadDeleteResult) in the annotation plugin and implement a memoized threads index plus verbs (threads, thread, reply, edit, setStatus, setMarked, remove, removeThread, permissionsFor). Wire comments into AnnotationCapability and extend tests/harness for multi-page layout and session identity. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Expose per-record collab authorization mirrors used for UI gating: add security.allowsAnnotationCreate/Mutation/GroupAssignment to core DocumentSecurityService and implement them for cloud and local services. Surface ScopeGuard.canCollab/canSetGroup helpers and wire CloudDocumentSecurityService to use raw scope, identity and PDF bits. Update annotation plugin to consult these per-record checks (create vs target-owner) and adjust grouping/ungrouping logic. Add unit tests for cloud and engine-local mirrors and a small stub-worker fix for annotation list RPC parity. Mirrors are for UI gating only; engine/server still enforce access.
This change exposes comment thread APIs and types for the React runtime, adds thread enrichment that joins live page labels/indexes, and updates the Chrome viewer with a comments panel, locale strings, and retry/error/loading states. It also adds coverage for page movement and deleted-page fallback behavior and bumps the generated wasm32 version.
This patch aligns the viewer API around content-space naming (`contentToView`, `viewToContent`, `toPixels`/`fromPixels`) and updates page context, stage, selection, and geometry code to use the new names consistently. It also adds the headless coordinate docs, makes `RevealOptions.rect` accept nullable inputs for comment-thread sources, and enriches comment threads with `contentRect` for camera jumps. The comment sidebar gains type metadata, locale strings, and improved card behavior so annotations are easier to identify and navigate.
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.
Adds
/Subjto annotation DTOs, drafts, and patches and reads/writes it across annotation base fields. Text annotations now support ISO 32000 review-state/Stateand/StateModel, including lowercase canonicalization for standard values, passthrough for custom models/states, and faithfulnull-vs-absent handling. The patch also marks these fields as appearance-inert and adds conformance coverage for round-trips, invalid drafts, null-clears, and custom state models.