Repository navigation
Conversation
Reorder pages becomes Organize pages. Select several pages with Ctrl-click (Cmd-click on macOS) or Shift-click and delete them with the toolbar or the Delete key; Ctrl+Z and Ctrl+Shift+Z undo and redo every change until the copy is saved. The Pages tab's thumbnail menu can start with the selected pages deleted. A PDF always keeps at least one page. Built with Claude in Cursor Co-authored-by: Cursor <[email protected]>
Dragging a thumbnail a second time in one smoke run froze the page on Windows CI. The existing reorder check still covers dragging.
# Conflicts: # src/App.tsx
Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # src/App.tsx # src/VersionHistoryPanel.tsx # src/versionHistory.ts
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@mberman84 - Can you review this PR when you have a chance? I addressed your comments and the CI is green. Once this PR is merged, I will create the follow-up PRs. |
mberman84
left a comment
There was a problem hiding this comment.
I reproduced an annotation-loss regression on 8be713e in the hidden macOS app, even with the organizer closed. Highlight a line, edit a different line in Edit mode, then save a copy. The PDF exported before the text edit contains the highlight. The copy exported after the text edit has no highlight. With the same synthetic document and same steps on base 264e193, the highlight is present in both copies.
In src/App.tsx, the content editor passes an empty page array to currentBytes to request the full document. The new kept-page filter treats that empty array as keeping zero pages, skips the page-indexed annotation entries, and takes the original PDF bytes for the edit. Please apply the filter only for a nonempty page subset and add a regression check that reads the highlight back from the edited copy.
The organizer’s save path now waits for markup restoration and passes the retained page order into OCR export as requested. All three CI jobs passed on the reviewed commit.
|
@mberman84 Could you take another look when you have a chance? The edited PDF now preserves existing highlights, and the smoke test reads the highlight back from the saved copy. I also fixed the pen smoke test to wait for the ink layer before starting a stroke. Windows, macOS, and Linux CI all passed on 38d883c. |
Problem
Folio can reorder pages and export a selection, but it can't delete a page. Dropping a blank or duplicate page means switching to another app. This is the first of three pull requests for #69 (delete, then rotate, then insert).
Change
Issue or approval
Part of #69. Approved here: #69 (comment)
How I checked it
npx tsc --noEmitandnpm run buildpassed.npm run test:thumbnails(15),npm run test:chat-math(18),npm run test:reader-security(8),scripts/test-link-history.mjs(7) andscripts/test-openrouter.cjs(4) passed.node --teststep from CI passed (26 passed, 1 Windows-only test skipped).npm run smokepassed twice.Before (Reorder pages, and the Pages tab's menu with two pages selected) and after (the same menu with Delete, Organize pages with pages selected, and after deleting them):
[before-reorder-pages.png]

[before-pages-menu.png]

[after-pages-menu.png]

[after-organize-selected.png]

[after-organize-deleted.png]
