Skip to content

Keep highlights and drawings when saving immediately after reopening - #86

Merged
mberman84 merged 2 commits into
mainfrom
codex/wait-for-saved-annotations
Nov 11, 2026
Merged

mberman84 merged 2 commits into
mainfrom
codex/wait-for-saved-annotations

Conversation

@mberman84

Copy link
Copy Markdown
Collaborator

Problem

Save a PDF immediately after reopening it. If Folio is still reading its saved annotations from local storage, the downloaded copy can be missing every highlight and drawing even though they appear in the reader a moment later.

Change

The reader can display the PDF while its annotations load. PDF exports, printing, and note exports wait for that document's saved annotations before taking their snapshot. An export stops if the reader has moved to another document.

Issue or approval

This fixes the early-save race described in the discussion on #44. The signature picker changes are independent.

How I checked it

On macOS, the off-screen smoke test delayed the saved-notes read, reopened the document, and pressed Save before releasing the read. The old code exported zero of four highlights. The fixed copy contains all four highlights and all three drawings. TypeScript, the production build, and the full hidden smoke suite also passed. GitHub CI checks Windows, macOS, and Linux.

Written with GPT-6 in Codex Desktop.

@mberman84
mberman84 merged commit 3b1e444 into main Nov 11, 2026
3 checks passed
@mberman84
mberman84 deleted the codex/wait-for-saved-annotations branch November 11, 2026 01:27
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