refactor(scum): remove legacy projection workflows

This commit is contained in:
npc0-hue
2026-08-11 15:18:03 +08:00
parent df48d8b283
commit 13746150cb
26 changed files with 47 additions and 3844 deletions
@@ -96,11 +96,11 @@ describe("PluginPageHostPage", () => {
expect(hostSource).not.toMatch(/ScumFileConfigWorkbench|GamePlayerIntelligencePanel|GameGiftCatalogPanel|ScumMapTrajectoryPanel|game\.scum/);
});
it("keeps SCUM workspace callbacks read-only across parent operational refreshes", () => {
it("removes SCUM legacy workspace callbacks from the parent host", () => {
expect(hostSource).toContain("readyPluginRef.current = readyPlugin");
expect(hostSource).toContain("hostContextRef.current = hostContext");
expect(hostSource).toContain("listSCUMPlayers: () => platformApiClient.listSCUMPlayers(serverId)");
expect(hostSource).toContain("listSCUMPositions: () => platformApiClient.listSCUMPositions(serverId)");
expect(hostSource).not.toContain("listSCUMPlayers");
expect(hostSource).not.toContain("listSCUMPositions");
expect(hostSource).not.toContain("createSCUMWorkflow");
expect(hostSource).not.toContain("createSCUMOperation");
expect(hostSource).not.toContain("listSCUMWorkflowSteps");
@@ -108,7 +108,6 @@ describe("PluginPageHostPage", () => {
expect(hostSource).not.toContain("requestFile");
expect(hostSource).not.toContain("writeFile");
expect(hostSource).not.toContain("getDeclaredFileReadSnapshot");
expect(hostSource).toContain("}, [pluginId, serverId]);");
expect(hostSource).not.toContain("}, [hostContext, readyPlugin, serverId]);");
expect(hostSource).toContain("const workspaceActions = undefined");
});
});
+1 -11
View File
@@ -66,17 +66,7 @@ export function PluginPageHostPage({ params, onNavigate, initialPlugin, embedded
}) : undefined, [manifestContract, routeKey, serverId]);
readyPluginRef.current = readyPlugin;
hostContextRef.current = hostContext;
const workspaceActions = useMemo<PluginPageWorkspaceActions | undefined>(() => {
if (!pluginId) return undefined;
return {
listSCUMPlayers: () => platformApiClient.listSCUMPlayers(serverId),
listSCUMSquads: () => platformApiClient.listSCUMSquads(serverId),
listSCUMSquadMembers: () => platformApiClient.listSCUMSquadMembers(serverId),
listSCUMVehicles: () => platformApiClient.listSCUMVehicles(serverId),
listSCUMFlags: () => platformApiClient.listSCUMFlags(serverId),
listSCUMPositions: () => platformApiClient.listSCUMPositions(serverId)
};
}, [pluginId, serverId]);
const workspaceActions = undefined as PluginPageWorkspaceActions | undefined;
const bundleLoadKey = declaredBundlePage ? [declaredBundlePage.bundleKey, declaredBundlePage.bundleVersion, declaredBundlePage.bundleIntegritySha256, declaredBundlePage.path].join(":") : "";
const loadableBundlePage = useMemo(() => declaredBundlePage, [bundleLoadKey]);
useEffect(() => {