Commit Graph
4320 Commits
Author SHA1 Message Date
Eric Kaden e646bb8684 Merge remote-tracking branch 'upstream/main' into fix/exec-menu-attachments
# Conflicts:
#	parity/acrobat-features.toml
2026-10-22 11:31:44 -04:00
Eric Kaden a29dd8b94e Merge remote-tracking branch 'upstream/main' into fix/util-scand
# Conflicts:
#	parity/acrobat-features.toml
2026-10-22 11:31:44 -04:00
Combiler01 7d2b02633c Merge remote-tracking branch 'upstream/main' 2026-10-22 21:01:36 +05:30
Combiler01 df6783032b fix(edit): extract image to its own tag when arranging shared marked-content sequence 2026-10-22 21:01:28 +05:30
alehelandClaude Opus 5.5 fd971559e7 M3: going Home puts the expanded All tools away with no document open
With no document open the expanded view covers Home itself, so the control
option `home` changed no tab and the view stayed up (CodeRabbit's remaining
merge-risk note on 8a8bb92d). The option now puts the view away itself.
`going_home_with_no_document_puts_the_expanded_all_tools_away` was seen to
fail with the fix reverted.

Also doc comments on the view's `show` and `tile` and the sidebar's
`all_tools`, for CodeRabbit's docstring-coverage check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 17:29:03 +02:00
aiongg 9526363152 Build each crate's integration tests as one binary (#4087)
* Build each crate's integration tests as one binary

