Found while testing crates/engine/src/cmd/object.rs:299-313 (object.stroke: `st.tint = v as f32`, `st.gap_tint = v as f32`; the no-selection path at :273 clamps, this one doesn't)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Bleed and Slug were selectable from the toolbar, the View menu and
`view.screenMode`, and were stored, but the canvas only ever asked whether the
mode was Preview or Presentation. Both therefore drew exactly what Normal drew:
guides, frame edges, the other non-printing marks, and content reaching across
the pasteboard.
They are preview modes now, and what each spread shows reaches out to its box:
the bleed for Bleed, the bleed and the slug for Slug (Slug shows every printing
element, and a slug narrower than the bleed does not pull the edge back in).
Preview and Presentation still stop at the trim.
The slug guide was never drawn either, so the Slug colour in Preferences ›
Guides & Pasteboard was stored, exported and round-tripped while nothing read
it. It is drawn beside the bleed guide, in that colour.
`Spread::bleed_rect`'s body becomes `outset_rect`, which measures either offset
from the page edges, with `bleed_rect` and `slug_rect` as its named callers.
Cells and cell styles had no first-baseline setting, so every cell set its first line by the
Ascent offset (the font's typographic ascender). IDML documents that set FirstBaselineOffset on a
cell style (CapHeight is common, often through a table style's body region) composed every row
taller than the document asked for. With a font whose typographic ascender is a full em (Avenir),
each row grew about 2.6 pt and long tables overset, losing their last rows.
- doc: Cell.first_baseline / first_baseline_min; CellStyle.first_baseline / first_baseline_min,
applied by CellStyle::apply_to and carried through resolve_cell_style's BasedOn chain.
- idml: FirstBaselineOffset and MinimumFirstBaselineOffset read and written on cells and cell styles.
- compose: a cell's text frame uses the cell's first baseline offset and minimum.
- engine: table.setCell, style.cell.create/edit take firstBaseline / firstBaselineMin; table.get
reports them; style.cell.create fromSelection captures them.
- tests: import through BasedOn and a table style's body region, a cell's own override, IDML round
trip; composer cap height vs ascent and a fixed minimum; command parameters and validation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The conflict was in links.rs, where main's atomic relink work (b050343a) and
this branch's path gate both changed `update`. Kept main's mechanism (build the
replacement with relinked_asset, then insert it) and this branch's gate (a link
craft-docpath refuses is missing and never read).
relinked_asset now takes the path to read and the link to record separately.
Previously they were one argument, safe only because update passed the raw stored
link; passing the resolved path to the old signature would have rewritten every
relative link to an absolute one on each refresh.
Also passes None for the document in main's embedded-status test, where the asset
has no link so the document is irrelevant.
craft-libs#169 is merged, so the fork pin is no longer needed. Pinned to
storytold/craft-libs 82a24b00 (main after the merge) rather than the older
12281d07, which predates resolve_absolute and the Windows colon refusal.
Found while testing crates/engine/src/cmd/mathexpr.rs:73-83
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Found while testing apps/designcraft-cli/src/main.rs:361 (`--scale` parse) and :386 (export); crates/render/src/lib.rs:422-423 (render_page)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Tool readouts (the Page tool's size while dragging, smart-guide distances, the
resize readout) took their unit from the UI's own setting, which nothing changes
from picas, so a document set to inches read in picas. The tool context now takes
the active document's horizontal ruler unit, and the Page tool's W/H use the
horizontal and vertical units, as the Control and Properties fields do.
Test: tool_readouts_measure_in_the_documents_units (picas before).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CgGsJkVe5GYG9qK6VFdECa
Found while testing crates/idml/src/import.rs:2748 (stroke_from: StrokeWeight, MiterLimit), also El::num in crates/idml/src/xml.rs:96 and the plain `.parse().ok()` calls around import.rs:1833, 2823 and 2832
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scratch exports from running the app and the CLI land in outputs/. It is
not ignored, so `cargo xtask assets` — which scans tracked and untracked
files alike — reports every PNG and PDF in it as an asset with no row in
ASSETS.md, and the check cannot pass on a machine that has ever run the
app with an output directory.
Merges upstream/main into the branch, resolving 12 conflicted files, and reconciles where the two sides meant different things — notably the format version, where both had independently defined version 2 (EPS sources here, pinned paragraph defaults on main), so a document without EPS was being written as version 1 and re-upgraded on load.
Verified locally against main b17efb2d: cargo test --workspace --no-fail-fast 2869 passed / 0 failed, cargo fmt --check clean, cargo clippy --workspace --all-targets -D warnings clean, xtask layers and wasm ok.
Found while testing crates/textimport/src/docx.rs:183 (run_attrs, w:sz) and :206-214 (para_attrs, w:spacing/w:ind via the `tw` closure)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Hamza's diagnosis of the forgotten OpenGL failure, with the filter reordered so it covers any backend and does not hold another machine's record against this one, plus a regression test.
No workflow runs on this PR: every one is path-filtered and apps/designcraft/src/gpu/backend.rs matches none. Verified locally on 653f83b8 instead — cargo test --workspace --no-fail-fast: 2847 passed, 0 failed, 5 pre-existing ignores; cargo fmt --check clean.
Builds on the fix in this branch, which spotted that a failed OpenGL was
being forgotten because `failed` is filtered to this platform's
candidates and OpenGL is no candidate off Windows.
Rather than spare OpenGL from the filter, run the filter before the
previous start's backend is added. A stored entry that is no candidate
here came from another machine and still says nothing, so it is dropped
as before; the backend a start was actually running on is added
afterwards and stays, whichever backend it is. That keeps the same crash
out of the next instance without naming OpenGL or the platform, and
without holding a failure recorded on someone else's machine against
this one.
Adds the regression test: on macOS, where Metal is the only candidate, a
start left on OpenGL has to keep it out of the instance, while a stored
OpenGL entry that never ran here is dropped.
The merge compiled, but six tests showed where the two branches meant
different things. Fixes, in order of consequence:
- Format version: both branches had independently defined version 2 —
here for retained EPS sources, on main for pinned Keep Lines Together
and drop cap defaults, with an `upgrade` that runs below 2. Writing 1
for documents without EPS then re-ran that upgrade on load and rewrote
their paragraph styles, so saving and reloading changed the document.
EPS now asks for version 3 and everything else stays at 2.
- place.drop into a frame: main turned Auto-Fit off so that resizing a
frame crops rather than refits, and this branch had carried the older
FillProportionally along while moving the geometry out of the edit.
Main's behaviour is the intended one.
- save() compacts unreferenced assets now, so the format test has to
place its EPS for the version sniff to see it at all.
- EPUB entries are named from the asset's file stem (asset_path), not
its bare id: images/logo-<id>.png.
- Command parameters are validated strictly, so the PDF page test sends
each command only the parameters it takes.
- The relink batch's "commits once" check read a process-wide revision
counter, which a test running beside it can advance; the single undo
step is what actually shows it committed once.
The EPS place tests move to cmd/file/eps_place_tests.rs: they write real
files, and main's file-system guard reads src files without seeing inline
#[cfg(test)] modules, but exempts _tests.rs ones.