Skip to content

docs: make the donation ask findable, add contributors and a star chart - #155

Merged
abdulsaheel merged 2 commits into
mainfrom
docs/support-and-social
Jul 26, 2026
Merged

docs: make the donation ask findable, add contributors and a star chart#155
abdulsaheel merged 2 commits into
mainfrom
docs/support-and-social

Conversation

@abdulsaheel

@abdulsaheel abdulsaheel commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

User description

Donations were invisible

The addresses were technically present and practically undiscoverable — one line at the very bottom of the README pointing at DONATE.md. Anyone who wanted to support the project had to go hunting for how.

Now:

  • Donate badge in the header row.
  • A centred block directly under Install — which is where someone is standing at the moment they decide they like it, rather than 200 lines further down.
  • Same block on the landing page, boxed in the accent colour, plus a Donate link in the site nav.

Same content and same addresses. Just findable.

Contributors

A contributors section crediting the people who made it better — mostly by wearing it on a real wrist and reporting what came out wrong. Worth saying out loud, since otherwise there's exactly one person's physiology in the test data.

Star chart — self-hosted, deliberately

I tried the two obvious services first. Neither works:

Service Result
star-history.com Refuses these repos: GitHub restricted starred-data access for openstrap/edge
starchart.cc Rate-limited: {"error":"rate limited, please try again later"}

Beyond both being unreliable, both would make every visitor's browser call a third party. GitHub proxies README images through camo so it wouldn't leak there — but the landing page has no such protection, and a page whose argument is "your data stays on your device" shouldn't quietly be making outside requests.

So tool/gen_star_history.py pulls the stargazer timestamps and emits a plain SVG — no script, no external reference, theme-aware light/dark — and .github/workflows/star-history.yml regenerates it weekly, committing only when it actually changed.

It plots all three repos, and makes the real story legible:

star history

That cliff is Hackaday and Adafruit on the same day (2026-07-15) — ~40% of all stars arrived in the following 48 hours. More honest than a bare star count.

On "GitHub trending"

There's no trending badge to add — GitHub exposes no trending API, and the third-party ones (Trendshift and similar) require being featured, which you apply for rather than embed. The downloads + stars badges and the growth chart are the closest honest equivalent, so that's what's here.

Two things worth reviewing

  1. star-history.yml needs contents: write to commit the regenerated SVG. That's a deliberate exception to the read-only default I set on the test workflow last week, scoped to this one job.
  2. I corrected my own overclaim mid-PR. I'd written that the landing page "makes no outside requests" — untrue, since the screenshots load from raw.githubusercontent.com. Reworded to state exactly what's true: the chart is self-hosted, there's no analytics or third-party service, and the images come from GitHub. Same standard as the "no cloud" fix in ci + docs: test gate on PRs, TestFlight install, landing page, contributor on-ramp #154.

Docs, one workflow and one script only — no Dart touched, so nothing in the test suite is affected.


PR Type

documentation, enhancement


Description

  • Donation addresses moved to prominent positions in README and landing page

  • Added contributors section (contrib.rocks) and star history chart to README

  • Self-hosted SVG star history chart generated via new Python tool, avoiding third-party services

  • Weekly GitHub Actions workflow regenerates and commits the star chart when changed


Diagram Walkthrough

flowchart LR
  A["tool/gen_star_history.py"] -- "fetches stargazer data, emits SVG" --> B["docs/star-history.svg"]
  C[".github/workflows/star-history.yml"] -- "runs weekly, commits if changed" --> B
  B -- "embedded in" --> D["README.md"]
  B -- "embedded in" --> E["docs/index.html"]
  F["Donate badge + block"] -- "added to header + under Install" --> D
  G["Donate section (styled)"] -- "added with id=support, nav link" --> E
  H["docs/style.css"] -- "new .donate / .growth styles" --> E
Loading

File Walkthrough

Relevant files
Configuration changes
star-history.yml
Weekly CI workflow to regenerate self-hosted star chart   

.github/workflows/star-history.yml

  • New weekly workflow (Mondays 04:17 UTC) that runs
    tool/gen_star_history.py and commits docs/star-history.svg only when
    it changed
  • Uses contents: write permission scoped to this job; workflow_dispatch
    also supported
  • Concurrency group prevents overlapping runs
+49/-0   
Documentation
README.md
Promote donation, contributors, and star history in README

