Pass the original filename to file.openBytes so the engine removes one native extension. Cover Open and Drop, repeated suffixes, Unicode, bare and missing extensions, and IDML through the import inbox. Keep the full filename in import warnings.
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Found while testing crates/textimport/src/export.rs:18 (plain_char) and :177 (rtf)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Found while testing crates/epub/src/html.rs:47-54 (reading_order: the `it.hidden` check comes after the group's children are pushed)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
file.openBytes used the name it was given as the document's title as is. The
IDML path strips .idml/.indd/.indt, but a native document opened as
"Brochure.designcraft" kept the extension, and everything that adds it back
doubled it: Save in the browser downloaded Brochure.designcraft.designcraft,
Save As suggested that name, and the File Name variable showed it. The app's
own drop and open paths strip the extension before calling, so only hosts and
scripts that pass a file name hit it.
The title now drops one trailing .designcraft (any case). Other names are
unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ApvpyStzzHbKyDBNxpzn2Y
Found while testing crates/engine/src/math.rs:909 (to_svg, the `esc` closure used for each <text> glyph)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Found while testing crates/color/src/lib.rs:115 (Color::to_hsb, the `max == r` branch)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Found while testing crates/engine/src/cmd/mathexpr.rs:~50 (the math.svg query) vs insert at ~64
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Found while testing crates/geom/src/warp.rs:~44-52 (PathWarp::at)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Found while testing crates/engine/src/script.rs:30-47 (parse: `t.lines().enumerate()` runs over the trimmed text)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Found while testing crates/geom/src/hit.rs:32-35 (intersects_rect early-out)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>