Fix the Windows CI timeout in custom_agent_is_typable_when_running_in_the_current_workspace - #2874
Open
sinelaw wants to merge 1 commit into
Open
Fix the Windows CI timeout in custom_agent_is_typable_when_running_in_the_current_workspace#2874sinelaw wants to merge 1 commit into
sinelaw wants to merge 1 commit into
Conversation
`custom_agent_is_typable_when_running_in_the_current_workspace` timed out
on Windows CI after 180s. The nextest kill dumped the stuck screen: the
command box held `zcustomcmd` where the test had typed `zzcustomcmd`, so
the `wait_until` for the full string could never fire.
Picking "custom…" paints the label on the selector immediately, but
`applyAgentPreset` hands focus to the command box through a plugin
round-trip that lands a tick later. The gate was `contains("custom")`,
which is already true during that window — so the test typed while focus
was still on the dropdown and the leading character went nowhere. Linux
and macOS passed only because the single tick inside `wait_until`
happened to complete the round-trip before the first keystroke; Windows'
slower plugin thread did not. Typing straight after the arrow key with no
wait at all reproduces the exact CI string locally.
Gate on the focus marker leaving the selector instead. `focused_line`
can't serve as a `wait_until` condition — it asserts exactly one marker,
and a frame mid-handoff legitimately has none — so this adds a
`focused_line_opt` sibling that returns `None` there.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
e2e::plugins::orchestrator_new_dialog::custom_agent_is_typable_when_running_in_the_current_workspacetimes out on Windows CI (180s, seen on #2865 and unrelated to that branch — it dates to the test's introduction in 5c99886).What happens
nextest's kill dumped the stuck screen:
The test types
zzcustomcmd; the box holdszcustomcmd. One leading character is gone, sowait_until(contains("zzcustomcmd"))never fires, andwait_untilis unbounded.Why
Picking
custom…paints the label on the selector right away, butapplyAgentPreset(orchestrator.ts:6698) re-renders the form and then hands focus tocmdviasetFocusKey/snapFormFocusTo— a plugin round-trip. The gate waswait_until(contains("custom")), which is already satisfied during that window, so the test typed while focus was still on the dropdown.Probing the window directly confirms it:
Linux and macOS pass only because the one
tick_and_renderinsidewait_untilhappens to complete the round-trip before the first keystroke. Windows' slower plugin thread does not.Fix
Gate on the focus marker leaving the selector rather than on the label. With that gate the same reproduction yields
zzcustomcmd.focused_linecan't be used in await_untilcondition — it asserts exactly one▸on screen, and a frame mid-handoff legitimately has none — so this adds afocused_line_optsibling returningNonein that case.Not addressed
The same race exists in the real editor: pick
custom…and type instantly on a loaded machine and the first character goes to the dropdown. Closing that needs the focus handoff to be synchronous with key handling, which the plugin can't do from its side — separate work.Verification
orchestrator_new_dialogtests passcargo fmt --checkclean; no new clippy warnings on the changed lines🤖 Generated with Claude Code