ElyMark: R4.10 round 2 fixes (copy guard, component 2b8bd9f)

A pending conversion no longer overwrites a later clipboard write; pin
moves to component 2b8bd9f (one-pass drawn lookup, latest press wins).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-14 21:52:25 -04:00
1 parent 67fa5bfc94
commit 2c374b23ed
8 files changed
+49 -7

No files matched your search

+1 -1
View File
@@ -242,7 +242,7 @@
- [~] 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)
- [x] 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。ElyMark 5392062、f84f990、09fcb0b,组件 6d90351、24ffc45、6c2d28c(已推送),pin 6c2d28c:键与菜单项取自 Typora 字节码与其中文菜单;表格为“段落”子菜单,加删除表格;拒绝成提示;菜单借打开的块的焦点,块与选区留着;复制为 Markdown、粘贴为纯文本只作用于文档。R1 FAIL 六项、R2 FAIL 四项已修,R3 PASS
- [x] R4.13 全部应用:中文显示(用户报,2026-10-14):Windows 上同一词里字形粗细不一(gpui 以 en-US 排版,汉字按日文回退);Ely 用到的组件里写死的英文改走中英目录;先于 R4.10 的修复做。第 1 轮未过(三项:排版语言不随 Ely 的中文设置、查找框英文、排序筛选英文),已修,见 `.work/R4.13-fix1`;第 2 轮通过。
- [ ] R4.10 ElyMark:右键菜单照 Typora 按目标变化:剪贴板行(剪切、复制、粘贴、删除)、复制/粘贴为 ▸(Markdown、HTML 代码、纯文本、粘贴为纯文本)、格式行、段落 ▸ 或表格 ▸ 或代码项、插入 ▸、链接(打开、复制地址)、图片(打开所在位置、删除图片)、删除块;预览只读时只留复制类。第 1 轮未过(五项:保留选区时目标取选区起点、打开块里 HTML 链接读错、切回标签重开已关的菜单、复制为 HTML 与纯文本卡界面、长注释),已修,见 `.work/R4.10-fix1`
- [ ] R4.10 ElyMark:右键菜单照 Typora 按目标变化:剪贴板行(剪切、复制、粘贴、删除)、复制/粘贴为 ▸(Markdown、HTML 代码、纯文本、粘贴为纯文本)、格式行、段落 ▸ 或表格 ▸ 或代码项、插入 ▸、链接(打开、复制地址)、图片(打开所在位置、删除图片)、删除块;预览只读时只留复制类。第 1 轮未过(五项:保留选区时目标取选区起点、打开块里 HTML 链接读错、切回标签重开已关的菜单、复制为 HTML 与纯文本卡界面、长注释),已修,见 `.work/R4.10-fix1`。第 2 轮未过(三项:未完的转换盖掉之后的复制、长段落右键的目标查找为平方级、连续右键的目标次序颠倒),已修,见 `.work/R4.10-fix2`
- [x] R4.12 全部应用:已开着时再打开文件,交给运行中的那份开成新标签并带到前台,不再弹“已在运行”(用户报,2026-10-14);先于 R4.11 做。第 1 轮 4 项:令牌被拒时连接重置使重试失效、慢速来者占住门、主窗口关后仍回执、ElyMail 与 ElyAgent 不到前台;已修,各有回归;第 2 轮通过
- [ ] R4.11 验收:真窗口逐项操作,每项功能可用(不求与 Typora 一一相同);帮助、PRD、`agents.md` 随之;逐条核对表
+7
View File
@@ -0,0 +1,7 @@
FAIL
1. `apps/ely-mark/src/export/copy.rs:74` — [P2] A pending conversion overwrites a newer clipboard operation. Start Copy as HTML Code, then use Copy as Markdown or ordinary Ctrl+C before conversion finishes: the newer copy lands correctly, but the old task subsequently replaces it with HTML. Only the three converted-copy actions replace `Desk::copying`; the other copy routes leave it alive. Invalidate pending conversions for later clipboard writes, or reject completion when a newer clipboard operation has occurred. Both window-dispatched probes fail after the pending conversion completes, while their immediate clipboard assertions pass. Evidence: `.work/R4.10/review-r2/copy-probes.log`.
2. `C:/Users/zhang/Documents/Github/Ely-GPUI-Components/src/documents/document/point.rs:294` — [P2] The new `drawn_link` lookup is quadratic: it calls `source_at` for successive displayed characters, repeatedly decoding and aligning the same source span. Right-click near the beginning of an open plain-text paragraph and the menu waits for this lookup even when there are no links. For 2,000, 4,000 and 8,000 characters, `target_at` took 99 ms, 491 ms and 1.94 s respectively in the unoptimized build; parsing, walking and Reader together stayed below 1 ms. This introduces slow ordinary-click feedback contrary to PERF-02. Resolve the source-to-display position without repeatedly scanning the span, and cover paragraph-length scaling. Evidence: `.work/R4.10/review-r2/target-cost.log` and `parse-baseline.log`.
3. `C:/Users/zhang/Documents/Github/Ely-GPUI-Components/src/documents/document/point.rs:179` — [P2] Overlapping right presses can publish their targets in reverse order. In an open block containing `[one](https://a.test) [two](https://b.test)`, select both links, then right-click `one` and `two` while the first lookup is pending. Both requests retain identical text/selection snapshots, so the guard accepts both completions. The probe observed `b.test` followed by `a.test`; ElyMark therefore replaces the latest menu with the older link target, making Open Link and Copy Link Address use the wrong address. Track the latest press or cancel superseded lookups, and emit only its target. Evidence: `.work/R4.10/review-r2/latest-press.log`.