Element Picker
Use the Element Picker built into every Dev Preview to select an element on a running Svelte, React, Vue, Angular, Astro, Preact or Solid site, see its components and source file as far as the dev build exposes them, and send a written request about it to an agent in the same worktree.
Overview
The Element Picker turns a Dev Preview of your own site into a way to point at what you want changed. Click an element on the running page and Daintree shows what the page's framework says about it: the components it sits inside and, where the development build exposes it, the source file and line that rendered it. Then write what should change and send it to a coding agent in the same worktree, one you already have running or a new session.
It is part of every Dev Preview, not a plugin, so there is nothing to install or enable. It works on any page your dev server serves. Svelte, React, Vue, Angular, Astro, Preact and Solid pages are recognized and traced as far as that framework's development build allows; any other page still gets DOM-level picking. The picker only reads. It never writes to your project: the agent you hand the request to makes the edit, in its own terminal, where you can watch and review it like any other agent work.
The same tool, with the same strip and drawer, also works in a Browser panel showing a page at a local address.
Before you start
- A dev server, in development mode. Source locations come from what the framework's development build attaches to the page, so run the project's dev command (
vite dev,next devand the like), not a production build. A production build loses source tracing, though some frameworks still name their components there (React keeps its component chain, for example); on a Svelte production build the drawer says elements can't be traced to source. You can still pick, and a request carries the DOM-level details. - A worktree. Locations are checked against the files in the preview's worktree, and requests go only to agents there. A preview with no worktree behind it reports Preview only: a request still carries what the page reports, but nothing is checked against source.
- An agent to send to. With no agent available to send to, Send stays off and the note under it says no agent CLI was found and to install Claude Code, Codex or Gemini CLI, with Open agent settings.
Pick an element
Every Dev Preview toolbar has an Element Picker button (a dashed square with a pointer) after the address bar. Click it to switch the picker on. You can also run Toggle Element Picker from the command palette, which acts on the focused Dev Preview, or the worktree's first open one, and opens a Dev Preview first if the worktree has none. Click the button again, or Close Element Picker at the end of the strip, to switch it off.
A strip appears under the toolbar with a Browse / Inspect switch. It starts in Inspect, and the strip reads "Click an element to ask an agent about it". In Inspect, the cursor becomes a crosshair and clicks on the page select elements instead of following links or pressing buttons. Switch to Browse to use the site normally, then back to pick.
Hovering outlines the element under the pointer with a dashed line and a label naming it and the component it sits in. A selection gets a solid outline, blue for an element and violet for a component.
Click an element to select it. With the page focused in Inspect, the keyboard moves the selection:
- The arrow keys walk the rendered tree from the selection: up to the parent, down to the first child, left and right through siblings.
- Option-Up Arrow Alt-Up Arrow Alt-Up Arrow widens the selection to the next component up the trail that the picker can select, usually the one that drew the element, then the one around that. Components the framework can't name or locate on the page are skipped. The strip marks a component selection with a Component badge.
- Escape clears the selection. Deselect on the strip does the same from anywhere.
The strip shows the trail of components above the selection, and each crumb that can be picked selects that component.
What the drawer shows
Once something is selected, a drawer opens beside the page. It stays closed while there is nothing to show, so the site keeps its full width while you browse. Fold it away and back with the details button on the strip, and drag its left edge to resize it. In a narrow pane it floats over the page rather than squeezing the site into a different breakpoint.
- The selection: the element's tag (or Component) and label, the source file and line with Copy path and Open in editor, and the components it sits in. On a page that names no source, it shows the selector a request will quote instead.
- What a request can claim: a short notice when the answer is less than a file and line, such as "Two or more files could own this element" (with a button to select the component around it when that can be selected), "No source reported for this element", or "No file or line for this element" when the page traced the components around it but not the element itself.
- Site source: appears only when there is something to say about the project rather than the element. When the worktree holds more than one app and Daintree can't tell which one this preview shows, it asks you to choose, beside the preview's address and the folder its server runs in. For a SvelteKit app on a Svelte or SvelteKit major other than the tested Svelte 5 and SvelteKit 2, it says Toolchain not verified, and the request carries the same note. It also says when it could not read the site source.
- The request composer: described below.
How sure the location is
Every name and location starts as something the page reported, and Daintree checks it against your files before relying on it. A path is only accepted inside the worktree. A Svelte location is checked against the .svelte file; a React location is mapped through the dev server's source maps and then checked against the file where the map allows. There is no confidence score. When nothing could be checked, the drawer shows the reported path marked Not checked, and when two or more files fit, it says so rather than choosing one. The request spells out, for each source line, whether it is as the page reported it, mapped through a source map, or checked against the file.
A location is tied to the file as it was read. If the file changes after you select (an agent's edit, for example), the selection is marked stale and Daintree selects the same element again once the preview updates. If it can't, the drawer asks you to select it again rather than sending a stale location.
How far each framework is traced
The picker reads only what each framework's stock development build exposes. Nothing is injected into your project to get more, and where a build exposes nothing, the drawer says so instead of guessing.
| Framework | What the picker gets |
|---|---|
| Svelte, SvelteKit | The element's file and line, checked against the .svelte file where it can be resolved, and the components around it. For SvelteKit, the route and its files when a route matches. |
| React, Next.js | Component names and chain, and file and line from React's development stack when the dev server's source maps can place it. Next.js server components show in the chain. |
| Vue, Nuxt | The component chain and, where Vue exposes it, each component's file as a hint. Lines only when the project uses vite-plugin-vue-inspector. |
| Angular | The components around the element and each component class's file. Template lines only when the app turns on template source locations. |
| Astro | File and line from the stamps Astro's dev toolbar adds. An island hands off to the framework that hydrates it. |
| Preact | The component chain, and file and line where a development JSX transform recorded them. |
| Solid | No component names. A location only with solid-devtools' locator turned on, quoted as the page reported it and not checked. |
| Anything else | DOM-level picking: a selector, a markup excerpt, the computed styles that matter, and a screenshot when one can be taken. |
Send it to an agent
Under the selection, the composer has three parts:
- Target: what the request is about, the element itself, one of the components around it, or the outermost file it was placed in (a route's
+page.svelte, say). It shows when there is more than one choice. It follows what you picked, but a draft you have started keeps pointing at what it was written about, with a Switch to button for the new selection. - The request: what should change, in your words (placeholder "What should change?", or "What should change in" and the component's name). Suggestions under it put exactly the words they show into the draft, and they follow what you picked: Add a hover state for a button, Fix the crop on mobile for an image, Polish the design for a component.
- The destination: Running in this worktree lists agent terminals already open in the preview's worktree. Start a new session offers each available built-in agent whose prompt Daintree can recognize, with Claude, Codex and Gemini first; until Daintree knows which agents are available, it offers those three. Agents in other worktrees are never offered, because the source paths in the request would be wrong there.
Press Send or Enter (Shift+Enter for a new line). Daintree types the request into the agent's own input once it sees the agent waiting at its prompt, so a busy agent gets it when it finishes rather than in the middle of a turn. A Requests list under the composer tracks each one: requests wait in one queue per composer, the first as Next for its agent and the rest as Queued for theirs, then Starting for a new session and Sent to the agent, with View changes once it is in. The first waiting request has Send now, which stops waiting for the prompt but keeps the checks that it is the same session and worktree. If Daintree can't confirm the request went in, the row reads Unconfirmed in the agent and asks you to check the terminal before retrying, so the agent doesn't get it twice. A waiting request follows a selection that was traced again after an edit. Just before typing, Daintree checks the cited files against the versions the request was built from; if they no longer match, nothing is typed, and Edit request puts your words back.
What is sent
The Includes row above Send lists what the request carries, and opens to the exact text Send types and the screenshot it points to. The request gives the agent references, not file contents, so it reads the source itself:
- your words and the target
- the worktree, the app and, for SvelteKit, its installed versions and the route's files
- the page address, with login details, query values and the fragment removed (query keys stay), and the viewport size
- each source location and how far it was checked, and the components around the element
- a selector, a markup excerpt with credentials and parameter values in URLs and the state of editable fields redacted (ordinary text stays), and the computed styles that say something about the element
- when one could be taken, a reference to a screenshot cropped from the preview at selection, which shows whatever is visible on the page there; never in a window attached to another machine
Your draft and the requests still waiting for their agent survive closing the picker.
Limits
- Local pages only. On a page that isn't at a local address (an external site the app linked to, an identity provider), the strip says it has paused, and the picker picks up again on the next local page.
- DevTools. The picker talks to the page through the same debugging channel DevTools uses. Opening DevTools on the preview can disconnect it, and the strip says DevTools may have taken over; press Reconnect.
- A worktree is required to trace. Without one, the drawer reports Preview only and nothing is checked against source.
- No source locations. A production build, a framework the picker doesn't recognize, or one whose dev build reports no locations gets DOM-level picking, plus whatever component names the build still exposes, never a guessed file.
- Server-rendered Svelte pages. Svelte's dev build can tag an element with a neighbor's location on a server-rendered page. Daintree places most of these from the template's structure; when it can't, the drawer says the reported location doesn't match the file. Switch to Browse, open the page from a link inside the preview, then select the element again.