docs: viewer serves PNG screenshots only - #1
Conversation
The challenge viewer no longer serves produced HTML: view responses are the post-sanitize index.png screenshot, and .html requests return 410 Gone (the gateway CSP sandbox floor remains as defense in depth). Syncs the Viewer section, API route table + poll example, getting started, troubleshoot, and the what-not-to-do note with the monorepo contract change (BaseIntelligence/base design-display-fixes).
📝 WalkthroughWalkthroughThe documentation changes replace public HTML viewer access with full-page PNG screenshots. They document the ChangesPNG viewer documentation
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/api.md`:
- Around line 37-42: Update the API example around the index.png request to
document that clients must wait until index.png appears in the successful run’s
pages list before requesting it, or add retry guidance for non-200 responses
while post-sanitize capture completes. Keep the existing distinction that only
the PNG is served and HTML requests return 410 Gone.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 763067e3-b7c4-49eb-9b23-1c7da523510b
📒 Files selected for processing (5)
docs/api.mddocs/getting-started.mddocs/rounds-and-scoring.mddocs/troubleshoot.mdexamples/what-not-to-do/README.md
| "$GATEWAY/challenge/design/v1/view/$RUN_ID/index.png" | ||
| ``` | ||
|
|
||
| Expect `index.html`, `pricing.html`, and `components.html` in the pages list when the | ||
| run succeeded. | ||
| run succeeded, plus `index.png` once the post-sanitize screenshot lands — the viewer | ||
| serves that PNG only (produced HTML is never served; `.html` requests get `410 Gone`). |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Retry the screenshot request or document the readiness condition.
The example makes one request to index.png, but the text says the screenshot appears only after capture lands. A user can receive a non-200 response while the run is otherwise successful. Add a retry loop, or instruct users to wait until index.png appears in the pages list before requesting it.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/api.md` around lines 37 - 42, Update the API example around the
index.png request to document that clients must wait until index.png appears in
the successful run’s pages list before requesting it, or add retry guidance for
non-200 responses while post-sanitize capture completes. Keep the existing
distinction that only the PNG is served and HTML requests return 410 Gone.
Summary
Syncs miner-facing docs with the monorepo screenshots-only viewer change (BaseIntelligence/base
design-display-fixes):docs/rounds-and-scoring.md): produced HTML is never served;GET /v1/view/{run_id}/index.pngreturns the post-sanitize full-page screenshot;.htmlrequests return410 Gone; the gateway CSPsandboxlockdown remains as defense in depth.docs/api.md): route table now listsindex.png(200 when captured;.html→ 410) and the pages route as metadata; poll example fetchesindex.png.410 Gonerow explains the retired.htmlviewer.Miners still write
index.html/pricing.html/components.htmlunder/out/pages/— only serving changed, not the harness contract.Test plan
design-checkgreen there)rgsweep confirms no remaining "raw HTML is served"/stale viewer claims in this repoSummary by CodeRabbit
410 Gone.index.png, interpreting broken screenshots, and understanding script behavior.