History

Move connect-agent above sources and preload plugin chunks (#494)

- Sources page: render McpInstallCard above the connected sources list so agent-pairing is the primary affordance on an empty workspace. - Add optional `preload` to SourcePlugin and call it from ExecutorPluginsProvider on mount, so navigating into a plugin's add/edit page no longer trips Suspense waiting on the lazy chunk. - Drop the visible "Loading…" Suspense fallback in sources-add — the preload now covers warm sessions, and a flash of nothing is better than a layout-shifting label on cold ones.

Rhys Sullivan committed 6 months ago

Commit b849f921 parent c627c487 files · +71 −21Browse files

Showing the changes to packages/plugins/openapi/src (1 of 7 files). Show all

Unified · Split

packages/plugins/openapi/src/react/source-plugin.ts+12−3
@@ -2,11 +2,20 @@ import { lazy } from "react"; · 1 unmodified line
22 import type { SourcePlugin } from "@executor-js/sdk/client";
33 import { openApiPresets } from "../sdk/presets";
44
5+const importAdd = () => import("./AddOpenApiSource");
6+const importEdit = () => import("./EditOpenApiSource");
7+const importSummary = () => import("./OpenApiSourceSummary");
8+
59 export const openApiSourcePlugin: SourcePlugin = {
610 key: "openapi",
711 label: "OpenAPI",
8− add: lazy(() => import("./AddOpenApiSource")),
9− edit: lazy(() => import("./EditOpenApiSource")),
10− summary: lazy(() => import("./OpenApiSourceSummary")),
12+ add: lazy(importAdd),
13+ edit: lazy(importEdit),
14+ summary: lazy(importSummary),
1115 presets: openApiPresets,
16+ preload: () => {
17+ void importAdd();
18+ void importEdit();
19+ void importSummary();
20+ },
1221 };