From e793c378db5879059e412af1d705b13b8c5146b8 Mon Sep 17 00:00:00 2001 From: Manan Shah <52329525+Manan17@users.noreply.github.com> Date: Thu, 19 Mar 2026 02:11:27 -0500 Subject: [PATCH] turning data recipes on for mac (#4454) --- studio/frontend/src/app/routes/__root.tsx | 8 +++++++- studio/frontend/src/components/navbar.tsx | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/studio/frontend/src/app/routes/__root.tsx b/studio/frontend/src/app/routes/__root.tsx index 0725d383c7..d7780c6743 100644 --- a/studio/frontend/src/app/routes/__root.tsx +++ b/studio/frontend/src/app/routes/__root.tsx @@ -15,10 +15,16 @@ import { AppProvider } from "../provider"; const CHAT_ONLY_ALLOWED = new Set(["/", "/chat", "/login", "/signup", "/change-password"]); +function isChatOnlyAllowed(pathname: string): boolean { + if (CHAT_ONLY_ALLOWED.has(pathname)) return true; + if (pathname === "/data-recipes" || pathname.startsWith("/data-recipes/")) return true; + return false; +} + export const Route = createRootRoute({ beforeLoad: ({ location }) => { const chatOnly = usePlatformStore.getState().isChatOnly(); - if (chatOnly && !CHAT_ONLY_ALLOWED.has(location.pathname)) { + if (chatOnly && !isChatOnlyAllowed(location.pathname)) { throw redirect({ to: "/chat" }); } }, diff --git a/studio/frontend/src/components/navbar.tsx b/studio/frontend/src/components/navbar.tsx index 0f159add77..03ea77a8b2 100644 --- a/studio/frontend/src/components/navbar.tsx +++ b/studio/frontend/src/components/navbar.tsx @@ -93,7 +93,7 @@ export function Navbar() { const disabledByTraining = isTrainingRunning && item.href !== "/studio"; const disabledByDevice = - chatOnly && item.href !== "/chat"; + chatOnly && item.href !== "/chat" && item.href !== "/data-recipes"; if (!item.enabled || disabledByTraining || disabledByDevice) { return (