Pin the component library at abac8b4: MarkdownDocument (C14.3)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
dd269f0729
commit
8d5f0a8dcc
8 files changed
+37
-6
No files matched your search
Generated
+1
-1
@@ -2044,7 +2044,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ely-gpui-component"
|
||||
version = "0.1.1"
|
||||
source = "git+https://git.zacharyzhang.com/ZacharyZhang-NY/Ely-GPUI-Components?rev=433c38fb2dbb4f6846ada27d1110a2d43cda7c1f#433c38fb2dbb4f6846ada27d1110a2d43cda7c1f"
|
||||
source = "git+https://git.zacharyzhang.com/ZacharyZhang-NY/Ely-GPUI-Components?rev=abac8b41b3893ba5b01251f649ccd7398e35f4af#abac8b41b3893ba5b01251f649ccd7398e35f4af"
|
||||
dependencies = [
|
||||
"alacritty_terminal",
|
||||
"anyhow",
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ jiff = "0.2"
|
||||
anyhow = "1"
|
||||
directories = "6"
|
||||
dunce = "1"
|
||||
ely-gpui-component = { git = "https://git.zacharyzhang.com/ZacharyZhang-NY/Ely-GPUI-Components", rev = "433c38fb2dbb4f6846ada27d1110a2d43cda7c1f" }
|
||||
ely-gpui-component = { git = "https://git.zacharyzhang.com/ZacharyZhang-NY/Ely-GPUI-Components", rev = "abac8b41b3893ba5b01251f649ccd7398e35f4af" }
|
||||
env_logger = "0.11"
|
||||
gpui = { package = "gpui-pre", version = "=0.3.8", default-features = false, features = ["stacker"] }
|
||||
gpui_platform = { package = "gpui-pre-platform", version = "=0.3.8", features = ["font-kit", "wayland", "x11"] }
|
||||
|
||||
@@ -40,7 +40,7 @@ site/ 官网(Vite 8、pnpm、TypeScript,无框架;等轴 SVG 积木
|
||||
|
||||
## 组件映射
|
||||
|
||||
依赖 `ely-gpui-component`(pin 433c38f,gpui 为 crates.io 的 `gpui-pre` =0.3.8)。名字取自 `reference/Ely-GPUI-Components/src`。gpui 用法规则见该仓库 `AGENTS.md`。`tests/scripts/agents_md.py` 核对下表每个名字都是组件库公开项。
|
||||
依赖 `ely-gpui-component`(pin abac8b4,gpui 为 crates.io 的 `gpui-pre` =0.3.8)。名字取自 `reference/Ely-GPUI-Components/src`。gpui 用法规则见该仓库 `AGENTS.md`。`tests/scripts/agents_md.py` 核对下表每个名字都是组件库公开项。
|
||||
|
||||
| 需要 | 用 |
|
||||
| --- | --- |
|
||||
@@ -312,4 +312,4 @@ cargo run -p ely-doc 启动一个应用(ElyDoc 先 cargo build -p ely
|
||||
- 2026-10-11:Linux 包的实测(L1.6)。本机(Omarchy,Hyprland 0.56)装上六个 Arch 包与六个 AppImage,`linux-installed.sh` 两种都过;deb、rpm、Arch 包在 Ubuntu 26.04、Fedora 44、Arch 容器里装上、全部 ELF 找得到库;deb 与 rpm 的六个应用在各自容器的 Xvfb 下画出窗口(`linux-distros.sh`)。截图按窗口(`grim -T` 加 Hyprland 的 `stableId`):按区域截时用户切换工作区或别的窗口盖住即截错。ElyMark 的文件监视略去读取后不会自激:重读前先比指纹(长度与修改时间),不打开文件。
|
||||
- 2026-10-11(用户定:替换 v0.1.3 的 Linux 包):v0.1.3 发布里原有的六个 AppImage(无头,打不开窗口)已删去,换成本机容器里建出的六个应用各四种包(共 24 个),出自 L1.7 的提交(晚于该标签);上传后逐个核对大小,ElyTree 的 AppImage 下载回来散列相同。`package.sh` 把每个 RUNPATH 按所在 ELF 解析(`$ORIGIN` 或 `${ORIGIN}` 开头,规范化后须在 AppDir 内),否则拒绝(如未修正的 cairo):CI 用的是别处建好的引擎,旧构建会在这里报错而不是带进包里。替换的 Linux 包对应的源码随之上传到同一发布(`source.sh`,文件名带构建提交号),发布说明写明 Linux 包出自哪个提交。
|
||||
- 2026-10-11:`ci.sh` 用 `ELY_SHARE` 时,CI 克隆里的 `engines`、`reference` 须是指向共享克隆的链接(Windows 为目录联接,不查);是本克隆自建的目录或指向别处即报错,不混用。`.gitignore` 的 `/engines`、`/reference` 不带斜杠,链接也被忽略(`source.sh` 要求工作区干净)。
|
||||
- 2026-10-11(用户定:ElyMark 不用 CEF,不用 Electron):ElyMark 改为原生。界面用组件库的 Markdown 组件(`documents::MarkdownEditor` 一族,缺的在组件库补并推到 Gitea),解析用 markdown-rs(`markdown` 1.0.0),公式用 RaTeX,Mermaid 用 mermaid-rs-renderer,PDF 用 MuPDF Story;CEF 随之删去,ElyMail 的正文也不用 CEF 与 Electron。进度在 `tasks/TASKS.md` 的 C14。组件库 fcad0ff 与 508cc55:`MarkdownRenderer`、`MarkdownEditor`、Markdown 着色、块范围与链接查找改读 markdown-rs 的语法树(GitHub 风格加公式),引用式链接与图片按定义解析,图片把所在段落分开,单行 `$$…$$` 为块公式,软换行(LF、CRLF、CR)读作空格,嵌套在引用与列表里的定义同样解析,强调与链接里的图片仍是图片(链接里的图片可按);`BlockEditor` 的导入导出不属 ElyMark,仍用 pulldown-cmark。markdown-rs 读嵌套图片时只留外层的说明。组件库 d5ecc5a:块公式经 `typography::Latex` 由 RaTeX 排出(字形为轮廓,按窗口缩放画),```` ```mermaid ```` 块经 `documents::Diagram` 由 mermaid-rs-renderer 画出(Mermaid 自己的深浅主题,底色与字色取 Ely 色板),都作为 gpui 资源在后台排版,RaTeX 或 Mermaid 对已解析的输入 panic 时显示为错误;`MarkdownRenderer::base` 给出文档所在文件夹,相对与 file 地址的图片从中读取并按自身大小、不超过栏宽显示,`data:` 地址解码,网络图片不载入(写明)。组件库 ab9a14c:每个公式、图与图片元素经 `primitives::held` 持有其资源,按资源计数持有者(8b9820b;画出的图存在共享的记录里,9036c92 起由最后离开的持有者释放,哪怕它自己还没收到图),最后一个持有者换了内容或离开窗口才从 gpui 资源缓存移除、在本帧之后从图集释放,共用同一内容的元素(含 gpui 缓存的视图)不受影响;公式按字形实际范围取画框,字形不被裁;公式失败显示原因、RaTeX 给的位置与原文,日志不含公式;`file:` 地址去掉查询与片段,`localhost` 为本机,Windows 上别的主机为共享路径,他处拒绝;Mermaid 的节点与饼图文字取 Ely 的前景色。组件库 2b6f551:`documents::MarkdownDocument` 是文件级的 Markdown 文档:全文与撤销在一个 `CodeEditor` 里(`CodeEditor::highlighter` 以 `markdown_highlights` 着色,无行号);可视以 gpui `list` 逐块画出文件的顶层块(链接定义、HTML、front matter 照原文显示,每个字节都在块里或块间),按下的块开成源码(`TextInput`),其键入即刻算作文档的文字,写回为一步撤销,上下键越过块边进入相邻块,Esc 写回;Cmd(他处 Ctrl)按下交给链接;预览只读;源码为编辑器本身;128 KiB 以内当场解析,更长的在后台解析,解析中按下块不打开(日志);新解析保留两端相同的块,滚动不跳。`CodeEditor` 的撤销历史最多留 64 MiB 文字,超出先丢最旧的步;`CodeEditor::reset` 换文字且撤销重新开始;`MarkdownMode` 加 `Preview`。组件库 fc181b4:一个插入点通用于各模式(编辑器的选区,写回的块移动它);`set_caret` 与 `set_top_line` 分别设插入点与视图,换模式保持顶行;按下的块在前一块写回后仍是所按的块(按偏移换算,结构变了即不开并记日志);块是 Tab 停靠点,Enter 或空格打开;预览不收按下、撤销与重做;撤销与重做每次记录、输入法组字、撤销、重做后都限在 64 MiB 内(先丢最旧的撤销,再丢最远的重做)。组件库 433c38f:只有对当下文字的解析才能打开块(解析的文字与编辑器相同),否则拒绝;要求的顶行在其文字解析后才落定:先到所在块,下一帧按块高的比例到块内位置,再有新的要求即接着放下一个;源码与列表之间切换保持顶行,可视与预览共用一个列表,切换不动滚动。
|
||||
- 2026-10-11(用户定:ElyMark 不用 CEF,不用 Electron):ElyMark 改为原生。界面用组件库的 Markdown 组件(`documents::MarkdownEditor` 一族,缺的在组件库补并推到 Gitea),解析用 markdown-rs(`markdown` 1.0.0),公式用 RaTeX,Mermaid 用 mermaid-rs-renderer,PDF 用 MuPDF Story;CEF 随之删去,ElyMail 的正文也不用 CEF 与 Electron。进度在 `tasks/TASKS.md` 的 C14。组件库 fcad0ff 与 508cc55:`MarkdownRenderer`、`MarkdownEditor`、Markdown 着色、块范围与链接查找改读 markdown-rs 的语法树(GitHub 风格加公式),引用式链接与图片按定义解析,图片把所在段落分开,单行 `$$…$$` 为块公式,软换行(LF、CRLF、CR)读作空格,嵌套在引用与列表里的定义同样解析,强调与链接里的图片仍是图片(链接里的图片可按);`BlockEditor` 的导入导出不属 ElyMark,仍用 pulldown-cmark。markdown-rs 读嵌套图片时只留外层的说明。组件库 d5ecc5a:块公式经 `typography::Latex` 由 RaTeX 排出(字形为轮廓,按窗口缩放画),```` ```mermaid ```` 块经 `documents::Diagram` 由 mermaid-rs-renderer 画出(Mermaid 自己的深浅主题,底色与字色取 Ely 色板),都作为 gpui 资源在后台排版,RaTeX 或 Mermaid 对已解析的输入 panic 时显示为错误;`MarkdownRenderer::base` 给出文档所在文件夹,相对与 file 地址的图片从中读取并按自身大小、不超过栏宽显示,`data:` 地址解码,网络图片不载入(写明)。组件库 ab9a14c:每个公式、图与图片元素经 `primitives::held` 持有其资源,按资源计数持有者(8b9820b;画出的图存在共享的记录里,9036c92 起由最后离开的持有者释放,哪怕它自己还没收到图),最后一个持有者换了内容或离开窗口才从 gpui 资源缓存移除、在本帧之后从图集释放,共用同一内容的元素(含 gpui 缓存的视图)不受影响;公式按字形实际范围取画框,字形不被裁;公式失败显示原因、RaTeX 给的位置与原文,日志不含公式;`file:` 地址去掉查询与片段,`localhost` 为本机,Windows 上别的主机为共享路径,他处拒绝;Mermaid 的节点与饼图文字取 Ely 的前景色。组件库 2b6f551:`documents::MarkdownDocument` 是文件级的 Markdown 文档:全文与撤销在一个 `CodeEditor` 里(`CodeEditor::highlighter` 以 `markdown_highlights` 着色,无行号);可视以 gpui `list` 逐块画出文件的顶层块(链接定义、HTML、front matter 照原文显示,每个字节都在块里或块间),按下的块开成源码(`TextInput`),其键入即刻算作文档的文字,写回为一步撤销,上下键越过块边进入相邻块,Esc 写回;Cmd(他处 Ctrl)按下交给链接;预览只读;源码为编辑器本身;128 KiB 以内当场解析,更长的在后台解析,解析中按下块不打开(日志);新解析保留两端相同的块,滚动不跳。`CodeEditor` 的撤销历史最多留 64 MiB 文字,超出先丢最旧的步;`CodeEditor::reset` 换文字且撤销重新开始;`MarkdownMode` 加 `Preview`。组件库 fc181b4:一个插入点通用于各模式(编辑器的选区,写回的块移动它);`set_caret` 与 `set_top_line` 分别设插入点与视图,换模式保持顶行;按下的块在前一块写回后仍是所按的块(按偏移换算,结构变了即不开并记日志);块是 Tab 停靠点,Enter 或空格打开;预览不收按下、撤销与重做;撤销与重做每次记录、输入法组字、撤销、重做后都限在 64 MiB 内(先丢最旧的撤销,再丢最远的重做)。组件库 433c38f:只有对当下文字的解析才能打开块(解析的文字与编辑器相同),否则拒绝;要求的顶行在其文字解析后才落定:先到所在块,下一帧按块高的比例到块内位置,再有新的要求即接着放下一个;源码与列表之间切换保持顶行,可视与预览共用一个列表,切换不动滚动。组件库 abac8b4:顶行的要求带编号,迟到的帧回调只完成自己的那个;文字一换即按新文字重新放,放时按当下文字的行数夹住;`reveal` 是同样的要求(插入点设在该行,该行放到顶上),新文字解析后才落定。
|
||||
@@ -36,7 +36,7 @@ fetch() { # name url rev [sparse paths...]
|
||||
echo "fetch $name $rev"
|
||||
}
|
||||
|
||||
fetch Ely-GPUI-Components https://git.zacharyzhang.com/ZacharyZhang-NY/Ely-GPUI-Components.git 433c38fb2dbb4f6846ada27d1110a2d43cda7c1f
|
||||
fetch Ely-GPUI-Components https://git.zacharyzhang.com/ZacharyZhang-NY/Ely-GPUI-Components.git abac8b41b3893ba5b01251f649ccd7398e35f4af
|
||||
fetch zed https://github.com/zed-industries/zed.git 1a28cff4b409169bac058bca40dfbfeb7621d19b
|
||||
fetch libreoffice-core https://github.com/LibreOffice/core.git 8221e31b3ac356a1623c672912a3d2b492f7e3d1 \
|
||||
include/LibreOfficeKit libreofficekit desktop/source/lib desktop/inc \
|
||||
|
||||
+1
-1
@@ -100,7 +100,7 @@
|
||||
- [x] C14.0 前置:`reference/` 加 markion 与 markdown-rs 并钉提交;`scripts/review.sh` 照用户新定(gpt-6.1-sol,effort high,fast,每条最多三轮) — R2 ok
|
||||
- [x] C14.1 组件库:`MarkdownRenderer`、`MarkdownEditor`、Markdown 着色、块范围、大纲与链接查找改用 markdown-rs(`documents` 的 `tree`、`markdown`、`render`);`BlockEditor` 的导入导出不属 ElyMark,仍用 pulldown-cmark;原有测试照过,改了语义的测试写明 markdown-rs 的读法;推送,ElyOffice 钉新提交 — R2 ok
|
||||
- [~] C14.2 组件库:公式与 Mermaid(MARK-04)。`typography::Latex` 改由 RaTeX 排出;Mermaid 由 mermaid-rs-renderer 画成图;画不出即显示错误与原文;`MarkdownRenderer` 用二者,本地图片按属主给的文件夹读,网络图片不自动载入 — R1 FAIL 六项已修:版面失败把公式写进日志(只记固定文字);资源与图集从不释放(`primitives::held` 持有,换内容或离开即释放);公式失败丢了原文与位置(显示原因、位置与原文);零边距裁掉字形(按墨迹重取画框);`file:` 地址把片段当文件名、把主机当相对路径(解析主机,去查询与片段);Mermaid 节点字色未取 Ely 前景。R2 FAIL 一项已修:一个持有者离开即逐出共享资源(按资源计数)。R3 FAIL 两项已修(不再送审):最后离开的持有者若未收到图,图集里的图不释放(图存于共享记录,由最后离开者释放,单测 `the_last_holder_frees_the_image_another_painted`);一行注释 11 词(已缩短)
|
||||
- [ ] C14.3 组件库:文件级 Markdown 文档组件。一个 `CodeEditor` 持全文与撤销;可视(变高虚拟列表,逐块渲染,按下的块开成源码,写回为一步撤销)、源码(`CodeEditor` 加 Markdown 着色)、预览(只读);属主可读写文本、模式、插入点行列、滚动,可跳到行;改动发事件
|
||||
- [~] C14.3 组件库:文件级 Markdown 文档组件。一个 `CodeEditor` 持全文与撤销;可视(变高虚拟列表,逐块渲染,按下的块开成源码,写回为一步撤销)、源码(`CodeEditor` 加 Markdown 着色)、预览(只读);属主可读写文本、模式、插入点行列、滚动,可跳到行;改动发事件 — R1 FAIL 七项已修:写回后按下别的块用旧范围(按偏移换算所按的块,结构变了不开);插入点偏移撤销后落在字符中间(改用编辑器选区为唯一插入点);预览收撤销重做(预览不挂动作);末尾新块的插入点漏算接缝;无插入点与滚动的设定(`set_caret`、`set_top_line`,换模式保持顶行);输入法组字与撤销重做不受 64 MiB 限制(每条路径都限,含重做);块不可用键盘到达(Tab 停靠点,Enter、空格打开)。R2 FAIL 三项已修:长文后台解析期间写回后按下仍用旧范围(解析文字与编辑器文字相同才可打开);块内滚动位置丢失(按块高比例);换文字后立即设顶行用旧块(要求等其文字解析后落定)。R3 FAIL 四项已修(不再送审):迟到的帧回调完成了新的要求(要求带编号,只完成自己的);等待中的顶行越过换成的短文字而崩溃(放时按当下行数夹住);换文字后的 `reveal` 用旧块(`reveal` 也是等解析的要求);测试不跑帧回调(`frames` 调 `simulate_next_frame`,并核对要求已完成,块内比例改为零时测试失败)
|
||||
- [ ] C14.4 ElyMark 文件会话改为原生(MARK-01,§14.3,QA-21):视图换成 C14.3 的组件,文本即文件原文,无序列化;BOM、CRLF 照旧;新建、打开、保存、另存、重命名照旧;应用不再依赖 `ely-web-content`
|
||||
- [ ] C14.5 删去 CEF:`crates/ely-web-content`、`scripts/fetch-cef.sh`、`scripts/build-mark-content.sh`、`apps/ely-mark/web`、打包里的 CEF 辅助应用与许可、CEF 的测试脚本;PRD 与 `agents.md` 写明新路线,ElyMail 正文不用 CEF 与 Electron
|
||||
- [ ] C14.6 编辑模式与大文件(MARK-02、14,PERF-07):可视、源码、预览按标签切换,切换不改文件,撤销跨模式;超过阈值的文件只开源码并说明;1 MB 文档 2 秒内可编辑,实测记录
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
FAIL
|
||||
|
||||
1. `../Ely-GPUI-Components/src/documents/document/visual.rs:51` — Opening another block uses ranges from before the current block was committed. The editor's Changed subscription has not reparsed the document when `open` immediately slices its new text using the old range. With `A\n\nB\n\nC`, delete A in its open field and click C: the probe panics at line 54 because byte 7 exceeds the new six-byte text. Adding `\n\nNew` to A and clicking B instead opens `N`. Preserve the clicked block's identity across the commit, translate its range through the edit, and validate against the matching text revision before opening it; cover length and structure changes. Evidence: `.work/C14.3-r1/probes.log`, `review_click_last_after_deleting_first` and `review_click_next_after_splitting_first`. The unmodified library passed all 1,766 tests and `cargo clippy --all-targets --features test-support -- -D warnings`; logs are in the same directory.
|
||||
|
||||
2. `../Ely-GPUI-Components/src/documents/document/mod.rs:211` — The resting caret remains a byte offset into an earlier revision, and clamping to text length does not make it a UTF-8 boundary. Open `éabcd` in Visual, replace the block with `x`, press Escape, then undo. The restored text is correct, but `caret()` panics because `rest == 1` is inside é. An owner reading the caret for its status bar or session state can therefore crash after an ordinary undo. Update the resting position when text/history changes and ensure every offset passed to `Buffer::point` belongs to the current text and a character boundary. Evidence: `.work/C14.3-r1/probes.log`, `review_caret_after_undo_unicode`.
|
||||
|
||||
3. `../Ely-GPUI-Components/src/documents/document/visual.rs:250` — Preview installs the same mutating Undo/Redo handlers as Visual, while the backing CodeEditor remains editable. After changing TEXT to `Changed`, switch to Preview and press Ctrl+Z: the supposedly read-only preview restores TEXT and emits a content change. Redo has the same unguarded path. Reject editing/history actions in Preview while allowing owner-driven content updates, and test undo and redo after entering Preview with existing history. Evidence: `.work/C14.3-r1/probes.log`, `review_preview_cannot_undo`; this violates MARK-02.
|
||||
|
||||
4. `../Ely-GPUI-Components/src/documents/document/mod.rs:195` — The caret calculation for an appended block omits the separator inserted by `joint(text)`. Starting with `A`, open the add-block field and type `B`: `text()` correctly returns `A\n\nB`, but `caret()` reports `(0, 2)` instead of `(2, 1)`. Compute the position against the effective document text, including the inserted separator, and cover documents ending in zero, one and two newlines. Evidence: `.work/C14.3-r1/probes.log`, `review_append_reports_actual_caret`.
|
||||
|
||||
5. `../Ely-GPUI-Components/src/documents/document/mod.rs:231` — C14.3 requires the owner to read and write caret line/column and scroll state, but the component exposes getters and only `reveal(line)`. That method forces column zero and couples scrolling to caret movement; neither the visual resting caret nor its private list scroll can be restored independently. Selecting a source caret through `editor()` also does not synchronize the visual caret: the probe selects `(4, 1)`, switches to Visual and reads `(4, 0)`. Provide the required independent position/scroll setters and synchronize the position used by each mode, with restoration tests covering a nonzero column and a viewport separate from the caret. Evidence: the public API and `.work/C14.3-r1/probes.log`, `review_mode_switch_keeps_caret`.
|
||||
|
||||
6. `../Ely-GPUI-Components/src/editor/state.rs:435` — The claimed 64 MiB history limit is enforced only on ordinary commits. IME completion records directly in `ime.rs:69`, and undo/redo move whole snapshots without applying the limit. Three compositions in a 23 MiB editor retain 72,351,744 bytes; replacing `small` with 65 MiB and undoing retains 68,157,440 bytes in redo. Thus composition history can grow without the advertised bound. Enforce the budget on every history insertion/transfer, including redo-only overflow, while preserving a valid undo/redo chain, and cover those paths. Evidence: `.work/C14.3-r1/probes.log`, `review_compositions_also_cap_history` and `review_undo_also_caps_history`; `.work/C14.3-r1/probe-source.log` includes the read-only size instrumentation. The final AGENTS.md decision overstates the current implementation.
|
||||
|
||||
7. `../Ely-GPUI-Components/src/documents/document/visual.rs:198` — Visual blocks and the add-block row are pressable only with the mouse: they have no Tab stop, focus ring or keyboard activation. The document's own focus handle is not a Tab stop, and its Up/Down handlers do nothing until a field has already been opened with the mouse. With the component inside a root FocusScope, Tab followed by Enter opens no block, so keyboard users cannot begin visual editing. Make the visual editing targets reachable with visible focus and keyboard activation, including the add-block target, as required by the gpui rules. Evidence: `.work/C14.3-r1/keyboard.log` and its FocusScope-wrapped probe in `.work/C14.3-r1/probe-source.log`.
|
||||
@@ -0,0 +1,7 @@
|
||||
FAIL
|
||||
|
||||
1. `../Ely-GPUI-Components/src/documents/document/edit.rs:41` — Round 1 defect 1 remains above the asynchronous parsing threshold. A write-back changes the editor before its Changed subscription advances `edits`; `reparse` schedules background work without invalidating `read`, so `read_now()` still accepts the old block ranges. Start with `A\n\nB\n\nCCCC\n\n` followed by enough paragraphs to exceed 128 KiB, replace A with AAAA, and press B: its field opens `B\n\nC`, including part of the untouched next block. Invalidate the parsed revision synchronously and reject or defer opening until the ranges belong to the current text. Cover write-backs above the threshold. Reproduced by `review_async_parse_cannot_open_a_stale_range` in `.work/C14.3-r2/probes-final.log`; probe source is in `probe-source.log` in that directory.
|
||||
|
||||
2. `../Ely-GPUI-Components/src/documents/document/place.rs:55` — Scroll reads discard `offset_in_item`, and the setter at line 79 always writes zero. In a 100-line fenced code block, source top line 40 becomes 0 after switching to Visual. Scrolling 500 pixels into that block in Visual and switching to Preview also jumps to its beginning. Thus round 1 defect 5 is only partly fixed, and the final AGENTS.md claim that mode switches preserve the top line is false. Preserve the position within a block when reading, restoring and switching views; cover tall blocks rather than only separate one-line paragraphs. Both scenarios fail in `review_top_line_inside_a_code_block_survives_modes` and `review_visual_to_preview_keeps_inside_block_offset` in `.work/C14.3-r2/probes-final.log`.
|
||||
|
||||
3. `../Ely-GPUI-Components/src/documents/document/place.rs:76` — Restoring scroll immediately after replacing text uses the preceding document's parsed blocks. Open `old` in Visual, then call `reset` with 100 separate paragraphs and `set_top_line(40)` in the same owner update: after parsing and rendering settle, the top line is 0. The replacement's Changed subscription reparses later, but nothing reapplies the requested position. This breaks C14.3's owner-controlled scroll restoration and MARK-12 session restoration. Resolve the request against the replacement revision, deferring it until that revision is parsed when necessary. Reproduced by `review_reset_then_restore_scroll` in `.work/C14.3-r2/probes-final.log`. The unmodified library passed all 1,779 tests and `cargo clippy --all-targets --features test-support -- -D warnings`; logs are in the same directory.
|
||||
@@ -0,0 +1,9 @@
|
||||
FAIL
|
||||
|
||||
1. `../Ely-GPUI-Components/src/documents/document/place.rs:130` — A placement callback identifies its request only by line number, so an obsolete callback can finish a newer request for another mode or text revision. With 100 paragraphs, call `set_top_line(40)` in Source and switch to Visual before the next frame: after callbacks settle, the top is 0. The reverse switch also yields 0. In Visual, requesting line 40, resetting to a 100-line fenced block and requesting line 40 again likewise lands at 0. Track request identity together with its mode and text revision; obsolete callbacks must not clear the current request. Cover these interleavings with actual frame callbacks. Reproduced by the two `review_pending_*` probes and `review_inflight_top_then_new_text_same_line` in `.work/C14.3-r3/probes.log`. The final AGENTS.md claim that mode switches preserve the top line is therefore incomplete.
|
||||
|
||||
2. `../Ely-GPUI-Components/src/documents/document/place.rs:100` — A deferred top line is clamped only when requested, then indexed against potentially shorter replacement text. In Visual, reset to more than 128 KiB of paragraphs, request top line 40 while parsing is pending, then reset to `short` before placement. Rendering calls `Buffer::line_range(40)` on a one-line buffer and panics: `the len is 1 but the index is 40`. Revalidate pending positions against the current text when placing them, and invalidate obsolete placement state on replacement. Reproduced by `review_waiting_top_then_shorter_reset` in `.work/C14.3-r3/probes.log`.
|
||||
|
||||
3. `../Ely-GPUI-Components/src/documents/document/place.rs:160` — `reveal` still resolves its target using the previous parsed blocks and never retries after the replacement is parsed. Open `old` in Visual, then reset to 100 paragraphs and call `reveal(80)` in the same owner update. After parsing and frame callbacks settle, the target block remains outside the viewport. The same reveal succeeds when issued after the new parse, confirming that the jump was lost. Defer the reveal until its text revision is parsed, then resolve and reveal the requested line. Evidence: `review_reveal_after_reset` in `.work/C14.3-r3/probes.log` and the passing `review_reveal_after_read_is_visible` control in `.work/C14.3-r3/mutation.log`.
|
||||
|
||||
4. `../Ely-GPUI-Components/src/documents/document/tests.rs:36` — The scroll-test helper refreshes the window without executing `Window::simulate_next_frame`, so the new placement callbacks never run. Assertions on `top_line()` merely read the pending request, masking failures in the final placement. Forcing the callback's within-block offset to zero still passes all 25 original MarkdownDocument tests, including the tall-block restoration test. Execute the next-frame callbacks, verify the request has completed, and assert the resulting viewport position. Evidence: `.work/C14.3-r3/mutation.log` and `mutation-source.log`; the independent probes that execute callbacks expose defects 1–3.
|
||||
Reference in new issue
Block a user