Commit Graph
3352 Commits
Author SHA1 Message Date
SofiaAFigueredoandClaude Sonnet 5 52fab678b6 Scope the File page's back-arrow hit area to the chevron
On Windows/Linux, the back arrow in the File (Backstage) page's side
panel was clickable across the whole 200px-wide row, not just the
chevron icon drawn at its left edge. Clicking anywhere in that row —
plain sidebar background to a user's eye — closed the File page the
same as clicking the arrow itself, with no visual cue it was
clickable.

Scope the click region to a narrow band around the chevron, the same
width already used for the macOS chevron fix (#2972). The row still
reserves its full 200x40 space for layout; only the interactive rect
shrinks.

Updated two tests that relied on the old oversized hit box to click
at the chevron's actual position, and added a regression test
asserting a click beside the arrow leaves the File page open.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-21 07:44:04 -03:00
Dominik StrebelandClaude Opus 5.5 aa8ca4bf1c Equations: double-clicks on the equation frame's grip and strip stay in the equation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:28:15 +02:00
Nikolai Nyegaard ea61d1fcb8 Options: list the languages alphabetically by their own name
- English (and Auto where offered) stays first as the source language and fallback; the rest sort by native name with accents folded, so Čeština is under C and Magyar under M; Cyrillic and CJK names follow the Latin ones
- The list used the registry order, which is the order the languages were added
2026-10-21 12:01:39 +02:00
Dominik StrebelandClaude Opus 5.5 cb2072bfe7 Equations: the equation being edited is framed as in Word
A thin outline as wide as the equation and as tall as its line, a grip over
its top-left corner and an options strip inside its right edge that opens the
equation menu; the argument the caret is in is shaded. Replaces the faint grey
shading around the equation alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 11:33:15 +02:00
Marco Arnulfo 5124ee6d76 DOCX: hand Word's TOC control to the TOC when the field ends in a paragraph of its own (#2427)
Word lays out an automatic table as its control around a TOCHeading, the entries with the field
opening in the first, and a last paragraph holding only the field's end. That paragraph isn't a
TOC entry, so the TOC was kept in its control with the markers in the body; Update Table then left
the heading out of the TOC and wrote a second control around the entries alone. The reader checks
that TOC with the end moved into the last entry and hands it over as the range read, as before.
2026-10-21 11:25:28 +02:00
Marco Arnulfo 35fdb45156 DOCX: hand WordCraft's own TOC control back to the TOC, keep it when a block control covers the heading (#2427)
A TOC whose heading isn't a TOCHeading is written with an empty heading paragraph inside the
control. Keeping the control around it on reading left that paragraph non-empty, so each save and
Update Table added a blank line (toc_menu_offers_update_field_after_save_and_reopen, #2182). The
reader now compares against the TOC the writer would actually wrap (written_toc_span), which also
keeps the original control when another block control covers the TOC heading.
2026-10-21 10:59:52 +02:00
Marco Arnulfo 07a9880c14 DOCX: keep Word's Table of Contents content control around a TOC the writer doesn't rebuild (fixes #2427) 2026-10-21 10:24:17 +02:00
Fin Warman cd3944c36e M2.1: check text-shadow geometry with translated masks 2026-10-21 09:06:00 +01:00
Nghiathan13andClaude Opus 5.5 a74b2cb8cf #2959: merge main into codex/2959-context-mini-toolbar
Doc conflicts (ROADMAP.md, docs/gaps.md, docs/ui-parity.md) keep both sides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 14:33:01 +07:00
Nghiathan13andClaude Opus 5.5 3b6040ee39 #2959: the context menu panel keeps its own width under the mini toolbar
The toolbar and the command panel share one popup whose justified layout stretched the panel
to the toolbar's width. The panel now takes the width egui measures in the popup's sizing
pass, so it matches the menu shown without the toolbar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 14:28:34 +07:00
FaabyyandClaude 7b19cd02d2 ODT: note table column widths in the progress docs
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-21 06:42:25 +00:00
FaabyyandClaude 58fda7ee21 ODT: table column widths are read, so a resized column survives a save
The importer ignored table:table-column and style:column-width and gave every
table equal columns, so widths set in LibreOffice (or changed in WordCraft and
exported) were lost on the next open.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-21 06:41:32 +00:00
Dylan M. Taylor e05b7fe86f Merge pull request #2381 from dylanmtaylor/ci/shared-nix-workflow
ci: switch to shared nix workflow from craft-common-actions
2026-10-21 02:39:43 -04:00
Diego Guerini 05b1c5a2e3 #2845 follow-up: clippy passes on Windows and Linux again (#3006)
`graphics.rs` allowed dead code only on macOS (where the Windows items are unused). Since #2845
the two indirect-validation functions are called only on macOS, so on Windows and Linux
`cargo clippy --workspace --all-targets -- -D warnings` stopped with "function is never used".
They now carry `allow(dead_code)` off macOS.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 18c7c1d114)
2026-10-21 13:31:39 +07:00
Fin Warman 5f5a12bf78 M2.1: pin font inputs in geometric layout tests 2026-10-21 07:14:51 +01:00
skylar taylor-barrick e3bb06a298 Merge pull request #800 from isaac-levine/ci-xtask-ci-workflow
CI: run cargo xtask ci on pull requests and pushes to main (#754)
2026-10-20 22:11:52 -06:00
skylar taylor-barrick cd709ea0a9 Merge current main into CI workflow branch 2026-10-20 21:31:13 -06:00
SlavenDj 67eb71facb #3370: the AutoSave text is part of the switch
Clicking the AutoSave label in the title bar did nothing; only the 30x16 switch
responded. The label was also selectable chrome: double-clicking it highlighted
"AutoSave" and Cmd/Ctrl+C copied it.

The label is now a clickable, non-selectable part of the switch, with the same
hover tooltip and pointing-hand cursor, and clicking either toggles AutoSave.
Regression test: clicking the label turns AutoSave off and on again.
2026-10-21 05:16:14 +02:00
SlavenDj 23c47b5c6f #3368: right-clicking a link hides the hover tooltip
The link tooltip (URL + "Ctrl/⌘+Click to follow link") stayed open when the
context menu opened. Tooltips draw above menus, so the URL box covered the
menu's first items (Cut, Copy, Paste, Font…) and the menu looked truncated.

The tooltip now stands down while the context menu is open, as the mini
toolbar already does, and while the secondary button is opening it.
Regression test: hover a link (tooltip shown), right-click, assert the menu
is open and the tooltip is gone.
2026-10-21 04:46:57 +02:00
MichaelandClaude Sonnet 5 dff6221f4c Don't let list AutoFormat override a style-linked heading number
CodeRabbit review: list_autoformat()'s numbering guard only checked
para.props.numbering (direct formatting). A heading numbered through
its style's linked Multilevel List preset (#1793) carries no direct
numbering at all — it's resolved from the style — so the guard missed
it, and typing "- " at the start of such a heading replaced its real
number with a fresh bullet instead of staying as plain text.

Fix: check the paragraph's resolved numbering (direct formatting over
the style chain), which reflects the list a heading actually has
whichever way it got it.

Reverse-verified: reverting just this guard reproduces the corruption
(the heading's "1.1" becomes "-"); passes with the fix restored. Full
engine suite (790 tests) and cargo fmt/clippy clean.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-21 09:07:18 +08:00
MichaelandClaude Sonnet 5 9603c68905 List AutoFormat triggers in front of already-written text (#3352)
"- ", "1. " and the other list triggers only turned into a bullet or
numbered item when they were the paragraph's entire content (caret at
the paragraph's end). Typing one at the start of a paragraph that
already has more text after the caret — the common case of going back
to bulletize an existing line — left it as literal text instead.

Checked in Word for Windows: it triggers on the paragraph's first
characters regardless of what follows, keeping the rest of the text
after the new list marker.

Fix: match the pattern against the text up to the caret (not the whole
paragraph), and strip only that matched prefix, not the paragraph's
entire text.

Regression test reverse-verified: fails with the old whole-paragraph
check reinstated (the old behavior literally reproduces the report —
"- " stays as typed text instead of becoming a bullet), passes with the
fix. Full cargo xtask ci passes except the pre-existing, machine-
specific a_thai_run_with_latin_falls_back_to_one_face failure (also
fails identically on a clean upstream/main checkout).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-21 08:55:55 +08:00
NetterSilverandClaude Haiku 5.5 77b6ca0e2a Keep '&' in LaTeX \href and \url addresses on import
Found while testing crates/formats/src/latex.rs:2526-2545 (raw_text)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-21 00:28:35 +00:00
MichaelandClaude Sonnet 5 1c90d8bb4b Add regression coverage for replying to a comment via its balloon (#3268)
No production code changed: the reported symptom (a typed reply
disappearing instead of posting) doesn't reproduce on current main.
Checked out the exact UI path the report describes (click a balloon's
Reply button, type, click away) via a kittest harness, and it correctly
posts the reply through review.reply.

The fix was apparently already in place — CommentDrafts/commit_reply
(crates/ui-egui/src/panes.rs) land the draft on focus loss, and
deselect_balloon (crates/ui-egui/src/canvas.rs) covers it again when the
balloon itself is deselected — but nothing exercised this specific
balloon-Reply-button path before, unlike comment editing which already
has coverage (a_refused_comment_edit_keeps_the_draft and others).

Reverse-verified: temporarily disabling both commit_reply call sites
reproduces the exact reported symptom (the reply silently never posts,
0 replies instead of 1) and fails this test with that change in place,
confirmed, then restored.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-21 08:22:38 +08:00
MichaelandClaude Sonnet 5 e2c9c26dfd Spelling & Grammar button now shows suggestions (#3340)
review.spelling (the Review tab's Spelling & Grammar button and the Home
tab's Editor button) only moved the selection to the next issue, with no
way to see or apply a suggestion — just the generic selection toolbar, so
it looked broken.

Running it now also opens the same suggestions menu Shift+F10 and a
Control-click already open for the word at the caret, via the
WordApp::run() chokepoint (not the ribbon call sites: keytips call
app.run() directly, bypassing a button's own .clicked() check).

Exposing this path also surfaced two latent i18n-audit gaps: the
suggestions popup's dictionary/grammar-rule words aren't interface text
(added an Exempt case, as the audit already does for font names and the
user dictionary), and "Possible spelling mistake" was missing from the
ru/tr/bg catalogs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-21 06:55:31 +08:00
Fin Warman e8b41d157f M2.1: retain textbox parents and picture-fill fallback 2026-10-20 22:41:28 +01:00
ratkoandClaude Opus 5.5 21ceb636f4 #3341: the scrollbar page tip stays on one line
The tip shown while dragging the vertical scrollbar (#2551) broke into two
or three lines ("Page 10 of" / "40") as the page number grew: the egui area
keeps last frame's width and the label wrapped to it, narrowing the tip
each time. The label no longer wraps.

Tested by the developer: the tip stays on one line in the app.

Fixes #3341.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 23:30:17 +02:00
Mat Strangeandopencode f7f78cadd6 The document's properties and a version restore need the protection stopped
Two gaps the review found, both of them a change to a protected document that
went through without the protection seeing it.

The properties (`file.properties`) and the privacy options
(`file.privacyOptions`) are document-wide state, and they aren't tracked: under
tracked changes they changed the document with no revision to show for it, and
under the other modes they were only rolled back by the post-check, after the
command had run. They are refused now, before the command runs, as the content
control's properties are.

A version restore (`file.versions`) replaces the whole document, including the
content the protection kept read-only, and it did that without the password:
`file.versions` is a pure command, so the protection never saw it. Keeping the
live protection and its password stopped them being dropped, but the content
underneath was still replaced. A restore needs the protection stopped first,
and the password with it when the document has one.

The live protection still wins over the snapshot's stale one, so a restore
can't lock the user out of their own document either.

Co-Authored-By: opencode <noreply@opencode.ai>
2026-10-20 22:00:25 +01:00
Francesco Urbani afbfa43351 doc: a start override restarts only its own level (ECMA-376 17.9.27)
A num's startOverride for a level applies when that level of that num is first used, and only
there: applying all of them on the num's first use reset the shared counters' other levels and
renumbered every following chapter.
2026-10-20 22:56:04 +02:00
Mex bf9571d7e1 Merge branch 'main' into fix/reject-invalid-comment-ids 2026-10-20 22:41:14 +02:00
ratkoandClaude Opus 5.5 15d5617e70 #3331: closing the header or footer returns to the body selection
Close Header and Footer (Esc, the ribbon button, MCP) always put the caret
at the start of the document, so the view jumped to page 1. The session now
remembers the body selection when a command moves the caret into a header
or footer, and closing puts it back, as Word does. A double-click on the
body still puts the caret where clicked.

Fixes #3331.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 22:11:38 +02:00
Mex 1b712863c1 M15: document Cuban and Peruvian decimal separator coverage
Record the regression evidence, preserve broader localization readiness, and update the touched parity document status and history.
2026-10-20 22:02:37 +02:00
Mex 642bf70594 docs: note corrected Cuban and Peruvian table numbers
Record the narrow regional separator correction without changing localization readiness or effort estimates.
2026-10-20 21:49:28 +02:00
Mex d72b5eb2a2 docs: record Cuban and Peruvian number separator fix
Update the progress date, preserve the current status, and add the narrow locale-number correction to the revision history.
2026-10-20 21:48:16 +02:00
Mex e717ae4dc5 fix(doc): use decimal points for Cuban and Peruvian Spanish
Add the two missing regional exceptions and regression coverage for parsing, grouped numbers, formatting, and Spain controls.
2026-10-20 21:44:52 +02:00
Dhruv d51f011a55 Cross-references are links: Ctrl+click goes to the target (#2945) 2026-10-20 13:19:53 -06:00
NetterSilverandClaude Haiku 5.5 c2fa8763e3 Translate the spooled sheet count in print confirmations
Fixes #3317

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 21:14:01 +02:00
Alex Wine f4299ff644 wasm: use the browser clock only on wasm32-unknown-unknown, not on WASI
`now_ms` in layout, `now_unix` in engine, formats and pdf gated
`js_sys::Date::now()` on `target_arch = "wasm32"`, which also matches
wasm32-wasip1 and wasm32-wasip1-threads. There js-sys has no host to call,
so it panics ("cannot call wasm-bindgen imported functions on non-wasm
targets"), and since `layout()` times itself with `now_ms`, every document
laid out on WASI aborts. `std::time` works on WASI, so these now use the
browser clock only on wasm32-unknown-unknown, the gate wordcraft-docx
already uses.
2026-10-20 12:11:57 -06:00
aiongg 023cda9554 Task panes: shortcuts run right after a pane resize (#1756)
A pointer drag on a pane's resize edge or a floating pane's grip leaves
no keyboard focus behind, so global Ctrl and F-key shortcuts, which
defer to any focused widget, run right after it. The test also covers
an edge focused from the keyboard: arrow keys move it and Escape leaves
it.
2026-10-20 18:10:59 +00:00
aiongg 080b05a0fd Task panes: follow craft-ui panes at 352a830 (#1756)
craft-ui 352a830 is the head of storytold/craft-libs#187. The panes API
WordCraft uses is unchanged. A floating pane also resizes from its top
edge and top corners, through a 4 pt band above the title bar.
2026-10-20 18:10:59 +00:00
NetterSilverandClaude Haiku 5.5 31b36442d5 Require hex digits in percent_decode escapes
Found while testing crates/formats/src/model.rs:1215-1223 (percent_decode)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 19:51:24 +02:00
NetterSilverandClaude Haiku 5.5 dfb9e1a851 Reject signs and repeated '#' in Rgb::parse
Found while testing crates/doc/src/props.rs:49-56 (Rgb::parse)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 17:37:31 +00:00
LQRD 253fab8a81 #2882: restore the saved proofing default when a command is rejected
Roll back the new preference on final command rejection, including protected-region validation after handler success. Cover prior/default-free preferences, document and undo rollback, serialization and restart. Qualify interface-language fallback documentation and add missing function documentation.
2026-10-20 21:47:13 +05:00
lab 1207 6479743c78 Status bar: a long message is shortened so it stops before the Focus button (#2402)
The status bar painted the message in full, so a long one (the path of a file that isn't there,
followed by "The system cannot find the path specified. (os error 3)") ran over the Focus and
view buttons and was drawn on top of them.

The controls on the right are laid out first now, and the message is shortened to the room they
leave: `fit_text` (new, next to `text_width` in `theme.rs`) cuts the text to the width it has and
ends it with an ellipsis, keeping its beginning. The whole message is in the tooltip.

The chrome test asserts that a long message stops before the Focus button and that it is shorter
than the whole text; the theme test asserts the shortening itself.
2026-10-20 22:11:23 +05:30
Mat Strangeandopencode 3a15b19e7f Docs: the progress docs' status lines carry today's date
Co-Authored-By: opencode <noreply@opencode.ai>
2026-10-20 17:20:53 +01:00
Mat Strangeandopencode d809c838c4 The CLI's --author names the session, it doesn't change the document
`--author` dispatched `file.setAuthor`, which a protected document refuses
now that the name is checked as the identity its exceptions are matched
against — so a script that named itself on a protected file failed before it
ran a single command.

The flag names the session, not the open document, so it sets the name
directly, with the same normalisation and blank-name check the command uses.
`file.setAuthor` keeps its protection check for the callers that mean to
change the document's identity.

Co-Authored-By: opencode <noreply@opencode.ai>
2026-10-20 17:20:53 +01:00
Mat Strangeandopencode f36339ab4b A password guards the protection whatever its mode
The guard that stops the protection of a protected document from changing
asked whether the editing was restricted, so a formatting-only protection —
the mode "none", which limits the styles rather than the editing — was
exempted. A formatting-only protection can carry a password, and that password
guarded it: it was exempt from the guard, so `{"mode": "readOnly", "password":
"other"}` replaced the protection and the password with ones of the caller's
choosing, and the protection could then be stopped with them.

A password guards the protection whatever its mode, as it did before.

Co-Authored-By: opencode <noreply@opencode.ai>
2026-10-20 17:20:53 +01:00
NetterSilverandClaude Haiku 5.5 a31743eb6d Map Windows-1255 byte 0xCA to U+05BA
Found while testing crates/doc/src/encoding.rs:82 (CP1255 table, entry for byte 0xCA)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 18:06:51 +02:00
Brandon ThomasandClaude Opus 5.5 d1b0bfc3f9 Skip CodeRabbit reviews on Dependabot PRs (#3302)
Adds .coderabbit.yaml so CodeRabbit no longer reviews or comments on PRs opened by dependabot[bot].

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 11:39:49 -04:00
Hamza 172b34b62f Markdown import: a definition-shaped line is not always a definition
Taking the definitions out before the blocks are parsed read each line
without the structure around it, and two kinds of line were deleted that
the author wrote as text.

A link reference definition has to start a block (CommonMark 4.7: one
cannot interrupt a paragraph), so

    Status update
    [Warning]: unstable
    more text

came through as "Status update more text". The line is taken only after
a blank line, at the start of the document, after a heading or thematic
break, or after another definition. Anywhere else it stays and reads as
text, which is what it did before definitions were understood at all: a
missed definition shows the link's own text, while deleting a line that
was part of a paragraph loses it with nothing to show.

Fences opened and closed by their own rules, which were not the block
parser's, so a line that is code there was a definition here:

    ```
    ```rust
    [foo]: /bar
    ```

An info string means ```rust does not close a fence, but this pass
thought it did and deleted the next line from the code block. Four
spaces of indentation is code rather than a fence, on both sides, so an
indented ``` no longer swallows the definitions that follow it.

Both halves have a control in the test: without the block rule the
paragraph comes back as "Status update more text", and without the
fence rules the code block comes back as "```rust\nSee foo.".
2026-10-20 20:39:24 +05:00
rabisandClaude Opus 5.5 a03deeeb26 #2428: the caret table's handles show where it starts and ends, where the pointer handles are
A repeated header row or a row running on to the next page no longer puts them on every page,
and they come from the same geometry as the handles under the pointer, so they can be grabbed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:35:10 +02:00