Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
5.1 KiB
FAIL
-
../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 whenopenimmediately slices its new text using the old range. WithA\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\nNewto A and clicking B instead opensN. 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_firstandreview_click_next_after_splitting_first. The unmodified library passed all 1,766 tests andcargo clippy --all-targets --features test-support -- -D warnings; logs are in the same directory. -
../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éabcdin Visual, replace the block withx, press Escape, then undo. The restored text is correct, butcaret()panics becauserest == 1is 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 toBuffer::pointbelongs to the current text and a character boundary. Evidence:.work/C14.3-r1/probes.log,review_caret_after_undo_unicode. -
../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 toChanged, 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. -
../Ely-GPUI-Components/src/documents/document/mod.rs:195— The caret calculation for an appended block omits the separator inserted byjoint(text). Starting withA, open the add-block field and typeB:text()correctly returnsA\n\nB, butcaret()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. -
../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 onlyreveal(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 througheditor()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. -
../Ely-GPUI-Components/src/editor/state.rs:435— The claimed 64 MiB history limit is enforced only on ordinary commits. IME completion records directly inime.rs:69, and undo/redo move whole snapshots without applying the limit. Three compositions in a 23 MiB editor retain 72,351,744 bytes; replacingsmallwith 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_historyandreview_undo_also_caps_history;.work/C14.3-r1/probe-source.logincludes the read-only size instrumentation. The final AGENTS.md decision overstates the current implementation. -
../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.logand its FocusScope-wrapped probe in.work/C14.3-r1/probe-source.log.