From e9e326791233242d1bb36b86cbccf4450c9eaa21 Mon Sep 17 00:00:00 2001
From: luciferlive112116 <291889058+luciferlive112116@users.noreply.github.com>
Date: Thu, 16 Jul 2026 16:23:55 +0800
Subject: [PATCH] chore(ui): remove dead Breadcrumbs and ScrollFlow components
Both components under components/site/ are fully implemented but have zero
import sites anywhere in apps/loopover-ui/src. A repo-wide search for
`Breadcrumbs`, `ScrollFlow`, and their `Crumb`/`FlowStep` types finds only
the definitions themselves; the other hits are Sentry's own error
"breadcrumbs" (src/selfhost/sentry.ts, browser-sentry.ts), an unrelated
concept. Neither has a dedicated test, a barrel re-export, or a reference
in a generated file or docs page.
breadcrumbs.tsx's doc comment claims it is the "breadcrumb rail used on
/app, /docs, /api headers", but none of those pages import it -- the
component was written and never wired in. Per the issue, this was the point
to check before deleting: no current page renders a breadcrumb rail today,
so there is no genuine gap to wire it into. components/ui/breadcrumb.tsx is
a separate shadcn primitive and is untouched.
Removing both drops nothing anything else depends on. It also clears two
react-refresh/only-export-components warnings, since each file exported an
interface (Crumb / FlowStep) alongside its component.
Verified: ui:typecheck clean, ui:build clean (121 modules, neither file was
in the graph), and ui:lint gains no new violation (the only errors are the
repo-wide CRLF prettier noise, absent on CI's LF checkout).
Closes #6182
---
.../src/components/site/breadcrumbs.tsx | 48 ---------
.../src/components/site/scroll-flow.tsx | 97 -------------------
2 files changed, 145 deletions(-)
delete mode 100644 apps/loopover-ui/src/components/site/breadcrumbs.tsx
delete mode 100644 apps/loopover-ui/src/components/site/scroll-flow.tsx
diff --git a/apps/loopover-ui/src/components/site/breadcrumbs.tsx b/apps/loopover-ui/src/components/site/breadcrumbs.tsx
deleted file mode 100644
index 255ba3cb0b..0000000000
--- a/apps/loopover-ui/src/components/site/breadcrumbs.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-import { Link } from "@tanstack/react-router";
-import { ChevronRight } from "lucide-react";
-
-import { cn } from "@/lib/utils";
-
-export interface Crumb {
- to?: string;
- label: string;
-}
-
-/**
- * Consistent breadcrumb rail used on /app, /docs, /api headers.
- * The last crumb is always rendered as the current page (no link).
- */
-export function Breadcrumbs({ items, className }: { items: Crumb[]; className?: string }) {
- return (
-
- );
-}
diff --git a/apps/loopover-ui/src/components/site/scroll-flow.tsx b/apps/loopover-ui/src/components/site/scroll-flow.tsx
deleted file mode 100644
index 50e9336448..0000000000
--- a/apps/loopover-ui/src/components/site/scroll-flow.tsx
+++ /dev/null
@@ -1,97 +0,0 @@
-import { motion } from "motion/react";
-import { useEffect, useRef, useState } from "react";
-import type { ReactNode } from "react";
-
-import { cn } from "@/lib/utils";
-
-export interface FlowStep {
- k: string;
- title: string;
- body: string;
- code?: string;
- icon?: ReactNode;
-}
-
-/**
- * Vertical scroll-linked flow: as the user scrolls, the step closest to the
- * viewport midline becomes the highlighted one. Static-export safe.
- */
-export function ScrollFlow({ steps, className }: { steps: FlowStep[]; className?: string }) {
- const [active, setActive] = useState(0);
- const refs = useRef>([]);
-
- useEffect(() => {
- const io = new IntersectionObserver(
- (entries) => {
- const visible = entries
- .filter((e) => e.isIntersecting)
- .sort((a, b) => b.intersectionRatio - a.intersectionRatio)[0];
- if (visible) {
- const idx = refs.current.findIndex((el) => el === visible.target);
- if (idx >= 0) setActive(idx);
- }
- },
- { rootMargin: "-40% 0px -40% 0px", threshold: [0.25, 0.5, 0.75] },
- );
- refs.current.forEach((el) => el && io.observe(el));
- return () => io.disconnect();
- }, [steps.length]);
-
- return (
-