feat: bring back the alert feed homepage widget

This commit is contained in:
LukeGus committed 2026-09-30 14:10:07 -05:00
1 parent 5f2b10fed8
commit 80f089268a
11 files changed
+319 -4

No files matched your search

+13
View File
@@ -71,6 +71,7 @@ import {
} from "./shell-bridge";
import { PluginViewPlaceholder } from "./PluginViewPlaceholder";
import { resolveLayoutTabTarget } from "@/shell/shell-layout";
import { getExtension, listExtensions } from "./extension-registry";
import type { WorkspaceTabSnapshot } from "@/types/ui-types";
function recordingShell(calls: ShellCall[]): TabShellCallbacks {
@@ -236,6 +237,8 @@ export async function renderPlugin(
mine(hostEditorSectionList()).map((section) => section.id),
dashboardCards: () =>
mine(registeredDashboardCardList()).map((card) => card.id),
extensions: (pointId) =>
mine(listExtensions(pointId)).map((extension) => extension.id),
settingsComponents: () =>
listSettingsComponents()
.filter((key) => key.startsWith(`${pluginId}:`))
@@ -318,6 +321,16 @@ export async function renderPlugin(
);
},
renderExtension(pointId, id, component = "view", props = {}) {
const extension = getExtension(pointId, id);
const Component =
extension?.pluginId === pluginId
? extension.components?.[component]
: undefined;
if (!Component) missing(`an extension "${component}" component`, id);
return wrap(<Component {...props} />);
},
renderDashboardCard(id) {
const card = getRegisteredDashboardCard(id) ?? missing("a card", id);
const Component = card.component;