feat: full screen onboarding with a plugin picker and per step versions

This commit is contained in:
LukeGus committed 2026-10-06 17:44:25 -05:00
1 parent 1e74ce4827
commit b9dd3488a5
59 files changed
+5413 -643

No files matched your search

+52
View File
@@ -1,4 +1,7 @@
import { rbacApi } from "@/main-axios";
import type { ChoiceAdjustment, PluginChoice } from "@/types/plugin-onboarding";
export type { PluginChoice };
export interface PluginTabContribution {
id: string;
@@ -506,3 +509,52 @@ export async function installUploadedPlugin(
announcePluginsChanged();
}
}
export interface OnboardingPluginInfo {
id: string;
name: string;
description: string;
icon: string | null;
category: string;
version: string;
source: "bundled" | "user";
state: string;
dependencies: string[];
recommended: boolean;
consent: boolean;
}
export interface OnboardingPluginList {
pending: boolean;
/** On an upgrade the picker starts from what is on, not the defaults. */
reason: "fresh" | "upgrade" | null;
managedByLinkedServer: boolean;
plugins: OnboardingPluginInfo[];
}
export interface OnboardingApplyResult {
resolved: Record<string, PluginChoice>;
adjustments: ChoiceAdjustment[];
enabled: string[];
disabled: string[];
removed: string[];
failed: { id: string; error: string; code?: string }[];
}
export async function getOnboardingPlugins(): Promise<OnboardingPluginList> {
const response = await rbacApi.get("/plugins/onboarding");
return response.data;
}
export async function applyOnboardingPlugins(
choices: Record<string, PluginChoice>,
): Promise<OnboardingApplyResult> {
try {
const response = await rbacApi.post("/plugins/onboarding/apply", {
choices,
});
return response.data;
} finally {
announcePluginsChanged();
}
}