Problem
After #2102 separated the direct WordPress Playground origin from the serialized exposed-preview proxy, authenticated editor commands correctly use server.wordpressUrl, but wordpress.visual-compare still resolves local URLs from server.serverUrl.
A real eight-route SSI university run proves the proxy is not a valid internal browser origin for canonical WordPress front-end routes:
- proxy origin:
http://127.0.0.1:60757
- direct WordPress origin:
http://127.0.0.1:53158
- staged source capture on the proxy succeeds
- candidate
/, /contact/, /courses/, /events/, /faculty/, /news/, and /programs/ fail with ERR_TOO_MANY_REDIRECTS
/research/ times out during the same canonical redirect loop
- editor commands using the direct origin validate 269/269 blocks
Root cause
browser-visual-compare.ts calls browserPreviewRouting(args, runtimeSpec, server.serverUrl) while editor commands use server.wordpressUrl ?? server.serverUrl. Internal source/candidate capture should remain same-origin with WordPress and avoid the serialized exposed-preview proxy. Public/exposed preview behavior remains a separate explicit mode.
Acceptance criteria
- Local
wordpress.visual-compare uses the direct WordPress origin when available.
- Explicit public/routed preview modes retain their existing behavior.
- Add a real or contract-level regression proving local source and candidate routes do not traverse the preview proxy.
- Rerun all eight
27-university-department visual comparisons.
Related: #2095 and #2102.
AI assistance
- Model: OpenAI GPT-5.6 Sol
- Tool: OpenCode
- Used for: cross-stack reproduction and origin-routing diagnosis with Chris Huber.
Problem
After #2102 separated the direct WordPress Playground origin from the serialized exposed-preview proxy, authenticated editor commands correctly use
server.wordpressUrl, butwordpress.visual-comparestill resolves local URLs fromserver.serverUrl.A real eight-route SSI university run proves the proxy is not a valid internal browser origin for canonical WordPress front-end routes:
http://127.0.0.1:60757http://127.0.0.1:53158/,/contact/,/courses/,/events/,/faculty/,/news/, and/programs/fail withERR_TOO_MANY_REDIRECTS/research/times out during the same canonical redirect loopRoot cause
browser-visual-compare.tscallsbrowserPreviewRouting(args, runtimeSpec, server.serverUrl)while editor commands useserver.wordpressUrl ?? server.serverUrl. Internal source/candidate capture should remain same-origin with WordPress and avoid the serialized exposed-preview proxy. Public/exposed preview behavior remains a separate explicit mode.Acceptance criteria
wordpress.visual-compareuses the direct WordPress origin when available.27-university-departmentvisual comparisons.Related: #2095 and #2102.
AI assistance