- {layout === "none" ? "Choose a device platform or a tool in the sidebar." : "Choose a tool in the sidebar."}
-
;
-}
diff --git a/apps/mac/web/mac.css b/apps/mac/web/mac.css
index ab3747d3..288995d3 100644
--- a/apps/mac/web/mac.css
+++ b/apps/mac/web/mac.css
@@ -1,11 +1,5 @@
-/* While the native sidebar is collapsed, the window's traffic lights and sidebar
- button sit over the page's top-left corner. Swift sets --mac-titlebar-inset to
- their width, and the leading panel's top row makes room for them. */
-.mac-leading .panel-toolbar {
+/* Leave the native traffic lights and sidebar toggle clear when the sidebar is collapsed. */
+.mac-device-toolbar {
+ min-height: var(--mac-titlebar-height, 0px);
padding-left: calc(var(--mac-titlebar-inset, 0px) + 0.5rem);
- transition: padding-left 150ms ease;
-}
-/* Views without a toolbar row, such as TraceSift, move below the controls instead. */
-.mac-leading:not(:has(.panel-toolbar)) {
- padding-top: var(--mac-titlebar-height, 0px);
}
diff --git a/apps/mac/web/main.tsx b/apps/mac/web/main.tsx
index a1645fd9..d795f2a6 100644
--- a/apps/mac/web/main.tsx
+++ b/apps/mac/web/main.tsx
@@ -5,40 +5,27 @@ import "./mac.css";
import { applyDocumentTheme } from "@modelcontextprotocol/ext-apps";
import { createRoot } from "react-dom/client";
import { flushSync } from "react-dom";
-import type { DeviceLayout } from "@mobile-dev/ui/device-layout.ts";
import { DeviceWorkspace } from "@mobile-dev/ui/device-workspace.ts";
import { ErrorBoundary, captureUiError, startUiTelemetry, stopUiTelemetry } from "@mobile-dev/ui/telemetry.ts";
import { isToolName, WorkspaceTools, type ToolName } from "@mobile-dev/ui/workspace-tools.ts";
import { MacHostBridge, postToShell } from "./mac-bridge.ts";
import { MacWorkspace } from "./mac-workspace.tsx";
-const layouts = ["ios", "android", "both", "none"] as const;
-const isLayout = (value: unknown): value is DeviceLayout => layouts.includes(value as DeviceLayout);
-
const bridge = new MacHostBridge();
startUiTelemetry(bridge);
// The Mac app has no chat, so the panels have no host attachments.
const panels = WorkspaceTools.create(bridge);
let tool: ToolName | undefined;
-let layout: DeviceLayout = "none";
+const devices = new DeviceWorkspace(bridge, panels);
const reactRoot = createRoot(document.getElementById("root")!);
function render() {
reactRoot.render(Mobile Dev could not render. Reload the window to try again.
}>
-
+
);
}
flushSync(render);
-const devices = new DeviceWorkspace(bridge, panels, {
- onAutomaticLayout: next => {
- layout = next;
- render();
- postToShell({ type: "layout", layout: next });
- },
- connectionFailed,
-});
panels.logs.setLayout(true);
-devices.changeLayout("none");
function connectionFailed(error: unknown) {
captureUiError(error, "host.connect");
@@ -55,22 +42,14 @@ function selectTool(next: ToolName | undefined) {
render();
}
-function selectLayout(next: DeviceLayout) {
- if (next === layout) return;
- layout = next;
- devices.changeLayout(next, true);
- render();
-}
-
declare global {
interface Window {
/** The native sidebar drives the content area through these calls. */
- mobileDevShell?: { selectTool(tool: string | null): void; selectLayout(layout: string): void; setTitlebarInset(width: number, height: number): void };
+ mobileDevShell?: { selectTool(tool: string | null): void; setTitlebarInset(width: number, height: number): void };
}
}
window.mobileDevShell = {
selectTool: value => selectTool(isToolName(value) ? value : undefined),
- selectLayout: value => { if (isLayout(value)) selectLayout(value); },
setTitlebarInset: (width, height) => {
document.documentElement.style.setProperty("--mac-titlebar-inset", `${Math.max(0, width)}px`);
document.documentElement.style.setProperty("--mac-titlebar-height", `${Math.max(0, height)}px`);
@@ -97,9 +76,7 @@ void (async () => {
panels.setAvailable(true);
await devices.setAvailable(true);
postToShell({ type: "ready" });
- // Codex opens the panel through a tool call that names a target. The app has
- // none, so the panels restore or pick devices and choose the layout themselves
- // unless the sidebar changes it first.
+ // The standalone app opens without a target and can select a running device.
await devices.open({});
} catch (error) {
connectionFailed(error);
diff --git a/docs/devices.md b/docs/devices.md
index 1b297b63..4e5ad2c2 100644
--- a/docs/devices.md
+++ b/docs/devices.md
@@ -16,21 +16,21 @@ Android logs need `adb` from an installed Android SDK. The reader checks `ANDROI
## Device panel
-Open a new chat after installing. Open Mobile Dev in the sidebar or call `mobile_open_workspace` for the fullscreen view. Call `mobile_open_simulator` for the panel beside a chat. Both opening tools accept optional `platform`, `kind`, and discovered `deviceId` arguments. For example, `{ platform: "android", kind: "emulator" }` opens Android and selects an emulator before connecting; `kind: "physical"` selects a connected phone. An unavailable requested target stays unselected, with a message and the device picker available. Opening never boots a device. Without targeting, iOS opens when both platforms have running devices; Android opens when it has the only running device. Later manual platform or device selections replace the opening choice.
+Open a new chat after installing. Open Mobile Dev in the sidebar or call `mobile_open_workspace` for the fullscreen view. Call `mobile_open_simulator` for the panel beside a chat. Both opening tools accept optional `platform`, `kind`, and discovered `deviceId` arguments. For example, `{ platform: "android", kind: "emulator" }` opens Android and selects an emulator before connecting; `kind: "physical"` selects a connected phone. An unavailable requested target stays unselected, with a message and the device picker available. Opening never boots a device. Without targeting, iOS opens when both platforms have running devices; Android opens when it has the only running device. Later manual device selections replace the opening choice.
-Enable both platforms from the platform menu to show the panels side by side. Each panel has a device dropdown, Home, App Switcher, and Screenshot. Pick a device in each panel. In the sidebar panel, the bar under the simulators holds the tools menu on the left and the platform menu on the right; fullscreen shows them above the tools. Use the platform menu to show either, both, or neither simulator. Selecting a device boots it if needed, then connects its screen. A selected running device connects automatically. The panel uses Apple’s device bezel and screen mask from the installed DeviceKit assets, with a simple frame as a fallback when assets are unavailable. Use the settings button at the bottom right for appearance, text size, location, and the device frame. iOS also offers contrast; Android offers rotation. The menu shows only settings supported by the bundled backend. Click the screen to type or drag. Closing the panel closes its stream.
+Open **Devices** and select the screens to display. The menu groups devices into iOS and Android columns. You can select multiple devices from either column and keep the menu open as you choose. Selecting a stopped simulator or emulator starts it. Each screen has its own Home, App Switcher, Screenshot, and Select controls. Drag the divider to adjust a screen’s width or scroll horizontally to reach additional screens. Deselecting a device closes its screen and leaves the device running. The panel uses Apple’s device bezel and screen mask from the installed DeviceKit assets, with a simple frame as a fallback when assets are unavailable. Use the settings button at the bottom right for appearance, text size, location, and the device frame. iOS also offers contrast; Android offers rotation. The menu shows only settings supported by the bundled backend. Click the screen to type or drag. Closing the panel closes its stream.
Click an iOS simulator or Android screen to focus it, then press **Command-V** to paste text into the device. Paste accepts up to 4,096 printable US-ASCII characters. Empty or non-text clipboard content sends nothing; line breaks, other characters, and oversized text show a notice without sending partial text. Paste is disabled during Select, while input is blocked, and until the stream is ready. Physical iOS keyboard input remains unavailable.
Use Select in the simulator toolbar to pause the screen. Hover to outline a component, then click to add a note. React Native development apps can supply runtime elements when accessibility omits a view. Drag to mark a region when neither source exposes it. Saved notes leave numbered blue bubbles. Notes attach text and available element details to your next chat message. The captured screen stays local for editing; annotations never attach screenshots. Click a bubble to edit or remove a note, or use Send to chat to send all notes for that device. If chat is unavailable, the panel keeps the notes and retries when you return. A sent or cleared batch starts again at 1.
-The iOS dropdown shows **Connected devices** first, with USB or Wi-Fi labels, then **Simulators**. It refreshes every three seconds while the iOS panel is visible, and when opening the dropdown. Selecting a physical device opens interactive screen mirroring through its paired developer connection. The phone sends HEVC video; a bundled native Node-API addon assembles compressed frames and transfers them into Node without copying the frame payload, then the panel decodes them through WebCodecs. MCP serializes the compressed bytes as base64, so the full path is not zero copy. The capture queue is limited to eight frames or 4 MiB and requests a keyframe after overflow. Physical iOS supports pointer taps, long presses, and drags through CoreDevice UniversalHID on the same developer tunnel. Input starts after a fresh video frame, uses normalized touchscreen coordinates, and releases held touches when the stream closes or resets. Screenshot captures the displayed mirrored frame as a PNG, attaches it to chat, and copies the same image to the macOS clipboard. Select annotates screen regions using the mirrored frame's pixel coordinates; native accessibility component names are unavailable. Both controls require a connected device and a ready video frame. Keyboard and hardware-button controls remain disabled. CPU and memory monitoring can attach to an already running development app on a paired iOS 17.4+ device. Mirroring requires Developer Mode and a host with HEVC WebCodecs support. `mobile_list_ios_devices` also returns remembered disconnected devices with their connection state; the picker shows connected devices only. Discovery errors remain visible while available simulators continue to work.
+The iOS column shows **Connected devices** first, with USB or Wi-Fi labels, then **Simulators**. It refreshes every three seconds while the iOS panel is visible, and when opening the dropdown. Selecting a physical device opens interactive screen mirroring through its paired developer connection. The phone sends HEVC video; a bundled native Node-API addon assembles compressed frames and transfers them into Node without copying the frame payload, then the panel decodes them through WebCodecs. MCP serializes the compressed bytes as base64, so the full path is not zero copy. The capture queue is limited to eight frames or 4 MiB and requests a keyframe after overflow. Physical iOS supports pointer taps, long presses, and drags through CoreDevice UniversalHID on the same developer tunnel. Input starts after a fresh video frame, uses normalized touchscreen coordinates, and releases held touches when the stream closes or resets. Screenshot captures the displayed mirrored frame as a PNG, attaches it to chat, and copies the same image to the macOS clipboard. Select annotates screen regions using the mirrored frame's pixel coordinates; native accessibility component names are unavailable. Both controls require a connected device and a ready video frame. Keyboard and hardware-button controls remain disabled. CPU and memory monitoring can attach to an already running development app on a paired iOS 17.4+ device. Mirroring requires Developer Mode and a host with HEVC WebCodecs support. `mobile_list_ios_devices` also returns remembered disconnected devices with their connection state; the picker shows connected devices only. Discovery errors remain visible while available simulators continue to work.
Panels in multiple chats share one physical iOS capture through a local, per-user service. Each panel has an independent queue limited to eight frames or 4 MiB. Opening another panel requests a fresh keyframe without resetting the hardware stream or other panels’ decoders. A slow panel drops its own backlog and requests recovery when it resumes reading; other panels continue receiving frames. Closing a panel removes only its subscription. The final subscription closes the native capture, and the service exits after 30 idle seconds. Concurrent gestures are serialized, and a held touch belongs to the panel that started it. Device Hub runs its own hardware capture and cannot subscribe to this service; close its mirroring window while using Mobile Dev.
Physical iOS mirroring uses the same Apple DeviceKit bezel and framebuffer mask as the matching simulator model. Discovery preserves the hardware product type, which selects the installed Xcode device profile. The bundled Baguette CLI renders its bezel without starting a simulator, and macOS rasterizes its mask. These assets are cached per model outside the video path. A device type stands for its own model identifier plus any regional or cellular variants its profile lists. Older Xcode profiles list none. If Xcode has no matching device type or the render fails, the screen mirrors without a frame, and the plugin looks for that model's frame again after five minutes.
-Ask the agent to inspect or control the app on the selected device. The panel shares both visible device IDs and platforms with the chat. Click a device panel to make it the active device for logs. Hiding a simulator keeps the current log source and buffered logs. Use Mobile Dev's screenshot, accessibility and input tools for the selected platform. Baguette streams iOS and serve-emu streams Android in the panel.
+Ask the agent to inspect or control the app on the selected device. The panel shares all visible device IDs and their platforms with the chat. Click a device panel to make it the active device for logs. Hiding a simulator keeps the current log source and buffered logs. Use Mobile Dev's screenshot, accessibility and input tools for the selected platform. Baguette streams iOS and serve-emu streams Android in the panel.
For mobile app development, the bundled skill tells the agent to open the panel beside the chat before the first device launch, or reuse an open panel. It covers iOS, Android, Expo, React Native, and SwiftUI work. The agent follows your device choice, reuses a suitable running device, or chooses and boots an installed simulator or AVD. It asks only when the choice changes what the task needs. The app project's own tools build, install, and launch the app on that device; the agent reuses an existing app dev server.
@@ -40,7 +40,7 @@ You can request fullscreen or a tool-only workflow. Planning, docs, code review,
Install Android SDK platform-tools and emulator. Create an AVD in Android Studio or connect an Android device and authorize adb access. The Android panel lists devices without booting one. Selecting an AVD boots it if needed, then starts the bundled Node.js serve-emu CLI on a private loopback port. Home, Back, Recents, Lock, pointer gestures, and typing use scrcpy's control socket. Closing the panel leaves the emulator running. AVDs start without a separate emulator window. A failed emulator process reports its exit right away instead of waiting for the boot timeout.
-The Android dropdown shows **Connected devices** first, with USB or Wi-Fi labels, then **Emulators**. It refreshes every three seconds while the Android panel is visible, and when opening the dropdown. Physical devices use ADB discovery: enable USB debugging and authorize the computer, or pair the device for wireless debugging. Offline and unauthorized devices remain visible with their state. Emulators keep their AVD name while unauthorized. An emulator restored from a quick-boot snapshot can stay unauthorized because adb does not repeat the key exchange; the panel reconnects adb at most every 5 seconds while an AVD boots, and for up to 15 seconds after you select an already running emulator. Selecting an authorized phone connects its screen and shares its serial and transport with the chat. Bundled scrcpy mirrors and controls the phone without installing a companion app. Physical Android devices support the existing screen, input, screenshot, native log, and performance tools; emulator boot and stop controls do not apply to them.
+The Android column shows **Connected devices** first, with USB or Wi-Fi labels, then **Emulators**. It refreshes every three seconds while the Android panel is visible, and when opening the dropdown. Physical devices use ADB discovery: enable USB debugging and authorize the computer, or pair the device for wireless debugging. Offline and unauthorized devices remain visible with their state. Emulators keep their AVD name while unauthorized. An emulator restored from a quick-boot snapshot can stay unauthorized because adb does not repeat the key exchange; the panel reconnects adb at most every 5 seconds while an AVD boots, and for up to 15 seconds after you select an already running emulator. Selecting an authorized phone connects its screen and shares its serial and transport with the chat. Bundled scrcpy mirrors and controls the phone without installing a companion app. Physical Android devices support the existing screen, input, screenshot, native log, and performance tools; emulator boot and stop controls do not apply to them.
Android H.264 packets travel through MCP resource reads. The panel decodes them with WebCodecs, so the host must support H.264 `VideoDecoder`. Each device gets its own backend and each panel gets its own stream session. Decoder errors and video backlog request a fresh keyframe on the same connection. The panel drops delta frames until it can decode that keyframe. Requests have a cooldown, and stale decoder callbacks cannot repaint a closed stream. The plugin reuses a matching serve-emu server at port 3300. Set `SERVE_EMU_URL` to reuse another loopback HTTP server; it must already stream the selected serial. Closing MCP stops only backends the plugin started.
diff --git a/docs/telemetry.md b/docs/telemetry.md
index d57ef079..632d363e 100644
--- a/docs/telemetry.md
+++ b/docs/telemetry.md
@@ -526,6 +526,8 @@ Since 0.1.69, inspection timing also includes the bounded Metro source-map looku
Since 0.1.92, Android inspection timing also includes the full-resolution display-size read and bounds scaling. Existing inspection, fallback and tree-processing coverage stays on the active selection path. Display sizes and element bounds remain local.
+The device workspace records the number of selected screens in the numeric gauge `ui.devices.visible`. The layout attribute describes the platforms shown. Workspaces with multiple screens omit device platform and kind attributes because their timing windows can contain work from several devices. Platform-specific frame counters continue to count each painted frame.
+
Since 0.1.93, `ui.video.paint` and the platform frame counters also cover frames drawn to the local buffer while Select freezes the visible screen. These remain bounded plugin processing measurements, not device FPS. Recovery uses the same surface attribution and timing units; screenshots and element details remain local.
`ui.annotations.send` measures the host send round trip, including composer retries. Outcome counters distinguish success, a missing composer, timeout and other failures. Unexpected send failures use a fixed error message. No message content goes to Sentry. A timeout keeps notes for a manual retry; it never triggers an automatic resend, since delivery may have succeeded without acknowledgement.
diff --git a/package-lock.json b/package-lock.json
index ef7da7d6..762cf981 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "mobile-dev",
- "version": "0.1.181",
+ "version": "0.1.182",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "mobile-dev",
- "version": "0.1.181",
+ "version": "0.1.182",
"workspaces": [
"packages/shared",
"packages/core",
diff --git a/package.json b/package.json
index 3cf71ea3..eee8a70c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "mobile-dev",
- "version": "0.1.181",
+ "version": "0.1.182",
"private": true,
"workspaces": [
"packages/shared",
diff --git a/packages/mcp-app/src/components/workspace.tsx b/packages/mcp-app/src/components/workspace.tsx
index 46b0238e..696c7815 100644
--- a/packages/mcp-app/src/components/workspace.tsx
+++ b/packages/mcp-app/src/components/workspace.tsx
@@ -3,14 +3,15 @@ import { useEffect, useRef, useState, useSyncExternalStore } from "react";
import type { ReactNode } from "react";
import type { WorkspaceTools } from "@mobile-dev/ui/workspace-tools.ts";
import { PerformanceView } from "@mobile-dev/ui/components/performance-view.tsx";
-import { SimulatorView } from "@mobile-dev/ui/components/simulator-view.tsx";
+import { DevicePanes } from "@mobile-dev/ui/components/device-panes.tsx";
+import { DevicePicker } from "@mobile-dev/ui/components/device-picker.tsx";
import { LogsView } from "@mobile-dev/ui/components/logs-view.tsx";
import { StorageView } from "@mobile-dev/ui/components/storage-view.tsx";
import { TraceSiftView } from "@mobile-dev/ui/components/tracesift-view.tsx";
import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from "@mobile-dev/ui/components/ui/base-select.tsx";
import { Button } from "@mobile-dev/ui/components/ui/button.tsx";
-import { usePanelRef, useGroupRef } from "react-resizable-panels";
+import { usePanelRef, useGroupRef, type Layout } from "react-resizable-panels";
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@mobile-dev/ui/components/ui/resizable.tsx";
import { useMediaQuery } from "@mobile-dev/ui/components/use-media-query.ts";
import { setUiSurface, setUiTelemetryContext } from "@mobile-dev/ui/telemetry.ts";
@@ -18,8 +19,7 @@ import type { RecordingController } from "@mobile-dev/ui/recording-controller.ts
import { RecordingCard } from "@mobile-dev/ui/components/recording-card.tsx";
import { AppFlowView } from "@mobile-dev/ui/components/app-flow-view.tsx";
-import type { DeviceLayout } from "@mobile-dev/ui/device-layout.ts";
-export type { DeviceLayout } from "@mobile-dev/ui/device-layout.ts";
+import type { DeviceWorkspace } from "@mobile-dev/ui/device-workspace.ts";
// Menu item IDs stay literal so tests and the package smoke check can find them in the bundle.
const tools = {
@@ -32,27 +32,19 @@ const tools = {
type Tool = keyof typeof tools;
const isTool = (value: string): value is Tool => value in tools;
-export function Workspace({ panels, recordingController, banner, displayModeControl, contextControl, automaticLayout, onLayout }: { panels: WorkspaceTools; recordingController: RecordingController; banner?: ReactNode; displayModeControl?: ReactNode; contextControl?: ReactNode; automaticLayout?: DeviceLayout; onLayout: (layout: DeviceLayout, manual?: boolean) => void }) {
+export function Workspace({ panels, recordingController, banner, displayModeControl, contextControl, devices }: { panels: WorkspaceTools; recordingController: RecordingController; banner?: ReactNode; displayModeControl?: ReactNode; contextControl?: ReactNode; devices: DeviceWorkspace }) {
const { logs, performance, storage, tracesift } = panels;
const appFlow = panels["app-flow"];
const [tool, setTool] = useState("logs");
const [savedVisible, setSavedVisible] = useState(false);
const [simulatorsCollapsed, setSimulatorsCollapsed] = useState(false);
- const [layout, setLayout] = useState(automaticLayout ?? "none");
- const manualLayout = useRef(false);
+ const deviceState = useSyncExternalStore(devices.subscribe, devices.getSnapshot);
const recordingState = useSyncExternalStore(recordingController.subscribe, recordingController.getSnapshot);
- useEffect(() => {
- if (automaticLayout === undefined || manualLayout.current || recordingState.recording !== undefined) return;
- setLayout(automaticLayout);
- onLayout(automaticLayout);
- }, [automaticLayout]);
useEffect(() => {
if (recordingState.recording === undefined) return;
- manualLayout.current = true;
setTool("performance");
setSavedVisible(true);
- setLayout("none");
- onLayout("none");
+ devices.clear();
panels.hide();
}, [recordingState.recording?.id]);
const performanceState = useSyncExternalStore(performance.subscribe, performance.getSnapshot);
@@ -82,52 +74,39 @@ export function Workspace({ panels, recordingController, banner, displayModeCont
panels.show(next);
};
const logsRef = usePanelRef();
- const simulatorGroupRef = useGroupRef();
+ const showDevices = deviceState.panes.length > 0 || !!deviceState.message || !open;
+ const deviceShare = split ? Math.min(80, 36 * Math.max(1, deviceState.panes.length)) : 60;
const workspaceGroupRef = useGroupRef();
- useEffect(() => { if (open) logsRef.current?.expand(); else logsRef.current?.collapse(); }, [open, split, layout]);
+ const resizedLayout = useRef(undefined);
+ useEffect(() => { if (open) logsRef.current?.expand(); else logsRef.current?.collapse(); }, [open, split]);
useEffect(() => {
- let simulatorsPending = layout !== "none";
- let workspacePending = true;
- // Hidden hosts defer group initialization; retain the request until the groups are measurable.
+ // Hidden hosts defer group initialization until the page becomes measurable.
+ const container = document.getElementById("workspace-panels")!;
+ let pending = true;
+ resizedLayout.current = undefined;
const applyLayout = () => {
- const simulators = simulatorGroupRef.current;
- if (simulatorsPending && simulators) {
- const current = simulators.getLayout();
- const panelIds = Object.keys(current);
- if (panelIds.length > 0) {
- simulatorsPending = false;
- simulators.setLayout({ "ios-resizable": layout === "android" ? 0 : layout === "both" ? 50 : 100, "android-resizable": layout === "ios" ? 0 : layout === "both" ? 50 : 100 });
- }
- }
+ if (!container.clientWidth || !container.clientHeight) { pending = true; return; }
+ if (!pending) return;
const workspace = workspaceGroupRef.current;
- if (workspacePending && workspace) {
- const current = workspace.getLayout();
- const panelIds = Object.keys(current);
- if (panelIds.length > 0) {
- workspacePending = false;
- workspace.setLayout({ "tools-resizable": layout === "none" ? 100 : split ? 64 : 40, "simulators-resizable": layout === "none" ? 0 : split ? 36 : 60 });
- if (isOpen() === false) logsRef.current?.collapse();
- }
- }
- if (simulatorsPending === false && workspacePending === false) observer.disconnect();
+ if (!workspace) return;
+ const current = workspace.getLayout();
+ if (Object.keys(current).length === 0) return;
+ pending = false;
+ const share = showDevices ? deviceShare : 0;
+ workspace.setLayout(resizedLayout.current ?? { "tools-resizable": 100 - share, "simulators-resizable": share });
+ if (isOpen() === false) logsRef.current?.collapse();
};
const observer = new ResizeObserver(applyLayout);
- observer.observe(document.getElementById("simulator-panels")!);
- observer.observe(document.getElementById("workspace-panels")!);
+ observer.observe(container);
applyLayout();
return () => observer.disconnect();
- }, [layout, split, tool]);
- const toolPanel = {
- if (!previous) return;
- if (size.inPixels <= collapsedToolSize + 1 && isOpen()) closeTools();
- else if (size.inPixels > 80 && isOpen() === false) showTool(tool);
- }}>{tool === "logs" && }{tool === "storage" && }{tool === "tracesift" && }{tool === "app-flow" && open && }{tool === "performance" && open && (savedVisible ?
: )};
- // The sidebar keeps these controls under its simulators. Fullscreen, or no visible
- // platform, moves them above the tools.
- const bottomToolbar = !fullscreen && layout !== "none";
+ }, [showDevices, split, tool, deviceShare]);
+ const bottomToolbarClosed = !fullscreen && !open;
+ const toolPanel = {tool === "logs" && }{tool === "storage" && }{tool === "tracesift" && }{tool === "app-flow" && open && }{tool === "performance" && open && (savedVisible ?