mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
## Summary - **Fix CI build failure**: Auth0Client crashes during Next.js prerendering when env vars aren't set. Returns a no-op stub (`getSession → null`) when domain is missing — semantically correct for static generation - **Lazy-load markdown libs (~260kb)**: ReactMarkdown, remarkGfm, and react-syntax-highlighter were eagerly imported in monaco-diff-viewer but only rendered when user expands "Generated Tests". Extracted into a dynamic component - **Parallelize repo detail query**: `getRepositoryById` ran the activity count sequentially after the repo lookup. Since `repoId` is already available, all three queries now run in parallel ## Test plan - [ ] CI `build` check passes (was failing since #2598) - [ ] Trace page still renders generated tests correctly when expanded - [ ] Repository detail page loads correctly with activity status
32 lines
979 B
TypeScript
32 lines
979 B
TypeScript
import { notFound } from "next/navigation"
|
|
import { getReviewPageInitData } from "../action"
|
|
import { ProfilerClient } from "./profiler-client"
|
|
|
|
interface ProfilerPageProps {
|
|
params: Promise<{ traceId: string }>
|
|
}
|
|
|
|
export default async function LineProfilerPage({ params }: ProfilerPageProps) {
|
|
const { traceId } = await params
|
|
|
|
const initData = await getReviewPageInitData(traceId)
|
|
|
|
if (!initData || !initData.event) {
|
|
notFound()
|
|
}
|
|
|
|
const metadata = (initData.event.metadata as any) || {}
|
|
|
|
return (
|
|
<ProfilerClient
|
|
traceId={traceId}
|
|
functionName={initData.event.function_name ?? null}
|
|
filePath={initData.event.file_path ?? null}
|
|
speedupX={initData.event.speedup_x ?? null}
|
|
originalLineProfiler={metadata.originalLineProfiler}
|
|
optimizedLineProfiler={metadata.optimizedLineProfiler}
|
|
originalRuntime={metadata.prCommentFields?.original_runtime}
|
|
bestRuntime={metadata.prCommentFields?.best_runtime}
|
|
/>
|
|
)
|
|
}
|