Skip to content

Agentic UI: Fix the preview landing on the home page when opening a URL on a stopped site - #4370

Merged
bcotrim merged 1 commit into
trunkfrom
fix-preview-path-on-stopped-sites
Jul 30, 2026
Merged

Agentic UI: Fix the preview landing on the home page when opening a URL on a stopped site#4370
bcotrim merged 1 commit into
trunkfrom
fix-preview-path-on-stopped-sites

Conversation

@bcotrim

@bcotrim bcotrim commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Related issues

  • N/A

How AI was used in this PR

Claude Code traced the race and wrote the fix and tests. I found the bug by hand and verified the fix in the app.

Proposed Changes

Opening a URL in the preview on a stopped site landed on the site's home page instead of the requested page — you had to click a second time. The site was started first and the preview pointed at the destination after, so the preview mounted on the previous path while the start was still in flight, and the load it reported back overwrote the destination. It's now pointed at the destination before the site starts.

Testing Instructions

Agentic UI, with a stopped site.

  1. From the site's Overview tab, click a WordPress link (e.g. wp-admin).
  2. The site starts and the preview lands on that page. Before this PR it landed on the home page and needed a second click.
  3. Repeat with the site already running — unchanged.

Pre-merge Checklist

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

🤖 Generated with Claude Code

@bcotrim bcotrim changed the title Fix the preview landing on the home page when opening a URL on a stopped site Jul 28, 2026
@bcotrim
bcotrim requested review from nightnei and sejas July 28, 2026 11:27
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 5df38f9 vs trunk

app-size

Metric trunk 5df38f9 Diff Change
App Size (Mac) 1375.36 MB 1375.36 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk 5df38f9 Diff Change
load 1045 ms 1084 ms +39 ms ⚪ 0.0%

site-startup

Metric trunk 5df38f9 Diff Change
siteCreation 6535 ms 6499 ms 36 ms ⚪ 0.0%
siteStartup 2386 ms 2383 ms 3 ms ⚪ 0.0%

Results are median values from multiple test runs.

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

@nightnei nightnei 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.

Great catch, I confirm that I reproduced the issue in trunk and it's fixed here 👍

@bcotrim
bcotrim merged commit 4802682 into trunk Jul 30, 2026
16 of 17 checks passed
@bcotrim
bcotrim deleted the fix-preview-path-on-stopped-sites branch July 30, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants