Repository navigation
fix(pdf): restore native annotation placement on Revert - #840
Open
IndelibleVivi wants to merge 1 commit into
Open
IndelibleVivi wants to merge 1 commit into
IndelibleVivi wants to merge 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch has not been deployed
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.
Dragging an annotation imported from the PDF mutates the same definition held by the file baseline. Revert then removes user additions but restores the native annotation at its dragged position.
Keep baseline definitions independent from editable definitions, including nested highlight rectangles, at import and restoration boundaries. Derive Revert availability from current annotation contents as well as the existing saved-diff state, so native-only moves can be reverted and undoing a move disables Revert again. The saved diff and PDF export formats remain unchanged.
Refs #817. This covers Revert only; redo shortcuts, saving native moves, reload persistence, and screenshot consistency remain separate parts of that issue.
Adds a deterministic local PDF with a native stamp and a Playwright regression through basic-host: add a user stamp, move the native stamp, Revert; repeat native-only move/Revert twice; then verify undo returns to the baseline and disables Revert. The test also rejects uncaught page errors. The shared loading helper accepts optional tool input so it can reuse the existing server-readiness wait without fetching a remote PDF.
Validation on macOS:
07cda25with the new fixture/regression fails at the native placement assertion: expected left/top180px / 252px, received252px / 290pxafter Revert.EXAMPLE=pdf-server npm run test:e2e -- tests/e2e/pdf-annotation-revert.spec.ts --project=chromium --reporter=list --workers=1 --retries=0: passed with bundled Chromium 143 (Playwright 1.57).npm test: 457 passed, 1 existing skip, 0 failed; includes 108 PDF annotation tests.npm run build,npm run --workspace examples/pdf-server build, andnpm run prettier: passed. The PDF workspace build includes its TypeScript check.Validation uses synthetic PDFs and the repository's basic-host. Native Claude Desktop and other browser engines were not exercised. No documentation change is needed: this restores the existing Revert behavior while retaining the documented persistence/export boundaries.