feat: VIBN-branded file browser on Build tab + sidebar status dot

- Build page: full file tree (lazy-load dirs) + code preview panel
  with line numbers and token-level syntax colouring (VS Code dark theme)
- New API route /api/projects/[id]/file proxies Gitea contents API
  returning directory listings or decoded file content
- Sidebar Apps section now links to /build instead of raw Gitea URL
- Status indicator replaced with a proper coloured dot (amber/blue/green)
  alongside the status label text

Made-with: Cursor
This commit is contained in:
2026-03-06 13:37:38 -08:00
parent bb021be088
commit e08fcf674b
3 changed files with 486 additions and 428 deletions

View File

@@ -295,10 +295,19 @@ export function VIBNSidebar({ workspace }: VIBNSidebarProps) {
<div style={{ fontSize: "0.82rem", fontWeight: 700, color: "#1a1a1a", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }}>
{project.productName || project.name || "Project"}
</div>
<div style={{ fontSize: "0.68rem", color: "#a09a90", marginTop: 1 }}>
{project.status === "live" ? "● Live"
: project.status === "building" ? "● Building"
: "● Defining"}
<div style={{ display: "flex", alignItems: "center", gap: 5, marginTop: 3 }}>
<span style={{
width: 6, height: 6, borderRadius: "50%", flexShrink: 0,
background: project.status === "live" ? "#2e7d32"
: project.status === "building" ? "#3d5afe"
: "#d4a04a",
display: "inline-block",
}} />
<span style={{ fontSize: "0.68rem", color: "#8a8478" }}>
{project.status === "live" ? "Live"
: project.status === "building" ? "Building"
: "Defining"}
</span>
</div>
</div>
)}
@@ -311,12 +320,12 @@ export function VIBNSidebar({ workspace }: VIBNSidebarProps) {
key={app.name}
icon="▢"
label={app.name}
href={project.giteaRepoUrl ? `${project.giteaRepoUrl}/src/branch/main/${app.path}` : undefined}
href={`${base}/build`}
collapsed={collapsed}
/>
))
) : (
<SectionRow icon="▢" label="No apps yet" dim collapsed={collapsed} />
<SectionRow icon="▢" label="No apps yet" dim href={`${base}/build`} collapsed={collapsed} />
)}
<SectionDivider />