* cli: report an empty benchmark layout instead of panicking
Return a clear error before benchmark work starts when the document contains no spreads.
* test: report a benchmark error for documents with no spreads
Create a structurally valid round-tripped document with no spreads and require bench to exit 1 with the clear error.
* cli: report failures after keep-going scripts
Keep executing requested steps while retaining the first failure in Report, so failed scripts return nonzero before save/export.
* docs: describe first script failure in Report
Describe the first failing step without assuming all callers stop immediately.
* test: cover keep-going failure reporting and output guards
Exercise failures before and after a successful step, preserve the first failure, and require both output paths to remain absent.
Option, with or without Shift, on a letter, digit, symbol or Space types a
character on macOS, so the window takes the key before the menu bar sees
it. The bar carried such a user shortcut as its key equivalent and the
window's dispatcher left the key to the bar, so the shortcut ran nowhere.
These shortcuts now stay in the app, like modifier-less ones.
Paste ignored a bitmap on the system clipboard: a screenshot or an image
copied in a browser had to be saved and placed. Paste now places it.
- edit.pasteImage {base64, name?, spread?, at?} embeds the image in the
selected empty frame, or in a new frame centered on `at` at its stored
resolution (72 ppi when none) and at most 60% of the page width, as
File > Place sizes it. Save and reopen and IDML export keep the pixels.
Images over 64 million pixels and names without an image extension are
refused.
- Ctrl/Cmd+V pastes the image egui delivers with no text, and Edit >
Paste reads the clipboard's bitmap, or the first image file of a copied
file list, when there is no text or the text is only an address.
- The menu read waits at most 1.5 s on its own thread, with one read in
flight at a time.
- With a native menu, objects copied here still paste as objects until
the pasteboard's change count shows a newer copy.
- ui.paste takes {image} for the control channel.
#1478 brought its argument fixes and their tests to main, in their reviewed form: main's is_subcommand/usage_for, values_present and the two tests are kept, and the branch's earlier copies are dropped. What this branch adds on top stays: the argument-surface tests in tests/it/args.rs and perf's --frames/--chars/--images in the usage.
Review fixes for #2304:
- Each pointer-less drop asks the system where the pointer is when its raw input arrives, and
converts it with that input's window rect and the UI scale, instead of one sample taken at the
later UI pass for the whole batch. Drops with pointer events keep their own pointer, and the
system is still only asked when a drop brought none.
- system_pointer is cfg'd off on wasm with its only caller; Services::pointer's docs say a drop
without a pointer lands in the middle of the view.
- pointer.rs: the AppKit flip is a pure function with a test, documenting why it flips against
the main display only (winit's window positions use the same origin).
- Test: a filled compound path takes a dropped image through its ring, not its hole.
Split out of #2073. Port of #1307's drops and #1666.
- Several images dropped together load the place cursor in the order they
came, each run of them where it comes among the other files, after the
images it already holds; click to place them one by one.
- One image dropped off a frame that takes it loads the place cursor instead
of being placed at once; on such a frame it still fills it.
- A drop is handled in its order, each file at its own pointer, and a dialog
(a multi-page PDF's Import Options, an alert) cancels the rest.
- On the web, files dropped together are read as one batch (none if one
can't be read), and a single dropped image loads the place cursor.
Split out of #2073. winit sends no pointer events during a drag from another
application on macOS, so a Finder drop had no pointer and never found the frame
under it. The host now gives the pointer's place on the screen
(`Services::pointer`, `PointerFn`: the system's points before the UI scale,
from `NSEvent.mouseLocation`), and `take_pending_drops` uses it for the files
that came without a pointer, divided by egui's zoom factor and made relative
to the window.
Split out of #2073. Port of #1307, #1392 (grid) and #1432 (thumbnail and count).
- File › Place takes several files; images load the place cursor in the
order chosen (`place.load` `files`, `append`), after the ones it holds.
A multi-page PDF or an alert stops the batch, and a file that can't be
placed returns its error to `app.placeDialog`.
- Each click places the next image; arrow keys while dragging lay out a
grid (`place.grid`) and are handled even at a limit; Escape unloads the
rest (`place.cancel`). Undo of a loaded image's asset cancels the queue.
- The cursor shows how many images are loaded.
- On the web, Place picks several files and the inbox loads consecutive
images for the same document as one batch.
The script command threw away the result of each export, so a PDF with
a drop shadow came out with nothing on stderr, while run --export
printed "warning: 1 object(s) with soft effects ... exported as images".
Each warning an export returns now goes to stderr as "warning: ...".
The JSON report on stdout is unchanged.
`validate_pdf` accepts `--standard x4|x1a`, and both its own usage string and the
module docs say so, but the line in the global `USAGE` left it off -- and that
line is exactly what `validate-pdf --help` slices out. So the option was
documented everywhere except the one place a user would look (noted in review).
`subcommand_help_names_the_options_that_subcommand_takes` asserts it, checks the
parser and the help agree by refusing an unknown standard, and does the same for
`run --cmd` and `mcp --automation-read-root` so this is about subcommand help
rather than one line.
The assertion was that the complaint names `--nope`, which a parser rejecting
unknown options would do just as well -- so it did not pin the thing the test is
named for (noted in review).
`validate-pdf --nope` and `validate-pdf nope.pdf` are now compared with the name
taken out, so the shape of the failure has to be the one an ordinary missing path
gets. That holds the behaviour without asserting the operating system's wording
for a missing file, which an earlier round of review rightly took out of here.
Review suggested asserting the JSON report instead. There is none to assert:
`validate-pdf --nope` fails at `std::fs::read`, before any check runs, and
writes nothing to stdout -- which `failed` already requires.
Controlled by adding `o if o.starts_with("--") => return Err(...)` to
`validate_pdf`:
left: "designcraft-cli: unknown option <name>\n"
right: "designcraft-cli: <name>: No such file or directory (os error 2)\n"
The old assertion passes against that left-hand side, since it names `--nope`.
`<sub> --help` answered about that subcommand without first asking whether the
subcommand was one, so `designcraft-cli typo --help` printed the whole usage and
succeeded. `typo` on its own was an error and `typo --help` was not, which is
backwards: a script checking the exit status carried straight past a misspelled
command (noted in review).
`is_subcommand` reads the names out of `USAGE` rather than listing them again,
so one added to the usage text cannot be missing here, and `usage_for` now uses
the same line parser instead of its own copy. An unknown name falls through to
the dispatch and fails there, as it already did without `--help`.
Measured over every name the usage lists -- run, commands, describe, script,
app, mcp, perf, bench, validate-pdf, links -- each still answers on stdout and
exits 0, while `typo` and `nonsense` exit 1. The test asserts both halves, so
the check cannot quietly become a block on subcommand help.
winit 0.30 gives an undecorated window WS_CAPTION and WS_BORDER; on some systems the compositor
reserves that frame, so the content is drawn offset (black bars at the top and left) while the
pointer keeps the client coordinates. A per-frame guard strips the styles again after every
winit flag change and keeps a maximized window clear of the taskbar. Fixes#1295.
egui-wgpu doubles its vertex buffer when a frame outgrows it, and wgpu's
default largest buffer is 256 MiB. Opening a 160-page InDesign catalogue
produced a frame with 137 MB of vertices; egui-wgpu asked for a 275 MB
buffer, the device refused it and the app stopped. The device now takes
the adapter's own largest buffer, as it already did for the texture side
(2047 MiB on DirectX 12 here), and the log says both limits.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>