wordpress-workspace-preview-routing-debug

Debug WordPress Workspace Agent preview, edit-mode, authentication, proxy, and URL-routing behavior across simple WordPress.com, Jetpack, and Atomic sites. Use…

npx skills add https://github.com/automattic/workspace --skill wordpress-workspace-preview-routing-debug

WordPress Workspace Preview Routing Debug

Use this skill for preview/auth/editor-mode problems in the WordPress Agent window or detached preview.

Workflow

  1. Ground the report in the current code path.
    • Inspect Sources/WordPressAgentPreviewURLResolver.swift, Sources/WordPressAgentWindowView.swift, Sources/WPCOMClient.swift, and relevant Sources/AppState.swift preview methods.
    • Search with rg -n "preview|frame_nonce|jetpack_frame_nonce|unmapped|Atomic|cookie|requested|effective|private|proxy" Sources.
  2. Preserve the preview trust rules.
    • Show the requested user-facing URL in UI.
    • Do not expose effective preview URLs, frame nonces, auth bootstrap URLs, or private preview details.
    • Reject localhost and private-network URLs.
  3. Check site type and mode.
    • Simple WordPress.com, Jetpack, and Atomic sites can require different preview URL, unmapped-host, nonce, cookie, or read-access handling.
    • Distinguish signed-out view, authenticated preview, and editor mode.
  4. Check proxy and routing overrides.
    • Inspect Sources/NetworkRoutingSettings.swift and the WordPress.com auth-cookie bootstrap in Sources/WPCOMClient.swift.
    • The app has a developer setting to bypass the macOS system proxy for sandbox routing, but the preview cookie-bootstrap flow intentionally uses a one-off direct session because proxy routing has produced wp-login.php 200 responses with empty auth cookies.
    • Keep normal API traffic aligned with the user's network setting unless the code path is specifically browser-cookie infrastructure.
  5. Reproduce with focused signals.
    • Prefer app logs, existing preview loading states, and targeted code inspection before inventing shell-only repros.
    • Verify loading/preparation states, navigation updates, requested-vs-effective URL display, and mode switch behavior.
  6. Keep comments where behavior is non-obvious.
    • Proxy bypass, cookie bootstrap, nonce handling, and URL rewriting deserve concise code comments when changed.

Output

  • Lead with the failing route or trust boundary.
  • Include file references and the specific site/mode assumptions.
  • Recommend tests for public URL, same-site URL, preview URL, editor URL, internal navigation, and rejected private URL.

Thêm skills từ automattic

wp-phpstan
automattic
Sử dụng khi cấu hình, chạy hoặc sửa lỗi phân tích tĩnh PHPStan trong các dự án WordPress (plugin/giao diện/trang web): thiết lập phpstan.neon, baselines,…
official
wp-playground
automattic
Sử dụng cho quy trình làm việc WordPress Playground: các phiên bản WP nhanh, dùng một lần trong trình duyệt hoặc cục bộ qua @wp-playground/cli (server, run-blueprint, build-snapshot),…
official
wp-plugin-development
automattic
Sử dụng khi phát triển plugin WordPress: kiến trúc và hooks, kích hoạt/hủy kích hoạt/gỡ cài đặt, giao diện quản trị và Settings API, lưu trữ dữ liệu, cron/tác vụ, bảo mật…
official
wp-project-triage
automattic
Sử dụng khi bạn cần kiểm tra xác định một kho lưu trữ WordPress (plugin/theme/block theme/WP core/Gutenberg/full site) bao gồm công cụ/kiểm tra/phiên bản…
official
wp-rest-api
automattic
Sử dụng khi xây dựng, mở rộng hoặc gỡ lỗi các endpoint/route của WordPress REST API: register_rest_route, các lớp WP_REST_Controller/controller, schema/argument…
official
wp-wpcli-and-ops
automattic
Sử dụng khi làm việc với WP-CLI (wp) cho các thao tác WordPress: tìm kiếm-thay thế an toàn, xuất/nhập db, quản lý plugin/chủ đề/người dùng/nội dung, cron, xóa bộ nhớ đệm,…
official
wpds
automattic
Sử dụng khi xây dựng giao diện người dùng dựa trên Hệ thống Thiết kế WordPress (WPDS) và các thành phần, token, mẫu thiết kế của nó.
official
woocommerce-finalize
automattic
Kiểm tra sức khỏe mã nguồn và khả năng truy vết trước khi phát hành cho các plugin WooCommerce. Chạy sau khi đánh giá mã -- tập trung vào mã chết, trùng lặp, độ phức tạp cấu trúc, và…
official