Skip to content

Agentic UI: Add Open in actions to the site overview - #4469

Open
shaunandrews wants to merge 5 commits into
trunkfrom
add-overview-open-in
Open

Agentic UI: Add Open in actions to the site overview#4469
shaunandrews wants to merge 5 commits into
trunkfrom
add-overview-open-in

Conversation

@shaunandrews

@shaunandrews shaunandrews commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

AI helped extract the Open in experience and overview shortcut styling from the larger site-overview prototype into an independently reviewable change. I reviewed the resulting diff and verified it independently.

Proposed Changes

SCR-20260806-nord
  • Bring the familiar Open in actions onto the Agentic UI site overview so users can hand a site off to Finder, their configured editor, or their terminal without first opening the preview menu.
  • Keep phpMyAdmin alongside those local development tools, matching the workflow available in the Classic Studio overview.
  • Present Customize, Open in…, and Manage as consistent responsive button grids that expand to three columns and collapse cleanly with the preview open.
  • Hide actions that are unavailable in the current host or have not been configured, avoiding controls that cannot complete successfully.
  • Match Classic's terminal failure handling with console logging, Sentry reporting, and a user-facing alert.

Testing Instructions

  1. Open a local site's Overview tab and confirm an Open in… section appears between Customize and Manage.
  2. Confirm Finder, the configured editor, Terminal, and phpMyAdmin open the expected destination.
  3. Clear the preferred editor and confirm its shortcut is omitted while the remaining actions stay available.
  4. Hide and show the preview panel. Confirm all three shortcut sections use equal-width columns and reflow without clipping or wrapping labels.
  5. Run the hosted UI and confirm the entire Open in… section is omitted where local OS integration is unavailable.
  6. Check the overview in both Light and Dark appearances.

Automated verification:

  • npx eslint --fix on all modified files
  • npm run typecheck
  • npm test -- apps/ui/src/components/open-in-menu/index.test.tsx apps/ui/src/components/site-overview-view/index.test.tsx
  • npm run cli:build:ui

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@shaunandrews
shaunandrews requested review from a team and bcotrim August 6, 2026 18:29
@shaunandrews
shaunandrews marked this pull request as ready for review August 6, 2026 18:29
@wpmobilebot

wpmobilebot commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 9443c6c vs trunk

app-size

Metric trunk 9443c6c Diff Change
App Size (Mac) 1403.26 MB 1403.29 MB +0.03 MB ⚪ 0.0%

site-editor

Metric trunk 9443c6c Diff Change
load 1075 ms 1036 ms 39 ms ⚪ 0.0%

site-startup

Metric trunk 9443c6c Diff Change
siteCreation 7518 ms 7514 ms 4 ms ⚪ 0.0%
siteStartup 2898 ms 2885 ms 13 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

const connector = useConnector();
const isStarting = useIsSiteStarting( site.id );
const isStopping = useIsSiteStopping( site.id );
const [ deleteOpen, setDeleteOpen ] = useState( false );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that sometimes we can start two actions at the same time, for example, from the Manage section list. I can start duplicating a site and then start the deletion process right away. What do you think of disabling some of these actions while others are running e.g. the site can't be deleted while being duplicated?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that issue and start working on a fix a while back: #4406
I'm hoping I can find a good solution that doesn't require to check the condition in all buttons. Let's address this issue in that follow-up

/**
* The apps a site can be handed off to. Mirrors the preview toolbar's
* "Open in…" menu, minus the browser (the preview itself is the browser here)
* and plus phpMyAdmin, which the classic overview also grouped with them.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is already clear in the code so the comment can be cleaned up. What do you think?

@katinthehatsite katinthehatsite left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good, I tested all the actions and they worked well 👍

One suggestion that I had is that when the site is deleted, you are brought to the chat of another site even though you are deleting a site from the overview tab. What do you think about bringing the user instead to the overview tab of another site for a more natural transition?

@katinthehatsite

Copy link
Copy Markdown
Contributor

Another thought while I am already reviewing this, is that I would definitely rename Export DB to Export database because DB might not be clear for some users, especially when this gets translated.

void connector.openSiteInTerminal( site.id ).catch( ( error ) => {
console.error( 'Failed to open site in terminal:', error );
captureException( error );
alert( __( 'Could not open the terminal.' ) );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use the app toasts here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants