Skip to content

Agentic UI: Add Connect a site to onboarding#3862

Draft
shaunandrews wants to merge 1 commit into
feature/workbench-site-creationfrom
workbench/agentic-connect-site-onboarding
Draft

Agentic UI: Add Connect a site to onboarding#3862
shaunandrews wants to merge 1 commit into
feature/workbench-site-creationfrom
workbench/agentic-connect-site-onboarding

Conversation

@shaunandrews

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

AI helped fold review feedback about large WordPress.com accounts into the Connect-site slice. I reviewed the code and ran lint, typecheck, and focused tests.

Proposed Changes

  • Adds a Connect a site onboarding route for bringing WordPress.com or Pressable sites into the app UI.
  • Loads syncable sites page-by-page during the connect step, with search and “load more” behavior, instead of fetching an entire account up front.
  • Shows already-connected and unsupported sites distinctly while only allowing syncable sites to be selected.
  • Creates the local shell without starting it, connects it to the remote site, starts the pull, and rolls back the shell if connect setup fails.

Testing Instructions

  • Open onboarding and choose “Connect a site.”
  • Test signed-out, offline, empty-account, single-site, and multi-site states if available.
  • On an account with many sites, confirm the first page loads without fetching every site and that “Load more”/scroll loading fetches additional pages.
  • Select a syncable site and confirm the flow creates the local site, connects it, starts pull, and navigates to the new site view.

Validation run:

  • npx eslint --fix apps/studio/src/ipc-handlers.ts apps/studio/src/modules/sync/lib/ipc-handlers.ts apps/studio/src/preload.ts apps/ui/src/components/busy-overlay/index.tsx apps/ui/src/components/onboarding-footer/index.tsx apps/ui/src/components/onboarding-layout/index.tsx apps/ui/src/data/core/connectors/ipc/index.ts apps/ui/src/data/core/index.ts apps/ui/src/data/core/types.ts apps/ui/src/data/queries/use-create-site-helpers.ts apps/ui/src/data/queries/use-wpcom-sites.ts apps/ui/src/data/queries/use-wpcom-sites.test.tsx apps/ui/src/hooks/use-grid-arrow-navigation.ts apps/ui/src/hooks/use-offline.ts apps/ui/src/lib/docs-links.ts apps/ui/src/ui-classic/router/layout-onboarding/index.tsx apps/ui/src/ui-classic/router/route-onboarding-connect/index.tsx apps/ui/src/ui-classic/router/route-onboarding-home/index.tsx apps/ui/src/ui-classic/router/router.tsx tools/common/lib/sync/environment-utils.ts tools/common/lib/sync/mshots.ts tools/common/lib/sync/sync-api.ts tools/common/lib/sync/transform-sites.ts
  • npm run typecheck
  • npm test -- apps/ui/src/data/queries/use-wpcom-sites.test.tsx apps/studio/src/modules/add-site/tests/add-site.test.tsx apps/studio/src/modules/add-site/hooks/tests/use-find-available-site-name.test.ts apps/studio/src/modules/add-site/hooks/tests/use-blueprint-deeplink.test.tsx

Pre-merge Checklist

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

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.

1 participant