Files
pdfcraft/parity
Osvaldo DuranandClaude Opus 5.5 d64a597d51 feat(tabs): rename the file from its tab (Rename… / double-click)
The tab context menu gets Rename…, and a double-click on a document tab does the same: a small
dialog opens with the name selected (without its extension) and renames the file on disk in its
own folder. The document stays open in its tab with its undo history and view; Recent files,
Reopen Closed Tab and the file watcher follow the new name (#2102, #2867).

- Engine: pdfcraft_engine::new_file_name / rename_target (the checks) and Session::rename_file
  (the move). The rules are the same on every system, so a synced folder keeps working: no path
  separators or < > : " | ? *, no control characters, no Windows device names (CON, NUL, COM1…),
  no trailing dot, at most 255 characters; the extension is kept and added back when left out; a
  case-only rename is allowed. Refused with the reason when the name is taken, the file is
  read-only or in use, the document was never saved, or it has unsaved changes.
- Window: the name is checked as it is typed (the reason shows under the field; Rename waits for a
  usable name). A document with unsaved changes gets Save and Rename: it is saved in place first,
  and renamed only if the save went through.
- Automation: doc_rename {doc, name}, held to the write root for both names.
- 6 labels in all 22 catalogs (Rename and File name already had rows); parity core.rename-file.

Tests: engine rename::tests (names, refusals, the move incl. read-only and unsaved), automation
doc_rename_moves_the_file_and_refuses_with_reasons, window rename_ui::tests (menu, live refusals,
Save and Rename, no Rename for a document without a file).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 16:18:10 -04:00
..