feat(sponsors): point TestMu AI at their own site - #515
Merged
Conversation
TestMu AI (GitHub login `LambdaTest-Inc`, formerly LambdaTest) asked for
their sponsor card to link to testmuai.com with UTM parameters instead of
their GitHub profile.
`wash()` in lib/landing/sponsors.ts is the only place a sponsor URL is
built, and it drops `login` on the way out, so the override has to live at
that stage. Both consumers — the landing sponsor wall and the
/sponsors.{svg,png} cards — read the washed `url`, so one map covers them.
Keyed on exact login casing, matching the EXCLUDED_LOGINS convention in
load-sponsors.ts. Tests cover the override, the untouched default, and
that a lowercased login does NOT match.
Note for whoever deploys: this does not take effect on merge. The KV
snapshot stores washed data and the SVG/PNG cards bake the href into their
bytes, so the new link only appears after a sponsors refresh — redeliver a
`sponsorship` webhook delivery from the napi-rs sponsors dashboard, or wait
for the daily 05:00 UTC cron.
Verified locally against the real Sponsors API: both the landing page and
/sponsors.svg render
`href="https://www.testmuai.com/?utm_medium=sponsor&utm_source=napi-rs"`
with no github.com/LambdaTest-Inc link remaining.
Also carries a 3-line lib/docs/lastmod.gen.json catch-up: the generator
picked up the real commit date for docs/cli/programmatic-api after #514
merged. Auto-generated, unrelated to the sponsor change.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013WduvbFaoon64GhYZZW6Ya
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.
TestMu AI (GitHub login
LambdaTest-Inc, formerly LambdaTest — $100/mo,slivertier) emailed asking for their sponsor card to link to their own site with UTM parameters instead of their GitHub profile.The change
wash()is the single URL construction site, and it discardslogin, so the override has to live at that stage — anything downstream would have to reverse-engineer the login out of a URL string. One map covers both consumers.Keyed on exact login casing, matching the
EXCLUDED_LOGINSconvention inload-sponsors.ts.The KV snapshot stores washed data (
store.ts:161) and the SVG/PNG cards bake the href into their bytes (refresh.ts:107). Both read paths hit that cache, notwash().sponsorshipwebhook from the napi-rs sponsors dashboardNote the cold-miss path on
/sponsors.svgcannot self-heal:routes/sponsors.svg.ts:74re-publishes the stale KV data it just read, so clearing R2 alone would re-bake the old URL.Verified locally
Against the real Sponsors API, both surfaces render the override and no
github.com/LambdaTest-Inclink remains:The
&correctly becomes&throughescapeXmlAttrand decodes back with both UTM params intact.Tests: override applies, non-overridden logins are untouched, and a lowercased login does not match. Full suite green (909 passed).
Not covered by this PR
Two parts of the sponsor's request are out of scope here:
![]()embeds render SVG in the browser's secure static mode where hyperlinks are inert —card.ts:87already documents this. That needs an explicit markdown link innapi-rs/napi-rs, not a change here.border-radius: 50%,borderRadius: size / 2). Their current GitHub avatar is already this logo's mark, correctly framed — so no change was needed. A local override would also have to be PNG/JPEG/GIF:avatars.ts:71rejects SVG and silently drops the sponsor from the card.🤖 Generated with Claude Code