Skip to content

Delete pages in a new Organize pages mode - #85

Open
joswalt wants to merge 6 commits into
Forward-Future:mainfrom
joswalt:organize-pages-delete
Open

joswalt wants to merge 6 commits into
Forward-Future:mainfrom
joswalt:organize-pages-delete

Conversation

@joswalt

@joswalt joswalt commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Reorder pages becomes Organize pages. It works as before: changes are a draft shown on the thumbnails, and Save downloads a new copy, so the original file and the open tab are never changed. Dragging and the "Move page N to" field still move one page at a time.
  • Ctrl-click (⌘-click on macOS) and Shift-click select several pages, as in the Pages tab since Export selected PDF pages from the thumbnail menu #68.
  • Delete removes the selected pages, from the toolbar or with Delete or Backspace, without asking, since nothing is saved until Save. It's unavailable when it would remove every page.
  • Undo and redo inside the organizer (Ctrl+Z, Ctrl+Shift+Z or Ctrl+Y; ⌘ on macOS) step through deletes and moves. Cancel discards everything.
  • Right-clicking selected thumbnails in the Pages tab offers Delete next to Export. It opens the organizer with those pages already removed, so Undo can bring them back.
  • The copy is called "name (organized).pdf", with Open organized copy; both replace the "(reordered)" wording. Highlights and notes are saved into the copy as before; marks on deleted pages are dropped.
  • Version history shows the new order compressed into ranges ("4, 1–3, 5–100") only when pages moved, and lists deleted pages. It no longer says "Updated annotations" when every mark was on a deleted page. Form-field values don't record their page, so they still count as surviving.
  • The keyboard shortcut list and the README include the organizer's shortcuts.

Issue or approval

Part of #69. Approved here: #69 (comment)

How I checked it

  • macOS, on this branch alone (rebased on 0590fac):
    • npx tsc --noEmit and npm run build passed.
    • npm run test:thumbnails (15), npm run test:chat-math (18), npm run test:reader-security (8), scripts/test-link-history.mjs (7) and scripts/test-openrouter.cjs (4) passed.
    • The node --test step from CI passed (26 passed, 1 Windows-only test skipped).
    • npm run smoke passed twice.
  • The new smoke check, "organizing pages deletes, undoes and redoes, keeps at least one page, and saves the chosen pages in order":
    • deletes pages from the Pages tab's menu, and Undo brings them back still selected;
    • checks that the Delete button and the Delete key do nothing when every page is selected;
    • covers Ctrl/⌘-click selection, Delete, Backspace, undo, redo, and dragging a page;
    • checks that focus moves to the selected page after a menu action;
    • reads the saved copy and checks its exact pages and order.
  • The existing reorder checks were updated for the new names and still pass, including filled form fields in the copy and annotations following their pages.
  • Windows and Linux: not run myself; CI covers both.

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-reorder-pages

[before-pages-menu.png]
before-pages-menu

[after-pages-menu.png]
after-pages-menu

[after-organize-selected.png]
after-organize-selected

[after-organize-deleted.png]
after-organize-deleted

joswalt and others added 2 commits November 7, 2026 23:07
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 <cursoragent@cursor.com>
Dragging a thumbnail a second time in one smoke run froze the page on
Windows CI. The existing reorder check still covers dragging.
joswalt and others added 3 commits November 10, 2026 22:21
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	src/App.tsx
#	src/VersionHistoryPanel.tsx
#	src/versionHistory.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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