DEV Community

Cover image for Click the running app, land in the code: Ingot's Visual editor
Ingot
Ingot

Posted on

Click the running app, land in the code: Ingot's Visual editor

The usual way to change a button is to hunt for it. You look at the page, guess the component, search for a class name, and hope you opened the copy that is actually on the screen.

We wanted the click itself to be the navigation.

Ingot is a desktop AI IDE for macOS, Windows and Linux, now in beta. The Visual editor is its own mode on top of App Preview: your running app large in the middle, the code beside it, the agent chat on the right, and your components at the bottom. Click an element and you land in the line that draws it. Minimize the mode and the IDE is back exactly as you left it.

A short demo of the loop is here: https://youtu.be/goSSFTCTYFs

The Visual editor in dark mode: ProductCard.jsx beside a live App Preview of a React shop, the Buy button outlined with its tag and size, the element as a chip in the agent chat, and the component library strip at the bottom

The Visual editor in dark mode: click an element in the running app and land in the source. The selected element is a chip in the chat, and the component library sits under the preview.

Open the Visual editor

Open your app in App Preview — a running dev server, a port, or any URL — then click Visual edit in the preview toolbar, click the Visual editor pencil in the title bar, or press ⌥⇧V (Alt+Shift+V) while the preview has focus. Find Action also has App Preview: Toggle Visual Edit.

The mode lays out:

  • the live preview large in the middle, with a tab per page (and per pinned component) and a toolbar on one line: address, port, Responsive device menu, width × height, zoom, Visual edit, Pick element, the component library, and Run (which starts your dev, start or serve script in a terminal)
  • the code beside it: your open files as tabs, and the selected element's file at its line
  • the agent chat on the right
  • the component library as a strip at the bottom

Minimize in the preview's tab strip, press Esc or ⌥⇧V, or click the same button again to close the mode. Your tabs, the side bar and the bottom panel are as you left them. Open the mode again and it continues where you were. The Visual editor never changes your saved layout.

The Visual editor in light mode: ProductCard.jsx open at the Buy button, a live App Preview of React 19 Shop with the button outlined, a chip in the chat, and live component cards at the bottom

The same mode in light mode, on a small React shop. The selected Buy button is outlined, and its source is open at ProductCard.jsx, line 8.

Hover, click, land in the code

Hover outlines the element under the pointer. Its tag names the component first, then the element and its size, for example PayButton · button.pay.primary 73×35.

Click selects the element. The outline stays, and its file opens beside the preview with the caret on the element's line and column. Keep clicking: each click selects the next element. Links and buttons are selected, not followed or pressed.

That click-to-source path comes with Bronze and up. On another plan, the button stays and shows which plan has it.

Tell the agent, with the element attached

The selected element also goes into the agent chat as a chip, for example button.buy · ProductCard.jsx:8. Type what you want next to it — "match the design: say Pay 72.00 €" — and send. The agent gets the element path, props, source file and line, selector, styles and HTML, together with your words. A new click replaces the chip, so the chat always holds the element you are looking at. Hover the chip for its file, line and element; the copy icon on it copies the full element details.

The agent proposes edits you review, as in any other Ingot run: accept what belongs, reject what does not, then check the preview.

When two places could have drawn it

Sometimes two places in your code match the element equally well — the same button written twice, for example. The chip then shows both, such as Toolbar.jsx:9 and Toolbar.jsx:5. Click one: it opens, and it is the one your edits and the agent use.

The Visual editor with the More link selected. The agent chat chip shows button.link and two equally good source matches, Toolbar.jsx:9 and Toolbar.jsx:5

The More link is selected. The chip in the chat shows two equally good matches in Toolbar.jsx, so you can choose which one to open.

The same ambiguous-match chip in dark mode

The same choice in dark mode.

The path bar, and editing props and styles

Under the preview, the path bar shows Page › … › Component › element, with the selected element highlighted. On the right: a button that opens the file at that line, the props icon, a pin that adds the component as a preview tab, and × to clear the selection.

