Repository navigation
test(evals): saved-app world.open waits for the destination page before the spec acts on it - #4794
Conversation
…immediately A freshly created session had no cached snapshot, so deriveSessionRenderModel reported "switching" while the first snapshot round trip ran and the composer disabled Run task. On Daytona that window is ~0.9 s and a click or Enter inside it was silently dropped with the draft intact. Seed the snapshot cache from the create response (stale, so the real fetch still runs as a background refresh).
…ad of wedging A prompt_async answered with 5xx/408 is an uncertain admission (#4635), but the hold it created could never end: the acceptance check treated absence as no evidence, Stop refused while the admission was unknown, and the failure body was dropped, so the person saw a paused composer with no explanation. - Keep the settled response body on PromptAdmissionUnknownError and show it as the session error card right away; the hold still prevents any resend. - readPromptAdmission: after the exact-message GET misses, list the idle conversation; when native lists it without the message the POST is settled and did not admit, so the drain receives admission_rejected and halts like any definite failure (explicit retry only, never an automatic resend). - On release the pending row is removed and the submitted composer is kept as an unsent message to restore; on confirmed acceptance the stale failure card is cleared.
Lexical keeps one empty paragraph in an empty editor, which innerText reports
as "\n". readComposerState now drops that trailing line break so draftText
matches what the person sees; user.see("composer", { text }) already trimmed.
…o e2e/saved-app-browser-requesting-conversation
… new tab returnVerification drove the agent browser entry point (browser.openUrl, the IPC behind browser.open_url) with no requesting conversation. Since #4434 the task host refuses that, and it never accepted an about:blank destination. The tab only stands in for the person's own browser so the openwork:// return link can be navigated without OS protocol registration, so create it the way a person opens a new tab and find its CDP target by diffing the page targets.
…-conversation' into e2e/dashboard-delete-no-buttons
…root has rendered
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Warden review summary — ClearNative 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 (131042 ms), confidentiality-review (53744 ms), spec-provenance-review (90372 ms), desktop-den-sync-review (158523 ms). Blockers
Advisories
Needs recheck
Observed review-thread metrics
Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority. |
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (c63458e387be1bb842dad885550813d90cad745b). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
|
Passed · 12/12 tests · 18/18 assertions · 8 images Commit |
…o e2e/saved-app-browser-requesting-conversation
…requesting-conversation
…ashboard-delete-no-buttons
Deploying openwork with
|
| Latest commit: |
05b752e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e61d7940.openwork.pages.dev |
| Branch Preview URL: | https://e2e-dashboard-delete-no-butt.openwork.pages.dev |
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (05b752efcbfb7bf9a14c2802daa8ce7c13d416e0). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Resync onto
|
| test | result |
|---|---|
create, preview, save and reopen an app without changing already-open results (this PR's spec, incl. step 13 "an admin cancels deletion in the app and confirms it on the dashboard") |
✓ passed (387.1 s) |
APP-ISOLATION embedded MCP Apps isolate siblings… (added to this file by #4829 today) |
× failed in world provisioning (62 s), before any assertion: Mock issuer gate failed: health reported https://3979-…, expected https://3979-… |
"passed":1,"failed":1,"skipped":0 → file verdict Failed, but the red test is #4829's, not this PR's: isolatedMcpApps seeds two seed.mock(...) without ports into one appWeb sandbox, both default to daytonaPort: 3979 (evals/packages/env/src/mock.ts:56), and the second mock's pkill + rebind on the same port trips the issuer gate. Now reproduced 3/3 across #4779 (2 runs) and this branch; #4829 only proved that case with --local. See the same note on #4779. This PR does not touch that code.
… route-commit wait in world open() (#4810) * fix(app): seed the delegated-task eval with a running parent thread The eval.task_activity.seed hook rendered an in-flight child under a parent whose thread status stayed "ready": it only marked the activity store busy. Since #4635 MessageList reads that as a stopped parent and the unobserved child shows "Waiting for task result" instead of the Working shimmer, so task-activity-shimmer and parent-child-permission-approval lost their [data-subagent-activity="shimmer"] row. A delegating parent is mid-run; mark the eval thread streaming like the chat-loading seed already does. * fix(app): seed a created session's snapshot so its composer can send immediately A freshly created session had no cached snapshot, so deriveSessionRenderModel reported "switching" while the first snapshot round trip ran and the composer disabled Run task. On Daytona that window is ~0.9 s and a click or Enter inside it was silently dropped with the draft intact. Seed the snapshot cache from the create response (stale, so the real fetch still runs as a background refresh). * fix(app): let a send that settled with a server failure recover instead of wedging A prompt_async answered with 5xx/408 is an uncertain admission (#4635), but the hold it created could never end: the acceptance check treated absence as no evidence, Stop refused while the admission was unknown, and the failure body was dropped, so the person saw a paused composer with no explanation. - Keep the settled response body on PromptAdmissionUnknownError and show it as the session error card right away; the hold still prevents any resend. - readPromptAdmission: after the exact-message GET misses, list the idle conversation; when native lists it without the message the POST is settled and did not admit, so the drain receives admission_rejected and halts like any definite failure (explicit retry only, never an automatic resend). - On release the pending row is removed and the submitted composer is kept as an unsent message to restore; on confirmed acceptance the stale failure card is cleared. * test(evals): read an empty Lexical composer as an empty draft Lexical keeps one empty paragraph in an empty editor, which innerText reports as "\n". readComposerState now drops that trailing line break so draftText matches what the person sees; user.see("composer", { text }) already trimmed. * test(evals): open the fresh conversation through the sidebar's New session button The sidebar button was renamed from "New task" to "New session" in #4491 (Sep 5) and the "new" scenario added in #4631 (Sep 8) still targeted the old label, so it could never find the button. Same user action, current label. * test(evals): create the empty-session workspace at its declared tmp path The emptySession world declared /tmp/openwork-empty-session-<ts> but seed.workspace() adopted the existing first-launch default workspace instead ("OpenWork Chat" under the dev profile home). On Daytona that profile lives inside the repo checkout, so the engine merged /workspace/.opencode/opencode.json ("permission": "allow") over the workspace's own catch-all and composer-run-mode never saw the workspace MCP rule take effect. * test(evals): name the server error when a run-mode read is not 200 * fix(app): reuse the running OpenWork server when the selected workspace is server-owned Workspaces created from the app live only in the server registry, so a renderer reload reaches startServerWithoutDesktopWorkspace and restarted the embedded server (and its engine) although it was healthy and already serving that workspace. Reuse it when it is ready with the preferred remote-access mode; only restart when nothing usable is running. * test(evals): open the saved-app verification return tab as a person's new tab returnVerification drove the agent browser entry point (browser.openUrl, the IPC behind browser.open_url) with no requesting conversation. Since #4434 the task host refuses that, and it never accepted an about:blank destination. The tab only stands in for the person's own browser so the openwork:// return link can be navigated without OS protocol registration, so create it the way a person opens a new tab and find its CDP target by diffing the page targets. * fix(app): re-read pending questions when a session reaches a terminal edge An interrupted question tool leaves the engine's pending list through its finalizer without a question.rejected event, so Stop on a delegated child left its question (and option buttons) in the parent view. Reconcile questions alongside permissions on terminal edges, for both engines. * Revert "fix(app): re-read pending questions when a session reaches a terminal edge" This reverts commit 9e70982. * fix(app): withdraw the stopped tree's unanswered questions after Stop OpenCode v1 runs tools on detached fibers: aborting a session marks the question tool part as aborted but leaves its request in GET /question, so a parent that stopped a delegated child kept showing the child's question and its option buttons. After Stop confirms the tree idle, reject the pending questions owned by the stopped sessions; other roots are left untouched. * test(evals): temporary Z2 diagnostics around dashboard delete route change * test(evals): saved-apps world.open returns once the destination page root has rendered * test(evals): create the permission-stop-recovery workspace at its declared tmp path Test 2 of parent-child-permission-approval ran bash without asking although the world wrote permission.bash="ask" to the workspace opencode.json. The world called seed.workspace() without create, so it adopted the first-launch default workspace under the dev profile, which on Daytona lives inside the repo checkout; the engine merges /workspace/.opencode/opencode.json ("permission": "allow") after the workspace file and the agent ruleset ends as [* allow, bash ask, * allow] (last match wins; permissions/effective reported shell allow, source engine, workspace file .../home/OpenWork Chat/opencode.jsonc). Same trap and same remedy as #4747 for emptySession; opt-in so the other splitPaneQuestions worlds keep their arrangement. * fix(app): withdraw the stopped tree's unanswered permission requests after Stop OpenCode v1 runs tools on detached fibers: aborting a session marks the tool part as aborted but leaves its Permission.ask pending in /permission, exactly as #4786 found for questions. The stopped tree would keep showing Allow once / Deny in every pane and after reload although nothing can consume the answer. After stopForegroundTree confirms every stopped session idle, also list pending permissions and reject the ones owned by the stopped tree; other roots are never touched and each withdrawal kind is best-effort on its own. * test(evals): remove temporary Z2 diagnostics from saved-app-creation * test(evals): make locate() misses list every candidate of the requested role plus route and page roots A miss used to quote only the first 8 visible buttons in DOM order, which are always the shell rail, so every miss read as "the page has no buttons" (#4794's diagnosis detour). The browser-side report now lists every rendered element of the requested role (buttons/links for role-less targets), the current route/hash, and whether the [data-app-header] / [data-dashboard-page] roots are mounted. The Node side caps the list at 40 and says how many the page really had. Matching is unchanged. * test(evals): run the serialized locate() miss callback against a fake page DOM Proves the browser-side branch the way Chromium will execute it: the report lists every rendered menuitem on a dashboard whose shell rail has nine buttons, names the route and mounted page roots, and a role-less miss lists all nine buttons instead of the first eight.
Stacked on
origin/e2e/saved-app-browser-requesting-conversation(#4779, which carries #4757) via merge commit80bab88f4; those commits are not part of this fix. Net change over the merge: one hunk inevals/worlds/saved-apps.ts. The brief's working title wasfix(app): dashboard stays interactive after navigating with an app-page menu open; the evidence below shows the dashboard was never broken, so no product code changes and the title says what actually changed.Root cause
Triage:
reports/e2e-red-2026-09-09/triage.md→saved-app-creation(Cluster 1, then #4779 "Noticed, not touched" item 1: step 13 fails deterministically 2/2 atsaved-app-creation.e2e.test.ts:523).world.open(path)wasgo(app, path), which only setswindow.location.hashand returns. The page being left stays mounted until React Router commits the new location (~100–200 ms on Daytona), and the app page and the dashboard share control labels (App options for Team briefing) and preview text (Weekly overview/Launch briefing). So the spec's next observation could land on the page it had just left:world.open("/dashboard")→click("App options for Team briefing")): the click resolved against the still-mounted app-page header button (trace target1066,136, identical to the pre-navigation click), its menu opened and unmounted with the page, andDelete Team briefingwas then never found on the dashboard because no menu was open there.world.open(\/dashboard${originalPath}`)→eventually(previewText includes …)): satisfied in 135 ms by the dashboard card's iframe before it unmounted;showDetails()/previewText()then read''` from a vanished target (my run 2, below). fix(evals): saved-app creation opens its verification return tab as a person's tab, not agent browser control #4779's three runs took 648–1340 ms here, i.e. they happened to wait for the real app-page iframe.The dashboard does not break. A diagnostic run (sha
fead49b90, temporary, removed inc63458e38) snapshotted the renderer around the route change with a raw hash set: right afterhash = #/dashboard→appHeader: true, dashboardPage: false(app page still mounted); after the route committed →dashboardPage: true, menus: 1, menuItems: ["Remove Team briefing from dashboard", "Delete Team briefing"], all dashboard buttons present (Share,Add,Open Team briefing,App options for …,Refresh/Run Project updates),console.error/window.error/unhandledrejectionbucket empty,body pointer-events: auto, noinert/aria-hiddenleftovers. The "main content renders no buttons" reading in #4779 was an artefact ofcdp/src/input.ts#locatelisting only the first 8 visible buttons on a miss — the shell rail comes first in DOM order.What changed
evals/worlds/saved-apps.tsopen(): aftergo(), wait (bounded, 30 s) for the destination's own root —[data-app-header]for/dashboard/apps/…,[data-dashboard-page]for/dashboard— before returning. Other paths are unchanged. No spec assertion was loosened or reordered and no sleeps were added;opennow means "the destination page is rendered", which is what every call site already assumed.Proof
pnpm evals:e2e saved-app-creation --daytonawithOPENWORK_EVAL_REFexported; placement lineselection: engine=legacy surface=legacy case=all; placement: daytona (--daytona); each run provisioned its own Den + admin desktop + web sandboxes and deleted all three.3d139f004(merge + diagnostics only, no fix)expected '' to contain 'Hide details'(the line-198 instance of the same race; step 13 not reached)fead49b90(fix + step-13 diagnostics using a raw hash set)1055,190, dashboard card) soZ2 reproduced: falsein that runc63458e387be1bb842dad885550813d90cad745b(final, diagnostics removed)"verdict":"passed". All 14 steps ok; step 13 "an admin cancels deletion in the app and confirms it on the dashboard" ok (4.0 s) —Delete Team briefinglocated at912,260on the app page and470,298on the dashboard card, thenDelete app; step 14 "Dashboard Add opens a creation conversation" ok (1.2 s).Also:
pnpm --dir evals run check:browserpasses (832 callbacks);lint:layersandtsc -p evalsreport only pre-existing violations/errors in files this PR does not touch (same as noted in #4770 / #4779).Noticed, not touched
locate()'s not-found message caps "Visible button/link candidates" at the first 8 visible buttons, which are always the shell rail. It reads as "the page has no buttons" and misled fix(evals): saved-app creation opens its verification return tab as a person's tab, not agent browser control #4779's diagnosis; listing candidates from the primary slot first, or raising the cap, would make misses self-describing.inPreviewinworlds/saved-apps.tspicks the first sandbox iframe target; on the dashboard there can be several (company tile + personal card), so preview reads there are ambiguous. Not a problem for current call sites onceopenwaits for the destination.go()behaviour itself (hash set only) is shared by many worlds; a generic "route committed" signal would need a product marker for the active route. Kept this fix local to the saved-apps world.openwork-server-…-32284-…sandbox was deleted manually. No sandboxes from any of my runs remain.