fix(web): keep managed Cloud finishing at the onboarding fork - #1543
Conversation
Cloud's pool runs AgentConnect's own image, so a Cloud preset is born placed on it with the deployment's runtime and model — there is nothing for the operator to choose, and sending them through a Choose-runtime step asks a question whose answer is already fixed. The runtime step is now the SELF-HOSTED cluster's, whose pool image belongs to the operator and whose members advertise what they can run. Picking Cloud finishes at the fork exactly as before; the Daemon path is unchanged on both. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Verified against source: lastStepExists = choice === 'daemon' || !featureFlagEnabled('managed') correctly restricts the fork-skips-to-Finish shortcut to managed+Cloud only. Self-hosted cluster and Daemon paths keep the runtime step exactly as #1541 left them. total math checks out for all reachable state combos. WhereStep's onNext now branches to finish() directly on the Cloud shortcut, bypassing saveAgentSetup — correct per the stated invariant that a Cloud preset is born placed/configured via PRESET_AGENT_POOL_RUNTIME/_MODEL, so there's nothing to PATCH. SaveError is now wired into WhereStep so a failed finish() surfaces there too. New tests cover both managed branches and match the step-count math.
Minor nit (non-blocking): total = Math.max(orgStepsBefore + 1, orgStepsBefore + (poolOffered ? 1 : 0) + (lastStepExists ? 1 : 0)) — the second term is always ≥ the first in every reachable state, so the Math.max wrapper is dead code. Not worth blocking on.
sent by review-bot-fast (Claude Agent · sonnet) · open in session
There was a problem hiding this comment.
Approved. The managed Cloud branch now finishes at the placement fork without rewriting the pool-born preset’s deployment runtime/model, while selecting Daemon still recomputes the wizard to include the connect/configure step. Self-hosted cluster behavior from #1541 remains intact, and completion errors plus post-success pending-daemon cleanup retain their existing ordering and retry behavior.
Verified the trusted synthetic merge parents against base 9d292453 and head c56b6ae4; git diff --check passed. Focused tests, typecheck, and ESLint could not be rerun in this checkout because dependencies/local binaries are absent and the task-scoped Corepack cache could not fetch pinned pnpm due registry DNS; static inspection found no blocking issue.
sent by review-bot (Codex · gpt-5.6-sol) · open in session
Follow-up to #1541, which gave the pool path a
Choose runtimestep. On managed Cloud that step asks a question whose answer is already fixed: Cloud's pool runs AgentConnect's own image, so a Cloud preset is born placed on it with the deployment's runtime and model (PRESET_AGENT_POOL_RUNTIME/_MODEL). Picking Cloud now finishes at the fork exactly as it did before #1541.What
lastStepExists = choice === 'daemon' || !featureFlagEnabled('managed')— the runtime step is the self-hosted cluster's, whose pool image belongs to the operator and whose members advertise what they can run.Finishagain whenever the chosen path has nothing after it (managed + Cloud), and it carries the completion error back, as before feat(web): ask the cluster path for a runtime before finishing onboarding #1541.Verified
FEATURE_FLAGS=daemon-pool,daemon-groups,managed: the fork readsCloud/Finish, selectingDaemonflips it toContinueand adds the step back, and finishing on Cloud left the preset's born pair (dsh-acp/deepseek-v4-flash, pool-placed) untouched while marking the org onboarded.Choose runtimeand no agent writes; Daemon still routes through the connect step).pnpm --filter @agentconnect.md/web test(2052 tests),typecheck, andeslintclean.🤖 Generated with Claude Code