mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-10 12:37:55 +01:00
fix(ui): recover stalled onboarding connection checks (#19505)
Bound the complete onboarding connection check to two minutes, abort its requests on timeout, and ignore late results. Keep the saved account available for retry and resume its matching unfinished setup after refresh. Verified 242 focused tests, workspace typecheck and build, and the complete hosted CI check set. Greptile is 5/5 with no unresolved review comments. Local full-UI timing failure and interrupted CI runner attempts remain documented in the PR evidence. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
beaa9a622d
commit
e3d8f42e19
11 files changed
+324
-182
No files matched your search
@@ -2,7 +2,7 @@
|
||||
* @fileoverview Frontend API client for external adapter management.
|
||||
*/
|
||||
|
||||
import { api } from "./client";
|
||||
import { api, type RequestOptions } from "./client";
|
||||
|
||||
/**
|
||||
* The safe scalar login fields the server projects for an adapter that declares
|
||||
@@ -67,13 +67,13 @@ export interface AdapterInstallResult {
|
||||
|
||||
export const adaptersApi = {
|
||||
/** List all registered adapters (built-in + external). */
|
||||
list: (context?: { companyId: string; environmentId?: string | null }) => {
|
||||
list: (context?: { companyId: string; environmentId?: string | null }, options?: RequestOptions) => {
|
||||
const query = new URLSearchParams();
|
||||
if (context) {
|
||||
query.set("companyId", context.companyId);
|
||||
if (context.environmentId) query.set("environmentId", context.environmentId);
|
||||
}
|
||||
return api.get<AdapterInfo[]>(`/adapters${query.size ? `?${query}` : ""}`);
|
||||
return api.get<AdapterInfo[]>(`/adapters${query.size ? `?${query}` : ""}`, options);
|
||||
},
|
||||
|
||||
/** Install an external adapter from npm or a local path. */
|
||||
|
||||
@@ -271,10 +271,12 @@ export const agentsApi = {
|
||||
testCredentials?: Record<string, string>;
|
||||
environmentId?: string | null;
|
||||
},
|
||||
options?: RequestOptions,
|
||||
) =>
|
||||
api.post<AdapterEnvironmentTestResult>(
|
||||
`/companies/${companyId}/adapters/${type}/test-environment`,
|
||||
data,
|
||||
options,
|
||||
),
|
||||
getAdapterAuthSignal: (companyId: string, type: string, environmentId?: string | null) => {
|
||||
const query = environmentId ? `?environmentId=${encodeURIComponent(environmentId)}` : "";
|
||||
|
||||
@@ -12,7 +12,7 @@ import type {
|
||||
StartEnvironmentCustomImageSetupSession,
|
||||
CreateEnvironmentCustomImageTerminalSessionToken,
|
||||
} from "@paperclipai/shared";
|
||||
import { api } from "./client";
|
||||
import { api, type RequestOptions } from "./client";
|
||||
|
||||
export interface EnvironmentCustomImageOverview {
|
||||
activeTemplate: EnvironmentCustomImageTemplate | null;
|
||||
@@ -152,12 +152,13 @@ export const environmentsApi = {
|
||||
: `/environments/${environmentId}`,
|
||||
body,
|
||||
),
|
||||
probe: (environmentId: string, companyId?: string | null) =>
|
||||
probe: (environmentId: string, companyId?: string | null, options?: RequestOptions) =>
|
||||
api.post<EnvironmentProbeResult>(
|
||||
companyId
|
||||
? `/environments/${environmentId}/probe?${companyIdQuery(companyId)}`
|
||||
: `/environments/${environmentId}/probe`,
|
||||
{},
|
||||
options,
|
||||
),
|
||||
probeConfig: (companyId: string, body: {
|
||||
name?: string;
|
||||
|
||||
Reference in new issue
Block a user