feat(web): open project surfaces in browser targets — #204

This commit is contained in:
2026-08-15 01:16:23 +02:00
parent 7fea538d0d
commit 0d543fb298
8 changed files with 513 additions and 132 deletions

View File

@ -5,7 +5,7 @@ import ReactDOM from "react-dom/client";
import { App } from "./App";
import { PluginLayoutWindow, ViewWindow, parseViewWindowParams } from "./ViewWindow";
import { WebApp } from "@/features/web";
import { WebApp, WebSurfaceWindow, parseWebSurfaceWindowParams } from "@/features/web";
import { DIProvider, resolveTransport } from "./di";
import { RootErrorBoundary, installGlobalErrorLogging } from "./RootErrorBoundary";
import "@/shared/styles/theme.css";
@ -19,6 +19,7 @@ if (!root) {
// project id). When the param is present and valid, render only that view — it
// follows the main window's focused project; otherwise the full app.
const viewParams = parseViewWindowParams(window.location.search);
const webSurfaceParams = parseWebSurfaceWindowParams(window.location.search);
// Ticket #74, F1: publish the transport this bundle was built for. `define`
// inlines it as a literal, and assigning it is a side effect, so it survives
@ -39,7 +40,9 @@ ReactDOM.createRoot(root).render(
<React.StrictMode>
<RootErrorBoundary>
<DIProvider>
{isWeb ? (
{isWeb && webSurfaceParams ? (
<WebSurfaceWindow params={webSurfaceParams} />
) : isWeb ? (
<WebApp />
) : viewParams?.kind === "panel" ? (
<ViewWindow panel={viewParams.panel} />