Skip to content

Docs: keep the source record pages out of the navigation tree - #44

Merged
jtravs merged 2 commits into
mainfrom
fix/docs-navigation
Nov 4, 2026
Merged

jtravs merged 2 commits into
mainfrom
fix/docs-navigation

Conversation

@jtravs

@jtravs jtravs commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Refs #40. This shortens the build a lot, but it does not explain the stalls, so it leaves #40 open until builds show the result.

What changed

The 763 source record pages are now :orphan:, reached through the alphabetical index instead of a hidden toctree. The conf.py setting that narrowed their sidebar is removed, because they no longer have one.

Readers: URLs and search entries are unchanged. Record pages lose the sidebar and previous and next links, and keep the top navigation and their link to the catalogue. the-data/sources.html drops from 125 KB to 33 KB, because it no longer lists 829 sidebar entries.

Why

Sphinx copies the whole navigation tree for every page it writes. A profile of a full build, on an Apple Silicon Mac at c63a648, without re-running the gallery:

Time
Whole build, under the profiler 271 s
Writing pages 222 s
The theme's generate_toctree_html 177 s

That is about 35 million node copies, nearly all for records the sidebar then hides.

Unprofiled builds, same machine, also without re-running the gallery:

Build Time
Before 164 s
collapse_navigation across the whole manual 62 s
This change 39 s
-j 2, without this change 141 s

collapse_navigation was rejected because it also changes the sidebar on every other page. The 62 s and 39 s runs ran side by side.

Verification

  • uv run poe check: passed, 21539 passed, 1 skipped, 100% coverage, including a clean docs build with warnings as errors and the gallery executing.
  • tests/test_source_catalogue.py now requires that records are orphans and that the index holds no toctree.
  • The public-wording scan shows no new hits.
  • The Read the Docs build of this PR is the check that matters. Results will follow here and on Read the Docs builds have been killed after about 24 minutes since 30 October #40.

Not checked

  • Whether this stops the kills. They began on 2026-10-29 with no change in optmat, and solprop's builds changed on the same date, so this reduces exposure to the problem rather than explaining it.
  • Record pages were checked in the generated HTML, not looked at in a browser.

🤖 Generated with Claude Code

Sphinx copies the whole navigation tree for every page it writes, and the
theme's sidebar asks for it on nearly every page. With 763 source records in a
hidden toctree that took 177 s of a 271 s profiled build (about 35 million node
copies), most of the build's time and most of its length on Read the Docs.

The record pages are now orphans, reached through the alphabetical index. Their
URLs and search entries stay. They lose the sidebar and previous and next links.
The local build without the gallery goes from 164 s to 39 s.

The setting in conf.py that narrowed the record pages' sidebar goes with them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jtravs jtravs added documentation Improvements or additions to documentation priority: high Wrong values, wrong public statements, or a user's first contact labels Nov 4, 2026
Copilot AI balanced review requested due to automatic review settings November 4, 2026 20:28

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T20:29:40.492236Z 0b747d9 PR opened
🔒 Security Review ✅ Completed 2026-11-04T20:30:32.261902Z 0b747d9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@read-the-docs-community

read-the-docs-community Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 optmat | 🛠️ Build #35653969 | 📁 Comparing 24d4484 against latest (24672b1)

  🔍 Preview build  

865 files changed · + 2 added · ± 863 modified

+ Added

± Modified

@codecov

codecov Bot commented Nov 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Six builds on Read the Docs took 230 to 341 s, against about 600 s before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jtravs

jtravs commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Read the Docs: 6 of 6 builds of this tree passed, at 230 to 341 s, on the unchanged config that had passed 0 of 10 since 30 October. Details are on #40. A later commit changes only the changelog fragment, from "about a third" to "less than half", because the whole build fell from about 600 s to a mean of 257 s.

@jtravs
jtravs merged commit 88f50f7 into main Nov 4, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation priority: high Wrong values, wrong public statements, or a user's first contact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants