Skip to content

Support landingPage Blueprint property#3107

Merged
bcotrim merged 6 commits intotrunkfrom
stu-1410-support-landingpage-blueprint
Apr 17, 2026
Merged

Support landingPage Blueprint property#3107
bcotrim merged 6 commits intotrunkfrom
stu-1410-support-landingpage-blueprint

Conversation

@bcotrim
Copy link
Copy Markdown
Contributor

@bcotrim bcotrim commented Apr 15, 2026

Related issues

How AI was used in this PR

Implemented with Claude Code. Reviewed the diff and ran lint/typecheck/tests locally before pushing.

Proposed Changes

Studio used to strip landingPage from Blueprints. Now it persists it on the site and uses it as the default target for "Open site" actions in the desktop app and CLI.

  • Removed landingPage from the unsupported-properties list (no more warning on import).
  • Added normalizeLandingPage() helper: strips host from absolute URLs, ensures a leading slash, treats empty/non-strings as unset.
  • Persisted landingPage?: string on siteDetailsSchema, StoppedSiteDetails, and captured it at CLI site creation.
  • Desktop openSiteURL falls back to the stored landingPage when no explicit path is passed. Forces auto-login in that case so admin landing pages work instead of bouncing to WP login.
  • CLI openSiteInBrowser uses landingPage as the auto-login redirect target, falling back to /wp-admin/ for sites without one.

Cleanup

With landingPage gone, both unsupported-feature lists became empty. This PR also removes all the now-dead machinery — scanner, filter, BlueprintValidationWarning, warning UI, and the plumbing across ~8 files. -359 lines in a dedicated commit. Git history has it if we ever need to reintroduce.

Testing Instructions

Manual — Desktop

Import a Blueprint with "landingPage": "/wp-admin/post-new.php". Verify no "unsupported feature" warning, then click "Open local site" from each entry point — header, site context menu, overview thumbnail, import/export tab. All should auto-login and land on the New Post screen. "WP Admin" and "Site Editor" buttons should still honor their explicit paths. Sites without landingPage should still open the homepage.

Manual — CLI

npm run cli:build
node apps/cli/dist/cli/main.mjs site create ~/Studio/test --blueprint path/to/blueprint.json

Browser should auto-login and land on the Blueprint's landingPage.

Pre-merge Checklist

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

@bcotrim bcotrim self-assigned this Apr 15, 2026
@bcotrim bcotrim force-pushed the stu-1410-support-landingpage-blueprint branch from 3275672 to f673dab Compare April 16, 2026 20:03
@bcotrim bcotrim requested a review from a team April 16, 2026 21:45
@bcotrim bcotrim marked this pull request as ready for review April 16, 2026 21:50
@wpmobilebot
Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 8b8368e vs trunk

app-size

Metric trunk 8b8368e Diff Change
App Size (Mac) 1282.41 MB 1282.38 MB 0.02 MB ⚪ 0.0%

site-editor

Metric trunk 8b8368e Diff Change
load 1857 ms 1580 ms 277 ms 🟢 -14.9%

site-startup

Metric trunk 8b8368e Diff Change
siteCreation 8128 ms 8118 ms 10 ms ⚪ 0.0%
siteStartup 4905 ms 4937 ms +32 ms ⚪ 0.0%

Results are median values from multiple test runs.

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

Copy link
Copy Markdown
Contributor

@gcsecsey gcsecsey left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @bcotrim! 🙌

The changes LGTM and the notices are now removed:

Before After
Image Image

I tested this using the friends-cors blueprint, and found that all links to the frontend of the site (header, site-menu, content-tab-overview) open the correct URL:

Link Page
Open WP Admin Image
Open site Image

I also tested using the chat-to-blog blueprint, which adds a landingPage within wp-admin.

Link Page
Open WP Admin Image
Open site Image

I also tested the CLI opening the langingPage URL as described. 👍

@bcotrim bcotrim merged commit 0ec159c into trunk Apr 17, 2026
10 checks passed
@bcotrim bcotrim deleted the stu-1410-support-landingpage-blueprint branch April 17, 2026 11:04
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.

3 participants