Commit Graph
3352 Commits
Author SHA1 Message Date
Sazid Al Bayazid 08d077d97a Tests: open the folded Window group to reach the Full Screen button (#2864)
The ribbon now shrinks its groups to fit the window (#662), and on the
View tab the Window group folds into a drop-down at 1440 pt: the Full
Screen button then lives in that menu, so the a11y query no longer finds
it and the test failed on the folded ribbon. Open the group when it is
folded, and click the button where it is.
2026-10-20 09:55:14 +06:00
MichaelandClaude Sonnet 5 a1d83853ec finish(): guard against a stale document identity and a prior job's error
Two real issues CodeRabbit caught in the first commit, both in
Recovery::finish:

- It didn't repeat tick's own guard against a stale self.id: if the
  session switched documents with no regular tick in between to
  notice and reset that identity, finish would discard the *previous*
  document's still-live recovery copy under the *new*, clean
  document's state. Added the same self.document == document_id()
  check tick already uses, and a test reproducing it (confirmed it
  fails without the guard).

- An in-flight job failing (e.g. a stray autosave) returned
  immediately via `?`, skipping the clean-document discard below it
  entirely — so a save that really did land cleanly right before exit
  could still leave a stale copy, for an unrelated reason. Keeps that
  error to return at the end instead, after still attempting the
  discard.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-20 11:40:54 +08:00
MichaelandClaude Sonnet 5 2ce9518be8 Status bar names footnotes and endnotes, not just header/footer
The "editing a non-body story" status line only checked "not the
body, not a text box" and always said "Editing header/footer" —
including while editing a footnote or endnote, which isn't one.
Found while checking #3057 against current main (already fixed
elsewhere): a headless screenshot of editing a footnote showed this
label, which turned out to be an unrelated, still-live bug.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-20 11:37:55 +08:00
MichaelandClaude Sonnet 5 f550ab7bea Wait for recovery cleanup before the app exits (#3140)
A save makes the document clean, which queues discarding this
session's now-redundant recovery copy — but that's only queued, on a
background worker thread, the same as a print job. Closing the app
right after Save (the very next frame, with no regular recovery_tick
in between to notice and queue the discard, or with the discard
queued but not yet finished by the worker) could race the process
exiting before the copy was actually removed, so the next launch
wrongly offered to recover a document that was in fact saved cleanly.

Added Recovery::finish and Session::finish_recovery, mirroring the
print spooler's own finish_pending_jobs, and call it from the same
places: on_exit and the macOS hard-quit path.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-20 11:22:51 +08:00
MichaelandClaude Sonnet 5 ddfb47d861 Restore document focus when a successful print closes the Print page
Every other place that closes the backstage sets canvas.want_focus so
the document actually takes keyboard input back (open_recent and
others already do); this one didn't, so typing was ignored until the
user clicked the document even though the Print page was gone.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-20 11:22:35 +08:00
Магда М.Г. 912441262e Layout tests: a Symbol bullet's line is the text's height plus its extra ascent 2026-10-20 06:11:47 +03:00
MichaelandClaude Sonnet 5 49204c5c8b Strengthen the print-returns-to-document test's failure assertions
Only checked that the Print page stayed open on a failed submission,
which could pass even if some other backstage page ended up showing
or the failure feedback itself wasn't retained. Also assert the Print
page specifically is still the one up, and that Feedback::Failed with
the actual error is still there to see.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-20 11:11:24 +08:00
MichaelandClaude Sonnet 5 579b2dc6ef A successful native print returns to the document (#3210)
poll_printing turned a terminal print message into a status-bar line
but never closed the Print backstage page, so it stayed open after a
successful submission (reported on macOS, where printing never shows
a separate OS dialog — WordCraft's own Print page is the whole flow)
until the user clicked Back, even though the job had already gone to
the spooler. Word returns to the document once the job is away, the
same as after Save.

A failed submission still leaves the Print page open, so the error
and the settings to fix it stay visible.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-20 10:56:26 +08:00
Sazid Al Bayazid 213045230d Layout: a line can break after a hyphen before a digit, like Word (#2712) 2026-10-20 08:36:18 +06:00
Sazid Al Bayazid deea76838d Tests: a table that starts mid-page never leaves a repeated header row alone (#1704) 2026-10-20 08:33:51 +06:00
aiongg 0d06d94867 Merge upstream/main into panes-trial 2026-10-20 02:31:52 +00:00
Sazid Al Bayazid 9992f47270 UI: the Full Screen button reports selected state, not enabled (#2864)
CodeRabbit review: WidgetInfo::labeled passed the fullscreen toggle state
as the enabled flag, so the button announced itself disabled while full
screen was off. A toggle reports its state through WidgetInfo::selected
(enabled, selected), like the other toggle-style button in the ribbon.
2026-10-20 08:31:16 +06:00
Sazid Al Bayazid 34f638ade1 UI: the Full Screen button leaves full screen on a second click (#2864)
The View tab's Full Screen button is a mode toggle, but it was drawn with
the one-shot big() helper: the fullscreen state was passed as the menu
flag, so while full screen was on the button swallowed its own clicks and
only Escape could leave. Draw it with big_toggle (checked state as
intended) and label it for assistive technology, pinned by a kittest
regression test that clicks the button in and out.
2026-10-20 08:31:15 +06:00
Brandon ThomasandClaude Opus 5.5 2e6db0bd88 Release 0.9.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.9.0
2026-10-19 22:18:50 -04:00
Магда М.Г. e6e007d018 Symbol (PCL6) keeps Symbol's line metrics; restore the STYLEREF row in layout-parity 2026-10-20 05:18:11 +03:00
MichaelandClaude Sonnet 5 25fb9b93f8 Use the rotated bounds for a floating picture's row-growing extent
rect.bottom() measures the unrotated frame; a rotated picture's actual
drawn bottom can extend further down (or less far), so use
Spin::bounds(rect).bottom() like wrap_area does for text wrapping.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-20 09:40:48 +08:00
MichaelandClaude Sonnet 5 1dd86b0d0a A floating picture in a table cell grows the row to hold it (#3108)
A row/cell's height was computed from the floating *tables* that grow it
(float_tables -> floats_bottom in crates/layout/src/lib.rs), but a
floating (anchored, non-inline wrap) picture or shape in a cell's
paragraph wasn't tracked the same way. The row sized to the cell's text
alone, so a picture taller than the text hung past the row's own bottom
edge and overlapped whatever came after the table — reproduced with the
reporter's own document and confirmed against their real Microsoft
Office 365 screenshot, which lays the same file out with the table
growing to fully contain the picture.

- crates/layout/src/lib.rs: layout_box now tracks the deepest point any
  floating (Wrap != Inline) picture or shape reaches in a box, the same
  way it already tracks float_tables, and folds it into floats_bottom.
- crates/layout/src/tests.rs:
  a_floating_picture_in_a_cell_grows_the_row_to_hold_it, mirroring the
  existing a_floating_table_in_a_cell_takes_no_room_and_the_cell_holds_it.

cargo xtask ci: fmt, clippy, assets, layers and wasm all pass. Full
workspace tests pass except the same 3 pre-existing, environment-only
Thai-font failures already noted on #3119 and #3184 (no
CRAFT_FONTS_DIR/TH Sarabun New in this build environment).

Closes #3108.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-20 09:23:17 +08:00
vangel76 00d4e7a291 #2729: use pinned layout fixtures to fix FreeBSD CI 2026-10-20 01:46:00 +02:00
vangel76 bfbb3d05a4 #2729: use pinned layout fixtures to fix FreeBSD CI 2026-10-20 01:46:00 +02:00
vangel76 9b6d326730 #2729: initialize pinned fonts in current ligature and caret tests 2026-10-20 01:45:42 +02:00
vangel76 212df61bc7 #3197: gate text-ink fixture to the platforms that use it 2026-10-20 01:40:47 +02:00
vangel76 0abe06e236 Merge remote-tracking branch 'upstream/main' into control-mcp-delivery-1326-1331 2026-10-20 01:40:44 +02:00
vangel76 843bf26ae8 #322: merge upstream and preserve window-command progress 2026-10-20 01:39:10 +02:00
vangel76 44055678c5 #1053: merge upstream while retaining RTF notes and comments 2026-10-20 01:38:35 +02:00
vangel76 9ea1d93a8d #2729: merge upstream and retain pinned-font test progress 2026-10-20 01:37:56 +02:00
vangel76andClaude Sonnet 5.5 ab3ad718a0 feat(ui): remove documents from the recent list, one by one or all (#2716)
Hovering a row in File > Home/Open > Recent shows a Remove button at its
right end, and a Clear all button under the list empties it. The commands
behind them, ui.recentRemove and ui.recentClear, work the same for the
CLI, the control channel and MCP. On the desktop the new list is written
to the preferences at once, so a removal survives the app being killed
before a normal close.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 01:34:12 +02:00
vangel76 7489ef9f8e SmartArt Text Pane: Tab demotes, Shift+Tab promotes the focused item (#2701)
Word's Text Pane demotes the focused item on Tab and promotes it on
Shift+Tab; our pane had only the Demote/Promote buttons, so Tab moved
the caret to the next row instead. WordApp::logic consumes Tab while a
Text Pane row is focused and runs smartArt.demote / smartArt.promote on
that item, keeping the row focused so the next Tab acts on it again. An
item that cannot go down a level is refused by the command, as the
button path already is.

A new flag records that a pane row has focus, so Tab from the canvas is
untouched. Regression test drives the harness: Tab on an item that
cannot demote changes nothing and keeps focus; Tab on one after a deeper
item demotes it and its sub-items, the same row takes the next Tab,
Shift+Tab promotes them back.
2026-10-20 01:33:43 +02:00
vangel76 83864cc7fd M2.1 #2697: tracked style-definition changes (w:stylePrChange)
Modify Style and Update Style to Match Selection while Track Changes is on
record the style definition as it was: Style carries a fmt_change, the
formatting recorder compares the style sheet before and after a command,
accepting keeps the change and rejecting restores the old definition, and the
Reviewing Pane lists style changes at the start of the document. DOCX reads
and writes w:stylePrChange (its w:id/w:author/w:date and the w:style before
it), so the change, its old style and revision round-trip through .docx.
2026-10-20 01:32:33 +02:00
vangel76 9516e3977a M-parity: ROADMAP row for tracked table/section property changes 2026-10-20 01:26:35 +02:00
vangel76 12bb1039d1 Formatting revisions (gap 5, #41): a table, row, cell or section property change made while Track Changes is on now records as a tracked change (w:tblPrChange / w:trPrChange / w:tcPrChange / w:sectPrChange)
Word records formatting changes to table, row, cell and section properties while tracking; the model, the OOXML reading, the writing and Accept/Reject all existed — only the recorder compared characters and paragraphs. `Recorder.blocks` in `crates/engine/src/cmd/fmt_revisions.rs` now compares those properties too (structure stays out: a table's grid, a cell's merge span, a section's headers and footers), so Reject All puts them back and Accept All keeps them.

- regression test `tracked_table_changes_are_kept_as_formatting_changes` (fails without the recorder)
- docs/gaps.md gap 5 narrowed
2026-10-20 01:26:25 +02:00
Dylan M. Taylor 9b4b948c6e Merge pull request #2854 from dylanmtaylor/chore/drop-competitor-references
docs: drop references to competing commercial software
2026-10-19 19:22:22 -04:00
rabis 9139162e0f #2802: Delete on whole table cells leaves one empty paragraph in each 2026-10-20 01:19:49 +02:00
Dominik StrebelandClaude Opus 5.5 9c3d39c597 DOCX: Punjabi in Pakistan takes the Arabic-script theme font
lang_script mapped every `pa` tag to Gurmukhi. Measured in Word for Mac:
with w:themeFontLang w:bidi="pa-PK" a majorBidi run takes the theme's
Arab font, with "pa-IN" its Guru font. The test matrix gains both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 01:19:14 +02:00
Dominik Strebel 1fa2533a52 DOCX: majorBidi/minorBidi theme fonts follow the theme font language 2026-10-20 01:19:14 +02:00
Viorel ToaderandClaude Sonnet 5.5 e375004cd6 G14: Romanian parity doc: entry range and citation-style note
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JadgGo4G2GHaAMNb3qyygk
2026-10-20 01:13:28 +02:00
Viorel Toader 2d957c905b G14: Romanian (ro) interface catalog 2026-10-20 01:13:28 +02:00
Dominik Strebel 88d936c3c5 Layout: justified lines shrink their spaces by Word's measured limits 2026-10-20 01:11:36 +02:00
Joey 156817d6ba Word signature lines stay signable after saving a .docx 2026-10-20 01:10:22 +02:00
Mikael Tollefsen ad7eea67c1 ui_shot: an out-of-range {"ppp": s} is clamped to 0.5–4, not ignored
A scale outside the range fell back to 2 instead of the nearest allowed
one (review on #3101): {"ppp": 5} now gives 4, {"ppp": 0.1} gives 0.5.
2026-10-20 01:07:36 +02:00
Mikael Tollefsen be492ddc98 Dark-theme interface text on Linux no longer looks semi-bold 2026-10-20 01:07:35 +02:00
Mikael Tollefsen e8c852d490 ui_shot: a {"ppp": s} line sets the window's pixels per point
Headless screenshots were always taken at 2x, so text could not be seen
as it is drawn on a fractional desktop scale (e.g. 1.45 on a 4K screen at
145 %). The scale is clamped to 0.5–4; 2 stays the default.
2026-10-20 01:07:31 +02:00
Mikael Tollefsen 7a3c3b40af Screen hinting: tricky fonts run their instructions with the Mono target
FreeType's "tricky" fonts (old CJK fonts that assemble their glyphs with
their instructions) were hinted with the light smooth target, whose
backward compatibility forbids the instructions' sideways moves, so their
glyphs could come apart. skrifa requires the interpreter with
Target::Mono for them (OutlineGlyphCollection::require_interpreter), as
the unhinted path already does; the screen hinter now does the same.

Test: a bundled font renamed into FreeType's list ("cpop") is hinted with
the Mono target and drawn as it hints; any other font keeps the light
target.
2026-10-20 01:07:31 +02:00
Mikael Tollefsen 5288fed0ea Zoom hinting test: the wheel's own frame is checked too
The frame the Ctrl+wheel event arrives in already changes the scale; the
test now checks it is unhinted, not only the eased frames after it.
2026-10-20 01:07:31 +02:00
Mikael Tollefsen 1e306ed5ab Pages drawn mid-zoom are unhinted, and hinted once the zoom stops
A Ctrl/Cmd+wheel notch eases in over several frames and a pinch changes
the scale every frame: each frame was a new size, so its pages were
hinted afresh (a new hinting instance per face and every glyph hinted
again, about 1.5 ms more per page) and the hint caches filled with sizes
nobody rests on, which could clear the one the zoom ends at.

While a pointer zoom changes the scale, pages are now drawn unhinted;
the hinting is part of the page's texture key, so the first frame at
rest draws the page hinted, also at the size the last zoom frame drew.
A zoom that leaves the scale as it is (at 10 % or 500 %, or over the
ribbon) keeps the pages hinted, and other scale changes (Zoom dialog,
slider, a fit zoom following the window) are drawn hinted at once.

Rounding sizes into buckets was considered instead: steps between
eased frames are far larger than any bucket fine enough to keep the
glyphs on the pixel grid at the size the zoom ends at.

Tests: an easing Ctrl+wheel zoom draws every in-between size unhinted
and the page hinted the frame it stops; the decision for a gesture,
the zoom limits and other scale changes; the page key holds the
hinting.
2026-10-20 01:07:31 +02:00
Mikael Tollefsen 9e25e978e5 Page text on Linux is hinted like FreeType's hintslight 2026-10-20 01:07:31 +02:00
przemek-archandClaude Opus 5.5 5174973770 Go to Footer brings a new, empty footer into view
A caret in an empty story also "selects the whole story", the condition that keeps
the view still after Select All and drawing; so after Go to Footer into a footer just
made, the view stayed at the header. A collapsed caret is not a selection of the
story: the view follows it again.
Test: go_to_footer_into_an_empty_footer_scrolls_to_it (fails on main).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 01:04:46 +02:00
Mikael Tollefsen 3248047b76 Zoom stretch: only a raster of what the page shows now stands in
A pointer zoom that reflows the pages (Read Mode's text size follows the
wheel; Web Layout's width follows the zoom) gives a page new content while
the zoom is still moving. The stretched raster failed the page key but
still stood in when its size fitted, so the page showed the previous
layout's text until the zoom stopped (review on #3111).

Each page raster now keeps what the page showed (its content and view,
without scale or hinting); a raster is stretched only when that matches
what the page shows now, else the page is rendered.

Tests: in Read Mode a wheel zoom renders the reflowed pages while it
moves (none rendered without the change, over 11 frames); the eased notch
is checked frame by frame: no raster while it moves, one the frame it
stops.
2026-10-20 01:01:19 +02:00
Mikael Tollefsen 5edcd6765b Pointer zoom stretches page rasters until it stops 2026-10-20 01:01:19 +02:00
Mikael Tollefsen 80bf6ed96b Screen hinting: tricky fonts run their instructions with the Mono target
FreeType's "tricky" fonts (old CJK fonts that assemble their glyphs with
their instructions) were hinted with the light smooth target, whose
backward compatibility forbids the instructions' sideways moves, so their
glyphs could come apart. skrifa requires the interpreter with
Target::Mono for them (OutlineGlyphCollection::require_interpreter), as
the unhinted path already does; the screen hinter now does the same.

Test: a bundled font renamed into FreeType's list ("cpop") is hinted with
the Mono target and drawn as it hints; any other font keeps the light
target.
2026-10-20 01:01:15 +02:00
Mikael Tollefsen 665af07277 Zoom hinting test: the wheel's own frame is checked too
The frame the Ctrl+wheel event arrives in already changes the scale; the
test now checks it is unhinted, not only the eased frames after it.
2026-10-20 01:01:15 +02:00