Skip to content

Fix /me/sites filtering and environment labels, keeping Pressable sites#4064

Draft
bcotrim wants to merge 2 commits into
trunkfrom
fix-sync-sites-filtering
Draft

Fix /me/sites filtering and environment labels, keeping Pressable sites#4064
bcotrim wants to merge 2 commits into
trunkfrom
fix-sync-sites-filtering

Conversation

@bcotrim

@bcotrim bcotrim commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

AI (Claude) extracted the change from #3941, traced the Pressable regression, and validated the corrected filters value against Calypso/Jetpack Cloud source; lint, typecheck, and sync tests were run locally. Manually reviewed.

Proposed Changes

  • Our /me/sites requests have always sent filter= (singular), which the API silently ignores — no server-side filtering ever happened, and non-syncable site types were only weeded out client-side.
  • This switches to the real filters=jetpack,atomic,wpcom param — the same set Jetpack Cloud sends in production. Including jetpack is what keeps Pressable (Jetpack-connected) sites in every picker; the earlier filters=atomic,wpcom attempt in Agentic UI: Site Creation #3941 dropped them, which is the regression that got it pulled out of that PR.
  • Pressable development environments are no longer treated as staging — they now show their own "Development" label instead of "Staging" in the default UI pickers.
  • Sites with environment_type=staging are now labeled Staging even when their parent production site isn't in the fetched list (previously they showed as Production).

Testing Instructions

  • Sign in with an account that has a Pressable site plus wpcom simple/Atomic sites.
  • Default UI → site → Sync: verify the Pressable site still appears and is connectable (this is the key regression check vs the atomic,wpcom value).
  • Verify a Pressable development environment shows a "Development" badge (not "Staging"), and staging sites show "Staging".
  • CLI: studio pull / studio push against the Pressable site still resolve it.
  • Regression: A8C-owned and deleted sites remain excluded from pickers.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
  • Manually verified with a Pressable-connected account (see Testing Instructions).

@bcotrim bcotrim marked this pull request as draft July 2, 2026 20:08
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 140803e vs trunk

app-size

Metric trunk 140803e Diff Change
App Size (Mac) 1317.17 MB 1317.17 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk 140803e Diff Change
load 767 ms 1113 ms +346 ms 🔴 45.1%

site-startup

Metric trunk 140803e Diff Change
siteCreation 6529 ms 6496 ms 33 ms ⚪ 0.0%
siteStartup 1864 ms 1859 ms 5 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