Every tests/*.rs file is its own executable that links the whole crate
graph. Move each crate's test files into tests/it/ as modules of one
tests/it/main.rs, for apps/pdfcraft, apps/pdfcraft-cli, automation, cos,
crypt, engine, render, sign and ui-egui. ui-egui's ui_group binary and
the support modules move into tests/it/ too. Crates with a single test
file keep it. The test executables go from 150 to 52, and every crate
runs the same number of tests as before.

ui-egui perf keeps its own binary (own process): its frame-time budgets
would charge each measurement for the other tests running beside it.

What the move needs:
- include_str!/include_bytes! and #[path] paths gain one "../".
- ui-egui: one GPU lock in tests/it/main.rs replaces the five per-file
  ones (content, document_links, editing, fill_sign, view), so one
  process creates one wgpu device at a time. The drop-line test in ui.rs
  and the screenshot blocks behind PDFCRAFT_*_SHOT(S) and
  CRAFT_UI_DOCKING_DIR, which render without holding it, take it too.
- pdfcraft winit_wayland_scroll: the vendored winit source it compiles
  names crate::event, so that shim lives in main.rs.
- parity evidence names the new paths.

* Name the one-binary test paths in docs and comments

- READMEs, docs, ATTRIBUTION and source comments name tests/it/<file>.rs.
- The oracle README's example filters with --test it encryption::qpdf_agrees.
- pdfcraft's GPU lock comment points at the UI tests' shared lock in
  crates/ui-egui/tests/it/main.rs.
2026-10-22 11:28:58 -04:00
Eric Kaden 7a9c3b28c7 Merge remote-tracking branch 'upstream/main' into fix/util-scand 2026-10-22 11:04:00 -04:00
alehelandClaude Opus 5.5 8a8bb92d33 M3: choosing a tool or another tab puts the expanded All tools away
The expanded view kept covering the workspace after a control client chose a
tool (`tool=organize`) or went Home (`home`), so the chosen panel or the Home
view never showed. The same held for a document tab click, Open Recent on an
open file, and the Combine files tab.

select_tool now clears the view, so every way of choosing a tool does. The
view also remembers which tab was in front when it opened, and another tab
coming forward puts it away, whichever path brought it there.

Each new test was seen to fail with the fix reverted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 17:00:41 +02:00
alehelandClaude Opus 5.5 cb21b2cce4 M3: opening a file and expanding All tools take the usual workspace path
Review follow-ups for the expanded All tools view:

- Opening a document left the view on, either over the new document (All
  tools as the default workspace) or waiting to reappear on the next switch
  back (Read as the default, or a mode override). Activating a document now
  puts it away, and the reset lives in enter_mode, which every workspace
  change goes through.
- The sidebar's expand button and `--tools full` assigned the mode directly.
  From Read the right panel saved on entry was not restored, and from Edit the
  Edit text tool stayed active. Both now go through switch_mode, as the mode
  bar does, so the sidebar shows the All tools list again on collapse.

Each new test was seen to fail with the fix reverted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:47:14 +02:00
Combiler01 3552193703 Modifed Test to run on Flaky Cl Test 2026-10-22 19:20:44 +05:30
Ridzzz0Alam b98d8a2819 M6: form_fill also warns about lines too tall or too wide for their box (#4018)
Two cases still drew a value cut off without saying so. A single-line
value at a fixed font size taller than the box (12 pt text in an 8 pt
field) was checked only for width, so it fit sideways and was cut at the
top and bottom. In a multiline field, a character wider than the box
becomes a line of its own, which fits vertically but is cut at the sides.

The single-line and comb branch now compares the line's ascent to
descent against the clip box (a new `Overflow::High`), and the multiline
branch reports the widest wrapped line that is still wider than the box.
An empty value draws nothing, so it is never reported, however small the
box.

Fixes #4018
2026-10-22 15:47:54 +02:00
jonathanwxh-cell 17f84e4391 Merge main into feat/optimize-compatibility-version
Retain compatibility regression coverage with upstream content-boundary and image-size tests.
2026-10-22 21:34:02 +08:00
Hamza 59163e3ad3 Redaction: a per-pass form budget, so depth 50 cannot fan out
Review of #3670: with the depth limit at 50, depth was the only bound on the
form walk. A form that draws the next level twice, or a cycle of two forms,
costs 2^depth interpretations — at 12 that was 4096, at 50 it is a hang on a
file anyone can send.

The pass now also counts the forms it enters, and the budget is Edit text's own
`MAX_FORM_VISITS`, referenced rather than copied. Running out is treated as a
form that cannot be read, which is what the depth limit already did: removed in
Apply, the page left alone in Verify.

Measured with the new test:

  depth 50, fan-out and a 50-deep cycle, with the budget   5.9 s
  depth 22, fan-out, budget removed                        still running after
                                                           5 minutes

A `const` assertion ties this pass's depth limit to Edit text's, so the build
fails rather than a redaction quietly removing what a reader still shows (the
review's third point). Checked by setting the limit back to 12:

  error[E0080]: evaluation panicked: assertion failed:
  MAX_DEPTH >= pdfcraft_edit::text::MAX_FORM_DEPTH

Tests: a page whose forms each draw the next twice, and the same with the last
form drawing the first again — both must finish and still redact the page.
2026-10-22 18:26:21 +05:00
Eric Kaden ae69aea627 M6: doc comments on every Panel variant 2026-10-22 09:22:27 -04:00
Eric Kaden c9fa6a7627 M12: a date pattern whose date the first can't keep gives way to a later one 2026-10-22 09:01:48 -04:00
Osvaldo DuranandClaude Sonnet 5.5 24a96e1a80 Merge upstream main 80b7d215 into pr/attachments
Merged cleanly, no conflicts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22 12:58:52 +00:00
Eric Kaden 9dab857ca3 M12: only date clauses are other ways to type a date, and a date is rewritten only into a first pattern that keeps it 2026-10-22 08:48:21 -04:00
Combiler01 adc297977a Fixes for Ubuntu Cl 2026-10-22 17:45:04 +05:30
Adrien Alberti 356e6cefe0 M12: type or pick an architect's 1:N drawing scale in the Measure panel, applied at once
On top of #3011's page unit, the Drawing scale block gets a "1:N" field (1:50,
1/100, 50, 1:2,5 are read; zero, negative, huge and malformed values are
refused with a message) and a combo of common architect scales (1:1 to
1:1000). Either one fills the existing fields (1 mm of paper = N mm, shown in
metres) and applies the scale to the page without a second click, only when
the document allows annotation. Apply scale is unchanged.
2026-10-22 13:34:55 +02:00
Combiler01 136e21355e Fixes 2026-10-22 17:04:13 +05:30
Dylan M. Taylor 80b7d21525 fix: add generic font-family fallbacks in demo (SonarCloud css:S4649)
Each font-family in assets/demo/showcase.html named only a specific font with
no generic fallback. Add an appropriate generic (serif/sans-serif/monospace/
cursive/math) so text still renders if the specific face is unavailable.
2026-10-22 07:09:59 -04:00
BFlat 04c773367c Merge pull request #4051 from storytold/readme/app-icon
README: the app icon above the title
2026-10-22 18:02:14 +07:00
bflatastic faef579296 README: the app icon above the title 2026-10-22 17:58:11 +07:00
Ridzzz0Alam bd00a131b6 M6: form_fill warns when a value does not fit its field (#4018)
With a fixed font size, a text field's appearance cuts a long value at
the edge of its box, but form_fill only answered "filled": n. A person
sees the cut; an agent filling forms through the CLI or MCP did not.

The text appearance builder now notes when the text it lays out does
not fit: one line wider than the box, or wrapped lines below it.
forms::appearance::value_overflow asks that for a field's widget,
Document::field_overflow for a field by name, and form_fill adds a
warning for each filled field that is cut off. The value is still saved
whole and drawn as before; auto-sized fields shrink to fit and are not
reported.

The automation tests' inline PDF builder moves to a shared pdf_of.

Fixes #4018
2026-10-22 12:52:40 +02:00
alehelandClaude Opus 5.5 8d1d7b11d5 Merge remote-tracking branch 'origin/main' into feat/all-tools-expand-view
Conflicts:
- crates/ui-egui/src/panels.rs: main made `panel_header` pub(crate) with
  `back: Option<&str>` (the Calculation order page uses it too); this branch
  needs its leading button to be Expand on All tools. It now takes
  `lead: Option<(&str, &str)>`, the button's icon and tooltip, and the three
  callers pass theirs (calc_order_ui.rs included).
- i18n catalogues: both sides appended entries at the same place; kept both.
- ATTRIBUTION.toml: catalogue hashes recomputed.

Main added eleven catalogues since this branch was cut (ca, ckb, fi, hi, id,
ko, lo, nb, ro, sq, th), and their coverage tests require every UI literal, so
the eight All tools view strings are translated in them too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 12:26:42 +02:00
alehelandClaude Opus 5.5 2358430e79 Merge remote-tracking branch 'origin/main' into fix/background-hidden-by-page-backdrop
Conflicts:
- crates/edit/src/lib.rs: keep both `backdrop` (this branch) and main's new
  `background` module (#2992, page background colour for Export to Word).
- crates/engine/src/lib.rs, crates/ui-egui/src/marks_ui.rs: union of the
  imports (main added BlockKey, block_overlapping and FontFamily).
- ATTRIBUTION.toml: catalogue hashes recomputed.

Main added eleven catalogues since this branch was cut (ca, ckb, fi, hi, id,
ko, lo, nb, ro, sq, th), and their coverage tests require every UI literal, so
the six Add Background backdrop messages are translated in them too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 12:20:28 +02:00
Ridzzz0Alam a204078cbb M4: Extract keeps the bookmarks of the pages it copies (#4020)
page_extract (and Split, which extracts each part) wrote the copied
pages without any outline, even when every page was extracted, though
the tool says bookmarks come along.

extract_pages now reads the source's bookmarks with the destinations
mapped to the copies, as Combine already does, and writes them as the
new document's outline. A bookmark whose page was left out goes, unless
a bookmark under it stays. A source without bookmarks still gets no
outline.

Fixes #4020
2026-10-22 11:51:48 +02:00
Osvaldo DuranandClaude Sonnet 5.5 6a5e6728e0 Merge upstream main 9a0ec645 into pr/attachments
Resolved by the keeper:
- ATTRIBUTION.toml: upstream's copy, hashes recomputed
- crates/organize/src/tests.rs: additions from both sides, upstream's first

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22 09:50:52 +00:00
Combiler01 22fffd63ea fix(ui-egui): restore added image editing in content_ui and stretched_picture on settled 2026-10-22 15:01:43 +05:30
Combiler01 65a8d0ed05 fix(ui-egui): collapse nested if in image_input clippy warning 2026-10-22 14:01:16 +05:30
jonathanwxh-cell c05f00c67a fix(engine): generate Protect keys and salts with getrandom (#4000) 2026-10-22 16:07:14 +08:00
Combiler01 4d93503937 Merge remote-tracking branch 'upstream/main'
# Conflicts:
#	ATTRIBUTION.toml
#	crates/automation/src/tools.rs
#	crates/automation/tests/automation.rs
#	crates/edit/src/images.rs
#	crates/edit/src/lib.rs
#	crates/edit/src/tests.rs
#	crates/engine/src/lib.rs
#	crates/ui-egui/src/create_ui.rs
#	crates/ui-egui/src/edit_text_ui.rs
#	crates/ui-egui/src/editing.rs
#	crates/ui-egui/src/i18n/es.tsv
#	crates/ui-egui/src/i18n/pt-br.tsv
#	crates/ui-egui/src/i18n/vi.tsv
#	crates/ui-egui/src/lib.rs
#	crates/ui-egui/tests/content.rs
#	crates/ui-egui/tests/editing.rs
2026-10-22 13:32:03 +05:30
Eric Kaden 4665685446 Merge remote-tracking branch 'upstream/main' into fix/exec-menu-attachments
# Conflicts:
#	crates/engine/src/tests.rs
#	crates/js/src/tests.rs
#	crates/ui-egui/tests/forms.rs
2026-10-22 03:19:20 -04:00
Eric Kaden 4d22d2b74a M12: doc comments on the picture-alternatives tests 2026-10-22 03:17:40 -04:00
Eric Kaden b00ab835a6 Merge remote-tracking branch 'upstream/main' into fix/xfa-edit-picture-alternatives
# Conflicts:
#	crates/engine/src/tests.rs
#	crates/xfa/src/tests.rs
2026-10-22 03:17:29 -04:00
Eric Kaden 82115ed65c Merge remote-tracking branch 'upstream/main' into fix/util-scand
# Conflicts:
#	crates/js/src/tests.rs
2026-10-22 03:15:57 -04:00
Eric Kaden de6dba001b Merge remote-tracking branch 'upstream/main' into fix/xfa-layout-drops-usage-rights
# Conflicts:
#	parity/acrobat-features.toml
2026-10-22 03:15:22 -04:00
jonathanwxh-cell b6b67a86d8 fix(automation): guard MCP dispatch and bound line and file reads (#3924) 2026-10-22 15:08:56 +08:00
aiongg 9a0ec64568 Merge pull request #3983 from aiongg/next
Integration batch: 218 PRs on main
2026-10-22 03:01:16 -04:00
Combiler01 8e97138a54 fix(i18n): restore catalog keys for Lithuanian and Vietnamese 2026-10-22 12:30:04 +05:30
Combiler01 67f1a57f08 Merge remote-tracking branch 'upstream/main'
# Conflicts:
#	ATTRIBUTION.toml
#	crates/ui-egui/src/content_ui.rs
#	crates/ui-egui/src/i18n/ar.tsv
#	crates/ui-egui/src/i18n/bg.tsv
#	crates/ui-egui/src/i18n/cs.tsv
#	crates/ui-egui/src/i18n/de.tsv
#	crates/ui-egui/src/i18n/el.tsv
#	crates/ui-egui/src/i18n/es.tsv
#	crates/ui-egui/src/i18n/fr.tsv
#	crates/ui-egui/src/i18n/hu.tsv
#	crates/ui-egui/src/i18n/it.tsv
#	crates/ui-egui/src/i18n/ja.tsv
#	crates/ui-egui/src/i18n/kk.tsv
#	crates/ui-egui/src/i18n/lt.tsv
#	crates/ui-egui/src/i18n/pl.tsv
#	crates/ui-egui/src/i18n/pt-br.tsv
#	crates/ui-egui/src/i18n/ru.tsv
#	crates/ui-egui/src/i18n/sl.tsv
#	crates/ui-egui/src/i18n/te.tsv
#	crates/ui-egui/src/i18n/tr.tsv
#	crates/ui-egui/src/i18n/uk.tsv
#	crates/ui-egui/src/i18n/vi.tsv
#	crates/ui-egui/src/i18n/zh-hans.tsv
#	crates/ui-egui/src/i18n/zh-hant.tsv
#	crates/ui-egui/src/lib.rs
#	crates/ui-egui/src/panels.rs
2026-10-22 11:59:39 +05:30
aiongg 022a970fab Integration: #2173's restored-paper test lets the dialog relabel its button before clicking Save as PDF
Windows CI has a default printer, so the button still read Print in the
frame where the test cleared the printer; the other print tests already
run a frame first.
2026-10-22 06:22:38 +00:00
aiongg 8662b2fe6a Merge r2-fix-ui: print test waits for its render; ui tests serialize GPU rendering 2026-10-22 05:41:48 +00:00
aiongg b99c774f01 Integration: serialize GPU rendering in the ui tests (batch render tests × lavapipe)
Each kittest harness creates its own wgpu/Vulkan instance on first render, and
lavapipe segfaults when one test creates an instance while another renders
(core dump: vkCreateSampler in libvulkan during a concurrent vkCreateInstance).
The batch tripled the rendering tests in editing.rs. editing and content take
the GPU lock view.rs and fill_sign.rs already use. Crashes over default-thread
runs: editing 11/40 before, 0/40 after; content 4/20 before, 0/20 after.
2026-10-22 05:41:37 +00:00
aiongg e85fca66e5 Integration: text field table labels in the batch's catalogues (upstream #3479 × r2 catalogues)
Albanian, Catalan, Finnish, Hindi, Korean, Indonesian and Romanian get all
22 text-field-table strings; Brazilian Portuguese gets the 4 limit messages
its full-union test requires. AI-assisted, marked in ATTRIBUTION.toml.
2026-10-22 05:34:34 +00:00
aiongg 3f3b913037 Integration: the dead-read print test waits for the preview rasters before checking idle (#2108 × print preview)
a_dead_options_read_wakes_an_idle_dialog asserted the dialog was idle after one
Harness::run. The print preview's page rasters render on the pool and ask for a
frame every 30 ms until they arrive; with kittest's 0.25 s step that is an
immediate repaint, so on a loaded machine run() exceeded its 4 steps
(canvas.rs finish_render_frame). The test now steps until no render is pending.
Under 24 parallel copies the old test failed 3 of 192 runs, the new one 0 of 72.
2026-10-22 05:33:31 +00:00
aiongg 8293832a98 Integration: Norwegian Bokmål page-gap labels (upstream #1836 × #3101) 2026-10-22 05:27:15 +00:00
aiongg 472717fcd7 Merge upstream main 88dad98dd into next
# Conflicts:
#	ATTRIBUTION.md
#	ATTRIBUTION.toml
#	crates/engine/src/dates.rs
#	crates/ui-egui/src/i18n/ar.tsv
#	crates/ui-egui/src/i18n/bg.tsv
#	crates/ui-egui/src/i18n/cs.tsv
#	crates/ui-egui/src/i18n/de.tsv
#	crates/ui-egui/src/i18n/el.tsv
#	crates/ui-egui/src/i18n/es.tsv
#	crates/ui-egui/src/i18n/fr.tsv
#	crates/ui-egui/src/i18n/hu.tsv
#	crates/ui-egui/src/i18n/it.tsv
#	crates/ui-egui/src/i18n/ja.tsv
#	crates/ui-egui/src/i18n/kk.tsv
#	crates/ui-egui/src/i18n/lt.tsv
#	crates/ui-egui/src/i18n/mod.rs
#	crates/ui-egui/src/i18n/pl.tsv
#	crates/ui-egui/src/i18n/pt-br.tsv
#	crates/ui-egui/src/i18n/ru.tsv
#	crates/ui-egui/src/i18n/sl.tsv
#	crates/ui-egui/src/i18n/te.tsv
#	crates/ui-egui/src/i18n/tr.tsv
#	crates/ui-egui/src/i18n/uk.tsv
#	crates/ui-egui/src/i18n/vi.tsv
#	crates/ui-egui/src/i18n/zh-hans.tsv
#	crates/ui-egui/src/i18n/zh-hant.tsv
#	crates/ui-egui/tests/fonts.rs
#	docs/localization-parity.md
#	docs/localization.md
#	docs/roadmap.md
#	parity/acrobat-features.toml
2026-10-22 05:22:09 +00:00
aiongg 4bd08a759b Integration: Albanian signature labels all translated (#3101 × r2 catalogues) 2026-10-22 05:00:09 +00:00
aiongg bbdbca628c Merge r2-fix-ui: tests the combined batch broke 2026-10-22 04:31:47 +00:00