Agentic UI: Add the Open in… split button to the preview toolbar - #4365
Agentic UI: Add the Open in… split button to the preview toolbar#4365bcotrim wants to merge 48 commits into
Conversation
📊 Performance Test ResultsComparing 48d70a2 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
8e72208 to
42381fd
Compare
…r-tabs' into stu-2012-add-preview-omnibox # Conflicts: # apps/ui/src/components/site-preview/address-bar.tsx
42381fd to
0d3b4d2
Compare
stu-2012-add-preview-site-search # Conflicts: # apps/ui/src/components/site-preview/address-bar.test.tsx # apps/ui/src/components/site-preview/address-bar.tsx # apps/ui/src/components/site-preview/index.tsx
…' into stu-2086-add-open-in-split-button
…-omnibox # Conflicts: # apps/ui/src/components/site-preview/address-bar.module.css # apps/ui/src/components/site-preview/address-bar.test.tsx # apps/ui/src/components/site-preview/address-bar.tsx # apps/ui/src/components/site-preview/index.tsx
There was a problem hiding this comment.
I tested the PR and it works as expected. A few inconsistencies I found:
The phpMyAdmin has a weird state in the main part of the preview button. And depending on the size of Studio window it shows only the sidebar, kind of the mobile version of phpMyAdmin (minute 0:27 of the video).
I noticed that Open in Browser opens the current preview page, Frontend, wp-admin or phpMyAdmin. While the rest of buttons open the site in finder, IDE, terminal.
phpMyAdmin is a bit different because it doesn't open the site in any app, it just navigates there. I suggest removing this item from the dropdown and having it always available in the center part.
Open in browser wp-admin should append the magic path to auto-login with the redirect URL, currently users need to enter their credentials in the browser and the magic link is not used.
open-in.mp4
|
Thanks @sejas can you take another look, please? |
I had the same thought while testing this. The options in the dropdown menu seemed mixed as some of them were related to the IDE and some of them to browser so it was a bit of a mixed bag. I have not tested the newest changes yet though |
katinthehatsite
left a comment
There was a problem hiding this comment.
For me, the changes mostly worked well. One thing that was making me confused is the default icons, for example, when the site is stopped:
For example, not every user might know what the default icon for the iTerm is.
Also, how do I, for example, choose Cursor. I have it installed, I see it in the classic UI but it is not present here?
…-split-button # Conflicts: # apps/ui/src/components/site-preview/address-bar.test.tsx # apps/ui/src/components/site-preview/address-bar.tsx # apps/ui/src/components/site-preview/index.tsx
Co-authored-by: Antonio Sejas <antonio.sejas@automattic.com>
Oh interesting, I am not sure why I am not seeing it with the most recent change 🤔 I did notice that when I select open in browser for one site, the selection persists for all sites. Should it be a per site preference? Screen.Recording.2026-08-04.at.11.11.13.AM.mov |
|
Thanks for testing again @katinthehatsite Added 3e71974 to address the icon issue, changing the browser icon to one that I think it makes it clear that it is an external app and not the preview panel. What do you think? 48d70a2 addressed another issue with a stale check for installed apps, maybe why you couldn't find Cursor earlier. Please let me know if this looks good to merge now 🙇 |
Looking 👀 |




Related issues
How AI was used in this PR
Claude Code ported
open-in-menu/from the Design Preview exploration (45fd6fb4c, #3975) and wrote the tests. I reviewed the diff and tested in the app.Proposed Changes
The preview toolbar's external-link icon becomes an Open in… split button: the left half repeats the last destination (persisted), the chevron opens Browser, Finder/File Explorer, editor, terminal, phpMyAdmin. Browser opens the page currently shown in the preview, and is the only destination disabled while the site is stopped.
The control itself stays in the toolbar in every state, including stopped — unlike the button it replaces, which #4366 moved inside the
canPreviewguard — so files, editor and terminal are reachable without starting the site first.Testing Instructions
Needs agentic features enabled.
Pre-merge Checklist
🤖 Generated with Claude Code