fix(app): wait for signed-in Den startup before Run Task - #3300
Merged
reachjalil merged 3 commits intoJul 29, 2026
Conversation
Contributor
|
@reachjalil is attempting to deploy a commit to the Different AI Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
reachjalil
marked this pull request as ready for review
July 29, 2026 15:04
benjaminshafii
added a commit
that referenced
this pull request
Jul 31, 2026
…)" This reverts commit 64786c4.
benjaminshafii
added a commit
that referenced
this pull request
Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Safety contract — read this first
This PR gates the composer by actual Den session state, not by whether the installation requires sign-in.
requireSigninis deliberately not read or used by this change. It controls whether the app forces authentication; it does not decide whether a signed-in user's task needs the signed-in Den context.Startup and submission sequencing
Connection establishment is not performed inside the submit callback:
useSessionMcpMaintenancestarts and repairs the signed-in workspace's OpenWork Cloud MCP connection in the background.Connecting signed-in services…; Run Task is disabled and displays its loading state.Reconnect Den to continue; the existing failure surface provides Retry and Open Connect.Any existing draft remains stored while the loading/reconnect state occupies the input area and returns unchanged when readiness becomes available.
For chat-first startup with no workspace, OpenWork must first create the local workspace that the engine connection is scoped to. The composer shows
Preparing your workspace…during that setup. The seeded prompt then remains held by the session surface and cannot auto-send until the new workspace reaches ready. This avoids a connection-before-workspace deadlock without starting the agent turn early.Behavior matrix
Risk and caution
This is intentionally fail-closed for the signed-in cohort. The strict readiness lifecycle verifies the
openwork-cloudMCP connection, direct tools, plugin canaries, and provider/model tool projection. A systemic projection or compatibility regression can therefore disable the composer for every signed-in user, even when ordinary local model prompting would otherwise work. That is the principal rollout risk.The previous broad pre-send gate blocked every message and was bypassed in #2790. This version reduces—but does not eliminate—that risk by keeping the signed-out path explicitly fail-open, making the blocked state visible before submission, and moving readiness to app startup rather than starting it after Run Task is clicked.
Important reviewer cautions:
requireSignin; optional-auth installations still contain both signed-out users (must be allowed) and signed-in users (must wait for their Den context).What changed
Focused checks
At current head
622361c87:At readiness implementation revision
5800c1fe5:The readiness test was not rerun after the input-loading-only follow-up; the current head received the app TypeScript check instead.
Not yet verified
The PR remains draft because a readiness false negative can lock the composer for all signed-in users. The live signed-in and signed-out journeys should be exercised before marking it ready.