From b6093f054954008b0f0f9bbee5f1fb5831ae0da4 Mon Sep 17 00:00:00 2001 From: mbeaulne Date: Wed, 8 Apr 2026 16:43:43 -0400 Subject: [PATCH] remove old home page --- src/components/Home/PipelineSection/index.ts | 1 - src/components/Home/RunSection/index.ts | 1 - src/components/Home/index.ts | 2 - src/components/layout/RootLayout.tsx | 10 +++- src/components/shared/Settings/useFlags.ts | 11 ----- src/flags.ts | 7 --- src/routes/Home/Home.tsx | 51 -------------------- src/routes/Home/index.ts | 1 - src/routes/router.ts | 14 +----- 9 files changed, 11 insertions(+), 87 deletions(-) delete mode 100644 src/components/Home/PipelineSection/index.ts delete mode 100644 src/components/Home/RunSection/index.ts delete mode 100644 src/components/Home/index.ts delete mode 100644 src/routes/Home/Home.tsx delete mode 100644 src/routes/Home/index.ts diff --git a/src/components/Home/PipelineSection/index.ts b/src/components/Home/PipelineSection/index.ts deleted file mode 100644 index f92167d2c..000000000 --- a/src/components/Home/PipelineSection/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./PipelineSection"; diff --git a/src/components/Home/RunSection/index.ts b/src/components/Home/RunSection/index.ts deleted file mode 100644 index a6485dba6..000000000 --- a/src/components/Home/RunSection/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./RunSection"; diff --git a/src/components/Home/index.ts b/src/components/Home/index.ts deleted file mode 100644 index 48b61557a..000000000 --- a/src/components/Home/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./PipelineSection"; -export * from "./RunSection"; diff --git a/src/components/layout/RootLayout.tsx b/src/components/layout/RootLayout.tsx index f01dced79..b54a0a43e 100644 --- a/src/components/layout/RootLayout.tsx +++ b/src/components/layout/RootLayout.tsx @@ -12,7 +12,15 @@ import AppMenu from "./AppMenu"; const RootLayout = () => { useDocumentTitle(); const { pathname } = useLocation(); - const isDashboard = pathname.startsWith("/dashboard"); + // Dashboard routes handle their own footer in the sidebar. + // Only show AppFooter on non-dashboard routes (editor, runs, settings, etc.) + const isDashboard = + pathname === "/" || + pathname.startsWith("/runs") || + pathname.startsWith("/pipelines") || + pathname.startsWith("/components") || + pathname.startsWith("/favorites") || + pathname.startsWith("/recently-viewed"); return ( diff --git a/src/components/shared/Settings/useFlags.ts b/src/components/shared/Settings/useFlags.ts index afdcd1747..c55e30a6b 100644 --- a/src/components/shared/Settings/useFlags.ts +++ b/src/components/shared/Settings/useFlags.ts @@ -7,17 +7,6 @@ import type { BetaFlagsStorage } from "./types"; const storage = getStorage(); -/** - * Non-hook flag check for use outside React (e.g., route beforeLoad). - */ -export function isFlagEnabled(flagName: keyof typeof ExistingFlags): boolean { - return ( - storage.getItem("betaFlags")?.[flagName] ?? - ExistingFlags[flagName]?.default ?? - false - ); -} - export function useFlags() { return { getFlags: () => storage.getItem("betaFlags"), diff --git a/src/flags.ts b/src/flags.ts index af668648d..c725618eb 100644 --- a/src/flags.ts +++ b/src/flags.ts @@ -47,11 +47,4 @@ export const ExistingFlags: ConfigFlags = { category: "beta", }, - ["dashboard"]: { - name: "Dashboard", - description: - "Enable the new Dashboard page, a redesigned homepage experience.", - default: false, - category: "beta", - }, }; diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx deleted file mode 100644 index 808eaddda..000000000 --- a/src/routes/Home/Home.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import { useRef, useState } from "react"; - -import { PipelineSection, RunSection } from "@/components/Home"; -import { AnnouncementBanners } from "@/components/shared/AnnouncementBanners"; -import { PipelineRunFiltersBar } from "@/components/shared/PipelineRunFiltersBar/PipelineRunFiltersBar"; -import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; - -const Home = () => { - const [activeTab, setActiveTab] = useState("runs"); - - const handleTabSelect = (value: string) => { - setActiveTab(value); - }; - - const handledPipelineRunsEmpty = useRef(false); - const handlePipelineRunsEmpty = () => { - if (!handledPipelineRunsEmpty.current) { - setActiveTab("pipelines"); - handledPipelineRunsEmpty.current = true; - } - }; - - return ( -
- -
-

Pipelines

-
- - - All Runs - My pipelines - - - - - - - - - -
- ); -}; - -export default Home; diff --git a/src/routes/Home/index.ts b/src/routes/Home/index.ts deleted file mode 100644 index ffa79319e..000000000 --- a/src/routes/Home/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from "./Home"; diff --git a/src/routes/router.ts b/src/routes/router.ts index d7fe0cded..09bfcddcb 100644 --- a/src/routes/router.ts +++ b/src/routes/router.ts @@ -6,7 +6,6 @@ import { Outlet, redirect, } from "@tanstack/react-router"; -import { createElement } from "react"; import { ErrorPage } from "@/components/shared/ErrorPage"; import { AuthorizationResultScreen as GitHubAuthorizationResultScreen } from "@/components/shared/GitHubAuth/AuthorizationResultScreen"; @@ -14,7 +13,6 @@ import { AuthorizationResultScreen as HuggingFaceAuthorizationResultScreen } fro import { AddSecretView } from "@/components/shared/SecretsManagement/components/AddSecretView"; import { ReplaceSecretView } from "@/components/shared/SecretsManagement/components/ReplaceSecretView"; import { SecretsListView } from "@/components/shared/SecretsManagement/components/SecretsListView"; -import { isFlagEnabled } from "@/components/shared/Settings/useFlags"; import { BASE_URL, IS_GITHUB_PAGES } from "@/utils/constants"; import RootLayout from "../components/layout/RootLayout"; @@ -26,7 +24,6 @@ import { DashboardPipelinesView } from "./Dashboard/DashboardPipelinesView"; import { DashboardRecentlyViewedView } from "./Dashboard/DashboardRecentlyViewedView"; import { DashboardRunsView } from "./Dashboard/DashboardRunsView"; import Editor from "./Editor"; -import Home from "./Home"; import { ImportPage } from "./Import"; import NotFoundPage from "./NotFoundPage"; import PipelineRun from "./PipelineRun"; @@ -87,23 +84,16 @@ const mainLayout = createRoute({ // Dashboard is a pathless layout — its children resolve to top-level paths // (/, /runs, /pipelines, etc.) without a /dashboard prefix. -// When the dashboard flag is off, the layout is a passthrough and / renders Home. const dashboardRoute = createRoute({ id: "dashboard-layout", getParentRoute: () => mainLayout, - component: () => - isFlagEnabled("dashboard") - ? createElement(DashboardLayout) - : createElement(Outlet), + component: DashboardLayout, }); const dashboardIndexRoute = createRoute({ getParentRoute: () => dashboardRoute, path: "/", - component: () => - isFlagEnabled("dashboard") - ? createElement(DashboardHomeView) - : createElement(Home), + component: DashboardHomeView, }); const dashboardRunsRoute = createRoute({