From 352a95c25670cffc04087ae41a4c87d4f306e147 Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Sun, 25 Oct 2026 20:07:25 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20perf:=20revert=20#7515=20(status?= =?UTF-8?q?=20view=20lazy=20load=20added=20late=20sidebar=20requests)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 47d2e4df7d6e0b81f3d74cf091244ba45ef24af3. --- src/browser/components/ChatPane/ChatPane.tsx | 21 ++------------------ src/browser/rendererFirstLoad.test.ts | 14 ------------- 2 files changed, 2 insertions(+), 33 deletions(-) diff --git a/src/browser/components/ChatPane/ChatPane.tsx b/src/browser/components/ChatPane/ChatPane.tsx index 5d3c808cee7..0d64487efb8 100644 --- a/src/browser/components/ChatPane/ChatPane.tsx +++ b/src/browser/components/ChatPane/ChatPane.tsx @@ -71,7 +71,7 @@ import { import { WorkspaceMenuBar } from "../WorkspaceMenuBar/WorkspaceMenuBar"; import { useMainPaneAgentInterfaceView } from "@/browser/features/RightSidebar/ArtifactsTab/agentInterfaceView"; import type { AgentInterfaceView } from "@/browser/features/RightSidebar/ArtifactsTab/agentInterfaceViewState"; -import { LazyFeature } from "../LazyFeature/LazyFeature"; +import { AgentInterfaceStatusView } from "@/browser/features/RightSidebar/ArtifactsTab/AgentInterfaceStatusView"; import { WorkspaceFooterBar } from "./WorkspaceFooterBar"; import type { DisplayedMessage, QueuedMessage as QueuedMessageData } from "@/common/types/message"; import type { HeldInput as HeldInputData } from "@/common/orpc/types"; @@ -138,23 +138,6 @@ import { type CustomEventPayloads, } from "@/common/constants/events"; -// The status page loads with the Agent interface view only (#7510): through ArtifactViewer it -// pulls the artifact frame, which the workspace page must not download while the view is off. -const AgentInterfaceStatusView = React.lazy(async () => ({ - default: (await import("@/browser/features/RightSidebar/ArtifactsTab/AgentInterfaceStatusView")) - .AgentInterfaceStatusView, -})); - -/** The status page, fetched and mounted only while the view shows it (the lazy open condition). */ -function LazyStatusView(props: React.ComponentProps) { - if (props.view !== "status") return null; - return ( - - - - ); -} - const TRANSCRIPT_ONLY_NOTICE = "This workspace's worktree is no longer available. This is a read-only chat transcript kept for historical and usage-tracking reasons."; @@ -1674,7 +1657,7 @@ export const ChatPaneContent: React.FC = (props) => { > {/* Before the scrollport, which holds the composer dock, so Tab reaches the page before the composer below it. */} - { ); }, 60_000); - // #7510: ChatPane always rendered the Agent interface status view, so its static import pulled - // the artifact viewer and SandboxedArtifactFrame (~14 KB brotli) into the workspace page's - // download even with the experiment off. - test("the workspace page's static imports do not reach the artifact frame", async () => { - const closure = new Set([ - ...(await staticImportClosure("src/browser/main.tsx")), - ...(await staticImportClosure("src/browser/components/AIView/AIView.tsx")), - ]); - expect(closure.has("src/browser/components/ChatPane/ChatPane.tsx")).toBe(true); - expect( - closure.has("src/browser/features/RightSidebar/ArtifactsTab/SandboxedArtifactFrame.tsx") - ).toBe(false); - }, 60_000); - test("the workspace page's static imports do not reach the workspace-menu modals", async () => { // App.tsx starts the workspace page chunk (loadAIView() -> AIView) while the entry boots, so a // phone downloads both closures before the composer works. WorkspaceMenuBar mounted these