refactor: address adversarial widget architecture review

This commit is contained in:
ajnart committed 2026-08-25 10:07:32 +02:00
1 parent 0ca62f1232
commit 9bf266935b
42 files changed
+460 -578

No files matched your search

+5 -2
View File
@@ -7,8 +7,11 @@ import { createTrpcQueryKey } from "../trpc-query-key";
const logger = createLogger({ module: "appWidgetPrefetch" });
const prefetchAllAsync: Prefetch<"app"> = async (queryClient, items) => {
const appIds = items.map((item) => item.options.appId);
const prefetchAllAsync: Prefetch = async (queryClient, items) => {
const appIds: string[] = [];
for (const item of items) {
if (typeof item.options.appId === "string") appIds.push(item.options.appId);
}
const distinctAppIds = [...new Set(appIds)];
const dbApps = await db.query.apps.findMany({