Repository navigation
Conversation
…ts its trail Render now writes what the book's first commit reads from the search index, so a later commit can start from the loaded page (#636 C3a): - the reading marks a page whose place, its owner or else its scope, is a topic, as applyRoute reads one (data-autoform-topic); - each result's card is marked as the index marks it (data-autoform-result), through one helper both use; - a page with statement cards carries, in its frame, the trail the book draws on an address naming one of them, and the boot script puts it in there, matching cards as the router's routes do, by URL-normalised fragment. No result owns a page, and a test pins it. The _first_paint docstring says "a page in a topic", per the Lead's correction.
Deicyde
force-pushed
the
feat/first-commit-facts
branch
from
November 13, 2026 16:51
f86180f to
0b2305a
Compare
3 tasks done
Contributor
Author
|
No blockers at 0b2305a. I checked the four places where the first paint has to agree with the router:
Shared anchors (nit, older cause). When Smaller notes:
Posted by Claude Code, at Jack's request. |
Catch up with main ce0c81c; CHANGELOG keeps both sides' entries.
Deicyde
marked this pull request as ready for review
November 13, 2026 23:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #636: C3a of the six PRs. Book pages now carry what the explorer's first commit reads from the search catalogue, and a statement's address first paints its own trail.
Premise
topic/index.html#theorem; and C3b, which will make the first commit from the loaded page instead of waiting for the catalogue.What changes
autoform_cli/ui/graph_pages.py:is_result()is the search index'sresultrule (formalizable, not a catalog card, not a container, not on a source track), now shared with render.autoform_cli/ui/render.py:_render_environmentmarks a result's card (.bp-thmwrapper) withdata-autoform-result, throughis_result(). A card is never a container._integrated_pagemarks the reading source withdata-autoform-topicwhen the page's place, its owner or else its scope, is a topic as the explorer'sapplyRoutereads one: its own scope, not a source track, not a module catalog. No result owns a page (render gives an anchorless page only to a container or to a node that is neither formalizable nor a catalog), so there is no owner result mark, and a test pins that.render_sitepasses each page's cards to_first_paint, which adds, for a page with cards, the statement trail: the crumbs the first commit draws when a card is the route's node, with the topic linked, then each card's reading label. Its docstring now says "a page in a topic".autoform_cli/ui/dag_viewer.py:render_bootwrites that trail into the frame's breadcrumb as one<template data-boot-statements>: the shared crumbs, then an<li data-anchor aria-current="page">per card. The boot script compares the address with each card's anchor as the browser normalizes a fragment (new URL("#" + anchor, location.href).hash === location.hash), as the router compares routes, and on a match puts the shared crumbs and that card's item in the trail. Template content is inert (not typeset, not in the page's text), and the frame was already left out of search.tests/ui/test_integrated_publication.py: on a fixture with a group page, a library catalog and a note, each page with cards holds the trail the commit draws, with the topic crumb linked and one item per card, and a page without cards holds none. The topic marks followapplyRoute's rule, the result marks equal the search index'sresult, and no reading source names a result.tests/ui/test_explorer_shell_boot.py: the boot script and the router read the same addresses: a non-ASCII anchor typed raw or percent-encoded (café,caf%C3%A9), a space (a b,a%20b), a bare%(100%, and100%25, which names nothing), a percent-encoded ASCII letter (ma%69n), and a section that is not a card. Both pick the same card, or none.tests/ui/test_dag_viewer_browser.py: in WebKit, with the explorer's script held, a card's address first paints four crumbs, three of them links and the statement current; after the commit, the trail and the rest of the head are the same, box for box within 1 px. It runs for a card whose label holds a formula and one whose label holds&,<and quotes.CHANGELOG.md: a Fixed line.Cost
ATLAS, rendered and built before and after on scratch CI: HTML grows from 552.5 MB to 562.7 MB (+1.84%), gzipped HTML by 2.09%, and the whole site by 1.36%. 3,708 pages carry a statement trail, with 45,847 card items; 4,004 reading sources are topics, and 45,847 cards are results.
check_blueprint_site.pypasses on the new site. https://github.com/Deicyde/atlas-lean/actions/runs/43456932487Not here
selection()keys routes by the whole address); the frame shows a topic page's "← topic" row for any:targetinside a card, such as a notes heading, where the commit shows it only for the card's own anchor; and a book with no roadmapREADME.mdfirst paints the trail [Home], where the commit draws [Home, Book, Roadmap].#node=address still first paints the page's trail; the commit draws the statement's, as on main.Checks
make lintandmake testpass on this PR's CI at 0b2305a, every job green, WebKit included: https://github.com/facebookresearch/autoform-bot/actions/runs/43466991946café), comparing the decoded address (on100%), no swap, the statement without the topic's crumbs, and any fragment naming the first card (oncafé).Posted by Claude Code, at Jack's request.