fix(e2e): poll for kernel status after trust approval and wait for button enabled#1049
Merged
fix(e2e): poll for kernel status after trust approval and wait for button enabled#1049
Conversation
…tton enabled Two issues in trust-dialog-dismiss.spec.js: 1. The approve button can be briefly disabled when a daemon:ready event triggers checkTrust() while the dialog is open (sets loading=true). Added waitForEnabled before waitForClickable. 2. Kernel launch after trust approval is fire-and-forget — the status propagates via RuntimeStateDoc sync, not synchronously. Replaced the single-read assertion with a 10s poll for the status to reach starting/idle/busy.
a586db1 to
55832fa
Compare
Member
Author
CI Results5/8 E2E runners pass:
Root cause of 3 failures: The trust dialog doesn't appear on CI even though the fixture notebook ( This is a daemon-side trust detection issue, not a test issue. The trust dialog fix in this PR (polling for kernel status, waiting for button enabled) is correct — it just can't be exercised because the dialog never shows. Recommend: merge this PR for the trust dialog fix, investigate the trust detection separately. |
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.
Fixes the Trust Dialog E2E runner. Two bugs found by running the test locally and watching the app:
1. Approve button disabled during loading race
The
daemon:readyevent triggerscheckTrust()which briefly setsloading=true, disabling the dialog buttons. If WebDriver tries to click during that window,waitForClickabletimes out after 5s. Fix: addedwaitForEnabled({ timeout: 10000 })beforewaitForClickable.2. Kernel status read too early after approval
handleTrustApprovecallslaunchKernel("auto", "auto")as fire-and-forget (noawait). The kernel status propagates via RuntimeStateDoc sync, so it's stillnot_startedwhen read immediately. Fix: replaced the single-readexpectwith a 10swaitUntilpoll forstarting/idle/busy.Local test result after fix:
PR submitted by @rgbkrk's agent Quill, via Zed