Agentic UI: Add Open in actions to the site overview - #4469
Conversation
📊 Performance Test ResultsComparing 9443c6c 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) |
| const connector = useConnector(); | ||
| const isStarting = useIsSiteStarting( site.id ); | ||
| const isStopping = useIsSiteStopping( site.id ); | ||
| const [ deleteOpen, setDeleteOpen ] = useState( false ); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
I think this is already clear in the code so the comment can be cleaned up. What do you think?
katinthehatsite
left a comment
There was a problem hiding this comment.
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?
|
Another thought while I am already reviewing this, is that I would definitely rename |
| void connector.openSiteInTerminal( site.id ).catch( ( error ) => { | ||
| console.error( 'Failed to open site in terminal:', error ); | ||
| captureException( error ); | ||
| alert( __( 'Could not open the terminal.' ) ); |
There was a problem hiding this comment.
Let's use the app toasts here
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
Testing Instructions
Automated verification:
npx eslint --fixon all modified filesnpm run typechecknpm test -- apps/ui/src/components/open-in-menu/index.test.tsx apps/ui/src/components/site-overview-view/index.test.tsxnpm run cli:build:uiPre-merge Checklist