From 926d6652796e6cecb4ff7d7ed91ba3b21a2297f7 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 26 Jan 2026 10:07:10 -0800 Subject: [PATCH] fix(docs): separate local and blob asset resolution for quick-reference ActionImage now uses local paths directly for PNGs while ActionVideo uses blob storage with proper path normalization (strips static/ prefix). Co-Authored-By: Claude Opus 4.5 --- apps/docs/components/ui/action-media.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/apps/docs/components/ui/action-media.tsx b/apps/docs/components/ui/action-media.tsx index 13c906368..1c018757d 100644 --- a/apps/docs/components/ui/action-media.tsx +++ b/apps/docs/components/ui/action-media.tsx @@ -12,8 +12,19 @@ interface ActionVideoProps { alt: string } +/** + * Normalize path for blob storage + * - Strips leading slash + * - Strips 'static/' prefix + */ +function normalizeBlobPath(src: string): string { + let path = src.startsWith('/') ? src.slice(1) : src + path = path.replace(/^static\//, '') + return path +} + export function ActionImage({ src, alt }: ActionImageProps) { - const resolvedSrc = getAssetUrl(src.startsWith('/') ? src.slice(1) : src) + const resolvedSrc = src.startsWith('/') ? src : `/${src}` return (