Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

chore(web): remove dead markdown component directory

Naiyuan Qing4c88a1318d64
diff --git a/apps/web/app/(dashboard)/issues/[id]/page.test.tsx b/apps/web/app/(dashboard)/issues/[id]/page.test.tsx
index 3ae28955ea..09469bec6a 100644
--- a/apps/web/app/(dashboard)/issues/[id]/page.test.tsx
+++ b/apps/web/app/(dashboard)/issues/[id]/page.test.tsx
@@ -297,11 +297,6 @@ vi.mock("@/features/editor", () => ({
}),
}));
-// Mock Markdown renderer
-vi.mock("@/components/markdown", () => ({
- Markdown: ({ children }: { children: string }) => <div>{children}</div>,
-}));
-
// Mock api (core queries/mutations use @multica/core/api, some components use @/platform/api)
const mockApiObj = vi.hoisted(() => ({
diff --git a/apps/web/components/markdown/CodeBlock.tsx b/apps/web/components/markdown/CodeBlock.tsx
deleted file mode 100644
index 3b674fe1bd..0000000000
--- a/apps/web/components/markdown/CodeBlock.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export { CodeBlock, InlineCode, type CodeBlockProps } from '@multica/ui/markdown'
diff --git a/apps/web/components/markdown/Markdown.tsx b/apps/web/components/markdown/Markdown.tsx
deleted file mode 100644
index 5487924b32..0000000000
--- a/apps/web/components/markdown/Markdown.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-import * as React from 'react'
-import {
- Markdown as MarkdownBase,
- MemoizedMarkdown as MemoizedMarkdownBase,
- type MarkdownProps as MarkdownBaseProps,
- type RenderMode
-} from '@multica/ui/markdown'
-import { IssueMentionCard } from '@multica/views/issues/components'
-
-export type { RenderMode }
-
-export type MarkdownProps = MarkdownBaseProps
-
-/**
- * Default renderMention that delegates to IssueMentionCard for issue mentions
- * and renders a styled span for other mention types.
- */
-function defaultRenderMention({ type, id }: { type: string; id: string }): React.ReactNode {
- if (type === 'issue') {
- return <IssueMentionCard issueId={id} />
- }
- return null
-}
-
-/**
- * App-level Markdown wrapper that injects IssueMentionCard via renderMention.
- * Callers that need custom mention rendering can pass their own renderMention prop.
- */
-export function Markdown(props: MarkdownProps): React.JSX.Element {
- return <MarkdownBase renderMention={defaultRenderMention} {...props} />
-}
-
-export const MemoizedMarkdown = React.memo(Markdown, (prevProps, nextProps) => {
- if (prevProps.id && nextProps.id) {
- return (
- prevProps.id === nextProps.id &&
- prevProps.children === nextProps.children &&
- prevProps.mode === nextProps.mode
- )
- }
- return prevProps.children === nextProps.children && prevProps.mode === nextProps.mode
-})
-MemoizedMarkdown.displayName = 'MemoizedMarkdown'
diff --git a/apps/web/components/markdown/StreamingMarkdown.tsx b/apps/web/components/markdown/StreamingMarkdown.tsx
deleted file mode 100644
index c55711ae84..0000000000
--- a/apps/web/components/markdown/StreamingMarkdown.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import * as React from 'react'
-import {
- StreamingMarkdown as StreamingMarkdownBase,
- type StreamingMarkdownProps as StreamingMarkdownBaseProps
-} from '@multica/ui/markdown'
-import { IssueMentionCard } from '@multica/views/issues/components'
-
-export type StreamingMarkdownProps = StreamingMarkdownBaseProps
-
-function defaultRenderMention({ type, id }: { type: string; id: string }): React.ReactNode {
- if (type === 'issue') {
- return <IssueMentionCard issueId={id} />
- }
- return null
-}
-
-/**
- * App-level StreamingMarkdown wrapper that injects IssueMentionCard via renderMention.
- */
-export function StreamingMarkdown(props: StreamingMarkdownProps): React.JSX.Element {
- return <StreamingMarkdownBase renderMention={defaultRenderMention} {...props} />
-}
diff --git a/apps/web/components/markdown/index.ts b/apps/web/components/markdown/index.ts
deleted file mode 100644
index 7d05984d00..0000000000
--- a/apps/web/components/markdown/index.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export { Markdown, MemoizedMarkdown, type MarkdownProps, type RenderMode } from './Markdown'
-export { CodeBlock, InlineCode, type CodeBlockProps } from './CodeBlock'
-export { StreamingMarkdown, type StreamingMarkdownProps } from './StreamingMarkdown'
-export { preprocessLinks, detectLinks, hasLinks } from './linkify'
-export { preprocessMentionShortcodes } from './mentions'
diff --git a/apps/web/components/markdown/linkify.ts b/apps/web/components/markdown/linkify.ts
deleted file mode 100644
index d8c23f5342..0000000000
--- a/apps/web/components/markdown/linkify.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { preprocessLinks, detectLinks, hasLinks } from '@multica/ui/markdown'
diff --git a/apps/web/components/markdown/mentions.ts b/apps/web/components/markdown/mentions.ts
deleted file mode 100644
index 1c71856d6b..0000000000
--- a/apps/web/components/markdown/mentions.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { preprocessMentionShortcodes } from '@multica/ui/markdown'