Skip to content

docs: viewer serves PNG screenshots only - #1

Merged
echobt merged 1 commit into
mainfrom
screenshots-only-viewer
Aug 7, 2026
Merged

docs: viewer serves PNG screenshots only#1
echobt merged 1 commit into
mainfrom
screenshots-only-viewer

Conversation

@echobt

@echobt echobt commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Syncs miner-facing docs with the monorepo screenshots-only viewer change (BaseIntelligence/base design-display-fixes):

  • Viewer section (docs/rounds-and-scoring.md): produced HTML is never served; GET /v1/view/{run_id}/index.png returns the post-sanitize full-page screenshot; .html requests return 410 Gone; the gateway CSP sandbox lockdown remains as defense in depth.
  • API page (docs/api.md): route table now lists index.png (200 when captured; .html → 410) and the pages route as metadata; poll example fetches index.png.
  • Getting started / troubleshoot / what-not-to-do: guidance updated — ship static HTML+CSS so the headless capture renders faithfully; a 410 Gone row explains the retired .html viewer.

Miners still write index.html / pricing.html / components.html under /out/pages/ — only serving changed, not the harness contract.

Test plan

  • Docs-only change; monorepo PR carries the code, tests, and freeze-doc pins (design-check green there)
  • rg sweep confirms no remaining "raw HTML is served"/stale viewer claims in this repo

Summary by CodeRabbit

  • Documentation
    • Updated API and viewer documentation to describe screenshot-only access through PNG images.
    • Clarified that generated HTML is not publicly served and HTML requests return 410 Gone.
    • Added guidance for retrieving index.png, interpreting broken screenshots, and understanding script behavior.
    • Updated getting-started and scoring guidance to reflect full-page PNG output and available page metadata.

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).
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The documentation changes replace public HTML viewer access with full-page PNG screenshots. They document the index.png endpoint, 410 Gone responses for HTML requests, screenshot behavior, troubleshooting steps, and updated sanitization guidance.

Changes

PNG viewer documentation

Layer / File(s) Summary
Viewer access contract
docs/api.md, docs/rounds-and-scoring.md, docs/getting-started.md
The documentation defines index.png access, retained page metadata, screenshot capture behavior, and 410 Gone responses for HTML requests.
Viewer usage guidance
docs/troubleshoot.md, examples/what-not-to-do/README.md
Troubleshooting and example guidance now describe PNG-only serving and the removal of public script execution.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main documentation change: the viewer serves PNG screenshots only.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch screenshots-only-viewer

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 15abd21 and 21ed1d4.

📒 Files selected for processing (5)
  • docs/api.md
  • docs/getting-started.md
  • docs/rounds-and-scoring.md
  • docs/troubleshoot.md
  • examples/what-not-to-do/README.md

Comment thread docs/api.md
Comment on lines +37 to +42
"$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`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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.

@echobt
echobt merged commit 1dc23ba into main Aug 7, 2026
1 check passed
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