diff --git a/tasks/TASKS.md b/tasks/TASKS.md index 67913a0..748e45e 100644 --- a/tasks/TASKS.md +++ b/tasks/TASKS.md @@ -239,7 +239,7 @@ - [~] R4.5 组件库:可视模式按下块时插入点落在所按的字处;右键不开块,把插入点放到所点处,以事件告知属主所点的目标(块的种类、链接地址、图片地址、是否在表格或代码块里)。组件 5af11fe 至 c35fdac(已推送):每段画出的文字记其原文范围与解码方式,从段尾倒着对回原文;右键发 `DocumentEvent::Pointed`。审查三轮未过(`tasks/reviews/R4.5-r1..r3.md`):r1 九项(引用续行、转义、缩进代码、提示块、HTML 块、定义与 front matter、空文档右键自开、写回改块、长注释);r2 四项(解码换行崩溃、CRLF 与 CR、删去的语法错位、写回改了定义);r3 五项:保留的缩进与 `>` 被当成换行吃掉、自动链接里的引用被解码、表格代码的 `\|`、解码出的空白不参与合并、数字引用的控制字符未按 markdown-rs 换成 U+FFFD。r3 已修(先比相同字符,再把画出的空格对行尾,空白不论是否解码都可略过;自动链接按原文,表格单元格的代码读 `\|`,数字引用照 markdown-rs),审查者的 17 个探针转为回归测试,14 个在旧码失败;轮数用尽,未再审。已打开块的输入框里右键不发事件,不在本条。ElyMark 的组件 pin 随 R4.10 再升 - [~] R4.6 组件库:行内格式命令(粗体、斜体、行内代码、删除线、下划线、链接、图片、清除格式),照 Typora:有选区即包住或去掉,无选区取插入点所在的词,空处插一对标记、插入点在其中;代码、公式、HTML、front matter 里拒绝并说明;一步撤销;打开的块照常可续写。组件 68d33b4 至 1d03545(已推送):`MarkdownDocument::format` 照 Typora 的 `toggleStyle`,跨块、跨链接或别的标记的选区拒绝(窄于 Typora 的拆分);格式一律在后台读,一次一个(另一个以 `Busy` 拒绝),文字、选区未变且不在预览才落下,后到的拒绝经 `DocumentEvent::FormatRefused`。审查三轮未过(`tasks/reviews/R4.6-r1..r3.md`):r1 七项(端点落在标记或地址里、行尾空格与空单元格、清除漏公式脚注转义、下划线隔着标签、长文卡界面、CR 行、跨块报错);r2 六项(嵌套标记与地址、自动链接的反斜杠、平方增长与 128 KiB 卡顿、连按丢失、后台拒绝无事件、长注释);r3 三项:格式后的同步重读超 100 毫秒、16 KiB 阈值使可视打开不在顶上、测试用了 std 的 Instant。r3 已修:格式不再在界面线程解析,文档的即时读取回到 128 KiB,计时用 `web_time::Instant`,两项回归在旧码失败;轮数用尽,未再审。遗留:128 KiB 以内的块多的文字,文档自身的同步重读仍可超 100 毫秒(markdown-rs 随节点数平方增长);超过 128 KiB 的文件以可视打开,首次后台读取落定时不在顶上(实测 140 KB 落在第 2 行,非 R4.6 所改,未修) - [~] R4.7 组件库:块命令(标题 1–6、段落、标题升降一级;引用、有序、无序、任务列表的切换;插入分隔线、代码块、公式块、目录、front matter、脚注、链接定义、前后空段落;删除块),一步撤销,拒绝说明原因。组件 58e212d 至 0558f0c(已推送):`MarkdownDocument::block` 照 Typora 的 `changeBlock`、`changeHeadingLevel`、`insertBlock`、`toggleIndent`、`insertParagraph`、`deleteBlock`,与格式共用一个后台执行器与 `EditRefusal`;同级标题保持不变(照 Typora 菜单),代码上的标题命令、任务首行的标题与引用拒绝(GFM 读作文字),前后空段落写成空行,越出打开的块先写回(多一步撤销)。审查三轮未过(`tasks/reviews/R4.7-r1..r3.md`):r1 十三项(标题标记里插入崩溃、任务框丢勾、列表里提示块拆开、拆分时行内标记断开、缩进代码改类型、列表项与脚注的前置段落、删除使邻段相接、尾部 `#` 与块起始符、任务首行、跨列表的选区、同级标题当开关);r2 十二项(拆分后重开标记成块语法、闭合 `#`、标记下一行的任务框、提示块的懒行与空行、标记与正文同行、Tab 缩进代码、任务列表包代码、引用里删除、拆分剩下的块起始符、长注释),r2 起标题与拆分写出前重新解析核对;r3 九项:核对忽略代码里的空白、按 mdast 而非可视读法核对(下划线、表情漏判)、提示块正文块失去缩进、按内容认围栏、非 ASCII 空白算缩进、去掉任务框露出块起始符、续行任务框解除时留下、空标题转段落误拒、转义的提示标记误拒。r3 已修:核对经 `MarkdownReader` 照绘制读(代码与公式里的空白计入),提示块的标记按提示读法判定、正文块保留缩进,围栏按源码结构认,缩进只数 ASCII 空格,去掉任务框时转义露出的起始符(续行同),空标题可转空段落;七项回归在 r3 的源码上失败(`.work/R4.7-fix3/red.md`);轮数用尽,未再审。遗留:列表与引用的切换不重新解析核对,只逐项修正 -- [ ] R4.8 组件库:表格行列上下左右移动、整理表格源码;代码块取代码内容;与已有的增删行列同一套拒绝 +- [~] R4.8 组件库:表格行列上下左右移动、整理表格源码;代码块取代码内容;与已有的增删行列同一套拒绝。组件 bcee87c 至 6b033f3(已推送):`TableEdit` 加上下移行(表头与首行互换,超出表头列数的行不作表头,到边拒绝为 `TableRefusal::Edge`)、左右移列、整理;表格按显示宽度补齐(`unicode-width`,Tab 记 4、控制字符记 0,照 Typora 的 `wcswidth`),写回表格自身的换行;表格编辑并入后台执行器;右键代码块时 `DocumentTarget` 带出代码文字。审查三轮未过(`tasks/reviews/R4.8-r1..r3.md`):r1 两项(纯 CR 文本里整理表格把前文当作容器前缀、行内 Tab 宽度不合 Typora);r2 一项(End 后插入表格拆开 CRLF);r3 一项(r2 的修法让行辅助函数返回光标之前的位置,End 后的块命令崩溃)。r3 已修:编辑器只按 LF 分行,光标可落在 CR 与 LF 之间;执行器与插入表格在入口把选区移到 CR 前,行辅助函数改为断言不收这种位置;两项回归在 r3 的源码上失败(`.work/R4.8-fix3/red.md`);轮数用尽,未再审。遗留:编辑器自身的 CRLF 模型不变,End 仍落在 CR 之后;表情宽度按 `unicode-width` 记 2 列(Typora 记 1) - [ ] R4.9 ElyMark:“段落”“格式”菜单与 Typora 同项同键(Ctrl+1–6、Ctrl+0、Ctrl+=/-、Ctrl+B/I/U、Ctrl+Shift+`、Alt+Shift+5、Ctrl+K、Ctrl+Shift+I、Ctrl+\、Ctrl+T、Ctrl+Shift+K/M/Q/[/]);源码模式 Ctrl+/;字号 Ctrl+Shift+=/-/0;专注 F8、打字机 F9;表格菜单加移动行列;复制为 Markdown Ctrl+Shift+C、粘贴为纯文本 Ctrl+Shift+V - [ ] R4.10 ElyMark:右键菜单照 Typora 按目标变化:剪贴板行(剪切、复制、粘贴、删除)、复制/粘贴为 ▸(Markdown、HTML 代码、纯文本、粘贴为纯文本)、格式行、段落 ▸ 或表格 ▸ 或代码项、插入 ▸、链接(打开、复制地址)、图片(打开所在位置、删除图片)、删除块;预览只读时只留复制类 - [ ] R4.11 验收:同一份样本在 ElyMark 与 Typora 的真窗口截图逐项对照;帮助、PRD、`agents.md` 随之;逐条核对表 diff --git a/tasks/reviews/R4.8-r1.md b/tasks/reviews/R4.8-r1.md new file mode 100644 index 0000000..85c6fb5 --- /dev/null +++ b/tasks/reviews/R4.8-r1.md @@ -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`. diff --git a/tasks/reviews/R4.8-r2.md b/tasks/reviews/R4.8-r2.md new file mode 100644 index 0000000..3c172c9 --- /dev/null +++ b/tasks/reviews/R4.8-r2.md @@ -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\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`. diff --git a/tasks/reviews/R4.8-r3.md b/tasks/reviews/R4.8-r3.md new file mode 100644 index 0000000..04f2d5a --- /dev/null +++ b/tasks/reviews/R4.8-r3.md @@ -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`.