Repository navigation
fix: avoid stale targets in the keyboard attribute sweep - #4399
Conversation
Select visible indices from the full control list and act through locators, so scrolling or focus can replace a node without invalidating an element handle or shifting the visible-only index. Keep all forty attempts and fail if the sweep loses every visible control. Closes #4256
|
The three cases reported in #4256 pass at this head, but CI has not validated the repair. In run 40472126654, The same run also reported stale keys in The active |
Choose, scroll and measure a candidate in one browser task, then send real pointer input and type through actual focus. The sweep no longer relies on a detached handle or an ordinal that a panel repaint can remove. It keeps forty seeded input steps and the existing key and browser-watch assertions. The previous locator driver reproduced a 120-second timeout on ideas-to-implement. Five focused cases complete the key comparisons with coordinate input after merging current main. Browser teardown still reports independent writes tracked in #4581 and #4582; the file-editor diagnostic also reproduces with main’s unmodified driver. Refs #4256
|
Pushed the Ruff formatting correction as 0c913b0. The pinned Ruff 0.16.1 formatter reproduced the failure on the previous head; formatting and lint checks now pass for the modal-watch test file. This increment changes formatting only. CI run 40672052168 on a6c6bc4 also reported six stale-key sweep teardown errors: answer-row resizing on With |
The coordinate sweep exposes answer lists that grow for several flex lines. The swap watch treated the tallest arrival as if it sized the whole list. Require the taller place to fit that occupant plus its own padding and borders before reporting a single-line sizing fault. Keep positive cases on wrapping-enabled rows, and exercise list growth and contraction.
A pointer click with no travel wrote translate: 0px and removed it in the same task. Keep zero displacement without an inline translation, avoiding redundant style writes on both the margin card and composer. Extend the shared drag handoff cases to cover a no-travel press while retaining the drag assertions.
Key each list separator by its group rather than its first item, so undoing the first Done card does not move a surviving card out and back during Lit reconciliation. Offline file reads refuse immediately; do not expose a transient busy state for those reads. Preserve live read/save serialization and the captured editor refusal. The release-notes and file-editor sweeps reproduced the write-watch findings before the changes. Release-notes, deck and file-editor pass afterward with watches active. The added offline-editor regression fails before and passes after; the live save/retry regression passes. pnpm run check passes all 695 runtime and 85 Worker tests. Rebuild the committed kernel.
The stale-key sweep chooses, scrolls and measures a random control in one browser task, clicks its screen coordinates, and types through actual browser focus. It retains neither a node handle nor an ordinal across tasks, avoiding the detached-target waits reported in #4256. It keeps forty seeded steps, readiness and settling waits, forced key repaint comparisons, and the browser watches.
The input paths expose two watch corrections and three redundant writers. Native modal dismissal retains the gesture that puts its fields away; timer closes and disallowed backdrop presses still report passive words loss. The swap watch distinguishes a single control line from a list growing across several wrapped lines, while oversized replacement controls still fail. A drag grip leaves a no-travel click without a temporary zero translation. On me separators keep their group's identity when its first item changes, avoiding a card moved out and back during Lit reconciliation. An offline file editor does not enter a busy state for a read that immediately refuses. The card layout, drag geometry, offline refusal and live file-save behavior remain the same; these writer changes add no intended visual state. The committed kernel is rebuilt.
Validation:
5d89c86c847b470f10fe63f40dc2c8ea5f8d40a7, therelease-notesandfile-editorsweeps reproduced their CI write-watch failures locally. After the latest corrections,release-notes,deckandfile-editoreach pass with the watches active.pnpm run checkpasses, including all 695 runtime tests and 85 Worker tests. The browser build, pinned Ruff lint/formatting, Prettier and ESLint checks pass.github-discoveriessweep, modal dismissal, wrapping lists, and thedynamic-widgets,code-comparisonandship-reviewsweeps.release-notesstartup comparison against that head loads 42 code requests on both versions through upgrade and server-state presentation, with 19 fewer JavaScript bytes. Neither arm reports startup layout shifts.The previously stated readiness hold for #4581 and #4582 is cleared by these reproductions and passing checks. The new head still needs its queued review and CI result; with
await_ci: false, that review and the CI landing follow-up own verification after this push.Closes #4256. Closes #4581. Closes #4582.