diff --git a/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/file/loading.tsx b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/file/loading.tsx new file mode 100644 index 000000000..f6a921fc5 --- /dev/null +++ b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/file/loading.tsx @@ -0,0 +1,3 @@ +import LoadingReportsFile from '@reports/file/loading'; + +export default LoadingReportsFile; diff --git a/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/file/page.tsx b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/file/page.tsx new file mode 100644 index 000000000..11e2f46bf --- /dev/null +++ b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/file/page.tsx @@ -0,0 +1,3 @@ +import ReportsFilePage from '@reports/file/page'; + +export default ReportsFilePage; diff --git a/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/loading.tsx b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/loading.tsx new file mode 100644 index 000000000..fd753f9b4 --- /dev/null +++ b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/loading.tsx @@ -0,0 +1,3 @@ +import LoadingReports from '@reports/loading'; + +export default LoadingReports; diff --git a/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/chart/loading.tsx b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/chart/loading.tsx new file mode 100644 index 000000000..6a07db048 --- /dev/null +++ b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/chart/loading.tsx @@ -0,0 +1,3 @@ +import LoadingMetric from '@metrics/chart/loading'; + +export default LoadingMetric; diff --git a/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/chart/page.tsx b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/chart/page.tsx new file mode 100644 index 000000000..f4afe9d3a --- /dev/null +++ b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/chart/page.tsx @@ -0,0 +1,3 @@ +import MetricChartPage from '@metrics/chart/page'; + +export default MetricChartPage; diff --git a/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/file/loading.tsx b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/file/loading.tsx new file mode 100644 index 000000000..57894a906 --- /dev/null +++ b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/file/loading.tsx @@ -0,0 +1,3 @@ +import LoadingMetric from '@metrics/file/loading'; + +export default LoadingMetric; diff --git a/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/file/page.tsx b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/file/page.tsx new file mode 100644 index 000000000..282d8551a --- /dev/null +++ b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/file/page.tsx @@ -0,0 +1,3 @@ +import MetricFilePage from '@metrics/file/page'; + +export default MetricFilePage; diff --git a/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/layout.tsx b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/layout.tsx new file mode 100644 index 000000000..e90da7a8f --- /dev/null +++ b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/layout.tsx @@ -0,0 +1,4 @@ +import MetricLayout, { generateMetadata } from '@metrics/layout'; + +export default MetricLayout; +export { generateMetadata }; diff --git a/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/loading.tsx b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/loading.tsx new file mode 100644 index 000000000..443108fc7 --- /dev/null +++ b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/loading.tsx @@ -0,0 +1,3 @@ +import LoadingMetric from '@metrics/loading'; + +export default LoadingMetric; diff --git a/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/page.tsx b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/page.tsx new file mode 100644 index 000000000..9507320f6 --- /dev/null +++ b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/page.tsx @@ -0,0 +1,18 @@ +import { redirect } from 'next/navigation'; +import { BusterRoutes, createBusterRoute } from '@/routes'; + +export default async function Page(props: { + params: Promise<{ chatId: string; metricId: string; reportId: string }>; +}) { + const params = await props.params; + const { chatId, metricId, reportId } = params; + + return redirect( + createBusterRoute({ + route: BusterRoutes.APP_CHAT_ID_REPORT_ID_METRIC_ID_CHART, + chatId, + metricId, + reportId + }) + ); +} diff --git a/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/results/loading.tsx b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/results/loading.tsx new file mode 100644 index 000000000..4582fe15d --- /dev/null +++ b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/results/loading.tsx @@ -0,0 +1,3 @@ +import LoadingMetric from '@metrics/results/loading'; + +export default LoadingMetric; diff --git a/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/results/page.tsx b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/results/page.tsx new file mode 100644 index 000000000..7f0bd99ca --- /dev/null +++ b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/results/page.tsx @@ -0,0 +1,3 @@ +import MetricResultsPage from '@metrics/results/page'; + +export default MetricResultsPage; diff --git a/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/sql/loading.tsx b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/sql/loading.tsx new file mode 100644 index 000000000..0153494a5 --- /dev/null +++ b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/sql/loading.tsx @@ -0,0 +1,3 @@ +import LoadingMetric from '@metrics/sql/loading'; + +export default LoadingMetric; diff --git a/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/sql/page.tsx b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/sql/page.tsx new file mode 100644 index 000000000..195d2750a --- /dev/null +++ b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/metrics/[metricId]/sql/page.tsx @@ -0,0 +1,3 @@ +import MetricSQLPage from '@metrics/sql/page'; + +export default MetricSQLPage; diff --git a/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/page.tsx b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/page.tsx new file mode 100644 index 000000000..db53b1982 --- /dev/null +++ b/apps/web/src/app/app/(primary_layout)/(chat_experience)/chats/[chatId]/reports/[reportId]/page.tsx @@ -0,0 +1,3 @@ +import ReportsPage from '@reports/page'; + +export default ReportsPage; diff --git a/apps/web/src/components/ui/report/ReportEditor.stories.tsx b/apps/web/src/components/ui/report/ReportEditor.stories.tsx index 86544f587..04f161fa9 100644 --- a/apps/web/src/components/ui/report/ReportEditor.stories.tsx +++ b/apps/web/src/components/ui/report/ReportEditor.stories.tsx @@ -11,32 +11,32 @@ const meta = { msw: { handlers: [ // // Mock Supabase auth endpoints to prevent MSW warnings - // http.post('http://127.0.0.1:54321/auth/v1/token', ({ request }) => { - // return HttpResponse.json({ - // access_token: 'mock_access_token', - // token_type: 'bearer', - // expires_in: 3600, - // refresh_token: 'mock_refresh_token', - // user: { - // id: 'mock_user_id', - // email: 'mock@example.com', - // is_anonymous: false - // } - // }); - // }), - // http.post('http://127.0.0.1:54321/auth/v1/refresh', ({ request }) => { - // return HttpResponse.json({ - // access_token: 'mock_refreshed_access_token', - // token_type: 'bearer', - // expires_in: 3600, - // refresh_token: 'mock_new_refresh_token', - // user: { - // id: 'mock_user_id', - // email: 'mock@example.com', - // is_anonymous: false - // } - // }); - // }) + http.post('http://127.0.0.1:54321/auth/v1/token', ({ request }) => { + return HttpResponse.json({ + access_token: 'mock_access_token', + token_type: 'bearer', + expires_in: 3600, + refresh_token: 'mock_refresh_token', + user: { + id: 'mock_user_id', + email: 'mock@example.com', + is_anonymous: false + } + }); + }), + http.post('http://127.0.0.1:54321/auth/v1/refresh', ({ request }) => { + return HttpResponse.json({ + access_token: 'mock_refreshed_access_token', + token_type: 'bearer', + expires_in: 3600, + refresh_token: 'mock_new_refresh_token', + user: { + id: 'mock_user_id', + email: 'mock@example.com', + is_anonymous: false + } + }); + }) ] } }, diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json index 5b37633cc..b86d62f14 100644 --- a/apps/web/tsconfig.json +++ b/apps/web/tsconfig.json @@ -13,7 +13,10 @@ "paths": { "@/*": ["src/*"], "@metrics/*": ["src/app/app/(primary_layout)/(chat_experience)/metrics/[metricId]/*"], - "@dashboards/*": ["src/app/app/(primary_layout)/(chat_experience)/dashboards/[dashboardId]/*"] + "@dashboards/*": [ + "src/app/app/(primary_layout)/(chat_experience)/dashboards/[dashboardId]/*" + ], + "@reports/*": ["src/app/app/(primary_layout)/(chat_experience)/reports/[reportId]/*"] }, "plugins": [ {