chore: sync upstream (554 Commits) #9
No reviewers
Labels
No labels
herkunft/alpha-feedback
status
blockiert
status
zu-testen
typ
bug
typ
docs
typ
enhancement
typ
feature
typ
idea
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
iris/pdfcraft!9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/sync-upstream-20261026"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Upstream-Sync von
upstream/main(554 Commits). Fast-Forward.64e0868bfeat(ui): menus from craft-menu, native on macOS (#4752)01b696dftest(ui): CJK interface tests skip without craft-fonts (#4706)13bfbd07Merge pull request #4737 from storytold/chore/deps-safe-refreshfc578a0bchore(deps): bump 11 safe dependency updates83ba2868build: pin craft-update to craft-libs main (495e597) (#4728)cda2d019build: pin craft-update to craft-libs main (495e597) (#4721)833cd63cproposal(redact): prevent retention of confidential vector paths behind clipping (F-008) (#4577)86a4120afeat: startup update prompt modal and direct self-updating (#4654)e90f7882Migrate PdfCraft to egui 0.37 (#4591)d764a8ebrefactor(ui): side panels on craft-ui task panes and the shared rail (#4606)71b47b51M3: a Page tools menu in the Pages panel (#4415) (#4583)8708f35bM6: with NeedAppearances, check boxes and radio buttons draw their /MK caption (ISO 32000-2 Table 224) (#4454)58d368f1M10: Word export keeps an italic run inside its sentence's paragraph (#4158) (#4411)0c124edcM3: an attachment's row opens on a double-click and has a right-click menu (#3466) (#4513)7dd44301M2: a luminosity soft mask in a DeviceCMYK group converts as ISO 32000-2 10.4.2 says, so 100% K masks fully (#4423)Pages with a comment or text box over a scanned picture count as having text, so the recognition run skipped them ("the page already contains text") and Edit did nothing for them. The run started by Edit now also reads the picture of such a page, as Acrobat does, and the words the page's text already has are not added twice. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>7461c297) into pr/attachments 77d9f7509f41809cf7) into pr/attachments 524ca95848afa8e184) into pr/attachments e46cc70d73dc41044b) into pr/attachments: the Vietnamese and Lithuanian catalogs' new rows beside this change's 96afca8fd25fdd820binto pr/attachments e5c2ea2bffbc7a12b9into pr/attachments: catalogs and ATTRIBUTION hashes by key (ATTRIBUTION.toml ) 1edc63907e3f5a784cinto pr/attachments 156c69f5cfd8b270581e498ec214d8b27058b05d0cce4aReview follow-ups for the expanded All tools view: - Escape closed the view even when a dialog or prompt over it owned the key. It now checks modal_open() first. - set_option("mode", …) changed workspace without clearing the view, so leaving and coming back to All tools reopened it. Another workspace now puts it away, as switch_mode does. - Right-to-left translations are stored in display order, so a multi-word Arabic query typed in logical order missed its tool. Such a query now matches word by word, as the command palette's search does. Each test was seen to fail with its fix reverted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>b0e5c6ebinto PR #3227 and fix version parser lifetime 9b0aeb0f69932bf9c6into pr/attachments f24a26b951dab31491into pr/attachments c257793c2cLayout notes are lowercase clauses joined with semicolons, and the bar put the first right after the layout's own sentence ('11 fields. the form's usage rights...'). The first note now starts with a capital.ec0a9650into pr/attachments e76adf812aA form past the pass's depth limit is removed rather than walked. That is the fail-safe choice for a redaction -- marked content inside a form we cannot read would otherwise survive -- but it also removes whatever else that form drew, marked or not. At a limit of 12, a page with a 13-deep chain lost the text of its innermost form with nothing in it marked. Measured on a page that draws HEAD, a chain of forms whose innermost draws DEEP, then TAIL, with only HEAD marked: chain before after (12) after (50) 1 HEAD DEEP TAIL DEEP TAIL DEEP TAIL 12 HEAD DEEP TAIL DEEP TAIL DEEP TAIL 13 HEAD DEEP TAIL TAIL DEEP TAIL 14 HEAD DEEP TAIL TAIL DEEP TAIL 50 HEAD DEEP TAIL TAIL DEEP TAIL 51 HEAD TAIL TAIL TAIL The limit is now 50, which is what the renderer follows (MAX_NESTED_INTERPRETATION_DEPTH) and what Edit text's reader follows (text::MAX_FORM_DEPTH). So anything a reader can see, this pass can walk. The last row is why 50 and not more: at 51 the renderer does not draw DEEP either, so removing that form costs nothing visible and the fail-safe still holds. Fixes #3645's data loss. The other half of that report -- that nothing tells the user when a form is removed -- is untouched: Report.forms_removed is counted but the engine's edit pipeline does not carry it out, and the one channel that reaches the result (doc.edit_notices) is typed TextNotice, for text that could not be drawn. Widening that type or adding a channel is a design choice for the maintainers rather than something to slip into this fix.Three of them, measured on main: pdfcraft-cli extract f.pdf --pages 1 --out --password (exit 0, and the PDF is in a file called `--password`) pdfcraft-cli check-one --edit f.pdf pdfcraft-cli: check-one: missing file pdfcraft-cli info /tmp/café.pdf (that é as one Latin-1 byte) thread 'main' panicked at library/std/src/env.rs:878:51: called `Result::unwrap()` on an `Err` value - An option whose value is a **file or folder** refuses a value that is another option, and names the way out for a file that really starts with `-`: `./--name`, as `--root` already offered. That also closes the gap the option walk left for those: an unknown option in a value position was skipped along with the option it followed, so `combine --out --nonsense` wrote `--nonsense` instead of saying what `--nonsense` was. Only those options. A password or a title can be any string, `--page` included — `an_option_shaped_password_is_not_parsed_as_a_page_flag` pins that, and a bad `--page` or `--dpi` is reported by the command in its own terms either way. - `positional` asks the option table which tokens are values, instead of skipping the one after every option. The token after a flag that takes none is an argument: `check-one --edit f.pdf` read the file as `--edit`'s operand and then reported it missing. - Arguments come through `args_os`, so one that is not UTF-8 is a usage error rather than a panic. `std::env::args` panics while collecting them, so even `--help` ended that way. tests/options.rs covers each, and each fails without its fix (the file called `--password` comes back; "check-one: missing file"; exit 101 with that report).583c1ec6into pr/attachments c05997639f6dec57bfinto pr/attachments 642e92ae976898094einto pr/attachments 6bc9f1c544dbc7130binto pr/attachments f325b63c8affaf3123into pr/attachments 102f0b7bfbd676fd44into pr/attachments 473d65da3e88dad98dinto pr/attachments f6d047757d9a0ec645into pr/attachments 6a5e6728e080b7d215into pr/attachments 24a96e1a8095263631into pr/attachments f84d6b17e63e968c8ainto pr/attachments 542196d90739844f06into pr/attachments fd8d402e30Recognize text (one document) and Recognize text in multiple files ran their worker unguarded. A panic in the recognizer (third-party inference) or a worker that died holding the progress lock left the run in place: the progress notice stayed, and every later run was refused with "Text recognition is already running" until restart. - Both workers run inside `pdfcraft_engine::guard`; a panic becomes the run's error ("Recognize text failed: …", in the UI's language). - `poll_ocr` treats a poisoned progress lock as a failure: it clears the run or batch and says so. The batch's loop moved unchanged into `recognize_files` so it can run inside the guard. A thread that can't be spawned is #1871's (#1819), and Export and the Action Wizard are #4043's; this leaves both alone. Tests (crates/ui-egui/src/ocr_ui.rs): a panicking recognizer ends with the error; a page run and a batch whose worker died holding the lock are cleared with a notice. Both fail without the change. The OCR integration tests pass with the real models (PDFCRAFT_MODELS). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>0dc77fe4into pr/attachments 4ebf287e61The header keeps Acrobat's count of comments and adds the replies in small text below it ("16 replies"), left out when there are none and counting the whole document rather than the current search. Status changes and checkmarks are not replies. The plural label is in all 33 catalogues with each language's plural forms; ATTRIBUTION.toml records the new hashes and that the label is an AI-assisted translation not yet reviewed by native speakers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KvugvPrjZtPVudhh7cMa5457e531ccinto pr/attachments dd396c2096Found while testing crates/js/src/formcalc.rs:2328-2330 ("format" number-picture branch, `if num < 0.0 { text = format!("-{text}") }`) Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>a2ec27b4into pr/attachments: translation catalogs and notes kept from both sides, ATTRIBUTION hashes recomputed (conflicted: nothing) 8b2cefc04c"Attach {name}" and "Delete attachment {key}" were missing from EDIT_LABELS, so the translation-gap report left them out.* M4: Document Properties has a Custom tab for custom properties Document Properties has a new Custom tab between Fonts and Advanced. It lists the document's custom properties, and Name and Value fields with Add, Update and Delete edit the list. Clicking a listed property fills the fields with it. OK writes the changes through SetInfo in the existing "Change document properties" step, so one undo reverts them with the other tabs' changes. Add is off for an empty value, a name already listed, a name that check_custom_key refuses (its message is the button's tooltip), and a name the file already uses for an entry the list leaves out (not text, only padding, or past the 256 listed). A property already in the file under a refused name or a name that is not UTF-8 is listed, and Add, Update and Delete stay off for it, so OK cannot fail on it or write a different key. Clearing an /Info entry now removes it when /Info is a dictionary written directly in the trailer. set_info_entry returned without a change there, so a delete in the Custom tab, a cleared Description field and a doc_set_info clear left the entry in the file. It now writes a copy without the entry as a new indirect /Info. The engine re-exports check_custom_key and adds Document::has_info (organize::has_info). set_option("dialog", "custom") opens the tab. * Contributors: add dotCooCoo (Robert Lee) * M4: Add in the Custom tab stops at the 256 properties the tab lists Document Properties > Custom lists at most 256 properties, so a property added past that was saved but left out of the list when the dialog opened again. Add is now off once the tab's list or the file's own list holds 256; a new name goes after the file's entries, so a file with more than 256 keeps Add off after a Delete as well.* refactor(ui): side panels on craft-ui task panes and the shared rail The Tools pane and the open side panel are docked craft-ui task panes (craft_ui::panes::PaneHost, Columns policy, no title bars, not movable), and the rail is craft_ui::panes::Rail with the page navigation cluster as its foot. On the right, outermost first: the rail, Tools when Preferences > Tools panel side is Right, the side panel, the page. Read mode uses the same panes without Tools; All tools full view still covers them. Floating, tab groups and drag-in are gone with docking.rs. - Widths are resizable within the old limits and saved under a new side_panels preference (version 1) with the Tools side and open state. The old docking value is read once as plain JSON and dropped on save. - ui.dock becomes ui.panel {panel: tools|side, open, width}; ui.dock.reset resets the side panels ("Reset side panels"). - F4 shows or hides the side panel (reopening the last one) and Shift+F4 the Tools panel, as View menu commands. - craft-ui pinned to e9630ae7 (craft-libs#309). * fix(ui): side panels clippy lint and the dragged-width test's grab offset * chore(deps): pin craft-ui at 7c42807, whose pane resize edges work over the page * chore(deps): pin craft-ui at craft-libs main ea4c823, with panes::Rail