Skip to content

The agent that grows with you

revert(desktop): an ended run drops its card under the runtime id it started with

alt-glitchfe0662fe98c0
diff --git a/apps/desktop/src/store/onboarding-run.ts b/apps/desktop/src/store/onboarding-run.ts
index 63aa7d02c17..da52af40708 100644
--- a/apps/desktop/src/store/onboarding-run.ts
+++ b/apps/desktop/src/store/onboarding-run.ts
@@ -22,10 +22,10 @@ import { ackFreeTierNotice } from './free-tier'
import { clearFreeTierIntro } from './onboarding'
import { $onboardingPhase } from './onboarding-phase'
import { markOnboardingDecided, ONBOARDING_DECIDE_DEADLINE_MS, setOnboardingSurfaceActive } from './onboarding-presence'
-import { $onboardingSession, isOnboardingChat } from './onboarding-session'
+import { $onboardingSession } from './onboarding-session'
import { ensureGatewayProfile, newSessionInProfile } from './profile'
import { $connection, $gatewayState, $selectedStoredSessionId } from './session'
-import { $setupBeatRequests, dropSetupBeat } from './setup-beat'
+import { dropSetupBeat } from './setup-beat'
export type OnboardingRequest = <T = unknown>(
method: string,
@@ -240,15 +240,10 @@ export function noteOnboardingEnded({ outcome, run_id }: OnboardingEndedPayload)
return
}
- dropRunCards()
+ dropSetupBeat(session.runtimeId)
endOnboarding(outcome === 'done' ? 'done' : 'skipped')
}
-// The run's card waits under the chat's current runtime id, which a reconnect replaces.
-function dropRunCards(): void {
- Object.keys($setupBeatRequests.get()).filter(isOnboardingChat).forEach(dropSetupBeat)
-}
-
/** An end this window missed (a reconnect, a backend restart): the run it shows is no longer the run
* in progress. */
export async function reconcileOnboarding(request: OnboardingRequest): Promise<void> {
@@ -261,7 +256,6 @@ export async function reconcileOnboarding(request: OnboardingRequest): Promise<v
const state = await request<OnboardingRunStateResult>('onboarding.state')
if ($onboardingSession.get() === session && state.run_id !== session.runId) {
- dropRunCards()
endOnboarding('skipped')
}
}