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
2import type { SourcePlugin } from "@executor-js/sdk/client";2import type { SourcePlugin } from "@executor-js/sdk/client";
3import { openApiPresets } from "../sdk/presets";3import { openApiPresets } from "../sdk/presets";
4 4
5const importAdd = () => import("./AddOpenApiSource");
6const importEdit = () => import("./EditOpenApiSource");
7const importSummary = () => import("./OpenApiSourceSummary");
8
5export const openApiSourcePlugin: SourcePlugin = {9export const openApiSourcePlugin: SourcePlugin = {
6 key: "openapi",10 key: "openapi",
7 label: "OpenAPI",11 label: "OpenAPI",
8 add: lazy(() => import("./AddOpenApiSource")),12 add: lazy(importAdd),
9 edit: lazy(() => import("./EditOpenApiSource")),13 edit: lazy(importEdit),
10 summary: lazy(() => import("./OpenApiSourceSummary")),14 summary: lazy(importSummary),
11 presets: openApiPresets,15 presets: openApiPresets,
16 preload: () => {
17 void importAdd();
18 void importEdit();
19 void importSummary();
20 },
12};21};