Repository navigation
Offer in-place retry for failed file diffs - #2365
Conversation
|
Why is this helpful / needed? Why could it initially fail? |
CI test failed on the approved head: the new retry test raced its replacement control.
leaf-agent
left a comment
There was a problem hiding this comment.
The full test job is red on this head, so I cannot keep the approval. The new retry journey failed at its third request: requestfailed fired before the replacement Retry button was ready, and Enter reached the old button while it still had aria-disabled="true". The phone-header test also reported a 49px passive shift; its focused rerun passed, so I have not established that cause.
On the purpose of Retry: a failed deferred fetch leaves an expanded file showing only an error. Closing and reopening the file already starts another load, but the visible Retry button gives someone reading the error a direct way to try again after a transient fetch failure. A malformed patch will still need its source repaired.
A network failure can precede the replacement Retry control's error paint. Wait for the replacement to accept activation before checking its restored focus or sending the next keyboard attempt, and observe the actual requests. The stability sensor must retain a disclosure's input credit while its lazy source preparation is still pending, including when a server reading arrives in the meantime. Join canonical presentation proof with counted rendering completion. Unrelated post-presentation arrivals do not extend that credit. The sensor retains its existing global credit model for pending presentation. Hold a real deferred chunk across a quiet geometry queue and concurrent news, then prove later passive movement still fails. A separate held-arrival fault control proves unrelated deferred work cannot hide movement after a press.
Adopt main's stability sensor and sensor regression file verbatim, removing the duplicate changes from this branch. Retry retains its product recovery, 10px error inset, and keyboard/network availability regression. Drop unused item and nextitem arguments from the newly landed pytest profiling hook. Pluggy supplies only declared arguments; the real browser smoke still records all profiling phases and its Playwright calls. Pinned Vulture passes.
Integrate frozen main ba50ba3, retaining its revision-history readings and registered preparation lifecycle. Combine diff test imports so Retry and held-lazy-source journeys both remain intact. The stability regression now observes a pending render across one frame while its grammar request is held, rather than waiting for completion before releasing the request. Preserve its presentation check and later passive-motion negative control.
Closing or navigating away from the gallery while a sample is loading could report `sample destroyed` as a page failure. Sample cancellation can occur while the old figure remains connected, so the gallery now follows the sample owner's AbortError contract for loading and playback commands, as lf-sample already does. This is a finishing follow-up to survey item 14, found while verifying the final preview. Runtime source measures 340 → 341 lines (+1, including the cancellation contract comment); the browser regression adds 29 lines. Validation: the held-allocation departure regression fails before the fix with "Could not play" and a page error, then passes after it. After integration with main, that regression and the phone diff-header journey pass, along with all 336 runtime tests. Independent source and integration reviews found no issues. CI runs the complete landing gates. CI also exposed a synchronization race in the retry regression introduced by #2365: observing a browser request precedes its Python route callback. The two held retry steps now wait for the collected route through the existing `holding` helper before reading the attempt count. All count and focus assertions remain; the focused retry journey passes. The diff-controls test module stays 521 → 521 lines. > _This was written by Codex on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
A failed expanded file diff now offers Retry in place. It uses the existing deferred-load pipeline, ignores repeated activation while loading, preserves keyboard focus after another failure, and returns focus to the file header when the source loads. The error message and Retry control have 10px inset spacing.
The browser journey covers repeated failures, duplicate activation, focus retention, tabbing away while loading, and successful recovery. It waits for the replacement error control to accept activation before trying again. The held-source stability test now checks rendering is pending before releasing its request, matching main’s preparation tracking while retaining its passive-motion negative control. A profiling gate repair removes two unused hook arguments; pytest supplies only the arguments a hook declares.
Validation: Retry recovery, phone parent-folder readability, held-source loading, widget preparation lifetimes, and the stability regression pass with main’s existing sensor. JUnit still records profiling phases and Playwright calls after the hook cleanup. All 336 runtime tests and targeted pre-commit checks pass. Live pointer, keyboard and phone-touch recovery also pass in the exploratory sample, whose labeled simulated interruption aborts one native request before Retry loads the real source.