From 9789df94c4795961dbef16e5334de9d8f8977b78 Mon Sep 17 00:00:00 2001 From: BrunoQuaresma Date: Fri, 30 May 2025 15:11:15 +0000 Subject: [PATCH 1/3] chore: improve iframe loading time --- site/src/pages/TaskPage/TaskPage.tsx | 60 +++++++++++++++++++--------- 1 file changed, 41 insertions(+), 19 deletions(-) diff --git a/site/src/pages/TaskPage/TaskPage.tsx b/site/src/pages/TaskPage/TaskPage.tsx index e863ade7f37f4..272acecbe0c0e 100644 --- a/site/src/pages/TaskPage/TaskPage.tsx +++ b/site/src/pages/TaskPage/TaskPage.tsx @@ -19,7 +19,6 @@ import { TooltipProvider, TooltipTrigger, } from "components/Tooltip/Tooltip"; -import { useProxy } from "contexts/ProxyContext"; import { ArrowLeftIcon, ChevronDownIcon, @@ -27,7 +26,6 @@ import { RotateCcwIcon, } from "lucide-react"; import { AppStatusIcon } from "modules/apps/AppStatusIcon"; -import { getAppHref } from "modules/apps/apps"; import { useAppLink } from "modules/apps/useAppLink"; import { AI_PROMPT_PARAMETER_NAME, type Task } from "modules/tasks/tasks"; import { WorkspaceAppStatus } from "modules/workspaces/WorkspaceAppStatus/WorkspaceAppStatus"; @@ -312,17 +310,6 @@ const TaskApps: FC = ({ task }) => { throw new Error(`Agent for app ${activeAppId} not found in task workspace`); } - const { proxy } = useProxy(); - const [iframeSrc, setIframeSrc] = useState(() => { - const src = getAppHref(activeApp, { - agent, - workspace: task.workspace, - path: proxy.preferredPathAppURL, - host: proxy.preferredWildcardHostname, - }); - return src; - }); - const embeddedApps = apps.filter((app) => !app.external); const externalApps = apps.filter((app) => app.external); @@ -344,7 +331,6 @@ const TaskApps: FC = ({ task }) => { e.preventDefault(); setActiveAppId(app.id); - setIframeSrc(e.currentTarget.href); }} /> ))} @@ -387,11 +373,16 @@ const TaskApps: FC = ({ task }) => {
-