mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-29 17:54:59 +01:00
Merge branch 'main' into codex/fix-watermark-visible-crop
This commit is contained in:
860 files changed
+75712
-182514
No files matched your search
@@ -84,19 +84,19 @@ The PDF object graph *is* the model (`crates/engine/README.md` §The editing mod
|
||||
|
||||
## Agent control
|
||||
|
||||
Every user-facing feature is reachable headlessly (`AGENTS.md` §3):
|
||||
Every user-facing feature is reachable headlessly (app-agents.md rule 14):
|
||||
|
||||
- the **command registry** (`crates/engine/src/commands.rs`, 184 commands) generates menus,
|
||||
shortcuts and the command palette;
|
||||
- the **automation tool table** (`crates/automation`, 141 tools) is shared by `pdfcraft-cli run`
|
||||
and the opt-in **MCP server** (stdio only; `pdfcraft-cli mcp`), confined to `--root`;
|
||||
- the opt-in **UI control channel** (`pdfcraft --control FILE`; loopback, per-launch token) lets an
|
||||
- the opt-in **UI control channel** (`pdfcraft --control PORT`; loopback, token-authenticated) lets an
|
||||
agent inspect, click, type, run commands and take screenshots of the real interface.
|
||||
|
||||
## Safety
|
||||
|
||||
- `unsafe_code = "forbid"` workspace-wide; crates deny `unwrap`/`expect`/`panic!`; engine entry
|
||||
points keep a last-resort `catch_unwind` (`AGENTS.md` §4).
|
||||
points keep a last-resort `catch_unwind` (app-agents.md rule 13).
|
||||
- Every input-derived size is bounded (decompression, images, recursion, content per page).
|
||||
- `cargo xtask fuzz` runs nightly; every finding becomes a synthetic regression test.
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ the AI models named in `Co-Authored-By` trailers.
|
||||
|
||||
## In PdfCraft
|
||||
|
||||
- The About window is the `Dialog::About` arm in `crates/ui-egui/src/dialogs.rs` (Help ▸ About, `help.about`).
|
||||
- The About window is the hosted About opened by `open_about` in `crates/ui-egui/src/dialogs/about.rs` (Help ▸ About, `help.about`).
|
||||
|
||||
## Credit yourself
|
||||
|
||||
|
||||
+25
-3
@@ -39,8 +39,8 @@ the current choice and the other valid settings.
|
||||
The existing opt-in UI control channel uses the same preference:
|
||||
|
||||
```sh
|
||||
pdfcraft-cli ui --control /path/to/control.json set key=comment-tool-pinned value=true
|
||||
pdfcraft-cli ui --control /path/to/control.json state
|
||||
pdfcraft-cli ui --control 4242 --control-token-file /path/to/token set key=comment-tool-pinned value=true
|
||||
pdfcraft-cli ui --control 4242 --control-token-file /path/to/token state
|
||||
```
|
||||
|
||||
`ui.state.comment_tool_pinned` reports the boolean. `ui.set` accepts `true` or `false` and refuses
|
||||
@@ -87,7 +87,7 @@ By default PdfCraft's own crates (`pdfcraft*`) log at `info` and everything else
|
||||
`RUST_LOG` replaces that with env_logger-style directives, for example `RUST_LOG=debug`,
|
||||
`RUST_LOG=warn,pdfcraft_render=trace` or `RUST_LOG=info,wgpu_core=warn`; a directive ending in `*`
|
||||
covers every target starting with it (`pdfcraft*=debug`). The logger is
|
||||
`apps/pdfcraft/src/logging.rs`. It never records the control-channel token or document passwords.
|
||||
`craft_platform::logs`. It never records the control-channel token or document passwords.
|
||||
|
||||
## GPU surface limits
|
||||
|
||||
@@ -169,3 +169,25 @@ Relative includes resolve beside the config that contains them. Included directo
|
||||
digit-prefixed `*.conf` files, in lexical order; backups and disabled files are ignored. The scan
|
||||
limits each config to 1 MiB, visits at most 256 config files/directories, and bounds include depth
|
||||
to 16 and directory entries to 32,768. Cyclic includes are skipped.
|
||||
|
||||
## Fonts and attribution
|
||||
|
||||
- `CRAFT_FONTS_DIR=<craft-fonts checkout> cargo build` makes `crates/fonts/build.rs` embed the
|
||||
craft-fonts faces as `pdfcraft_fonts::CRAFT_FONTS`. Without it PdfCraft builds, tests and runs, but
|
||||
has no Japanese face: Japanese UI text shows replacement boxes and writing Japanese into a PDF
|
||||
returns an error. Release builds set it (`.github/workflows/release.yml`), and `ATTRIBUTION.toml`
|
||||
lists it as a `[[build_input]]`. Code that uses `CRAFT_FONTS` works when it is empty.
|
||||
- The desktop app reads one font already installed on the machine at run time, as the last interface
|
||||
fallback (`OnDemandFonts` with `SystemCandidates`, the craft font catalog). The page viewer can draw a CID font of an Adobe CJK
|
||||
collection that a PDF does not embed with an installed face, on screen only
|
||||
(`crates/render/src/system_font.rs`; `RenderConfig::system_fonts` is off by default and set by
|
||||
`RenderConfig::on_screen`). Neither font is embedded, shipped, committed or copied, and nothing drawn
|
||||
with them is saved or printed. `PDFCRAFT_SYSTEM_FONTS=0` turns both off; `cargo xtask screenshots`
|
||||
sets it.
|
||||
- `cargo xtask assets` fails when an asset file has no `ATTRIBUTION.toml` entry, an entry's hash is
|
||||
missing or wrong, a licence is not on the allowlist or its file is missing, or an image, icon or font
|
||||
names Adobe as author, except a font under OFL-1.1 alone. The Adobe non-visual data allowed is the
|
||||
closed list in `xtask/src/assets.rs` (`adobe_data = true`). `cargo xtask demo-pdf` fails if the PDF
|
||||
embeds a font that is not an `ATTRIBUTION.toml` entry.
|
||||
- The ArtCraft name, wordmark and logos in `docs/brand/` are trademarks of the ArtCraft Team, not open
|
||||
source (terms in `docs/brand/LICENSE-brand.txt`); they stay in PdfCraft, unmodified.
|
||||
+2
-2
@@ -171,7 +171,7 @@ update the numbers.
|
||||
and read-only automation regressions cover the change; per-glyph validation and the
|
||||
separate embedded-font extraction gap remain open. No readiness or backlog re-count.
|
||||
- **Impact:** every one is a user who lost trust. Crash reports outrank feature work
|
||||
(`AGENTS.md` §4).
|
||||
(app-agents.md rule 13).
|
||||
- **Estimate:** 45–80 h (≈ 0.2–0.4 h per issue). **Doc:** this file.
|
||||
|
||||
### 7. OCR reads only unaccented Latin
|
||||
@@ -305,7 +305,7 @@ update the numbers.
|
||||
first reading has not been taken yet.
|
||||
- **Evidence:** text extraction (word-F1 0.98 against `pdftotext`) and now rendering (above); qpdf
|
||||
checks written output on every CI run since `PDFCRAFT_ORACLES_REQUIRED`. Acrobat captures must
|
||||
stay local in `plan/acrobat/` (clean-room, `AGENTS.md` §1.1).
|
||||
stay local in `plan/acrobat/` (clean-room, clean-room.md).
|
||||
- **Still missing:** Acrobat itself as the reference rather than other open renderers; form
|
||||
calculation and signature validation; the interop suite that opens every kind of output we write
|
||||
(encrypted ones above all, after #774) in pdf.js and MuPDF; and 15 of those 250 files could not
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# Known gaps of the egui-to-craft port
|
||||
|
||||
Status: 10 app tests remain ignored after the port's test phase (2026-11-20). Remove the `#[ignore]` when its gap is
|
||||
fixed. Framework items (F-n) are in the port workspace's follow-up list.
|
||||
|
||||
| Test | How it fails | Likely cause |
|
||||
|---|---|---|
|
||||
| `comments::a_double_click_on_a_replace_text_opens_its_one_window` | the group's window doesn't open on the double-click | the comment part receives the first press and release; the second press reaches the comment canvas tool with click count two |
|
||||
| `editing::paragraph_edges_and_frames_are_caught_without_aiming_for_the_hairline` | a click off the text doesn't apply the typing | F-115 follow-up: the edge band and the click-off rule overlap |
|
||||
| `marks::the_preview_shows_the_page_the_range_selects_under_the_marks` | the stamp preview doesn't show the selected page | F-161: the preview overlay's clip is inverted and its geometry a pass behind |
|
||||
| `panel_snapshots::every_panel_matches_its_snapshot` | all 11 accessibility-tree snapshots differ after updating the dock queries | L-298 defers pixel snapshots; these text snapshots need separate review |
|
||||
| `split_view_render::a_late_edit_turns_the_page_in_both_panes` | the palette does not turn the page | the port's palette control ignores the search value; production puts it in the query, which the shared palette now keeps in its own session. Typing the query and pressing Enter or activating the matching row also left rotation at zero; the pane rendering assertion has not yet been reached |
|
||||
+2
-2
@@ -66,7 +66,7 @@ date in the AppStream metadata. The binaries don't embed the commit yet.
|
||||
|
||||
**Fonts:** every job checks out [craft-fonts](https://github.com/storytold/craft-fonts) at the commit
|
||||
pinned in `release.yml` and builds with `CRAFT_FONTS_DIR` and `CRAFT_FONTS_REQUIRED=1`, so releases
|
||||
embed its Japanese fonts and fail rather than ship without them (`AGENTS.md` §1.4). Bump the pin
|
||||
embed its Japanese fonts and fail rather than ship without them (docs/development.md "Fonts and attribution"). Bump the pin
|
||||
deliberately.
|
||||
|
||||
**OCR models:** desktop packaging stages the Scan & OCR models (#103).
|
||||
@@ -154,7 +154,7 @@ neither the MSI nor the portable zip needs the Visual C++ redistributable.
|
||||
doesn't have. "Combine files in PdfCraft" (#585) is a second verb in the same component,
|
||||
`PdfCraft.Combine`, running `pdfcraft --combine "<file>"` once per selected file; the
|
||||
single-instance hand-off sends them with `"combine": true`, and the running app adds them to
|
||||
its Combine files tab (`OsEvent::Combine`). Both verbs come and go with `INSTALLPDFCONTEXTMENU`.
|
||||
its Combine files tab (`Intake::OpenFor` with action "combine"). Both verbs come and go with `INSTALLPDFCONTEXTMENU`.
|
||||
- The image right-click entry (#190) is the same kind of verb, `PdfCraft.CreatePdf`, for ten image
|
||||
types, in its own component (`PdfcraftImageContextMenu`) since it became optional. Its rows moved
|
||||
out of `PdfcraftApp`; that's safe because `MajorUpgrade` removes the old version before installing
|
||||
|
||||
@@ -56,7 +56,7 @@ never been measured side by side with Acrobat, and the first public releases (0.
|
||||
|
||||
- **Target identified from the installed app.** `/Applications/Adobe Acrobat DC/Adobe Acrobat.app`,
|
||||
`CFBundleShortVersionString` 26.002.21931. Inspected without launching it and without opening
|
||||
anything inside `Contents/Resources/JavaScripts/` (clean-room rules, `AGENTS.md` §2): the
|
||||
anything inside `Contents/Resources/JavaScripts/` (clean-room rules, clean-room.md): the
|
||||
`Info.plist` `CFBundleDocumentTypes` (the formats it opens: see
|
||||
[file-format-parity.md](file-format-parity.md)), the `.lproj` folder names (24 localizations,
|
||||
plus the MEA/MEH/NAF Middle East and North Africa editions named in `Resources/Sequences/`), the
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
How PdfCraft's tools, panels, shortcuts and feel compare with Acrobat Pro's current interface (the
|
||||
2023+ "new Acrobat": All tools pane on the left, quick-action toolbar, Home view). Behaviour is
|
||||
observed clean-room (`plan/acrobat/02-ui-ux.md`, local-only; `AGENTS.md` §2); nothing from Adobe's
|
||||
observed clean-room (`plan/acrobat/02-ui-ux.md`, local-only; clean-room.md); nothing from Adobe's
|
||||
interface is copied. Gaps ranked in [gaps.md](gaps.md).
|
||||
|
||||
**UI/UX fidelity ≈ 55% ready** (estimated), **30–60 h** additional to the features total.
|
||||
|
||||
Reference in new issue
Block a user