Skip to content

Agentic UI: Strip local domain suffix from publish flow domain suggestion - #4743

Open
bcotrim wants to merge 1 commit into
trunkfrom
stu-2393-strip-local-domain-in-publish-flow
Open

Agentic UI: Strip local domain suffix from publish flow domain suggestion#4743
bcotrim wants to merge 1 commit into
trunkfrom
stu-2393-strip-local-domain-in-publish-flow

Conversation

@bcotrim

@bcotrim bcotrim commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

Written with Claude Code (analysis, implementation, tests); reviewed by me.

Proposed Changes

Following "Create a new WordPress site" from the publish/sync flow prefilled the WordPress.com domain search with the site's local domain (e.g. mysite.wp.local), so the first screen in the handoff showed an "invalid domain" warning instead of suggestions.

  • A shared stripLocalDomainSuffix helper in packages/common now derives the suggestion: the exact .wp.local suffix (Studio's default) is stripped entirely; otherwise only a single trailing .local label is removed, so mysite.com.local suggests mysite.com.
  • Both front ends use it — the agentic UI (which did no stripping) and the classic UI (which only handled exact .wp.local).

Testing Instructions

  1. Create a Studio site with the default custom domain (<site-name>.wp.local).
  2. In the agentic UI, start the publish flow and follow "Create a new WordPress site" — the domain search should be prefilled with the bare site name and show real suggestions, no warning.
  3. Repeat from the classic UI sync flow.
  4. Edge cases: a site with custom domain mysite.local prefills mysite; mysite.com.local prefills mysite.com.

Pre-merge Checklist

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

@bcotrim bcotrim self-assigned this Aug 31, 2026
@bcotrim
bcotrim requested a review from a team August 31, 2026 10:27
@bcotrim bcotrim changed the title Strip local domain suffix from publish flow domain suggestion Agentic UI: Strip local domain suffix from publish flow domain suggestion Aug 31, 2026
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 8ab0c24 vs trunk

app-size

Metric trunk 8ab0c24 Diff Change
App Size (Mac) 1425.05 MB 1425.05 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk 8ab0c24 Diff Change
load 1186 ms 1204 ms +18 ms ⚪ 0.0%

site-startup

Metric trunk 8ab0c24 Diff Change
siteCreation 7515 ms 7551 ms +36 ms ⚪ 0.0%
siteStartup 3370 ms 3373 ms +3 ms ⚪ 0.0%

Results are median values from multiple test runs.

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

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.

2 participants