Commit Graph
310 Commits
Author SHA1 Message Date
c43203a482 Port release fixes to main: platform-tests (#9305)
* desktop: position menus and dialogs against the actual Windows display

(cherry picked from commit 76f52b00dd)

* test: click File and print to PDF on an offset portrait display

(cherry picked from commit 9e79bae8d0)

* test: hit adjacent toolbar controls after moving to portrait

(cherry picked from commit b486ba01e4)

* Allow a third Metal drawable in native macOS fullscreen

(cherry picked from commit 7db123a913f49177ce3d53e54bb9f2b5044861ee)
(cherry picked from commit 7d4c3cfa11)

* Skip the Metal surface lookup between fullscreen transitions

(cherry picked from commit d7e6ac8a3f96afca091a9d64ce4e43d2cc489647)
(cherry picked from commit ede39fcaba)

* Deliver XFA field typing through the native input path

(cherry picked from commit fae3ec8053)

* Wait for the PDF to open before running redaction commands

(cherry picked from commit 9a76183b1f)

* Wait for the unlocked document and the active signing page in UI tests

(cherry picked from commit 6721d2dd3f)

* Isolate successful nightly socket preparation from stable-profile tests

(cherry picked from commit 6ff99bde51)

* Type fractional UI test inputs using the active formatting region

(cherry picked from commit f5f02ea845)

---------

Co-authored-by: Codex <[email protected]>
Co-authored-by: FredApps <[email protected]>
2026-12-04 17:44:48 +01:00
67e3288769 Port release fixes to main: reader-web (#9306)
* Return keyboard to reader on blank page view click

(cherry picked from commit b12d744c3a)

* Check field draft survives background focus handoff

(cherry picked from commit 82abf52b1a)

* Preserve the OCR text drag anchor over a scanned page

(cherry picked from commit a28bdd3db1fd5723736b038a16bf7ac13795baf6)
(cherry picked from commit bbb0c61a1c)

* Restore saves to the embedding web page

(cherry picked from commit 24702af7e6)

* Keep host copy saves from marking the open document saved

(cherry picked from commit 2624b9b9d2)

* Use pinned APIs in Space Audit and host save checks

Port of the host save test half only; the Space Audit half is covered by another open PR.

(cherry picked from commit bbde94e743)

* Read the browser clock when painting comment and file timestamps

(cherry picked from commit cbda2fd3ff)
(cherry picked from commit c5984569d1)

* Web: give the document session a browser wall clock (#8957)

(cherry picked from commit b90c6de6e0)

* Test organize thumbnails after moving a page

(cherry picked from commit 0230ac0fc7)

* Test organize deletion of selected and tile pages

(cherry picked from commit 9a12b9b1fb)

* feat(view): rulers along the page area (view.rulers)

View ▸ Show/Hide ▸ Rulers (Ctrl+R / ⌘R) reserves a strip along the top
and left of the document area and draws rulers in the measurement units
preference, from the top-left of the page under the pointer (or the
current page) in its displayed orientation. Major ticks use the 1/2/5
interval that keeps labels apart at the current zoom, the tick count is
capped, and a marker follows the pointer. The choice persists, and the
control channel takes `rulers=on|off` and reports `rulers`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit c8a854134f)
(cherry picked from commit dcb941b3f9)

---------

Co-authored-by: FredApps <[email protected]>
Co-authored-by: Codex <[email protected]>
Co-authored-by: Terra854 <[email protected]>
Co-authored-by: yusufmntm <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-12-04 16:13:04 +01:00
2845f072fb fix(windows): keep the integrated title bar's window borderless (#8845, #8793, #9040) (#9297)
winit 0.30 gives an undecorated window WS_CAPTION | WS_BORDER. On some Windows
systems the compositor still reserves that frame, so the content is drawn below
a black bar while the pointer keeps the client coordinates, and a click lands
above the control. PhotoCraft, VectorCraft, FigCraft and DesignCraft fixed the
same symptom by stripping WS_CAPTION/WS_BORDER and having Windows recalculate
the frame; winit puts them back on every flag change, so the guard runs once per
frame and only reads the style once they are gone. WS_THICKFRAME stays, so edge
resizing and snap keep working. Only the integrated (undecorated) title bar is
guarded; the system title bar is untouched.

Ports storytold/photocraft#2401. Not yet verified on affected hardware.

Co-authored-by: FredApps <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
2026-12-04 16:12:56 +01:00
ae3c7b7592 chore(deps): pin craft-libs to the rev the 0.23.2 release builds against (9888a5855) (#9308)
Release has built against craft-libs 9888a585 since 0.23.2; main stayed on 6afe03f5b, so
main could not take the release-only UI fixes that use the newer craft-libs APIs (centred
TextField, tab wheel browsing, bounded document preview width, wheel messages for fitted
page spreads). This moves main to the same rev; Cargo.lock only changes the craft-libs source.

The 12 craft-libs commits behind this rev are being put on craft-libs main in
https://github.com/storytold/craft-libs/pull/5306.

Co-authored-by: FredApps <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
2026-12-04 16:12:23 +01:00
FredApps fabd0f5030 Merge pull request #2729 from rangoDJ/feat/web-embedded-mode
feat(web): embedded mode hides external community links (#2490)
2026-12-04 12:34:46 +01:00
FredApps 6ed2b9dab1 Preserve the normal Windows frame when closing a minimized window [skip ci] (#8952)
(cherry picked from commit 29fca6d43d)
2026-12-04 11:56:37 +01:00
FredApps 0885691b8f Merge current main and validate embedded mode values 2026-12-04 11:38:54 +01:00
eliets2andeliets2 1f26293482 Save per-file batch log with step status and failure reasons (#6519)
* Save per-file batch log with step status and failure reasons

Users need an honest per-file record after a batch run instead of only opaque JSON, so a failing file and its reason are not lost.

Add a plain-text per-file log to the batch result and an optional CLI log path that writes one section per file with step status, output name and failure reason plus final counts, annotating step errors with the step name.

Test: batch_log_names_failed_file_step_and_reason failed before the change and passes after.

* Address review for pull request 6519

* Batch log: escape backslashes, wire the CLI log option

* Compare the escaped output path in the batch log test

* Address review for pull request 6519

* Repair review branch integration

* Format the files this pull request changes

* Repair review branch integration

* Repair review branch integration

* Keep dry-run output names clear of files that already exist

* Give the dry-run log test its own output folder

* Address review for pull request 6519

* Format the files this pull request changes

* Repair review branch integration

* Tighten the change after a final review

* Tighten the change after a final review

* Repair review branch integration

* Address review for pull request 6519

* Format the files this pull request changes

* Address review for pull request 6519

* Repair review branch integration

* Address review for pull request 6519

* Format the files this pull request changes

* Repair review branch integration

* Address review for pull request 6519

* Format the files this pull request changes

* Address remaining review requests

* Tighten the change after a final review

---------

Co-authored-by: eliets2 <[email protected]>
2026-12-03 15:39:04 +01:00
FredApps 7cce4ce173 test: resolve nightly launches in the socket tests without installing the profile
cargo test runs the pdfcraft binary's unit tests in one process. The single-instance socket
tests called launch_profile::prepare, which installs the nightly profile in craft_nightly's
process-wide OnceLock, so tests that ran after them saw a nightly launch: the window icon test
compared the nightly icon with the stable one, and stable_defaults_and_nightly_version_line
found is_nightly() true. The FreeBSD workflow runs plain cargo test and failed this way.

The socket tests now parse and validate the launch the same way, without installing it.
2026-12-02 10:27:50 +01:00
FredApps 4cf59f81c2 Merge pull request #7558 from jweaver3/fix/cli-flag-operand-7516
cli: read option values without matching another option's operand
2026-12-01 10:55:10 +01:00
rangoDJ 689012bac9 Merge main into feat/web-embedded-mode and port #2490 onto the craft UI port
Main's UI port (#8160) rewrote the home screen, the title bar and the control options. The embedded flag now hides the community card in the start screen and the Discord button in the title bar, and set_option takes the egui context.
2026-11-30 20:33:30 -05:00
FredApps 9a9534b27a Merge pull request #8810 from storytold/fix/pdfcraft-windows-startup
Recover startup on Windows OpenGL-only GPUs and record first-frame diagnostics
2026-11-30 19:15:15 +01:00
Codex c0621caa19 Exercise the Windows GPU fallback with each renderer override 2026-11-30 18:24:56 +01:00
Codex b4b34e2d0d Use a valid random control token for the startup GUI test 2026-11-30 15:17:12 +01:00
Codex 653c335a9c Verify desktop startup stages reach the log while the window is open 2026-11-30 14:52:00 +01:00
Codex 22bf80b038 Use the native Linux display-handle dependency for the clipboard 2026-11-30 14:49:25 +01:00
Codex 451419a35d Use the focused Wayland seat for Flatpak copy and paste 2026-11-30 14:27:54 +01:00
FredApps 810f32475f Merge pull request #8809 from storytold/fix/windows-caption-restore
Windows: keep Maximize and Close reachable after restoring the window
2026-11-30 14:20:33 +01:00
Codex 9fbb41dbec Keep automatic GL recovery with explicit power preference and time the first successful pass 2026-11-30 13:48:03 +01:00
Codex 4d4854fbeb Keep caption buttons visible on vertically staggered monitors 2026-11-30 13:34:33 +01:00
Codex 051c07ed61 Format startup launch construction 2026-11-30 13:13:59 +01:00
Codex 90a460cc7d Record timed startup stages through the first UI frame and preserve explicit renderer overrides 2026-11-30 13:13:31 +01:00
austin62jakeandClaude Opus 5.5 a6d31b9100 M3: an OpenGL adapter comes after another adapter of its vendor, before kinds are compared (#4134)
wgpu's OpenGL adapter has no device id and guesses its kind from its
strings: every Intel GPU is "integrated". With no display known (Remote
Desktop), an Intel discrete GPU's OpenGL adapter therefore outranked its own
Direct3D 12 adapter, was declined, and the app fell back to glow although
Direct3D 12 worked (CodeRabbit). An OpenGL adapter now comes after any
other adapter of the same vendor, matched by vendor since OpenGL has no
device id, before kinds are compared. An OpenGL-only GPU still beats the
software adapter, whose vendor is Microsoft.

The test now models wgpu's OpenGL adapters as wgpu reports them: the
vendor's id, device 0 and the guessed kind.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 13:10:23 +01:00
austin62jakeandClaude Opus 5.5 74566b5d04 M3: of one GPU's adapters, the OpenGL one is picked last, whatever order wgpu lists them in (#4134)
pick_adapter ranked adapters without their backend, so a GPU that wgpu
offers through both Direct3D 12 and OpenGL got its Direct3D 12 adapter
only because wgpu lists it first. The backend is now the last part of the
ranking. An OpenGL-only GPU still beats the software adapter by kind, and
the selector then declines it so that glow starts on that GPU.

The test covers Direct3D 12, Vulkan, OpenGL and software adapters, in
both orders and with no display known (FredApps' review).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 13:10:23 +01:00
austin62jakeandClaude Opus 5.5 54e4e522d4 M3: the adapter selector runs on Windows even when no display names its GPU (#4134)
The selector, which now declines wgpu's OpenGL backend, was only
installed when a display's GPU was found by its PCI ids. A display that
has none, such as Remote Desktop's, left wgpu's own choice in charge,
and that could still pick an OpenGL-only GPU. It now runs on Windows
always; with no display known, pick_adapter ranks adapters by kind, most
frugal first, as wgpu's low-power choice does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 13:10:23 +01:00
austin62jakeandClaude Opus 5.5 89b477ae67 M3: on Windows, a GPU wgpu can only reach through OpenGL draws with eframe's OpenGL renderer (#4134)
An Intel HD 2500 or 4000 (Ivy Bridge) has no Direct3D 12 driver, so wgpu
picks its OpenGL backend. That backend fails in Surface::configure a few
seconds after the window opens ("Failed to wait for GPU to come idle"),
after the start-up retry with OpenGL can help, so the app closed with a
white window (#519, #4134, #5553). eframe's own OpenGL renderer works on
the same GPUs, which is the PDFCRAFT_RENDERER=gl workaround.

The adapter selector now declines an adapter on wgpu's OpenGL backend on
Windows, unless WGPU_BACKEND asked for it, so the existing start-up retry
draws with eframe's OpenGL renderer instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-30 13:10:23 +01:00
Codex 15e0a68ae1 Keep restored Windows caption controls within the monitor work area 2026-11-30 13:10:18 +01:00
Codex 038e8911ec build: pin the page viewport anchoring fixes 2026-11-30 12:45:38 +01:00
Dylan M. Taylor 4ef8250943 feat(pdfcraft): wire craft-nightly for self-isolated nightly launches (#8669)
* feat(pdfcraft): wire craft-nightly for self-isolated nightly launches

* fix(nightly): preserve version probes and app startup behavior

* fix(nightly): bump craft-nightly for single-instance sockets and add regression tests

* test(nightly): preserve app profile preparation behavior
2026-11-29 15:58:04 -05:00
Dylan M. Taylor 8a5468e6eb fix(pdfcraft): pass None to socket_path() in Windows unit test (#8657) 2026-11-29 03:25:25 -05:00
Dylan M. Taylor be459f88d3 feat(nightly): onboard PdfCraft to signed two-stage nightly releases (#8643)
* feat(nightly): onboard PdfCraft to signed two-stage nightly releases

* chore: update Cargo.lock for rfd dependency in pdfcraft app

* chore: retrigger CI checks

* fix(nightly): enable Linux package_formats (including Flatpak) in signing policy

* fix(nightly): fix unused import, attribute nightly icons, and wire -Nightly/-BuildOnly in package.ps1

* test(nightly): exclude packaging/** from coverage and add nightly bootstrap unit tests
2026-11-29 01:09:39 -05:00
jweaver3 820f2eb32c cli: test ordinary extract, split and render through the atomic writer
On the revision integrated with main's shared atomic writer
(craft::atomic), ordinary extract, split and render write the requested
pages, parts and image size, leave the source byte-for-byte unchanged,
and leave nothing else in the folder. The missing-value regression also
checks that a refused command writes nothing and keeps the source.
2026-11-28 22:53:30 -05:00
jweaver3 0c8d342f1c cli: read option values without matching another option's operand
`flag(args, "--name")` matched any token, so a value-taking option's
operand was taken for an option. With a password of `--out`,
`extract --password --out in.pdf --pages 1 --out out.pdf` read `in.pdf`
as the output and wrote over the source file.

Add `value_of_flag`, which walks the arguments by the command's option
spec as `validate_options` and `positional` do, and move `info`, `text`,
`combine`, `extract`, `split` and `render` to it. An option left without
an operand at the end of the line is now reported instead of being read
as absent, and a repeated option's last value is the one used.

Fixes #7516
2026-11-28 21:54:40 -05:00
FredApps 1c404e5238 Merge main into fix/macos-finder-open 2026-11-28 22:50:20 +01:00
Yuri GanugiandClaude Opus 5.5 da46aa2d02 macOS: files opened from the Finder, Open With or the Dock open again (#8491)
The port (#8160) dropped the result of AppleEvents::connect, the function that drains the Apple-event inbox into the file intake, so 'odoc' and quit events were never delivered. PdfCraftApp keeps it again as os_events, as in v0.22.0, and each frame's logic calls it before it opens the intake. Found by MarcGoudy (#8443).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 22:37:33 +01:00
FredApps 4733f25e1f Merge main into the main repair branch 2026-11-26 20:52:46 +07:00
FredApps 9b6e2a1660 Merge branch 'main' into fix/startup-activation-token 2026-11-26 13:22:30 +01:00
FredApps 9aee13f183 Merge #8180 into the main repair branch 2026-11-26 19:12:26 +07:00
Dylan M. Taylor c55c9ca155 Use the native private token writer in the CLI fixture 2026-11-24 06:20:31 -05:00
Dylan M. Taylor 5ea0f16556 fix: propagate PDFCraft locale to shared UI 2026-11-23 20:48:56 -05:00
Dylan M. Taylor 940c2b6b8f CI: clippy clean on all targets; fix the Windows print dialog build
After the craft framework port (#8160):
- Test modules gated by cfg(all(test, not(wasm32))) weren't recognised as tests by
  clippy, so their expect/panic calls counted as production code; gate them with
  cfg(test) and cfg(not(wasm32)) separately.
- Remove dead test helpers, restore the Windows manifest tests the port dropped,
  and fix the remaining lints (redundant clones and casts, unused imports).
- Page Setup on Windows called a main_window_handle() that doesn't exist; parent the
  driver dialog to the active window again, as before the port.
2026-11-23 16:07:08 -05:00
Dylan M. Taylor cf53c79625 Resolve the craft framework from https://github.com/storytold/craft-libs next at 0a6e42b80bfd586aee6ee1144aa98cf1ea37a844
Every framework path dependency and patch is now a git dependency at that revision.
Cargo.lock is regenerated against it separately.
2026-11-23 13:32:32 -05:00
Dylan M. Taylor df0f36ea67 prod merge: the web build compiles again: craft's dialogs feature (rfd panels, threads) is native only; the web saves through the platform BrowserFiles (Files::save: the browser's save picker or a download), with its own SaveTarget; native-only uses gated (window/dock tables, control server, RecoveryStore, reload watch, legacy app.ron, reveal); a web clipboard over EventClipboard; web OCR and print wake through Wake instead of the removed ctx field; pdfcraft-web takes a ControlChannel and protocol::REPLY_DEADLINE 2026-11-23 08:17:34 -05:00
Dylan M. Taylor d0e9ba10c5 prod merge: re-pin every craft-libs entry to the synced framework (f9d38c866, pushed pdfcraft-port head; incl. craft-pkcs7, craft-html, craft-xfa, craft-xfdf, craft-web-api/web-host, preflight's craft-cms), patch craft-font-catalog, craft-xfa and craft-xfdf to it as well (one craft-font-catalog in the lock), one lock resolve, regenerate ATTRIBUTION.md 2026-11-23 08:17:33 -05:00
Dylan M. Taylor 2288f7a37c prod merge: the web build's file service saves to an embedding page first (page_saves) 2026-11-23 01:49:16 -05:00
Dylan M. Taylor cca41815d9 prod merge: clippy clean (dead code from the port and the merge removed or test-only, whole-document text copies drained each pass, native menu frame wired, deprecated egui ids, codemod's doubled ctx parameters, type aliases) 2026-11-23 01:46:21 -05:00
Dylan M. Taylor 3404bf4ac7 port sync: the web build takes the platform browser file service (L-313, L-317) 2026-11-22 23:18:14 -05:00
Dylan M. Taylor b86eff8259 merge deps: union workspace deps at the port pin (wordmodel, mcp-server, jsonrpc; craft-pdf fonts; 0.22.0), hayro/framework patch paths, shared AGENTS.md with port facts, comment wording, port Cargo.lock restored. The lead re-pins craft-libs after the framework sync. 2026-11-22 22:50:16 -05:00
Dylan M. Taylor 333b287a8b Production merge skeleton: upstream/main 9b3e6d6f3 into area/app-1 6cfe35235, conflict markers left in (42 files; 4 modify/delete keep the port's deletion) 2026-11-22 22:39:00 -05:00
aiongg 3f3b3e634a Adopt the shared AGENTS.md (RFC-0072) (#7937)
* Adopt the shared AGENTS.md (RFC-0072) and test rules (RFC-0071)

* Point removed AGENTS.md section references at the shared standards
2026-11-20 18:10:17 +07:00