From 68e2f2a2cd0e660d624e0dd508ff3dcdb9c3808d Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Thu, 28 May 2026 17:29:57 -0300 Subject: [PATCH] feat(agent-bridge): show "page moved" banner before redirect from /system/mitm-proxy (C4) Converts bare server-side redirect() to a client component that shows an amber "This page has moved" banner for 2.5 s, then auto-redirects to /dashboard/tools/agent-bridge. User can also click "Go now" to jump immediately. All strings use useTranslations("agentBridge.pageMoved"). --- .../dashboard/system/mitm-proxy/page.tsx | 41 ++++++++++++++++--- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/src/app/(dashboard)/dashboard/system/mitm-proxy/page.tsx b/src/app/(dashboard)/dashboard/system/mitm-proxy/page.tsx index b59c55710f..401134ddbe 100644 --- a/src/app/(dashboard)/dashboard/system/mitm-proxy/page.tsx +++ b/src/app/(dashboard)/dashboard/system/mitm-proxy/page.tsx @@ -1,9 +1,40 @@ -import { redirect } from "next/navigation"; +"use client"; + +import { useEffect } from "react"; +import { useRouter } from "next/navigation"; +import { useTranslations } from "next-intl"; /** - * MITM Proxy page — moved to AgentBridge (plan 11). - * Redirects to the new location at /dashboard/tools/agent-bridge. + * MITM Proxy page — moved to AgentBridge (plan 11 §12). + * Shows a "page moved" banner for 2.5 s then redirects. */ -export default function MitmProxyPage() { - redirect("/dashboard/tools/agent-bridge"); +export default function MitmProxyMovedPage() { + const router = useRouter(); + const t = useTranslations("agentBridge.pageMoved"); + + useEffect(() => { + const timer = setTimeout(() => { + router.replace("/dashboard/tools/agent-bridge"); + }, 2500); + return () => clearTimeout(timer); + }, [router]); + + return ( +
+
+
+ info +

{t("title")}

+
+

{t("message")}

+ +
+
+ ); }