Files
ElyOffice/tasks/reviews/R4.6-r2.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.6 KiB

FAIL

  • Ely-GPUI-Components/src/documents/document/format.rs:241: Unwrapping still checks only the requested style's own marks, then returns before validating nested boundaries; the underline return at line 286 has the same problem. Strong at **[a](ht‸tps://x)** or **~~a~‸~** removes the outer bold, and Underline at <u>[a](ht‸tps://x)</u> removes the underline, instead of returning Across. Thus round 1's boundary defect is only partly fixed. Validate the original selection against all protected marks and addresses before either unwrap path, including partial crossings of nested styles. Four full-library regressions fail in .work/R4.6-r2-review/probes.log.

  • Ely-GPUI-Components/src/documents/document/format/clear.rs:32: Every text node is scanned for escapes, including autolink text where backslashes are literal. Clear on a‸ <https://x/\*> produces a https://x/*, deleting a character that the parser retains in both the label and URL. Removing formatting must retain that literal backslash. Distinguish actual Markdown escapes from verbatim autolink contents before collecting removal ranges, and add an exact-output regression. The full-library failure and original AST are in .work/R4.6-r2-review/clear-regression.log.

  • Ely-GPUI-Components/src/documents/document/format/apply.rs:37: The synchronous branch still blocks the UI well beyond PERF-02 below AT_ONCE. Formatting the first character of "a\n\n".repeat(32000) (96,000 bytes) takes 1,179 ms at P95 over 30 optimized runs of the unchanged toggle implementation on a Ryzen 9 9950X3D under WSL. This branch runs that entire parse and validation on the UI thread. Round 1's stall therefore remains for smaller documents with many paragraphs. Reuse a current parse or move expensive parsing and validation off the UI thread at these sizes too; cover this document shape rather than only one long word above the cutoff. Measurements and sample hash: .work/R4.6-r2-review/timing.log.

  • Ely-GPUI-Components/src/documents/document/format/apply.rs:48: Assigning the next task to _formatting drops the preceding accepted command. With "x".repeat(AT_ONCE + 1) and the caret at byte 1, request Strong and then Emphasis before the background work finishes: both calls return Ok(()), but the result has only emphasis (*xxx…*), losing Strong. Serialize accepted commands, or explicitly refuse a new command while one is pending instead of silently replacing it. Add a regression asserting both formatting effects and their undo behavior. Reproduced by the failing two-command test in .work/R4.6-r2-review/probes.log.

  • Ely-GPUI-Components/src/documents/document/format/apply.rs:60: Background refusals are logged without being delivered to the caller, so MARK-15's required explanation cannot be shown. In a source document consisting of an inline code span followed by more than AT_ONCE bytes of prose, Strong with the caret inside that code returns Ok(()); completion leaves the text unchanged and emits no document event. The same refusal is returned to the caller in a short document. Provide a completion result or event carrying FormatRefusal, including refusals from apply, so the host can explain the failure. The accepted result, empty event list and unchanged text are recorded in .work/R4.6-r2-review/probes.log.

  • Ely-GPUI-Components/src/documents/document/format/apply.rs:18: The new method documentation spans three comment lines, violating the explicit one-line comment rule. Also, the new comment at format.rs:63 contains eleven words, exceeding the ten-word limit. Reduce these comments to single lines of at most ten words, or remove them.