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