@@ -17,7 +17,7 @@ import { isFlagEnabled } from "@/components/shared/Settings/useFlags";
1717import { BASE_URL , IS_GITHUB_PAGES } from "@/utils/constants" ;
1818
1919import RootLayout from "../components/layout/RootLayout" ;
20- import { Dashboard } from "./Dashboard/Dashboard " ;
20+ import { DashboardLayout } from "./Dashboard/DashboardLayout " ;
2121import Editor from "./Editor" ;
2222import Home from "./Home" ;
2323import { ImportPage } from "./Import" ;
@@ -45,6 +45,11 @@ const DASHBOARD_PATH = "/dashboard";
4545export const APP_ROUTES = {
4646 HOME : "/" ,
4747 DASHBOARD : DASHBOARD_PATH ,
48+ DASHBOARD_RUNS : `${ DASHBOARD_PATH } /runs` ,
49+ DASHBOARD_PIPELINES : `${ DASHBOARD_PATH } /pipelines` ,
50+ DASHBOARD_COMPONENTS : `${ DASHBOARD_PATH } /components` ,
51+ DASHBOARD_FAVORITES : `${ DASHBOARD_PATH } /favorites` ,
52+ DASHBOARD_RECENTLY_VIEWED : `${ DASHBOARD_PATH } /recently-viewed` ,
4853 QUICK_START : QUICK_START_PATH ,
4954 IMPORT : IMPORT_PATH ,
5055 PIPELINE_EDITOR : `${ EDITOR_PATH } /$name` ,
@@ -83,14 +88,55 @@ const indexRoute = createRoute({
8388const dashboardRoute = createRoute ( {
8489 getParentRoute : ( ) => mainLayout ,
8590 path : APP_ROUTES . DASHBOARD ,
86- component : Dashboard ,
91+ component : DashboardLayout ,
8792 beforeLoad : ( ) => {
8893 if ( ! isFlagEnabled ( "dashboard" ) ) {
8994 throw redirect ( { to : APP_ROUTES . HOME } ) ;
9095 }
9196 } ,
9297} ) ;
9398
99+ const dashboardIndexRoute = createRoute ( {
100+ getParentRoute : ( ) => dashboardRoute ,
101+ path : "/" ,
102+ beforeLoad : ( ) => {
103+ throw redirect ( { to : APP_ROUTES . DASHBOARD_RUNS } ) ;
104+ } ,
105+ } ) ;
106+
107+ // Placeholder component — replaced in subsequent PRs
108+ const ComingSoon = ( ) => null ;
109+
110+ const dashboardRunsRoute = createRoute ( {
111+ getParentRoute : ( ) => dashboardRoute ,
112+ path : "/runs" ,
113+ component : ComingSoon ,
114+ } ) ;
115+
116+ const dashboardPipelinesRoute = createRoute ( {
117+ getParentRoute : ( ) => dashboardRoute ,
118+ path : "/pipelines" ,
119+ component : ComingSoon ,
120+ } ) ;
121+
122+ const dashboardComponentsRoute = createRoute ( {
123+ getParentRoute : ( ) => dashboardRoute ,
124+ path : "/components" ,
125+ component : ComingSoon ,
126+ } ) ;
127+
128+ const dashboardFavoritesRoute = createRoute ( {
129+ getParentRoute : ( ) => dashboardRoute ,
130+ path : "/favorites" ,
131+ component : ComingSoon ,
132+ } ) ;
133+
134+ const dashboardRecentlyViewedRoute = createRoute ( {
135+ getParentRoute : ( ) => dashboardRoute ,
136+ path : "/recently-viewed" ,
137+ component : ComingSoon ,
138+ } ) ;
139+
94140const quickStartRoute = createRoute ( {
95141 getParentRoute : ( ) => mainLayout ,
96142 path : APP_ROUTES . QUICK_START ,
@@ -207,9 +253,18 @@ const settingsRouteTree = settingsLayoutRoute.addChildren([
207253 secretsRouteTree ,
208254] ) ;
209255
256+ const dashboardRouteTree = dashboardRoute . addChildren ( [
257+ dashboardIndexRoute ,
258+ dashboardRunsRoute ,
259+ dashboardPipelinesRoute ,
260+ dashboardComponentsRoute ,
261+ dashboardFavoritesRoute ,
262+ dashboardRecentlyViewedRoute ,
263+ ] ) ;
264+
210265const appRouteTree = mainLayout . addChildren ( [
211266 indexRoute ,
212- dashboardRoute ,
267+ dashboardRouteTree ,
213268 quickStartRoute ,
214269 settingsRouteTree ,
215270 importRoute ,
0 commit comments