299 Commits

Author SHA1 Message Date
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
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
austin62jake 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 <noreply@anthropic.com>
2026-11-30 13:10:23 +01:00
austin62jake 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 <noreply@anthropic.com>
2026-11-30 13:10:23 +01:00
austin62jake 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 <noreply@anthropic.com>
2026-11-30 13:10:23 +01:00
austin62jake 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 <noreply@anthropic.com>
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 Ganugi 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 <noreply@anthropic.com>
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
skylar taylor-barrick 20830d092c Route PDF parsing and rendering through shared craft-pdf (#2068)
* refactor(render): route PDF reading and rendering through shared craft-pdf (storytold/craft-libs#778)

* fix(render): convert u32 raster dimensions to usize for Pixels::zeroed

* fix(render): remove unused hayro_syntax imports in inspect

* fix(render): let shared raster dimensions reject rounded over-budget sizes before allocation

* chore(pdf): repin craft-libs to #2497 and align tests with shared contract

* fix(render): align remaining 8 tests and OutputLimit error with craft-libs contract

* docs(attribution): update ATTRIBUTION.md for shared hayro* dependencies

* docs(attribution): include adobe_data suffix for hayro-cmap in ATTRIBUTION.md

* docs(attribution): sync ATTRIBUTION.md with cargo xtask assets --write

* docs(licenses): update NOTICE hash and hayro-interpret asset licences in LICENSES.toml

---------

Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-20 02:53:23 -05:00
Dylan M. Taylor fd7c19ec69 red8 g3: app red round 8 fixes 2026-11-19 14:38:58 -05:00
Dylan M. Taylor 219abc1a58 App red round 7 g2: fixes and wiring from the g2 fixer 2026-11-19 12:26:12 -05:00
Dylan M. Taylor df8c2d54be app red 5 (g5) (swarm/red5); committed by the lead 2026-11-18 23:06:26 -05:00
Dylan M. Taylor d9ac7bfeff lead: every kittest harness creator installs the runtime first (L-227; tools-lead/harness-install-codemod.py, 361 creators) 2026-11-18 19:46:37 -05:00
Dylan M. Taylor b1f4af2974 L-227: the app creator installs the framework runtime (native and web) with the startup language's fonts; test install helpers (rfix1). L-228: fonts_ready goes; a language change installs its fonts (lead) 2026-11-18 19:46:08 -05:00
Dylan M. Taylor 5526134502 lead: the workspace compiles with its tests. main.rs: claim without the assumed portable flag, title bar from settings.layout, the app opens and attaches its settings store (attach_settings, owed by pdf-shell-w9), control channel, ctx (L-208); q221: redact_props pub (pdf-forms-w13 row 63), comments::thread_id pub, the grid test reads its texture bytes; PastePlacement pub (its field is) 2026-11-18 19:25:13 -05:00
Dylan M. Taylor c07c6954e7 test compile fix 2 (all) (swarm/tfix2); committed by the lead 2026-11-18 19:22:11 -05:00
Dylan M. Taylor 79477f3909 Point hayro-postscript to storytold/craft-libs (storytold/craft-libs#790) (#7828) 2026-11-18 19:08:53 -05:00