The props icon opens a panel beside the page. The page narrows, so every element stays clickable. Esc or × closes it. The panel shows the element's props or attributes and its styles. Hover a value and click the edit control (or double-click it), type, and press Enter:

  • Text is written as the plain text between the tags in the JSX.
  • A prop or attribute is written as its string value in the JSX, keeping its quotes. class is written as className.
  • Add attribute adds a new attribute to an HTML tag, as name=value.
  • A style is written to the CSS rule of the element's class, or to its CSS-module rule. If there is no rule, Ingot writes an inline style on the element.

Each change is one undoable edit in the file's editor, saved, and the page shows it at once while your dev server reloads. A note says where it went.

Ingot never guesses. An expression such as value={total}, nested markup, a prop a component does not write in its JSX, or a style that two CSS rules could take is left as it is. The note says why, and the request goes into the chat box, so one Enter hands it to the agent.

The props and styles panel open beside a narrowed preview, with a note that two CSS rules could take a color style, and the same request already filled in the agent chat box

The props and styles panel after a color change that two CSS rules could take. Ingot leaves the style alone, explains why, and puts the request in the chat box.

The same props and styles panel in dark mode

The same panel in dark mode.

The element in the chat, editing props and styles, and the component library come with Silver, Gold and Platinum.

The component library

The strip at the bottom shows your components, grouped by folder, and your UI packages (the components their API exports, read from node_modules). You can search, pick a folder or a package, and:

  • Live cards show a component as your page draws it right now. Components that are not on the page show their name and outer element.
  • Drag a card into the code to write the component where you drop it, or onto the preview to write it after the element under the pointer. The import is added when the file does not already have it: a relative path for your components, the package name for packages.
  • + From selection asks the agent, in the chat box, to make a new component from the selected element.
  • Open package opens its package.json. When a newer version is out, Update runs the install in a terminal. Double-click a card to open the component.

How Ingot finds the source

Nothing is added to your project: no plugin, no package, no config file, and it does not matter how you start your dev server. Ingot keeps its own index of the project's JSX, TSX, HTML, Vue and Svelte — in memory, never written to the project — and matches each click against it.

  1. The index. Every element written in your code, with its file, line and column, its tag or component, the component whose code writes it, its static class names, its text, and attributes that identify it (id, data-testid, aria-label, href, type, placeholder, and more). Saving a file updates the index at once.
  2. The click. The preview sends what the page knows about the element: tag, classes, text, those attributes, the elements around it, and the component names the framework gives at runtime, if any.
  3. The best match opens. Ingot scores the places that could have drawn the element and opens the best one at its exact line. CSS-module class names match their key, and a component usage can be found by the text it passes.

An element drawn inside a library component resolves to your code that uses it, not to the library's file.

What a dev build says about itself — for example React 18, Vue or Svelte dev data — is used as an extra signal only. It is never required. React 19, plain JSX and every bundler work the same way.

Pick element in App Preview, outside the mode, still picks one element for the agent and then stops.

Working together

In an Ingot Together session, the elements your teammates selected on the same page show with an outline in their colour and their name, and their initials show in the preview's tab strip.

Two teammates' selections on the same App Preview, each with a coloured outline and a name tag, while ProductCard.jsx stays open beside the preview

Two teammates' selections on the same preview, each with an outline and a name tag.

The same Ingot Together selections in dark mode

The same Together view in dark mode.

What's in the beta, and what it costs

The Visual editor is in the desktop beta, and it is still being built: names, settings and defaults may change before the feature fully ships. What we describe here is what the public docs say it does today.

The editor itself is free. AI starts at $15 a month (Ingot Bronze). Click-to-source — the mode, hover, click into the file, and the element path — comes with Bronze and up. The full Visual editor — the element in the chat, editing props and styles, and the component library — comes with Silver, Gold and Platinum.

Founding teams get Ingot Platinum at $25 a seat for the first year. Ask through ingotide.com/pricing, or email us at hello@ingotide.com.

Try it

Top comments (0)