Repository navigation
fix(app): open workspace New task without waiting for the engine - #4577
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 4 Skipped Deployments
|
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (6c28856dd913956c88eefe2f18d8e8fef061aa75). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (b3adf4be829c5cc9b7a25acc392fcfb591a1e465). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (f235ad63bfae27de6aea9c01e93c4db12eecbde1). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (46b2229a347b055beb864ac23ab391671a157663). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (2fe6f4cead418ee317f2d52b39b24f9ea20fd608). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Test evidence — workspace-new-task-opens-an-editable-composer-immediately-and-creates-one-task-o — ✅ passedSHA 2fe6f4c · engine v2 ✅ passed · 4 expectations passed · 0 failed · 0 pending [world] mock(mcp) · den(daytona) · desktop(daytona) · workspace(/tmp/openwork-openwork-workspace-new-task-long-name-1788728545642-1788728545642) · [seed:raw] evalIn() · sessions(1) · [seed:raw] evalIn() ℹ️ ASSERTION — 1. The workspace New task plus remains clickable over a long workspace nameThe painted element at the plus center belongs to the plus, not the truncated title.
ℹ️ ASSERTION — 2. New task opens without waiting for engine session creationThe visible composer appeared 60.799999952316284 ms after clicking; the limit was 1000 ms. Session POSTs were delayed 5000 ms, but opening issued none and left all existing session IDs unchanged.
ℹ️ ASSERTION — 3. The empty composer accepts a draft and preserves it on another New task clickTyping was verified in the visible editor; clicking New task again retained the exact draft text and still issued no session creation request.
ℹ️ ASSERTION — 4. Submitting creates exactly one task in the intended workspace and receives the mock replyThe mock model was visible before submission and its reply appeared afterward. Exactly one session POST targeted the selected workspace, one session was added, every existing session remained, and the workspace expansion state was unchanged.
Test run created 2026-09-06T20:58:42.316Z · Source: |
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (2fe6f4cead418ee317f2d52b39b24f9ea20fd608). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
… picker (#4738) * test(evals): create the bench workspace folder instead of adopting the first-launch default Since 51c0ab9 (#4608) a fresh desktop boots into its default "OpenWork Chat" workspace, so createAndSelectWorkspace(app, { path }) no longer passes through /welcome and adopts that workspace instead of the bench folder carrying the witness provider in opencode.json. The engine then never sees bench-witness and "Bench Model listed in picker" can only pass by racing the persisted active-workspace id. Ask for the folder explicitly with create: true. * test(evals): pin the bench viewport so the sidebar completion indicator is observable The completion milestone reads the sidebar row's per-session loading indicator, which only renders at desktop width. On a runner whose window manager tiles new windows (observed: Amethyst squeezed the eval Electron to a 195x1029 viewport) the sidebar never mounts and the first send never counts as complete. Emulate the 1280x900 viewport the benchmark is meant to measure, as the other layout-sensitive specs already do. * test(evals): re-express the bench New task claim for submit-time session creation Since b4ed5f4 (#4577) the sidebar New task control opens the workspace's empty composer immediately and the session is created by the first send, so no ses_ id can appear in the route on click and the old "new session route" wait could never resolve. Readiness is now the empty New task route with no session surface and a prompt-ready composer; the send that follows must land in a session no earlier turn used, which keeps the distinct-session claim.
…-status flip on reload (#4797) * 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): open sidebar New session as the empty composer in workspace-engine-upgrade Since #4577 the sidebar New session controls open the workspace's empty New task composer at once and the session is created by the first send, so waiting for a ses_ route on click never resolves. Re-express the three sidebar steps: the click lands on the empty New task route without a session surface and a prompt-ready composer; the send must land in a session no earlier turn used (same claim shape as bench-openwork-app-v1 in #4738). Palette steps still create their session up front. * fix(app): send the New task prompt under v2 chat routing The empty New task composer creates its session on submit and hands the prompt over through a scoped auto-send mark. The mark was keyed with the workspace's default endpoint URL (always /opencode), while the session surface under OpenCode v2 routing owns the session as /opencode2, so the lookup missed and the prompt silently vanished: the person landed on an empty new session. Key the mark with the endpoint that created the session (createRouteSessionWithEndpoint), which is the URL the surface will own it under. * test(app): reproduce the snapshot owner flip after a v2 session reload The surface mounts under the v1 URL before chat routing resolves; the owned read 404s, parks for its retry, and the routing flip changes the owner while it is in flight. The read rejects with 'Session snapshot owner changed' and the (workspace, session) query never refetches, so the transcript stays empty. * fix(app): re-read a session snapshot when its owning endpoint changes The snapshot query is keyed on (workspace, session) with retry off on the desktop loopback path. When chat routing resolves to /opencode2 after boot (or the draft scope resolves once identity verifies) while the owned read is in flight, the read rejects with 'Session snapshot owner changed' and nothing refetched, leaving the error card over an empty transcript. Cancel the doomed read and refetch under the new owner; a bare invalidate would only join the in-flight promise because the first load has no data yet.
… the composer recovers (attachment-upload-loading-state) (#4811) * 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): open sidebar New session as the empty composer in workspace-engine-upgrade Since #4577 the sidebar New session controls open the workspace's empty New task composer at once and the session is created by the first send, so waiting for a ses_ route on click never resolves. Re-express the three sidebar steps: the click lands on the empty New task route without a session surface and a prompt-ready composer; the send must land in a session no earlier turn used (same claim shape as bench-openwork-app-v1 in #4738). Palette steps still create their session up front. * fix(app): send the New task prompt under v2 chat routing The empty New task composer creates its session on submit and hands the prompt over through a scoped auto-send mark. The mark was keyed with the workspace's default endpoint URL (always /opencode), while the session surface under OpenCode v2 routing owns the session as /opencode2, so the lookup missed and the prompt silently vanished: the person landed on an empty new session. Key the mark with the endpoint that created the session (createRouteSessionWithEndpoint), which is the URL the surface will own it under. * test(app): reproduce the snapshot owner flip after a v2 session reload The surface mounts under the v1 URL before chat routing resolves; the owned read 404s, parks for its retry, and the routing flip changes the owner while it is in flight. The read rejects with 'Session snapshot owner changed' and the (workspace, session) query never refetches, so the transcript stays empty. * fix(app): re-read a session snapshot when its owning endpoint changes The snapshot query is keyed on (workspace, session) with retry off on the desktop loopback path. When chat routing resolves to /opencode2 after boot (or the draft scope resolves once identity verifies) while the owned read is in flight, the read rejects with 'Session snapshot owner changed' and nothing refetched, leaving the error card over an empty transcript. Cancel the doomed read and refetch under the new owner; a bare invalidate would only join the in-flight promise because the first load has no data yet.
Opening New task from a workspace waited for session creation before showing the composer, making a slow engine request feel like an unresponsive click. Ordinary primary New task now opens the existing empty composer immediately and creates the engine session when the prompt is submitted. Grouped tasks, side chats, and workspace-error Retry keep their existing creation behavior.
Validation: Passed on OpenCode v2 in an isolated, cold-booted Daytona desktop. The existing workspace New task journey verifies:
Reproduce on this PR head:
Placement:
daytona (daytona CLI authenticated). Verdict: 1 passed, 0 failed, 0 skipped. Exact-head assertion evidence is published in the test-evidence comment.pnpm typecheckpassed. The optionalpnpm evals:typecheckexits 2 with the same 337 diagnostics on the change and unchanged baseec5a74546, after normalizing checkout paths; first failure is TS1294 inapps/server/src/agent-context-cloud-probe.ts:216.