Dev Preview
An embedded browser that runs your project's dev server behind a stable proxy origin, with device emulation, an Output/Console/Diagnostics drawer, the Element Picker, script discovery across nine sources, and stops that stay stopped across a relaunch.
Overview
A Dev Preview panel runs your project's dev server and shows what it serves in a browser embedded inside Daintree. Your UI updates as agents change the code, without a second window to tab into. Each panel owns its own dev-server session, keyed by project and panel, so several previews can run side by side without colliding.
The panel's toolbar is the one the Browser panel uses, plus a device-mode toggle and a console toggle that only Dev Preview shows. Underneath, the webview never talks to the dev server directly: it loads a fixed proxy origin that Daintree owns, which is what keeps cookies and localStorage intact across a dev-server restart. The address bar still shows the dev server's own address and route, such as localhost:5173/dashboard, so you read, type and copy addresses the way you would in any browser. That mechanism is described in How the preview is served.
Starting a preview
The launcher in the toolbar is the primary way in: open it and pick Dev preview. That row dispatches devServer.start (Open dev preview in the command palette), which opens a panel titled Dev server with the project's configured dev command already loaded and starts it, rather than a bare preview you then have to configure. The panel palette (Command-N Control-N Control-N ) and the Dev preview item in a worktree card's menu still work and land in the same place.
Show, hide or reorder the Open dev preview toolbar button in Settings > Toolbar. On a fresh profile the browser and dev-preview buttons live in the launcher's panel tray rather than as standalone toolbar buttons; saved layouts are left alone. Like a Browser panel, a Dev Preview can move to the dock: the live preview opens from the dock in a popover, and the server keeps running.
Empty states
A panel with no dev command shows one of two prompts, depending on whether Daintree found a likely script. Detection runs again each time a panel opens, so a package.json added after the project was opened is still picked up.
If it found a candidate, the panel shows Start the dev server and:
- A Detected chip with the full command, exactly as it will run
- A Run button, which saves that command to project settings and starts it
- A Run another script… menu listing every other detected command
- An Open project settings link for configuring the command by hand
If nothing was detected, the panel shows Set a dev command with a Dev command field (placeholder npm run dev) and a Run button. Run stays disabled while the field is empty or holds more than one line. If project settings can't be updated, the panel says Couldn't save the command and offers Retry.
Once a command is configured, a stopped server shows Start the dev server with the command and a Start dev server button. A server that is running but hasn't printed a local URL yet shows Waiting for the dev server's address with View terminal. A failed start replaces the page with a named error (Port conflict, Missing dependencies, Permission denied or Dev server error), a Retry button (Retry install for missing dependencies), and the next place to look: View terminal, or Open project settings for a port conflict. See Fix a Dev Preview.
Switching scripts
Once a command is configured, the panel header carries a dev-script switcher showing the active script's name; its tooltip reads Switch dev script followed by the command. It lists every detected candidate with its command, with a check beside the one in use. Picking a different one saves it to project settings and stops the server running the old command.
The rest of Dev Preview
- Discovery and serving for how Daintree finds your dev command, picks a port, and puts a stable proxy origin in front of it, plus what happens to a session when you stop it, close the panel or relaunch.
- Tools for the toolbar, device emulation, find in page, the Element Picker, and the Output, Console and Diagnostics drawer.
- Element Picker for clicking an element on your running site, seeing its components and source as far as the framework's dev build exposes them, and sending a request about it to an agent in the same worktree.
- Troubleshooting for a server that is slow to start or keeps crashing, a page that won't load, live reload that stopped, and blocked navigation.
Beyond one panel
Several things lift Dev Preview out of its own panel.
The toolbar's links launcher has a Dev servers section that lists every dev-server session Daintree is running, across worktrees and projects, with each one's status and address and per-row restart and stop buttons. Click a running server to bring its preview forward when this window can show it; a server in another project opens in your system browser instead. A session restored from the last run stays listed with a Start button, because it is an offer to restart. The launcher's button appears on its own while any dev server is starting, installing, running, stopping or has failed; for a restored server alone, open it with Open links from the command palette. See Dev servers for the details.
Worktree cards and Running processes
A worktree card's menu carries Start dev server, Restart dev server and Stop dev server for that worktree's preview, offering only the ones that apply right now. The Running processes view lists every live terminal across projects and windows, dev servers included; open it from the resource readout at the foot of the sidebar. Its Kill button on a dev server's row asks Stop '…'? and stops the server through its preview with Stop dev server, rather than killing the process out from under the panel.
Wherever a stop comes from (the drawer, the links launcher, a worktree card or Running processes), it sticks: the panel stays stopped through remounts, project hibernation and a relaunch until you press Start dev server or pick a restart option. See Stops that stick.
Agent control
The in-app Assistant reaches two of these controls in its Full tool set: devPreview.reloadPreview and devPreview.restart. Console output is readable through browser.getConsoleMessages, also in Full, which targets dev-preview panels specifically. These browser and preview actions are absent from the external API-key MCP surface. See MCP Server and Daintree Assistant.
Two-pane layout
Dev Preview pairs well with the two-pane split: an agent on one side, your running app on the other. Turn on Preview-focused layout in Settings > Panel grid > Layout and, when exactly one of the two panels is a preview (Dev Preview, Browser or Review), the split gives it 65% of the width instead of half.
Settings reference
- Command: the dev server command to run (e.g.
npm run dev). Settings > Project > General, under Dev server - Load timeout: how long to wait for the server to respond, 1 to 120 seconds, default 30. Same section
- Use Turbopack for Next.js: on by default, and only affects Next.js 15 and newer; see Turbopack for Next.js. Same section
- Environment variables: injected into the dev server process. Settings > Project > Variables
- Preview-focused layout: gives a Dev Preview, Browser or Review panel 65% of a two-pane split. Settings > Panel grid > Layout
- Open dev preview toolbar button: show, hide or reorder it. Settings > Toolbar
Device, rotation, DPR, fit and drawer state are per-panel state Daintree remembers, not Settings options.