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.
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>
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>
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>
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>
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>
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>
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.
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.
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>
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>
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>
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.
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.
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
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>
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.
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.
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.
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>
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.
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.