Skip to content

docs: show the error and page-load benchmark charts on the landing page and README - #246

Merged
JuroOravec merged 8 commits into
mainfrom
docs/landing-benchmark-charts
Oct 22, 2026
Merged

JuroOravec merged 8 commits into
mainfrom
docs/landing-benchmark-charts

Conversation

@JuroOravec

Copy link
Copy Markdown
Member

Shows the benchmark results on the docs landing page and early in the README, as decided in the presentation study (mockup D, revised).

Landing page

Two cards sit below the unchanged hero. They're side by side on wide screens and stack below 1,100 px. There are no tabs, no title over both cards, and no AI card.

"Catch mistakes before the app runs":

  • One sentence: "We built the same app in 12 frameworks and made the same 63 mistakes in each."
  • The error chart has the same legend and dashed Citry line as the Benchmarks page.
  • It shows all 12 frameworks, sorted by how many each reports before the app runs, best first. The sorting comes from a new sort="static" option on <c-error-benchmark-chart>.

"Page load time":

  • It shows the second-load chart, using <c-benchmark-chart load="second" c-show_table="False">.
  • The screen-reader label is kept.

Each card ends with a "How we measured" link to the Benchmarks page.

README

README.md is also what PyPI shows. Right after the links line, it gets:

  • a heading;
  • one sentence;
  • a <picture> element with dark and light images;
  • a "How we measured" link.

All URLs are absolute.

docs_site/scripts/benchmark_images.py draws the images with the same chart markup and the site's CSS. It saves them under docs/assets/benchmarks/, with the run id and a content hash in each file name, and it never overwrites an existing file. That matters because published PyPI pages keep loading their image URLs. docs/codebase.md explains when to rerun it.

Validators

  • published_readme_links now reads each file whole. It catches relative paths in multi-line HTML tags, in srcset, and in href and poster. The old version missed all three.
  • New, readme_benchmark_charts: it rebuilds the README block from the benchmark data. It fails when the run, the counts or an image don't match, when an image was changed in place, or when the markers are broken. It needs only the standard library.

Evidence

  • Docs build check: 0 errors, 0 warnings.
  • Tests: the docs_site tests for the touched code (92) and the validator tests (20).
  • Other checks: scripts/validate.py, ruff and mypy.
  • Review: an independent technical review and a separate prose pass.

Note

The numbers come from the current Benchmarks run, which measured the code that ships as Citry 0.6.1. They go live with this merge, and the release is what makes them true for pip install citry.

🤖 Generated with Claude Code

JuroOravec and others added 5 commits October 22, 2026 11:34
The landing page shows two cards below the hero: the error benchmark,
sorted by mistakes reported before the app runs, and the second-load
page time. Both reuse the Benchmarks page chart components: the error
chart gains a sort="static" option and the speed chart a show_table
option.

The README gets the error chart as light and dark PNGs drawn by
docs_site/scripts/benchmark_images.py. The files are named by benchmark
run and image hash and are never overwritten. A new
readme_benchmark_charts validator rebuilds the README block from the
data. published_readme_links now reads whole files, so it also catches
relative paths in multi-line tags, srcset, and HTML links.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The landing charts now differ from the Benchmarks page, which is
unchanged. Each chart sits under a section heading ("Catch mistakes
early", "As fast as Next.js") with its legend below the bars. The error
chart counts only the mistakes that apply to each framework ("54 of
61"), sorted by that share, and the speed chart shows one total bar per
framework, fastest first, with no groups. Both come from new options on
the existing components (sort, scale, short_names, phases, compact).

The existing "Catch mistakes early." section is renamed "No silent
failures." so the two headings do not clash. The README block and its
images are redrawn with the same options; the earlier image pair never
reached main, so it is removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The two benchmark sections now sit between the sponsor belt and the
tutorial video, with the same room above them as below.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
"Catch mistakes early" now comes first, full width, and "As fast as
Next.js" follows as its own block. Both cards span the page's 76rem
column like its other blocks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The README chart names the Citry version its run measured, from
  VERSION_NOTES in benchmark_readme.py; the validator fails on a run
  without a note.
- The README alt text uses the same short names as the image.
- static_shares refuses an unknown status and a missing, repeated, or
  stray record, as the chart does.
- The dashed line follows the bars' scale with scale="applicable".
- A compact chart keeps its legend above the table.
- The landing design doc names "No silent failures." as the
  reliability heading; the landing page comment lists the hand-typed
  values to recheck after a new run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@JuroOravec
JuroOravec changed the base branch from main to build/smaller-citry-wheel October 22, 2026 10:31
@JuroOravec
JuroOravec added this pull request to stack #219 October 22, 2026 10:31
Base automatically changed from build/smaller-citry-wheel to main October 22, 2026 10:35
@JuroOravec
JuroOravec merged commit ad44384 into main Oct 22, 2026
14 of 26 checks passed
@JuroOravec
JuroOravec deleted the docs/landing-benchmark-charts branch October 22, 2026 11:05
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