Skip to content

Add agentic Connect site flow#4307

Open
bcotrim wants to merge 10 commits into
trunkfrom
mognet/add-agentic-connect-site-flow
Open

Add agentic Connect site flow#4307
bcotrim wants to merge 10 commits into
trunkfrom
mognet/add-agentic-connect-site-flow

Conversation

@bcotrim

@bcotrim bcotrim commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

Codex assisted with repository exploration, implementation, focused regression tests, and interactive UI verification. The lifecycle and rollback boundaries, connector contracts, and light/dark presentation were reviewed and iterated during development.

Proposed Changes

  • Add Connect as an Add Site path where signed-out users can log in or sign up, then find and search all relevant WordPress.com and Pressable sites with clear environment, availability, and existing-connection information.
  • Create a local shell, persist its live-site relationship, and pull content into Studio with the correct rollback boundary: failures before persistence remove the shell, while later failures retain the connection for recovery.
  • Focus the new local site as soon as pulling begins, open its live progress, and let the user navigate elsewhere while detailed CLI progress continues in the site status and sidebar. Start the site automatically when the pull completes.
  • Remove every WordPress.com connection when a local site is deleted in Electron or local-web, with regression coverage for both paths.
Light Dark
image image

Testing Instructions

  1. Launch the agentic UI and choose Add site → Connect while signed out. Verify both login and signup return to the Connect flow.
  2. Test WordPress.com and Pressable sites. Search by name and URL, and verify available, unavailable, upgrade/transfer-required, and already-connected groups and explanations.
  3. Connect an available site. Verify the shell is created without starting, the connection is saved, and Studio immediately focuses the local site with the pull status open.
  4. Navigate to another site while pulling. Verify the sidebar continues to show activity and the detailed CLI pull message remains available on the connecting site.
  5. Verify the site starts automatically after a successful pull and opens as a usable local copy.
  6. Simulate a failure before connection persistence and verify the local shell and files are removed.
  7. Simulate a pull/start failure after connection persistence and verify the local site and live relationship remain, with the failure shown in site status.
  8. Delete a connected local site in Electron and local-web and verify every WordPress.com connection for that local site is removed.
  9. Exercise offline, loading, empty, request-error, and retry states in light and dark color schemes.

Pre-merge Checklist

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

bcotrim added 2 commits July 22, 2026 21:00
…onnect-site-flow

# Conflicts:
#	apps/ui/src/components/site-dropdown/main-view.test.tsx
#	apps/ui/src/components/site-dropdown/main-view.tsx
@bcotrim bcotrim self-assigned this Jul 22, 2026
@bcotrim
bcotrim requested review from nightnei and sejas July 24, 2026 18:28
@bcotrim
bcotrim marked this pull request as ready for review July 24, 2026 18:28
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 5755526 vs trunk

app-size

Metric trunk 5755526 Diff Change
App Size (Mac) 1377.87 MB 1377.91 MB +0.05 MB ⚪ 0.0%

site-editor

Metric trunk 5755526 Diff Change
load 1099 ms 1080 ms 19 ms ⚪ 0.0%

site-startup

Metric trunk 5755526 Diff Change
siteCreation 7000 ms 6989 ms 11 ms ⚪ 0.0%
siteStartup 2352 ms 2363 ms +11 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