mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
## Problem The Files tab on block previews showed a "Supabase files." caption row between the tabs and the file viewer. It doesn't add anything useful and takes space from the code. ## Solution Remove the caption row and render the file viewer directly in the tab panel. The registry lookup that fed the caption is dropped from `BlockOverview`; the markdown and agent-prompt export still lists dependencies as before. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Interface Changes** * Block overviews now show the generated file tree directly when file display is enabled. * The “Supabase files” banner and dependency details are no longer shown, and the surrounding file layout has been removed. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
694 B
TypeScript
32 lines
694 B
TypeScript
import path from 'node:path'
|
|
import type { ReactNode } from 'react'
|
|
|
|
import { BlockItemCode } from './block-item-code'
|
|
import { BlockOverviewTabs } from './block-overview-tabs'
|
|
import { generateRegistryTree } from '@/lib/process-registry'
|
|
|
|
export function BlockOverview({
|
|
name,
|
|
children,
|
|
showFiles = false,
|
|
}: {
|
|
name: string
|
|
children?: ReactNode
|
|
showFiles?: boolean
|
|
}) {
|
|
return (
|
|
<BlockOverviewTabs
|
|
files={
|
|
showFiles ? (
|
|
<BlockItemCode
|
|
files={generateRegistryTree(path.join(process.cwd(), 'public', 'r', `${name}.json`))}
|
|
embedded
|
|
/>
|
|
) : undefined
|
|
}
|
|
>
|
|
{children}
|
|
</BlockOverviewTabs>
|
|
)
|
|
}
|