README.md

  • Added downloads, stars, and Donate badges to the header badge row
  • Inserted a centred donation block with BTC/EVM addresses directly
    after the Install section
  • Added a Contributors section with contrib.rocks image
  • Added a Star history section embedding docs/star-history.svg with
    context about the Hackaday/Adafruit spike
  • Rewrote the "Support the work" footer blurb to be shorter and point to
    DONATE.md
+61/-4   
Enhancement
index.html
Landing page: prominent donate block and star history section

docs/index.html

  • Added "Donate" link in site nav pointing to #support anchor
  • Replaced the plain support section with a styled .donate block
    containing BTC/EVM addresses and explanatory fineprint
  • Added a new .growth section embedding the self-hosted star-history.svg
    with explanatory caption
+39/-13 
style.css
CSS for donate block and star history section on landing page

docs/style.css

  • Added .growth styles for the star history image (responsive, bordered,
    rounded)
  • Added .donate block styles: accent-coloured border, background
    surface, prominent heading
  • Added .donate-lede, .donate .fineprint, and .addr code rules for
    layout and mobile word-break on long crypto addresses
+54/-0   
gen_star_history.py
Python tool to generate self-hosted SVG star history chart

tool/gen_star_history.py

  • New Python script that paginates the GitHub stargazer API for all
    three OpenStrap repos
  • Renders a theme-aware (light/dark via CSS media query) step-function
    SVG with no external references or scripts
  • Writes output to docs/star-history.svg; includes y-axis rounding,
    legend, and timestamp
+165/-0 

Summary by CodeRabbit

  • Documentation

    • Updated the README with downloads and star badges, donation details, contributor information, and project star history.
    • Added a Donate link and refreshed support content on the documentation site.
    • Added Bitcoin and EVM donation details with improved formatting for smaller screens.
  • New Features

    • Added a project star-history chart displaying growth over time.
    • Star-history data is refreshed automatically on a regular schedule.

The addresses were technically present and practically invisible — a line at
the very bottom of the README pointing at DONATE.md. Anyone who wanted to
support the project had to go looking for how.

Now: a donate badge in the header row, and a centred block directly under
Install, which is where people are when they've just decided they like it.
Same block on the landing page, boxed in the accent colour, with a Donate
link in the site nav. Same content, just findable.

Adds a contributors section (contrib.rocks) that credits the people who
made it better — mostly by wearing it on a real wrist and reporting what
came out wrong, which is worth saying out loud given there is one person's
physiology in the test data.

Star chart is SELF-HOSTED, and that is deliberate rather than
not-invented-here:

  * star-history.com refuses these repos outright — it answers "GitHub
    restricted starred-data access for openstrap/edge".
  * starchart.cc rate-limits anonymous callers, so the image renders as a
    broken graphic some of the time.
  * Both would have every visitor's browser call a third party. GitHub
    proxies README images through camo, so that would not leak there, but
    the landing page has no such protection, and a page arguing your data
    stays on your device should not be quietly making outside requests.

So tool/gen_star_history.py pulls the stargazer timestamps and emits a plain
SVG — no script, no external reference, theme-aware for light and dark — and
a weekly workflow regenerates it and commits only when it changed. The
chart shows all three repos and makes the Hackaday/Adafruit spike obvious,
which is a more honest picture of where this actually stands than a star
count on its own.

Also added downloads and stars badges. There is no such thing as a GitHub
trending badge — GitHub exposes no API for it — so those plus the chart are
the closest honest equivalent.

Note the star-history workflow needs `contents: write` to commit the
regenerated file. That is a deliberate exception to the read-only default on
the test workflow, scoped to this one job.
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@abdulsaheel, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 54 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1f42452c-6a57-44b5-a6a9-df576fd7cbbd

📥 Commits

Reviewing files that changed from the base of the PR and between 542d6e9 and 00b0e28.

