Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

feat(v4-migration): add migration link to personal settings menus (#16191)

Max Deichmann81d2d5e7f964
diff --git a/web/src/components/layouts/app-layout/variants/AuthenticatedLayout.tsx b/web/src/components/layouts/app-layout/variants/AuthenticatedLayout.tsx
index 51562ff632..4bc317e5ae 100644
--- a/web/src/components/layouts/app-layout/variants/AuthenticatedLayout.tsx
+++ b/web/src/components/layouts/app-layout/variants/AuthenticatedLayout.tsx
@@ -36,7 +36,10 @@ import type { RouteGroup } from "@/src/components/layouts/routes";
import dynamic from "next/dynamic";
import { ControlledFeaturePreviewModal } from "@/src/features/feature-previews/components/ControlledFeaturePreviewModal";
import { InAppAgentWindowHost } from "@/src/features/in-app-agent/components/InAppAgentWindowHost";
-import { useV4UpgradeUiEnabled } from "@/src/features/v4-migration/useV4UpgradeUiEnabled";
+import {
+ useV4UpgradeUiEnabled,
+ useV4UpgradeUiFlag,
+} from "@/src/features/v4-migration/useV4UpgradeUiEnabled";
import { useUiCustomization } from "@/src/ee/features/ui-customization/useUiCustomization";
import { findCurrentInstance } from "@/src/ee/features/ui-customization/instanceLinks";
import { api } from "@/src/utils/api";
@@ -124,6 +127,9 @@ export function AuthenticatedLayout({
const router = useRouter();
useProjectCookie(router);
const uiCustomization = useUiCustomization();
+ // Account-level entry: use the raw flag (same as account settings tabs), not
+ // project-scoped force-v3 suppression.
+ const showV4Migration = useV4UpgradeUiFlag();
// Safe assertion: AuthenticatedLayout is only rendered after auth checks pass
// in AppLayout, which guarantees session.user exists at this point
@@ -180,6 +186,15 @@ export function AuthenticatedLayout({
name: "Account Settings",
href: "/account/settings",
},
+ ...(showV4Migration
+ ? [
+ {
+ type: "link" as const,
+ name: "v4 Migration",
+ href: "/v4-migration",
+ },
+ ]
+ : []),
{
type: "action" as const,
name: "Theme",
diff --git a/web/src/components/nav/topbar-account.tsx b/web/src/components/nav/topbar-account.tsx
index 4158bf8828..5fea903712 100644
--- a/web/src/components/nav/topbar-account.tsx
+++ b/web/src/components/nav/topbar-account.tsx
@@ -18,6 +18,7 @@ import {
DropdownMenuTrigger,
} from "@/src/components/ui/dropdown-menu";
import { ThemeToggle } from "@/src/features/theming/ThemeToggle";
+import { useV4UpgradeUiFlag } from "@/src/features/v4-migration/useV4UpgradeUiEnabled";
import { cn } from "@/src/utils/tailwind";
/**
@@ -27,6 +28,7 @@ import { cn } from "@/src/utils/tailwind";
*/
export const TopbarAccount = ({ className }: { className?: string }) => {
const session = useSession();
+ const showV4Migration = useV4UpgradeUiFlag();
const user = session.data?.user;
if (!user) return null;
@@ -75,6 +77,11 @@ export const TopbarAccount = ({ className }: { className?: string }) => {
<DropdownMenuItem asChild>
<Link href="/account/settings">Account settings</Link>
</DropdownMenuItem>
+ {showV4Migration ? (
+ <DropdownMenuItem asChild>
+ <Link href="/v4-migration">v4 Migration</Link>
+ </DropdownMenuItem>
+ ) : null}
{/* ThemeToggle stops propagation itself; keep the row from closing the
menu so the user can flip themes and keep the menu open. */}
<DropdownMenuItem onSelect={(e) => e.preventDefault()}>