Adversarial review of the whole Documents app (round 7). Eight reviewers each covered one area: text input, layout and painting, DOCX reading and writing, tables and objects, references and fields, review (comments and Track Changes), the app shell and UI, and saving, collaboration and other formats. Each then did a second pass on what they had found. Where a fix depended on another area, it was built on the merged branch, so fixes that interact were tested together.
Every issue was reproduced before it was fixed, with a unit test or browser spec that fails on main. Each commit holds one fix and its test (186 commits).
Most important fixes
Lost work
- Shared documents: text typed in a table cell landed in the wrong cell, or broke the table for everyone, while someone else added or removed rows or columns. Paragraph marks are now matched cell by cell.
- Autosave: someone typing steadily was never autosaved, because each keystroke restarted the wait. Edits now save at the latest 30 s after the first unsaved one.
- Leaving with AutoSave off: pending edits were saved without asking. A Save / Don't Save / Cancel dialog now asks first.
- Reopening a shared document: if its room couldn't be reached, the document silently became editable and unshared, and a later reopen replaced those edits. It now stays read-only with Try Again.
- Undelivered shared changes: changes left in the browser were replayed for whichever account opened the room next. They are now kept per account.
- Comments: a refused comment or reply was thrown away. A half-written reply or edit was emptied by clicking into the document.
- Copying from Markdown or web pages: a file containing a copied-fragment marker opened as that fragment only, dropping the rest of the page.
Files that opened read-only now open for editing
- List numbering: Chinese, Japanese, Korean, Hebrew, Arabic and legal numbering (一、二、, ①②③, 가나다, First/Second, iroha…). Also lists that switch font options off, as Word's legal outlines do.
- Character-unit indents (
w:firstLineCharsand related). These are in nearly every Chinese or WPS document. - Word watermarks (VML
PowerPlusWaterMarkObjectand picture watermarks). They are now drawn, kept byte for byte, and understood by Design › Watermark. - Word's page-number headers and footers (
docPartObjblocks), including ones that also hold a watermark. - Alignment and justification:
- distributed alignment
- Arabic in justified paragraphs
- justified lines with right, centre or decimal tabs
- Other:
- strikethrough and double strikethrough both switched off
- highlight
nonein styles PAGE \* ARABICfrom LibreOffice- HYPERLINK fields to files
- tables whose heading rows are too tall to repeat
- main parts named
document2.xml
- Clearer messages: password-protected and Word 97–2003 files now say what to do. altChunk documents (html-docx-js, assembly tools) show their text instead of a blank page.
Track Changes and protection
- Untracked edits: table edits Track Changes can't record (deleting or merging rows, columns and cells, sorting, converting) and Alt+Shift+Up/Down paragraph moves used to remove or move text untracked. They now refuse with a message.
- Locked tracking: formatting changes stay tracked even when "Track formatting" is turned off.
- Moves: accepting or rejecting either half of a tracked move resolves the whole move.
- Show Markup: Next and Previous Change, the Reviewing Pane and No Markup / Original now respect what Show Markup hides. In views that hide deleted text, the caret, Backspace and typing pass over it.
- Protected documents:
- Comments, Track Changes toggling, headers, note settings and page numbering can no longer change them.
- Comment commands are disabled where protection allows no comments.
Layout and display
- Line breaking: lines break after em and en dashes and zero-width spaces, and Chinese and Japanese justified lines end flush at the margin.
- Unmarked Hebrew and Arabic: text typed into ordinary runs now gets correct carets and selection.
- iPhone and iPad: zoomed pages and the ink overlay stay within iOS Safari's canvas size limit, so they no longer go blank.
- Dark page: the preference now draws dark pages. Print, PDF and saving stay white.
- Comment cards: placed correctly in Read Mode, Side to Side and Web Layout, and they fit narrower windows.
References
- Headers and footers: the even/odd header edited is the one the page shows. F9 updates header and footer fields and stays in the story, even when keys are typed during the update.
- Pages: PAGE fields inserted in the body show the page's own number. Go To Page and the Bookmarks dialog use printed page numbers.
- Other: caption labels in any script, bookmarks with Unicode names, links in notes and headers that reach body bookmarks, and citations no longer nest inside one another.
Input, clipboard and Find
- Find: typing straight quotes finds curly ones. Whole-word search finds
Inc.,C++and$100. Find and Go To work from a header or footer. - Clipboard:
- Formatting is kept when copying in documents with fields or notes, and when copying from table cells. Tables copy as tab-separated rows.
- Copy, Cut and Paste work in frames without clipboard permission, with a clear message when the browser refuses.
- Typing and spelling:
- Autocorrect handles dead keys and capitalizes a lone "i".
- Spelling ignores optional hyphens and suggests contractions.
Tables and objects
- Tables:
- Select Column/Row next to merged cells acts on the right cells.
- Exact row heights stay exact.
- Ctrl+Shift+Enter splits the table.
- Table formulas skip deleted text and round halves away from zero.
- Pictures: Layout OK no longer snaps a moved picture back, and rotate and flip start from its current state.
- Drawing: lines are drawn in the direction dragged, and grouping keeps the stacking order. Ink can be drawn on pages where no paragraph starts.
- Equations: Edit Equation no longer adds brackets or merges lines.
Import and export
- PDF export:
- list numbers are in the searchable text
- links are clickable
- right-to-left text copies in the right order
- HTML, Markdown and text export: equations, symbols, restarted numbering and lists in table cells are kept.
- Opening files:
- Google Docs pages keep their blank lines and nested lists, and Google redirect links point at the real address.
- Tables from Word and LibreOffice web pages keep their rows.
- Horizontal rules are kept, and hidden HTML in Markdown stays hidden.
- Text files in Cyrillic, Greek, Hebrew or Arabic code pages, and UTF-16 files without a byte-order mark, open as text.
Shell and accessibility
- Contrast and themes:
- Read Mode's counter is readable in dark mode.
- Switches and the ruler stay visible in forced colours.
- Menus and focus:
- Escape closes narrow-window submenus.
- Screen readers announce @mention choices.
- Keyboard users can leave the Diagram dialog.
- Phones:
- The tab the document switches to is scrolled into view.
- The ribbon folds on a phone held sideways.
- The name stays readable when the ribbon is auto-hidden.
- Title and status bars:
- The title no longer jumps on autosave.
- The status bar names the page in view while scrolling.
- Zoom buttons are disabled at the limits.
- Shortcuts and Assistant:
- Shortcut labels are correct on a Mac.
- The Assistant no longer writes "null" under drafts, and it scrolls to new replies.
Behaviour changes to note
- Saving: with AutoSave off, leaving a document now asks whether to save, as Word does.
- Offline shared documents: an owner who is offline can't edit a shared document until its room can be reached. Before, the edits risked being overwritten.
- Track Changes on tables: structural table edits are refused while Track Changes is on. They used to delete text untracked.
- Read Mode: with comments shown, it leaves room for the comment cards, so a 1600 px window shows one reading column instead of two.
- Title bar: between 1361 and 1680 px wide, routine save states show only the icon. The tooltip and accessible label still give the state.
- Approximations, documented in
docs/conformance.md:- justified Arabic widens spaces rather than using kashida
- a justified line ending in a right or centre tab keeps its natural spacing
- line numbers next to a column line are centred in the gap
Testing
- Unit tests: 1,059 files / 10,551 tests pass, normally, with
TZ=UTCand on Node 22 (CI's version). - Build:
npm run build, including the license check, passes. Bundle size is within 0.2% ofmain. - Browser suite: 2,865 passed, 132 failed. The same run on
mainhad 123 failures, mostly pixel-reference specs that differ on this machine.- Every failure not on
main's list was rerun on both. Seven failed only on this branch: one spec that went on waiting for a Close Header button that no longer appears, and three specs per heading-row change that asserted the old behaviour. Each was updated after checking the new behaviour in its flow. - The rest passed on rerun (load-related) or also fail on
main.
- Every failure not on
- CI's advisory browser run (Linux): it fails on
maintoo, so the first run was compared test by test. Five tests failed only on this branch:- One was a real bug on Windows and Linux: Ctrl+Shift+V pasted twice when the browser's paste event came late. It is fixed, with a regression test for both Mac and Linux behaviour.
- The other four were test issues: Insert-tab buttons folded away by Linux fonts, a Mac-only shortcut, a timeout, and a test that sent Ctrl+Shift+V twice on Linux. They are fixed in their own commits. The last run has no failures that
maindoes not also have (132 vs 133).
- Schema validation: every exported DOCX from the browser run passes the schema check, about 20,000 parts. The exceptions are three exports that also fail on
main, because their test inputs carry content kept untouched. - Conformance check: running
check:conformancewith no arguments stops at an unrelated spec'sedited.docx. Many specs save that generic name, and the tool checks files by name. This also happens onmain.
Known gaps left open
- Collaboration: text typed at the very start of a cell can still land in a new row or column when someone inserts one at that exact spot at the same moment. This is documented in
docs/collaboration.md. - Track Changes on tables: row and cell revisions (
w:trPr/w:del,cellDel,cellMerge) are not written yet, so those edits are refused while tracking. - PDF export: text in text boxes, shapes and WordArt is not in the searchable text.
- Undo: changes to note settings can't be undone.
- SAVEDATE: it doesn't change, because content-only saves leave
core.xmlbyte for byte. - Ctrl+Enter in a table cell: it still inserts a page break inside the cell. Word's exact result wasn't established, so this was left unchanged.
Activity
18610e1a3753ca6b9409b41142c864157c9d82