Files
ElyOffice/tasks/reviews/R4.6-r1.md
T
ZacharyZhang-NYandClaude Opus 5.5 411d32b97e R4.6: inline format commands, closed after three review rounds
Component 68d33b4..1d03545 (pushed). Round-3 findings fixed with
regressions; rounds spent. Two limits recorded in the task line.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 13:16:35 -04:00

3.7 KiB

FAIL

  • Ely-GPUI-Components/src/documents/document/format.rs:210: The unwrap path returns before checking protected boundaries, and merging likewise loses the original endpoints. Strong at a *‸*bold** z removes bold, and Link at [a](ht‸tps://example.com) deletes the address; both must refuse as Across. Strong also accepts a *⟨*b** c⟩ and the partial other-style selection *a⟨b*⟩ (producing *a**b***). Validate the original endpoints against marks and addresses before unwrapping or expanding same-style nodes, and distinguish containment in a node's body from containment including its delimiters. Reproduced in .work/R4.6-r1-review/confirmed-probes.log.

  • Ely-GPUI-Components/src/documents/document/format.rs:219: Block lookup uses only the first-to-last child's content span, excluding editable trailing whitespace and positions in empty cells. Strong at alpha ‸ returns Outside instead of inserting alpha **‸**; the empty cell in | h |\n| - |\n| ‸ | also returns Outside. Both positions satisfy the empty-pair rule. Locate the owning paragraph, heading or cell independently of its children's text span, then include its editable whitespace while excluding structural marks. Both cases fail executable probes.

  • Ely-GPUI-Components/src/documents/document/format.rs:402: Clear only removes the node kinds handled by marks and HTML tags, leaving other inline .md-meta intact. Clear on **a** $x‸+y$ produces a $x+y$, and on a‸ [^n]\n\n[^n]: note leaves the footnote reference unchanged. Typora's decorator explicitly marks the math and footnote delimiters as .md-meta; escaped punctuation's backslashes are another reproduced omission. Remove these inline marks too, retaining their content and untouched blocks, and cover them with exact-output tests.

  • Ely-GPUI-Components/src/documents/document/format.rs:175: Underline detection requires the nearest HTML tags on either side to be <u> and </u>, so an intervening tag hides the enclosing underline. Underline at <u>a <br>b‸c</u> produces <u>a <br><u>bc</u></u> instead of removing the enclosing pair to produce a <br>bc; nested <em> reproduces the same failure. Find the enclosing matched underline pair through intervening and nested tags, rather than treating adjacent tags as the pair.

  • Ely-GPUI-Components/src/documents/document/format.rs:192: Every format command reparses the entire file synchronously from MarkdownDocument::format, bypassing the existing background-read threshold and source-only size limit. An optimized probe on "word\n\n".repeat(64000) (384,000 bytes), formatting the first word, took 4,735 ms; parsing alone took 3,873 ms (.work/R4.6-r1-review/timing.log). The UI thread therefore stalls for seconds even when the command touches one word, and larger source-only files still enter the parser. Reuse a current parse or perform command parsing off the UI thread, enforcing the existing large-file guard before applying the edit.

  • Ely-GPUI-Components/src/documents/document/format.rs:225: Blank-line detection splits only on LF. In a CR-only file, Strong at a\r‸\rb returns Outside instead of inserting a\r**‸**\rb. This rejects a real blank line that the Markdown parser recognizes. Detect LF, CRLF and CR consistently with the existing source-line reader, preserving the original separators; the CR case fails the probe.

  • Ely-GPUI-Components/src/documents/document/format.rs:233: A selection spanning valid blocks reports Outside, contrary to the specified Across refusal. Strong on ⟨alpha\n\nbeta⟩ reproduces this, so the caller receives the wrong reason despite both endpoints being in paragraphs. Distinguish a selection crossing blocks from a caret outside an editable block, and assert the exact refusal in the tests.