R5.3: ElyDoc drags the cursor's table borders, one kernel command per drop at the read's revision; three rounds used, last fixes tested

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 10:03:47 -04:00
1 parent d07f0ddb7c
commit e6e5aea7a1
21 files changed
+832 -15

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
FAIL
- [P1] `crates/ely-lok/src/view/borders.rs:97` — New event batches replace the table and revision used by an active drag, while `Held` retains the old border index. Reproduce: insert a third column, hold the second inner border, undo the insertion while holding, then move the mouse. `clamp` at line 87 indexes entry 1 of a one-entry array and panics. When the index still exists, dropping instead applies the old drag to the changed table: the kernel probe moved the new border from 3323 to 3623 twips without a stale error. This breaks R5.3's read-revision requirement. Keep the drag's geometry and exact supplying revision together; never reinterpret its index against a newer table, and reject or cancel invalidated drags. Add regressions for undo and topology changes during a drag. Evidence: `.work/R5.3-r1-probes.log`.
- [P2] `crates/ely-lok/src/view/borders.rs:103` — The fixed six-pixel reach on both sides of every border consumes the interior of short rows. A normal 276-twip row is only 9.2 pixels high at 50% zoom, so the adjacent row-border hit regions overlap across its entire height. After entering the table, clicking the middle of the second row starts a border drag instead of positioning the caret; the input-handler probe reports `held border=true, sent delta=0`. Limit border hit regions according to the displayed neighboring geometry so ordinary cell clicks remain available, and test those clicks through `on_mouse_down` at reduced zoom. Evidence: `.work/R5.3-r1-hit.log`.
- [P3] `crates/ely-lok/src/view/borders.rs:129` — This new comment, the comment at line 145, and `crates/ely-lok/src/view/tests/borders.rs:16` each contain eleven words. They fail the project's explicit one-line, ten-word comment rule. Shorten all three to at most ten words.
+5
View File
@@ -0,0 +1,5 @@
FAIL
- [P1] `crates/ely-lok/src/view/borders.rs:115` — The table snapshot still receives the latest view revision rather than its supplying batch's revision. `apply_batch` first calls `seen_revision`, which keeps the maximum because input completions and event batches can arrive out of order. Reproduce: receive a two-column table at revision 1, insert a column and process its revision-2 input completion, then apply the delayed revision-1 batch and drag its inner border. The kernel probe moved the new table's border from 3324 to 3624 twips without a stale error. Holding geometry through subsequent updates fixes round one's active-drag case, but this ordering still violates R5.3's read-revision requirement. Store the exact supplying `batch.revision` with the geometry, independently of the latest view revision, and add an out-of-order batch/completion regression. Evidence: `.work/R5.3-r2/probes.log`.
- [P2] `crates/ely-lok/src/view/input.rs:337` — Releasing a border ignores `event.position` and commits the last position received by `on_mouse_move`. GPUI only dispatches that move handler while the pointer is over the canvas, so dragging outside freezes the guide and commits the wrong width. Reproduce with a 450-pixel canvas: hold the inner column border at x=426.87, move to x=440, continue outside to x=480, then release. Dispatching through the same GPUI registrations and actual LokView handlers leaves the guide at x=440 and commits 5182 twips instead of the release position's 5782. Track pointer movement throughout the held drag and apply the release coordinates before issuing the single border command; cover release outside the canvas with an event-dispatch regression. Evidence: `.work/R5.3-r2/probes.log`.
+5
View File
@@ -0,0 +1,5 @@
FAIL
- [P2] `crates/ely-lok/src/view/borders.rs:163` — The drag uses the pointer's absolute position without retaining its initial offset from the border. Because `drop_border` calls `move_border` even without a mouse-move event, a stationary click within the border's hit area changes the document. Reproduce at 100% zoom: press and release 3 pixels right of a two-column table's inner border without moving. The painted-LokView GPUI dispatch probe sent one command and moved the kernel border from 6403 to 6448 twips. Preserve the press position or grab offset, derive movement from that origin, and issue no command for a stationary click. Add an off-center stationary-click regression while keeping release-coordinate handling. Evidence: `.work/R5.3-r3/probes.log` and `.work/R5.3-r3/probe.source.log`.
- [P3] `crates/ely-lok/src/view/borders.rs:172` — The comment “Lets go at `position`: one command, at the held table's revision.” contains eleven words. Running `tests/scripts/comments.py` fails on this line under the project's ten-word limit. Shorten it to at most ten words. Evidence: `.work/R5.3-r3/comments.log`.