From aec167cd907c01f129f0d97bb102d8f7817353d9 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Wed, 20 May 2026 09:15:05 +0000 Subject: [PATCH] fix: resolve Biome formatting issues in background.ts and memories-grid.tsx Co-Authored-By: Claude Opus 4.5 --- apps/browser-extension/entrypoints/background.ts | 16 +++++++++++----- apps/web/components/memories-grid.tsx | 8 ++++++-- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/apps/browser-extension/entrypoints/background.ts b/apps/browser-extension/entrypoints/background.ts index 52e05754..777a137a 100644 --- a/apps/browser-extension/entrypoints/background.ts +++ b/apps/browser-extension/entrypoints/background.ts @@ -31,10 +31,15 @@ const PLATFORM_LABELS: Record = { function normalizePlatform(value?: string): string | undefined { if (!value) return undefined - return value.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "") + return value + .toLowerCase() + .replace(/[^a-z0-9]+/g, "_") + .replace(/^_+|_+$/g, "") } -function inferPlatformFromActionSource(actionSource: string): string | undefined { +function inferPlatformFromActionSource( + actionSource: string, +): string | undefined { const source = actionSource.toLowerCase() if (source.includes("chatgpt")) return "chatgpt" if (source.includes("claude")) return "claude" @@ -146,9 +151,10 @@ export default defineBackground(() => { content = data?.url || "" } - const platform = normalizePlatform(data.sourcePlatform) - || inferPlatformFromUrl(data.url) - || inferPlatformFromActionSource(actionSource) + const platform = + normalizePlatform(data.sourcePlatform) || + inferPlatformFromUrl(data.url) || + inferPlatformFromActionSource(actionSource) const platformLabel = platform ? data.sourcePlatformLabel || PLATFORM_LABELS[platform] || platform : undefined diff --git a/apps/web/components/memories-grid.tsx b/apps/web/components/memories-grid.tsx index f8098148..132dd3fa 100644 --- a/apps/web/components/memories-grid.tsx +++ b/apps/web/components/memories-grid.tsx @@ -109,7 +109,9 @@ const EXTENSION_PLATFORM_LABELS: Record = { twitter: "X / Twitter", } -function getExtensionSourceLabel(document: DocumentWithMemories): string | null { +function getExtensionSourceLabel( + document: DocumentWithMemories, +): string | null { const metadata = document.metadata if (!metadata || typeof metadata !== "object") return null @@ -1263,7 +1265,9 @@ const DocumentCard = memo( day: "numeric", year: "numeric", }) - return [sourceLabel, badge, date].filter(Boolean).join(" - ") + return [sourceLabel, badge, date] + .filter(Boolean) + .join(" - ") })()}