tasks: R4.8 table moves and tidy, three review rounds
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
91e54b5f48
commit
7d4016eadb
4 files changed
+12
-1
No files matched your search
@@ -0,0 +1,5 @@
|
||||
FAIL
|
||||
|
||||
1. `C:/Users/zhang/Documents/Github/Ely-GPUI-Components/src/documents/document/tables.rs:62` — Table rewrites mistake preceding text for a container prefix in CR-only documents. Reproduction: load `Before\r\r| A | B |\r| - | - |\r| 1 | 2 |\r\rAfter\r`, place the caret on `1`, and call `edit_table(TableEdit::Tidy)`. The LF-only prefix lookup captures `Before\r\r`; the writer repeats it before the delimiter and body rows, so `Before` occurs three times and the table is broken. This reproduces through the public document API; ElyMark's loader preserves bare CR. The writer also replaces internal CRLF endings with LF when supplied CRLF component text. This violates §14.3's content and line-ending preservation. Use CR/LF/CRLF-aware line boundaries for prefix detection and validation, and carry the table's line ending into the writer. Add public-API regressions for Tidy and moves with preceding content and these line endings. Evidence: `.work/R4.8-r1-review/probes-public.log`.
|
||||
|
||||
2. `C:/Users/zhang/Documents/Github/Ely-GPUI-Components/src/documents/document/tables.rs:197` — `UnicodeWidthStr::width()` does not match the stipulated Typora `wcswidth` for interior tabs. Reproduction: tidy `| a\tb | x |\n| - | - |\n| q | r |\n`. Typora's bundled function returns width 6 for `a\tb` (`tabSize: 4`), requiring a six-dash first delimiter and a six-column padded `q` cell. This writer produces `| ---- | ---- |` and pads the first column to four instead; the public document API reproduces it. Use the agreed width rules consistently for both column measurement and cell padding, with a regression containing an interior tab. Evidence: `.work/R4.8-r1-review/typora-width.log` and `.work/R4.8-r1-review/probes-public.log`.
|
||||
@@ -0,0 +1,3 @@
|
||||
FAIL
|
||||
|
||||
1. `C:/Users/zhang/Documents/Github/Ely-GPUI-Components/src/documents/document/tables.rs:268` — `insert_table` splits CRLF when the caret is between its two bytes. Reproduction through the public document API: open `Intro\r\nNext\r\n` in Source mode, focus the editor, press End, then call `insert_table`. End places the caret at byte 6; `line_start` and `line_end` treat that position as an empty line. The result is `Intro\r\r\n<table>\r\n\nNext\r\n`, introducing bare CR and LF instead of preserving CRLF around the inserted table, contrary to §14.3. Treat CRLF as one boundary when resolving the insertion line, including a caret on its LF, and add a regression using the editor's End action. Evidence: `.work/R4.8-r2-review/probes.log`, test `review_r48r2_insert_after_end_key_keeps_crlf`.
|
||||
@@ -0,0 +1,3 @@
|
||||
FAIL
|
||||
|
||||
1. `C:/Users/zhang/Documents/Github/Ely-GPUI-Components/src/documents/document/block.rs:266` — `line_end` now returns an offset before a caret inside CRLF, but block-command callers still slice from the original caret. Open `Intro\r\nNext\r\n` in Source mode, focus the editor, press End, then call `MarkdownDocument::block(BlockCommand::CodeBlock)`: the caret is byte 6, `line_end` returns 5, and `block/split.rs:53` panics with `byte range starts at 6 but ends at 5`. End followed by Shift+Right and the same command also panics, at `block/insert.rs:31`. Rule, MathBlock, Toc, Footnote and LinkDefinition share the first failure. Both public interaction probes pass with `07fee55`'s helpers and fail with `ce015e7`, so this regresses completed block commands (MARK-15). Normalize the actual caret/selection offsets consistently before deriving and slicing ranges, preserving the decision to leave the editor's CRLF model unchanged, and cover these End-key interactions. Evidence: `.work/R4.8-r3-review/probes.log`, `baseline-blocks.log`, `baseline-matrix.log` and `probe-source.log`.
|
||||
Reference in new issue
Block a user