Repository navigation
fix(app): keep a brand-new session sendable while its first snapshot loads - #4757
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.
|
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 (92503 ms), confidentiality-review (136889 ms), spec-provenance-review (136617 ms), desktop-den-sync-review (181722 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 (564e17c7d6b3651e75b093a616f5a593f93932ba). 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 |
Deploying openwork with
|
| Latest commit: |
4a2f432
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://442feecb.openwork.pages.dev |
| Branch Preview URL: | https://e2e-fresh-session-send-gate.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 (4a2f43213a12ee0bf7ce09e8ac38de90d5913f91). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Resynced with
|
Root cause
Triage:
reports/e2e-red-2026-09-09/triage.md→ Cluster 1 "Fresh-sessionRun taskclick swallowed" (Brief B).handleCreateTaskInWorkspaceWithOpenModenavigated to the new session with an empty snapshot cache, soderiveSessionRenderModelreported"switching"(!hasSnapshot && isFetching) until the four-request snapshot round trip finished, and the composer'sdisabled={model.transitionState !== "idle" …}gate dropped any Run task click / Enter in that window with the draft intact (triage-probe-run4-immediate-click.log: disabled at t=386 ms, enabled at t=901 ms, nothing sent).prompt_asyncanswered 5xx/408 is an uncertain admission, but the resultingadmission_unknownhold could never end: the acceptance check treated absence as no evidence, Stop refused while admission was unknown, and the response body was dropped, so the person saw a paused composer with no explanation (session-error-technical-detailstest 2:runEnabled:falseafter 15 s).readComposerStatereported an empty Lexical editor as"\n"(streamed-markdown-answertest 1draftText === "").What changed
seedCreatedSessionSnapshot(session-sync) seeds the snapshot cache from the create-session response before navigating, stale (updatedAt: 0) so the real fetch still runs as a background refresh of a session already on screen.hasSnapshotis true from the first render → composer sendable immediately.PromptAdmissionUnknownErrorkeeps the settled 5xx body as itscause(promptAdmissionFailure); the surface shows it as the session error card right away while the hold still prevents any resend.readPromptAdmission(accepted / absent / unknown): after the exact-message GET misses, list the idle conversation; when native lists it without the message, the settled POST did not admit it → new drain eventadmission_rejectedhalts like any definite failure (explicit retry only, never an automatic resend). Surface and global drainer probes dispatch it; on release the pending row is removed and the submitted composer is saved as an unsent message ("Restore unsent message"). Confirmed acceptance clears the stale failure card.readComposerStatedrops Lexical's trailing empty-paragraph"\n";streamed-markdown-answertest 1 opens the fresh conversation through the sidebar's New session button (renamed from "New task" in Fix split-view sending and prioritize New session #4491 on Sep 5; the scenario added in fix(app): show sent messages immediately across new chats #4631 on Sep 8 still targeted the old label). Same action, current label — no assertion changed, no waits added.admission_rejectedreducer (queued-drain-admission-wedge.test.ts),readPromptAdmissiontri-state and settled-body preservation (opencode-session-native.test.ts).Proof (Daytona, one spec at a time,
OPENWORK_EVAL_REFpinned; sandboxes checked out the sha shown)Placement line for every run:
"lane":"e2e","daytona":true,"placement":"daytona","engine":"legacy","surface":"legacy".session-error-technical-details564e17c7dadmission_unknownhold) passed: A became sendable 11.5 s after its 507, banner +runEnabled:falseafter the second 507. (First attempt at this sha: test 2 passed, test 1 died in Daytona provisioning —source post-prepare gate … 502— before any assertion; re-run above is clean.)connector-tool-call-branding564e17c7dstreamed-markdown-answer09801d4bb(run 2)draftText === ""and the reject/restore steps; "new" scenario then failed only on the staleNew tasklabel (fixed in564e17c7d). Test 2 now passes the immediate send (session("New task")→ click Run task 265 ms later → user row visible in 25 ms) and fails later on toggle-"Thought"-then-immediate-notSee(Cluster 7 class). Test 3 fails on Escape-then-notSeepalette (Cluster 7, Brief K). CONT-01 passed.streamed-markdown-answer564e17c7d(runs 3, 4)streamedMarkdownworld build failed withVideo fixture write failed: 409(see below). Test 3 failed on Cluster 7 / geometry steps; CONT-01 passed both times. So the "new" scenario of test 1 at this sha is unproven; its only change since run 2 is the button label, and run 2's failure listedbutton "New session"among the visible candidates.saved-app-creation564e17c7dopenwork:browser:openUrl→Browser control requires a requesting conversation— pre-existing on dev (same error in nightly run 34387590503 @52a028817), not this cluster.workspace-engine-upgrade564e17c7dhi→ click Run task within 0.35 s → reply) passed; dev failed exactly there (Timed out … seeing text=/^hi$/). Step 2 fails onnew session routeafter reload on the/sessionNew-task route — pre-existing since Sep 7 (nightlies 34090498133 / 34150647199 / 34193972847 at24b811cbe/5afbfcb49/ad9786497fail with the same message), i.e. #4577 changed what the sidebar New session does on that route; owner should re-express that step.Verdict for this PR: Incomplete as a whole-file green (see out-of-scope failures above), Passed for every Cluster-1 claim: the fresh-session immediate send is observed in
streamed-markdown-answertest 2,workspace-engine-upgradestep 1,saved-app-creation,connector-tool-call-branding; the 5xx hold release is observed insession-error-technical-detailstest 2.Noticed, not touched
streamedMarkdownworld build fails withVideo fixture write failed: 409in 3 of 4 runs at this base, never in the Sep 9 baseline/nightly logs. Every POST goes throughmanagedDesktopPolicy(config).assertRequest→assert(...)→current()→identityChanged→ 409policy_identity_changedwhen the Den identity generation moves while the read is in flight; fix(desktop): recover credentials before engine readiness #4718 (1c455cfab, "recover credentials before engine readiness") now bumps that generation viaPUT /den-session/identityduring the first seconds after sign-in, exactly when the world writes the fixture. Real product race for any early write, not this cluster.renderedMessages.length === 0 && … && errorbranch), so with the new release path it appears at release (~10 s) instead of immediately; sessions with history show it immediately.streamed-markdown-answertest 2 has a toggle-"Thought"-then-immediate-notSeerace of the same shape as Brief K (Cluster 7).workspace-engine-upgradestep 2 andsaved-app-creation"share" step: spec/product drifts listed above.