Skip to content

fix(e2e): poll for kernel status after trust approval and wait for button enabled#1049

Merged
rgbkrk merged 1 commit intomainfrom
fix/e2e-trust-dialog-status-poll
Mar 22, 2026
Merged

fix(e2e): poll for kernel status after trust approval and wait for button enabled#1049
rgbkrk merged 1 commit intomainfrom
fix/e2e-trust-dialog-status-poll

Conversation

@rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented Mar 21, 2026

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:ready event triggers checkTrust() which briefly sets loading=true, disabling the dialog buttons. If WebDriver tries to click during that window, waitForClickable times out after 5s. Fix: added waitForEnabled({ timeout: 10000 }) before waitForClickable.

2. Kernel status read too early after approval

handleTrustApprove calls launchKernel("auto", "auto") as fire-and-forget (no await). The kernel status propagates via RuntimeStateDoc sync, so it's still not_started when read immediately. Fix: replaced the single-read expect with a 10s waitUntil poll for starting/idle/busy.

Local test result after fix:

Trust dialog appeared
Kernel status before trust approval: not_started
Clicked approve button  
Dialog dismissed in 307ms
Kernel status after dialog closed: idle
✓ should close trust dialog on single click without waiting for kernel (1.5s)

PR submitted by @rgbkrk's agent Quill, via Zed

@github-actions github-actions bot added test Test infrastructure and coverage quill PR authored by Quill Agent 🦆 labels Mar 21, 2026
…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.
@rgbkrk rgbkrk force-pushed the fix/e2e-trust-dialog-status-poll branch from a586db1 to 55832fa Compare March 22, 2026 02:46
@rgbkrk
Copy link
Member Author

rgbkrk commented Mar 22, 2026

CI Results

5/8 E2E runners pass:

Runner Status
Smoke
UI (Cell Visibility)
UV Prewarmed
Deno
UV Pyproject
Trust Dialog ❌ trust dialog never appears
UV Inline Deps ❌ trust dialog never appears
Conda Inline Deps ❌ trust dialog never appears

Root cause of 3 failures: The trust dialog doesn't appear on CI even though the fixture notebook (2-uv-inline.ipynb) has inline deps and no trust_signature. The daemon's trust verification may not be reading runt.uv.dependencies from the notebook metadata correctly, or the trust check on Linux resolves differently.

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.

@rgbkrk rgbkrk merged commit de53ee5 into main Mar 22, 2026
16 of 20 checks passed
@rgbkrk rgbkrk deleted the fix/e2e-trust-dialog-status-poll branch March 22, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

quill PR authored by Quill Agent 🦆 test Test infrastructure and coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant