Files
ElyOffice/tasks/reviews/C14.3-r3.md
T
2026-10-12 02:03:41 -04:00

2.9 KiB
Raw Blame History

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.