Skip to content

fix(app): close the restart prompt and command palette synchronously on dismiss - #4724

Merged
yomgui merged 1 commit into
devfrom
e2e/dismiss-dialog-visibility
Sep 11, 2026
Merged

yomgui merged 1 commit into
devfrom
e2e/dismiss-dialog-visibility

Conversation

@yomgui

@yomgui yomgui commented Sep 10, 2026

Copy link
Copy Markdown
Member

Root cause

Triage cluster 7/K in reports/e2e-red-2026-09-09/triage.md ("Dismiss-then-notSee races"): assertAbsent (evals/packages/cdp/src/input.ts) requires the target to be gone on its first inspection, ~44 ms after the dismissing input. Both dialogs are Base UI popups that stay mounted until their exit motion finishes (useAnimationsFinished on the popup element):

  • AlertDialogContent (restart prompt, desktop-updater-provider.tsx): data-closed:animate-out fade-out-0 zoom-out-95 duration-100 → still opaque enough to count as visible at 44 ms → Target remained visible: "Restart OpenWork?". Test 2 of the same spec ("control rail not ready … Keep completed after update") was the follow-on of that dialog still being open.
  • CommandDialogPopup (command palette): transition-[scale,opacity,translate] duration-200 data-ending-style:opacity-0 → the palette input with placeholder Search actions, settings, and sessions… is still visible right after Escape (streamed-markdown-answer test 3).

What changed

Dismissal now hides the popup in the same frame: data-closed:hidden on the AlertDialog popup/overlay and the command palette popup/backdrop, replacing their exit animation/transition (entrance motion is unchanged). display:none is used rather than visibility:hidden because the AlertDialog's duration-100 leaves transition-property at its all default, which would animate visibility as a discrete step and keep the element visible for the whole duration. With no running animation Base UI unmounts the popup on the next frame. No spec was changed; no waits were added.

Proof (Daytona, sha a42676ec1b6f51f831359e6b4f47320233b19565, OPENWORK_EVAL_REF pinned — sandbox log: HEAD is now at a42676ec)

Placement line for both runs: {"lane":"e2e","daytona":true,"placement":"daytona","engine":"legacy","surface":"legacy","vision":"defer",…}

pnpm evals:e2e background-desktop-update --daytona → passed 1 / failed 1 / skipped 0

  • ✓ a confirmed update relaunch resumes only the unfinished task on its original engine (the cluster's follow-on test; red on dev)
  • × updates download outside Settings and offer a persistent, optional restart — the cluster claims now pass in the trace: click(Keep working) → notSee(text=Restart OpenWork?) ok (absent for the full 3000 ms window), and press(Escape) → notSee(text=Restart Studio?) ok. The test then fails later, at spec line 89 (click({role:"button", text:"Check now"}) in the install-failure loop): Located element was visible=true, hitTestOk=false. Covered by div text="Check now" for 30 s, i.e. the Settings Check now button is disabled (busy || checking || downloading) after a failed install. That loop was added by fix(desktop): wait for native update readiness before restart #4714, which merged as "Verification — Incomplete" with this spec never executed; the triage lane predates it. Not touched here.

pnpm evals:e2e streamed-markdown-answer --daytona → passed 1 / failed 3 / skipped 0

  • Tests 1–2 are triage Cluster 1 (fresh-session Run task click swallowed; draftText is "\n"), unchanged and out of scope.
  • × test 3 v1 keeps long tool-rich history… — the cluster claims pass: press(Escape) → notSee(placeholder=Search servers and artifacts...) ok and press(Escape) → notSee(placeholder=Search actions, settings, and sessions…) ok, each observed twice for the full 3 s window. It then fails later in browseHistory (added by fix(session): reveal newly submitted messages #4683, never reached on the lane before): keyboard browsing settles above the latest turn … expected 561 to be greater than or equal to 657 (rows.at(-1).rect.top >= viewport.bottom after PageUp). Not touched here.
  • ✓ CONT-01 restores the exact cumulative prefix…

Verdict for this PR's claim: dismissal is synchronous for both dialogs (observable in both traces). Spec-level verdict for the two files remains Incomplete because of the two unrelated downstream failures above. Both runs' sandboxes were deleted by the testkit.

Also: pnpm --dir apps/app typecheck exit 0.

Noticed, not touched

  1. fix(desktop): wait for native update readiness before restart #4714 follow-up: after a failed Restart & update, Settings › Updates Check now stays disabled (button pointer-events:none, hit lands on its wrapper) so the new install-failure loop in background-desktop-update cannot proceed. Hypothesis: an automatic check → auto-download leaves the status in downloading with the mock's finishDownload unresolved; needs a probe of updateStatus at that point.
  2. fix(session): reveal newly submitted messages #4683 follow-up: browseHistory in streamed-markdown-answer test 3 — after PageUp the last user row's top (561) never gets ≥ the viewport bottom (657) on Daytona.
  3. components/ui/dialog.tsx still uses the same data-closed:animate-out … duration-100 exit pattern; any spec that notSees right after closing a plain Dialog will hit the same race. Left alone to stay in scope.
  4. command-palette-search / command-palette-pin-rename already work around this race with probe.eventually(… footer disappears) before notSee; those waits are now unnecessary.

…on dismiss

Base UI keeps a dialog popup mounted (and partially opaque) until its exit
animation or transition finishes, so the restart prompt and the command
palette stayed visible for 100-200 ms after Keep working / Escape. Hide the
popup with display:none as soon as it is closed; Base UI then unmounts it on
the next frame.
@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 10, 2026 2:00am UTC
3 Skipped Deployments
Project Deployment Actions Updated
openwork-den Skipped Skipped Sep 10, 2026 2:00am UTC
openwork-diagnostics Skipped Skipped Sep 10, 2026 2:00am UTC
openwork-landing Skipped Skipped v0 Sep 10, 2026 2:00am UTC

@github-actions

Copy link
Copy Markdown
Contributor

Warden review summary — Clear

Native findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run

Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (4246 ms), confidentiality-review (3901 ms), desktop-den-sync-review (5173 ms).

Blockers

  • None.

Advisories

  • None.

Needs recheck

  • None.

Observed review-thread metrics

  • Unique observed run attempts in retained window: 1
  • Distinct heads in retained window: 1
  • Current unresolved Warden threads: 0 of 0 observed
  • Observed resolved/unresolved transitions in retained snapshots: 0 / 0
  • First observed resolved/unresolved (state at first collection, not event time): 0 / 0
  • Precision: unavailable (no adjudications; no TP/FP values are inferred)
  • Observation window: 1/20 run attempts retained; truncated: false
  • Transition snapshot: 0/0 current attributed threads retained (limit 500); truncated: false

Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority.

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (a42676ec1b6f51f831359e6b4f47320233b19565). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@github-actions

Copy link
Copy Markdown
Contributor

Passed · 3/3 tests · 4/4 assertions · 2 images

Commit a42676ec1b6f51f831359e6b4f47320233b19565 · selected evidence

Open review report

This branch was successfully deployed

1 active and 3 inactive deployments
Preview – openwork-app — a42676ec Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-den — a42676ec Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-landing — a42676ec Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-diagnostics — a42676ec Deployed Sep 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant