wordpress-workspace-preview-routing-debug

Gỡ lỗi hành vi xem trước, chế độ chỉnh sửa, xác thực, proxy và định tuyến URL của tác nhân không gian làm việc WordPress trên các trang web WordPress.com đơn giản, Jetpack và Atomic. Sử dụng…

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

testing-js
automattic
Hướng dẫn kiểm tra tệp JavaScript để tìm lỗi cú pháp
setup
automattic
Xác minh rằng dn CLI đã được cài đặt và cấu hình. Sử dụng khi người dùng lần đầu cài đặt plugin domain-names, hoặc khi lệnh dn thất bại vì CLI đã…
studio-cli
automattic
Sử dụng Studio CLI để quản lý các trang WordPress cục bộ, xác thực và các trang xem trước. Kích hoạt kỹ năng này khi bạn cần chạy các lệnh Studio CLI, quản lý…
dn-info
automattic
Lấy thông tin chi tiết về một tên miền đã đăng ký bằng dn CLI. Sử dụng khi người dùng muốn xem chi tiết tên miền như ngày hết hạn, máy chủ tên, thông tin liên hệ,…
qa
automattic
So sánh nội dung WXR đã trích xuất với trang web nguồn gốc ban đầu từng trang một. Tìm văn bản, tiêu đề, hình ảnh và liên kết bị thiếu. Khắc phục bằng cách vá WXR hoặc…
add-skill
automattic
Thêm một kỹ năng mới vào plugin a8c-design. Sử dụng khi bạn đã xây dựng một kỹ năng Claude Code và muốn đóng góp nó vào plugin a8c-design dùng chung của Automattic —…
design-foundations
automattic
Xây dựng một JSON nền tảng thiết kế mạch lạc từ một trang web đã được giải phóng — các vai trò ngữ nghĩa về màu sắc/kiểu chữ/khoảng cách kèm dấu vết bằng chứng. Sử dụng khung sườn một phần…
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,…