Files
ElyOffice/tasks/reviews/R7.6-r2.md
T
ZacharyZhang-NYandClaude Opus 5.5 13546ea899 R7.6: Windows and Linux print (#3)
Windows prints through the system dialog at the document's paper;
Linux through the desktop portal, the dialog's choices laid out by Ely.
Round 3 findings fixed without a further review, as the rules say.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-16 16:59:46 -04:00

4.0 KiB
Raw Blame History

FAIL

  • crates/ely-platform/src/print/win.rs:210; crates/ely-platform/src/print/linux/sheets.rs:199 — The 2 mm fit allowance still permits silent clipping, so round 1's paper-size finding is only partly fixed. A 600×842-point PDF containing a black mark at x=597–599 returns Ok(true) through Microsoft Print to PDF, which produces a 595.32-point-wide A4 page with that mark missing. Linux composition onto A4 also succeeds and removes the mark; an interior control square survives both paths (.work/r76-review-r2/paper-comparison.log). Separate paper-name matching tolerance from actual content fit: reject overflow beyond device-rounding error before submitting the job. Add a near-standard-size regression with content at the page edge.

  • crates/ely-platform/src/print/linux/sheets.rs:332 — Printable annotations without /AP are silently omitted. A valid PDF 1.7 Square annotation with /F 4, /Rect [50 100 150 180], red /C and /IC, and no appearance stream renders 8,000 colored pixels in the real PDF worker, with damaged=false. Its print_copy still has no /AP; composing that copy succeeds but produces a completely blank page (.work/r76-review-r2/worker-probe.log, content-comparison.log). Generate missing printable appearances before flattening, or use a renderer that synthesizes them. Test rendered output from the actual print-copy path, including an annotation without /AP.

  • crates/ely-platform/src/print/linux/sheets.rs:321 — Annotation placement ignores the NoRotate flag. On a page with /Rotate 90, a printable Square annotation with /F 20, /Rect [50 100 150 180], and a 100×80 appearance is rotated with the page instead of retaining its orientation about its anchor. The worker's print copy preserves the correct appearance, but the composed output moves it to a disjoint rectangle: 16,000 pixels differ, representing the missing original and incorrectly placed replacement (.work/r76-review-r2/content-comparison.log). Account for NoRotate when composing the annotation transform and add a rendered regression on a rotated page.

  • crates/ely-platform/src/print/linux/sheets.rs:268 — Generated annotation resource names overwrite existing page XObjects. With an existing /ElyAnnot0 drawing a blue square and one printable red annotation, objects.set("ElyAnnot0", look) redirects the original page's /ElyAnnot0 Do to the annotation appearance. Printing the real worker's copy replaces the blue square with another red rectangle; the ordinary annotation control renders unchanged (.work/r76-review-r2/content-comparison.log, probe-source.log). Allocate annotation names that are absent from the inherited resource dictionary, preserve existing bindings, and test both original content and the added annotation.

  • crates/ely-platform/src/print/linux/choices.rs:70 — The page-setup parser expects reverse_portrait and reverse_landscape, but GTK serializes these orientations as reverse-portrait and reverse-landscape. Selecting either reverse orientation therefore fails before printing. Actual Gtk.PageSetup.to_gvariant() output and the exact-source parser reproduce both errors (.work/r76-review-r2/gtk-settings.log, linux-exact-probe.log); the existing test uses the wrong underscore spelling. Parse the page-setup values specified by the portal contract and test serialized GTK values.

  • crates/ely-platform/src/print/linux/choices.rs:98 — Open-ended GTK ranges cannot be parsed. Entering 2- in the dialog produces start=1, end=-1, serialized as page-ranges="1--1"; parsing the endpoint as u32 fails with invalid digit found in string. GTK serialization and the exact-source parser reproduce this (.work/r76-review-r2/gtk-settings.log, linux-exact-probe.log). The existing tests supply 1-, which is not GTK's serialization of that choice. Recognize GTK's -1 endpoint sentinel, expand it to the document's last page, and test the resulting printed pages.