⛔ Files ignored due to path filters (1)
  • docs/star-history.svg is excluded by !**/*.svg
📒 Files selected for processing (1)
  • tool/gen_star_history.py
📝 Walkthrough

Walkthrough

Changes

The pull request adds a star-history SVG generator and weekly/manual GitHub Actions refresh workflow, then integrates the generated chart and expanded donation content into the README and documentation landing page.

Star history and donations

Layer / File(s) Summary
Star-history SVG generator
tool/gen_star_history.py
Fetches paginated GitHub stargazer timestamps, builds a labeled SVG chart, handles API failures, and writes docs/star-history.svg.
Scheduled star-history refresh
.github/workflows/star-history.yml
Runs weekly or manually, and commits and pushes the generated SVG only when it changes.
Documentation and landing-page presentation
README.md, docs/index.html, docs/style.css
Adds star-history and contributor sections, donation navigation and address details, updated support copy, and responsive styling for the new content.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant Generator
  participant GitHubAPI
  participant Repository
  GitHubActions->>Generator: run tool/gen_star_history.py
  Generator->>GitHubAPI: request paginated star timestamps
  GitHubAPI-->>Generator: return stargazer data
  Generator->>Repository: write docs/star-history.svg
  GitHubActions->>Repository: commit and push when SVG changes
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main documentation changes: donation visibility, contributors, and the new star chart.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/support-and-social

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

(Review updated until commit 00b0e28)

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

@github-actions

Copy link
Copy Markdown
Contributor

PR Code Suggestions ✨

No code suggestions found for the PR.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tool/gen_star_history.py`:
- Around line 140-142: Update the output generation near the stamp construction
and SVG text append so unchanged star data produces identical output across
runs: remove the current-date “updated” stamp, or derive it from the latest
stargazer timestamp instead of datetime.now(timezone.utc). Preserve the existing
SVG formatting and use the star data’s latest timestamp when retaining the
label.
- Around line 150-154: Update the repository-processing flow around
stargazer_dates so a RuntimeError aborts the entire chart generation instead of
continuing to publish a partial result. Preserve the warning output, then
propagate or otherwise terminate generation before docs/star-history.svg is
overwritten or committed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 22748353-c67f-4169-b9d9-817ed3766d83

📥 Commits

Reviewing files that changed from the base of the PR and between 70654db and 542d6e9.

⛔ Files ignored due to path filters (1)
  • docs/star-history.svg is excluded by !**/*.svg
📒 Files selected for processing (5)
  • .github/workflows/star-history.yml
  • README.md
  • docs/index.html
  • docs/style.css
  • tool/gen_star_history.py

Comment thread tool/gen_star_history.py Outdated
Comment thread tool/gen_star_history.py Outdated
Two CodeRabbit findings on the generator, both correct.

The chart stamped datetime.now(), which changed the SVG on every run. That
made the workflow's `git diff --quiet` no-change path unreachable, so it
would have committed a pointless revision every Monday forever — the exact
churn that guard exists to prevent. The stamp now comes from the most
recent star, so the file is byte-identical until a star actually arrives,
which is precisely when a commit is warranted. Verified: two consecutive
runs now produce identical bytes.

Second, a failed fetch for one repo was logged and skipped, then the
partial chart was written and committed over the last good one — a
transient API blip would silently drop a series from the published chart.
Now aborts instead, leaving the previous complete chart in place until the
next run.
@abdulsaheel

Copy link
Copy Markdown
Collaborator Author

Both CodeRabbit findings applied — the first was a real bug in the workflow

1. The chart wasn't deterministic, which defeated its own no-change guard.

I stamped datetime.now(), so the SVG differed on every run — meaning git diff --quiet could never take its no-change path, and the workflow would have committed a pointless revision every Monday forever. Exactly the churn that guard exists to prevent, and I'd have shipped it.

Stamp now derives from the most recent star, so the file is byte-identical until a star actually arrives — which is precisely when a commit is warranted. Verified:

two consecutive runs → byte-identical ✓
stamp now reads: "to 2026-07-25"

2. A partial chart could overwrite a good one.

A failed fetch for one repo was logged and skipped, then the incomplete chart was written and committed over the last good version — so a transient API blip would silently drop a series from the published chart, with no signal that it had happened. Now aborts instead, leaving the previous complete chart in place until the next run. Fail-closed is right here: a missing week is recoverable, a silently-degraded published artefact isn't.

Confirmed no imports became unused after removing the wall-clock call.

@github-actions

Copy link
Copy Markdown
Contributor

Persistent review updated to latest commit 00b0e28

@github-actions

Copy link
Copy Markdown
Contributor

PR Code Suggestions ✨

No code suggestions found for the PR.

@abdulsaheel
abdulsaheel merged commit 4d8899f into main Jul 26, 2026
3 checks passed
@abdulsaheel
abdulsaheel deleted the docs/support-and-social branch July 26, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant