Repository navigation
landing: GitHub stars badge in the primary nav - #2311
Merged
Merged
Conversation
The plain GITHUB text link in the top nav of every page becomes a small badge: the GitHub mark and the star count (for example 14.2k), linking to github.com/xerj-org/xerj. The owner asked for this one exception to keeping GitHub out of the header. - scripts/seo/stars_badge.py reads stargazers_count from the GitHub API, saves it in scripts/seo/github_stars.json with the time it was read, and writes the badge into every primary nav (203 pages). --check verifies, --offline rewrites from the saved count. build_articles.py uses the same badge, so the generated article pages stay current. - landing/theme.js (already loaded on every page) refreshes the number from api.github.com, cached in localStorage for 10 minutes, so a browser makes at most 6 calls an hour against the 60/hour unauthenticated limit. Any failure keeps the shipped number; there is no empty state or spinner. - style.css: muted 1px frame, no gold, so it does not compete with the primary CTA; fixed-width count box, so a refresh causes no layout shift. - scripts/landing/test_stars_badge.cjs covers cache, refetch and failure. Fallback: 14,225 stars, read 2026-10-24T02:05:55Z.
Owner
Author
|
Xerj Merger made the fix: replaced the plain GITHUB nav link on every xerj.org nav page with a GitHub stars badge (build-time fallback count from scripts/seo/github_stars.json, refreshed in the browser via landing/theme.js with a 10-minute localStorage cache). All checks green on 5215c08; squash-merged pinned to that head. |
cursor Bot
pushed a commit
that referenced
this pull request
Oct 24, 2026
The only conflict was CHANGELOG.md. engine.rs and landing/llms-full.txt auto-merged. Both behaviours stay. #1981 (this branch): a flat RSS at or above the watermark releases the breaker after 2 seconds and does not re-arm inside the 4 MiB band. While that latch stays engaged, drain requests double from 2 seconds up to 15 minutes unless RSS falls by more than 4 MiB. corpus index reports eta_quality=stalled at 0/N and after 10 minutes of silence on a phase with no denominator. main, kept alongside that: - #2296 / #2294: an existing index's persisted index.default_pipeline is copied from settings.json back into the in-memory map on boot, failed-index retry, and snapshot restore. - #2303: a single-document write is acknowledged at a quorum of copies, with the replica-sync lock on the engine. - #2250 / #1612: neural autoindex prints an estimated embedding time, and --embed-mode stays fixed at ingest. llms-full.txt keeps that text and the 0/N stall sentence. - #2308 / #2305 and #2311 came in with no overlap on the drain schedule. CHANGELOG keeps the #1981 entry and main's #2294 default_pipeline entry. No .github file was edited. Verified (rustc 1.97.1 (8bab26f4f 2026-07-14), from engine/): - cargo +1.97.1 fmt -p xerj-engine -p xerj-autoindex -- --check: exit 0 - RUST_MIN_STACK=32MiB cargo +1.97.1 test --no-fail-fast -j 2 -p xerj-engine -p xerj-autoindex -- --test-threads=2: exit 0, 3118 passed, 0 failed, 29 ignored. Includes flat_rss_above_the_watermark_releases_and_does_not_rearm, drain_requests_back_off_when_rss_does_not_fall, rss_noise_around_a_flat_footprint_still_releases, commit_starvation_holds_a_flat_footprint_until_commit_returns, and a_phase_at_zero_reports_a_stall_once_nothing_completes. Co-authored-by: xerj-org <xerj-org@users.noreply.github.com>
cursor Bot
pushed a commit
that referenced
this pull request
Oct 24, 2026
#2311 and #2313 merged to main after ce2d7af. Both ship in rc.99 because the tag goes on the merge commit. [Unreleased] stays empty. #2313 improves #1170, which stays open: cluster mode opens {data_dir}/_raft and replays the committed prefix before it serves. Documents are not copied, and there is no InstallSnapshot. #2311 replaces the primary-nav GITHUB link with a stars badge. Footers and data-latest-tag stay V1.0.0-RC.99 / v1.0.0-rc.99. The shipped count is 14,225, read 2026-10-24T02:05:55Z. The window since v1.0.0-rc.98 is 93 merged pull requests. Co-authored-by: xerj-org <xerj-org@users.noreply.github.com>
cursor Bot
pushed a commit
that referenced
this pull request
Oct 24, 2026
gen_sitemap.py --write then --check after merging #2311. /, /agent-search/, and /for-agents move to 2026-10-24. 203 URLs, check passed. Co-authored-by: xerj-org <xerj-org@users.noreply.github.com>
Merged
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.
Adds a live GitHub stars badge to the xerj.org header. The owner asked for this as the one exception to keeping GitHub out of the top of the page.
Preview (not production): https://preview-stars-badge.xerj.pages.dev
What changes
GITHUBtext link in the primary nav of all 203 nav pages is now the badge: GitHub mark plus the star count (★ 14.2k), linking to https://github.com/xerj-org/xerj. It replaces the link, so the nav does not get a second GitHub entry.https://api.github.com/repos/xerj-org/xerj(stargazers_count). It is stored inscripts/seo/github_stars.jsonwith its source and time: 14,225 stars, read 2026-10-24T02:05:55Z (Oct 23, 9:05 PM CDT). The badge is never empty and never shows a spinner.landing/theme.jsfetches the same endpoint in the browser. That file already loads on every nav page, so there are no extra requests for assets. The result is cached inlocalStorage(xerj.ghstars) for 10 minutes, so each browser makes at most 6 calls an hour against the 60/hour unauthenticated limit. If the call fails or is rate limited, the badge keeps the number it shipped with and logs nothing. The CSPconnect-srcalready allowsapi.github.com.min-width(7ch, tabular numbers), so the layout does not shift when the number updates.scripts/seo/stars_badge.pyrefreshes the count and rewrites the navs. It also has--offline(rewrite without fetching) and--check.build_articles.pynow uses the same badge, so its generated pages stay current.Checks
★ 14.2K(the nav is uppercase); href is the repo; clicking it opens the GitHub repo; aria-labelXERJ on GitHub, 14,225 stars; the localStorage cache is filled after the live fetch.stars_badge --checkok (203 navs).fix_heads --check,fix_links --checkandbuild_articles --checkok.seo_lint206 pages, 0 gate violations.factcheck --fail-on error0 errors. Sitemap ok. Landing node tests 28/28, including 4 new badge tests.Note
scripts/seo/set_nav.pyexists only on the open site remake stack (#1925, #1927, #1929, #1930), not on main. If that stack lands after this PR, its nav template needs the badge in place of theGITHUBlink, otherwise the badge is dropped.stars_badge.pycan then re-apply it with--offline.AI disclosure: this PR was written by an AI agent (Grok Bot) at the owner's request, and checked with the scripts and browser tests listed above. Please review before merging. Nothing has been merged or deployed to production.