From a14b83d66d7c2a0a19c5621f694ae04aad4cd211 Mon Sep 17 00:00:00 2001 From: Harshith Mullapudi Date: Thu, 9 Oct 2025 15:44:24 +0530 Subject: [PATCH] fix: document view is broken in log view --- .../app/components/common/styled-markdown.tsx | 220 ++++++++++++++++++ .../app/components/logs/log-details.tsx | 5 +- .../components/spaces/space-episode-card.tsx | 3 +- .../app/services/ingestionLogs.server.ts | 4 +- .../app/trigger/spaces/space-summary.ts | 29 ++- apps/webapp/prisma/schema.prisma | 30 ++- 6 files changed, 262 insertions(+), 29 deletions(-) create mode 100644 apps/webapp/app/components/common/styled-markdown.tsx diff --git a/apps/webapp/app/components/common/styled-markdown.tsx b/apps/webapp/app/components/common/styled-markdown.tsx new file mode 100644 index 0000000..b398b26 --- /dev/null +++ b/apps/webapp/app/components/common/styled-markdown.tsx @@ -0,0 +1,220 @@ +import ReactMarkdown from "react-markdown"; +import type { Components } from "react-markdown"; +import { cn } from "~/lib/utils"; + +const markdownComponents: Components = { + h1: ({ className, ...props }) => ( +

+ ), + h2: ({ className, ...props }) => ( +

+ ), + h3: ({ className, ...props }) => ( +

+ ), + h4: ({ className, ...props }) => ( +

+ ), + h5: ({ className, ...props }) => ( +

+ ), + h6: ({ className, ...props }) => ( +
+ ), + p: ({ className, ...props }) => ( +

+ ), + ul: ({ className, ...props }) => ( +