Skip to content

Agentic UI: Surface publish-picker load and connect failures - #4612

Draft
shaunandrews wants to merge 2 commits into
stu-2162-dedupe-site-togglefrom
stu-2162-publish-picker-feedback
Draft

Agentic UI: Surface publish-picker load and connect failures#4612
shaunandrews wants to merge 2 commits into
stu-2162-dedupe-site-togglefrom
stu-2162-publish-picker-feedback

Conversation

@shaunandrews

@shaunandrews shaunandrews commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

AI ported these states from the site-header exploration into the existing picker.

Proposed Changes

The publish picker rendered nothing when the WordPress.com sites request failed and swallowed connect errors into the console.

  • Failed loads show a classified, user-readable reason (expired session, offline, rate-limited, service down) with a Retry.
  • Connect failures surface inline instead of silently doing nothing.
  • Long loads get a "large accounts" hint after 6s; picking a site shows "Connecting…" and guards double-clicks.
  • The error classifier is a shared, unit-tested helper (lib/wpcom-load-error).

Screenshots

Loading Error + Retry
Loading state Error state light
Error + Retry (dark)
Error state dark

Testing Instructions

  1. Open Publish on an unconnected site while signed in — the sites list loads as before.
  2. Kill your network and reopen it — a readable error with Retry appears instead of an empty panel.
  3. Pick a site — the row reads "Connecting…" and other rows disable until it finishes.

Verification completed

  • npm run typecheck · new helper tests 6/6 · dropdown suites pass

Pre-merge Checklist

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

The picker silently rendered nothing on a failed sites load and swallowed
connect errors into the console. Show a classified, user-readable error with
a retry, a slow-loading hint for large accounts, and per-site connecting
feedback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The status/error text was missing an explicit line-height, inheriting an
oversized default that read as awkward double-spacing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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