Repository navigation
feat(site): unify website features with the X-Mech catalogue - #2021
Draft
realmarcin wants to merge 8 commits into
Draft
realmarcin wants to merge 8 commits into
realmarcin wants to merge 8 commits into
Conversation
The 2026-10-25 X-Mech site review left five catalogue features partial on
TraitMech. This brings each to the fleet's wave-1 standard in the owning
renderer and templates, then regenerates pages/ and the discussions shell.
- evidence: 870 of 1,130 record pages showed PMID, DOI or URL tokens as plain
text (synonym sources, curation-history changes, notes, rationale, graph
descriptions, ':ref{doi=...}' directives in snippets). A single autolink
filter escapes record text and links only tokens whose target
reference_url() accepts; synonym sources use the existing citation macro.
- term_links: traitmech: and METPO: groundings that name a TraitMech record
now open that record's page (the page's own id resolves like its Identifier
card), kg-microbe nodes show their label and link their record, MICRO and
rdfs join the resolver map, and other prefixes fall back to bioregistry.io.
A local id with no record page stays unlinked rather than becoming a 404.
- schema_docs: docs/SCHEMA.md has fallen behind the schema (no causal_graphs,
canonical_examples, discussions or datasets), so the site no longer points
at raw YAML only: pages/schema.html is generated from LinkML's SchemaView
(every class with its induced slots, every enum) and linked from the nav,
the landing Data card and every footer.
- license: footers now state the licences exactly as LICENSE, LICENSE-DATA
and LICENSE-CODE do and link those files; the discussions index, which
republishes record text, gets the same footer through its shell.
- responsive: the Text and Sequence maps drew a fixed-width SVG that
overflowed a 390 px viewport; they now scale like the PaCMAP and graph
maps, and each map's data table scrolls in a named, focusable region.
Below 860 px the facet sidebar, stacked above the content, stayed
sticky and covered the catalogue table or map plot while scrolling (up to
704 of 844 px on Browse); it now scrolls away with the page.
Output stays deterministic (no clock), so the pages/ staleness gate holds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main gained a curation PR (#2013) after this branch was cut. Per the curation playbook, the three conflicted record pages were cleared and all of pages/ was regenerated with just gen-pages rather than resolved by side. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 25, 2026
…at they claim Review of this PR found three gaps. The deep-research previews are Markdown shown verbatim, and the autolink token ran on through Markdown syntax: "[10.1038/x](https://doi.org/10.1038/x)" has balanced parentheses, so the DOI swallowed "](https://...)" into its href, and "**10.x/y**" or "`10.x/y`" kept the closing marks. Four committed pages (syntrophy, halophilic, axially filamented, flask shaped) linked percent-encoded debris such as .../nrmicro2166%5D(... . Tokens now end at "]" and drop trailing "*" and "`" (no DOI or URL in the corpus contains a bracket), with cases for link syntax, bold and inline code, plus a check over every rendered research preview. pages/ regenerated: 0 doi.org hrefs with %5D, %2A or %60 (was 4). The licence test read only the licence files. It now derives the footer words from LICENSE, LICENSE-DATA and LICENSE-CODE and checks them against the rendered base, landing and discussions footers, so a change to the files or to a footer that the other does not follow turns it red. The schema-page test called itself a determinism check but compared two renders in one process. It now compares the render with the committed pages/schema.html above the footer, which a separate gen-pages process wrote. Fixes #2022, fixes #2023, fixes #2024 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the Cycle 5 Stage 4 review files (#2020). It touches no generated output or rendering source, so nothing needed regenerating for the merge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…notice The fleet's catalogue-candidate review rated three features on TraitMech below present. - skip_link (missing): the first Tab stop on every page type was a logo or nav link. base.html and the landing now start with "Skip to main content", which is shown only while focused and moves focus into <main id="main-content">. - not_found_page (missing): a mistyped address at any depth got GitHub's generic 404. GitHub Pages serves the publishing root's 404.html for every missing URL, and this branch-built site publishes the repository root, so `just gen-pages` now also writes /404.html from a template. Its links, stylesheet and script are site-root-absolute (/TraitMech/pages/...) because a relative link would resolve against the missing path. It carries no corpus stamp, so curation PRs never rewrite it, and a test checks that the committed copy is current. - curation_notice (partial): nothing explained SEEDED, PROPOSED, REVIEWED or DEPRECATED. The landing now lists each status with its record count, and each record page puts a "What this status means" disclosure beside its status. Every definition is quoted from the schema's MappingStatusEnum at render time rather than paraphrased. Whether REVIEWED implies human review is left unstated: the curation playbook says "REVIEWED after human curator signoff", but every recorded curation event names claude, codex or a maintenance script, so the repository does not settle it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fleet's unified standard asks every Mech for a cheap guard: each link to a sibling Mech must use a route the fleet verified, because tests cannot call the network and a guessed path on another site fails silently. The new tests allow only the standard's verified search and record routes (PathwayMech's pages/records/ among them) and the exact site roots that the footer's sibling links use. They check every renderer template and script, and every page of the built site, including /404.html and the discussions index. The current corpus passes: its only deep sibling links are 15 PathwayMech records, and they answered 200 when checked on 2026-10-25. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main gained a curation PR (#2026) that edits seven trait records and their pages. Git merged the generated pages textually, which mixes main's data with this branch's templates. Per the curation playbook, pages/ was regenerated with just gen-pages rather than trusted: seven record pages and schema.html differed from the auto-merge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 26, 2026
autolink() trimmed only an unbalanced closer at the very end of a token, and resumed scanning after the whole regex match. In "(https://a.example/x)-(https://b.example/y)" the parentheses balance across both URLs, so the first link's href became "https://a.example/x)-(https://b.example/y" and the second URL got no link of its own. A token now ends at the first ")" that closes no "(" opened inside it, and scanning resumes after the token rather than the match, so what was cut off is scanned again. This is the approach of the PathwayMech port. Balanced parentheses inside a URL or DOI are kept, as in https://en.wikipedia.org/wiki/Foo_(bar) and 10.1016/0005-2744(70)90044-4. Regenerating pages/ changes nothing: no committed page has this shape. Fixes #2033 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Summary
Brings the five website features that the 2026-10-25 X-Mech site review left partial on TraitMech up to the fleet's wave-1 unified standard. Every change is in the owning renderer or template (
scripts/render_trait_pages.py,scripts/render_discussions_shell.py,src/traitmech/templates/).pages/and the discussions shell were then regenerated withjust gen-pagesandrender_discussions_shell.py. No curated record, schema, embedding or vendored governance file is touched.Most of the 1,130 record-page diffs are the footer licence and skip-link markup, which every page carries.
mainwas merged in three times (after #2013, #2020 and #2026), and each timepages/was regenerated rather than resolved by side, as the curation playbook says. After #2026, regeneration changed seven record pages andschema.htmlrelative to git's textual auto-merge. If another curation PR lands first, runjust gen-pagesagain in the same way.evidence:ref{doi=...}directives)autolinkfilter escapes the text and then links only PMID, PMCID, DOI and http(s) tokens whose targetreference_url()accepts. Trailing punctuation and unbalanced closing brackets are trimmed, and the visible text is unchanged. Because research previews are Markdown, a token also ends at]and drops trailing*and backtick, so link syntax, bold and inline code never reach an href (review finding F1). It is applied to notes, snippets, curation changes, session events, discussion text, graph/edge descriptions, canonical-example notes, dataset descriptions, pathway basis and research previews. Synonym sources use the existingcitation()macro.test_autolink_*(25 cases, including unsafe schemes, attribute break-out, and Markdown link, bold and inline-code shapes),test_research_preview_links_carry_no_markdown_debris(every rendered research preview),test_free_text_references_link_in_every_record_context,test_real_synonym_source_from_the_review_is_linked%5D,%2Aor%60(4 before the F1 fix, on syntrophy, halophilic, axially filamented and flask shaped). A DOM walk finds 0 loose tokens on 6 record pages. The biofilm formation synonym sourceDOI:10.1038/nrmicro.2016.94is now a link.term_linkstraitmech:node groundings unlinked; kg-microbe node CURIEs unlabeled and unlinked; MICRO xrefs and rdfs predicates plain textterm_linkfilter. A CURIE naming a TraitMech record (traitmech:orMETPO:) opens that record's page. The page's own id resolves like its Identifier card (METPO to w3id, a local id to its YAML) instead of linking to itself. kg-microbe nodes show their label and link: parent-proxy nodes go to the parent record, direct matches to w3id.MICROandrdfswere added to the resolver map. Other well-formed prefixes fall back tohttps://bioregistry.io/<CURIE>. Atraitmech:id with no record page stays visible but unlinked, so it never becomes a 404 or#.test_curie_resolver_map_with_registry_fallback(8),test_own_record_groundings_open_their_record_page,test_kg_microbe_nodes_show_the_label_and_link_the_record,test_direct_metpo_node_resolves_to_the_authority_not_a_self_link,test_cross_references_use_the_resolver_map<code>on record pages went from 2,188 traitmech + 1,525 METPO + 507 rdfs + 185 NCBITaxon + 4 MICRO to only the header's own identifier, which is linked from the Identifier card on the same page. There are 0href="#"anchors. With the keyboard, Tab+Enter on the kg-microbe node of biofilm formation opensphenotype. Clicking an own-record grounding on psychrotolerant openscold_shock_response,traitmech:000206.schema_docsdocs/SCHEMA.mdis not current with the schema: it lackscausal_graphs,canonical_examples,discussionsanddatasets, and was last touched 2026-09-09 while the schema changed 2026-10-07. So it is not linked. Instead,pages/schema.htmlis generated by the renderer from LinkMLSchemaView: all 15 classes with induced slots (range, cardinality, description, pattern) and all 15 enums with permissible values. Range names link to their class or enum anchors, and the source YAMLs and schema licence are linked. Schema prose is shown unlinked because its identifiers are format examples such asPMID:12345678. "Schema" in the nav, the landing Data card and every footer now point to it, and the footer keeps a YAML link. The page carries no clock, and thepages/staleness gate checks it.test_schema_reference_documents_every_class_slot_and_enum,test_schema_page_matches_the_committed_render_and_anchors_resolve(compares the render with the committedpages/schema.html, which a separategen-pagesprocess wrote, above the stamped footer; F3),test_schema_link_is_visible_from_every_page_type(6)licenseLICENSE: "Project data: CC BY 4.0 (LICENSE-DATA). Code: BSD-3-Clause (LICENSE-CODE). Third-party source material keeps its own terms (licence scope, LICENSE)". This is inbase.htmland the landing. The discussions shell injects the same footer between its markers, guarded by a new</body>anchor check.test_every_page_type_footer_states_the_repository_licences(9 page types),test_footer_licences_match_the_licence_files(3 footers: base, landing, discussions shell; the expected words are derived fromLICENSE,LICENSE-DATAandLICENSE-CODE, then read from the rendered footer; F2),test_discussions_index_carries_the_licence_footer_once,test_committed_discussions_index_is_current_with_the_shellresponsiveviewBoxpluswidth:100%pattern thatumap.htmlandgraph.htmlalready use. Related issue #1927 names onlyumap/graph, which already fit on main, so this PR leaves its status to the owner. All four map data tables scroll in arole="region"withtabindex="0"and anaria-label, with a focus outline. Also found and fixed: below 860 px the facet sidebar stacks above the content but stayedposition: sticky. While scrolling it covered the catalogue table on Browse (704 of 844 px of the viewport) and on category pages, and the plot on the maps. It now scrolls away with the page, and it stays sticky on wide screens.test_map_plot_scales_to_its_container(4),test_map_data_table_scrolls_in_a_named_focusable_region(4),test_facet_sidebar_is_not_pinned_over_content_on_narrow_screensCatalogue candidate features (fleet candidate review, 2026-10-25)
skip_linkbase.htmland the landing start with "Skip to main content", shown only while focused, targeting<main id="main-content" tabindex="-1">. The discussions index already had one from the shared claw template.test_first_tab_stop_skips_to_main(10 page types: landing, Browse, category, record, 4 maps, schema, 404)<main>.not_found_page/TraitMech/,/pages/and/pages/traits/ecology/just gen-pagesnow also writes a themed404.htmlat the repository root, which is this branch-built site's publishing root. It is rendered fromtemplates/404.html(base shell, search into Browse, links to home, Browse, schema and All Mech projects). Every link, the stylesheet and the script are site-root-absolute (/TraitMech/pages/...), because GitHub serves the file at whatever missing path was asked for. It carries no corpus stamp, so curation PRs never rewrite it.test_not_found_page_is_current_and_every_site_link_is_root_absolute: the committed file equals a fresh render, every site link is/TraitMech/-absolute and names a tracked file, and there is no corpus stamp.404.html) was hit at/TraitMech/no-such-page,/TraitMech/pages/no-such-page-q7.htmland/TraitMech/pages/traits/ecology/nope.html. Each returns 404 with the styled page and theme toggle, all 15 site links answer 200, and there is no overflow. Searching "pathogen" from the deep 404 lands on Browse showing "9 of 1130 records shown".curation_noticeMappingStatusEnumat render time and never paraphrased, with a link to the schema page's status definitions.test_record_page_explains_its_status_in_the_schemas_words(4 statuses, compared with a liveSchemaView),test_landing_states_what_each_status_means_with_its_count,test_committed_pages_carry_the_curation_noticeCandidate features left out or partial: whether
REVIEWEDmeans a human review is not stated on the site. The curation playbook's checklist says "REVIEWEDafter human curator signoff". However, every recordedcuration_historyevent in the corpus (6,255) namesclaude,codexor a script, including the 192 changes that read as promotions to REVIEWED. The repository does not settle the question, so the site quotes only the schema ("Curator has signed off on label / definition / parents."). It also says each record page lists every curation event with its curator. The repository owner should decide the wording; the question is tracked in issue #2027.Sibling-Mech link guard (the standard's
cross_mech_linksrepair rule):test_sibling_links_in_renderer_sources_use_verified_routesandtest_every_sibling_link_in_the_built_site_uses_a_verified_routeallow only the standard's verified search and record routes, PathwayMech'spages/records/among them, plus the exact site roots used by the footer's sibling links. The second test also covers the/404.htmlpage and the discussions index.Mutation check: 17 targeted reverts of individual changes, each run in a fresh pytest process, each turned at least one of the new tests red. Two tests were first green under a mutation and were then tightened: the synonym DOI is also cited elsewhere on the page, and the footer also links the schema page. The review fixes add six more mutations:
];*and backtick no longer trimmed;LICENSEandLICENSE-CODEconsistently changed to MIT while the footer still says BSD (only the new licence test goes red);pages/;The candidate features add nine more:
base.html;<main>id removed;pages/regenerated.All of them turn the new tests red.
Independent review follow-ups
e1e7be36.e1e7be36.e1e7be36.cross_mech_linksis repair-only in this wave), so it is left for the coordinator.Checks run (final, at
5ba96634: everything above, the #2033 autolink fix, and main atbc1dfa79)Main has since gained #2029 and #2032. Between them they touch only reviews, workflow records,
INFRA_TASKS.md, history records andscripts/audit_evidence_snippets.pywith its test. They change no renderer source, data or generated output, so they were not merged in.5ba96634): a URL or DOI token now ends at the first)that closes no(opened inside it, and scanning resumes after the token rather than the regex match, the approach of the PathwayMech port.test_autolink_ends_a_token_at_a_parenthesis_it_never_opened, with 4 cases: two parenthesised URLs joined by-,see (https://a/x), (https://b/y),https://en.wikipedia.org/wiki/Foo_(bar)kept whole, and(see 10.1016/0005-2744(70)90044-4).just gen-pagesafter the fix changed no committed page.just qc: exit 0 (8.7 min). This includes ruff,validate-strict,audit-discussions-datawithrender_discussions_shell.py --check, andaudit-derived-reports(OK pages/, all reports current).tests/test_unified_site_features.pyplus the existing render and discussions tests: 199 passed. The unified-features file alone: 94 passed.uv run pytest tests/ -qafteruv sync --extra dev, the CI install step, atd3879590, before the autolink merges two parenthesised URLs joined without whitespace into one wrong link #2033 change toautolink()and its tests: 4,966 passed, 1 failed. The failure istest_record_review_contract.py::test_every_saved_structured_bundle_is_valid, which needs review-base commitcd2380c02edcin the local object store. The commit exists on GitHub, and CI fetches it withfetch_record_review_bases.py --applybefore pytest. This run skipped that network step. CI passed this test at an earlier head of this PR.%5D,%2Aor%60: 0 (4 before the F1 fix).rel="nofollow noreferrer"hrefs, 0 carry Markdown debris.href="#"anchors.d3879590(site output is unchanged since):/favicon.icorequest (404).kg-microbe-site check --mech traitmech, run from claw withTRAITMECH_ROOTset to this worktree: clean, 1,147 pages.Left out, and why
docs/SCHEMA.mdis stale but was not edited here. It is a hand-written Markdown page outside this change's tooling. A follow-up should replace its table with a pointer topages/schema.html.<code>. The same identifier is linked in the Identifier card beside it, and linking both would add a duplicate tab stop.build_provenanceandshareable_stateare present on the main surfaces and are not in this wave's scope for that page.just qcrewrites the trackedreports/proposal_citation_audit.tsv. The committed copy is already stale against main's data (11 rows, for examplegao_her_systemafter the Cycle 4 Stage 5 record curation). This is pre-existing, not part of this change, and is excluded from the commit.Review
Two independent read-only reviews: the first (head
22ee3d47) found four issues, filed as #2022 to #2025; the delta review (headd3879590) verified the fixes with 14 targeted reverts and found three nits, filed as #2030 and #2031 (the third is the owner decision already in #2027).Fixes #2022
Fixes #2023
Fixes #2024
Fixes #2031
Fixes #2033
Filed, not addressed by this PR: #2025 (TaxonMech links for canonical-example taxa, a new cross-Mech relation), #2027 (whether REVIEWED means human review), #2028 (stale tracked citation-audit report), #2030 (guard test coverage of dashboard pages).
🤖 Generated with Claude Code