Files
supabase/apps/ui-library/components/block-overview.tsx
Saxon FletcherandClaude Opus 5.5 904e3c4aa0 chore(library): remove the Supabase files caption from block previews (#51077)
## 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>
2026-09-30 05:50:57 +00:00

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>
)
}