Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2.9 KiB
FAIL
-
../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, callset_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 tworeview_pending_*probes andreview_inflight_top_then_new_text_same_linein.work/C14.3-r3/probes.log. The final AGENTS.md claim that mode switches preserve the top line is therefore incomplete. -
../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 toshortbefore placement. Rendering callsBuffer::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 byreview_waiting_top_then_shorter_resetin.work/C14.3-r3/probes.log. -
../Ely-GPUI-Components/src/documents/document/place.rs:160—revealstill resolves its target using the previous parsed blocks and never retries after the replacement is parsed. Openoldin Visual, then reset to 100 paragraphs and callreveal(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_resetin.work/C14.3-r3/probes.logand the passingreview_reveal_after_read_is_visiblecontrol in.work/C14.3-r3/mutation.log. -
../Ely-GPUI-Components/src/documents/document/tests.rs:36— The scroll-test helper refreshes the window without executingWindow::simulate_next_frame, so the new placement callbacks never run. Assertions ontop_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.logandmutation-source.log; the independent probes that execute callbacks expose defects 1–3.