Repository navigation
Ask the reader to star the repo, in the nav and the footer - #87
Merged
Merged
Conversation
The landing page linked to the repository twice and asked for nothing either time: `Self-host` in the nav and `GitHub` in the footer's Project column both led to the same place. Each is now the star chip instead, so the two places that already pointed at the repo do the asking. A chip rather than a button, because the ink pill is the only primary action on any surface and an open-source project asking to be starred must not compete with the channel the reader came to create. The nav takes the short label, since the mark carries the destination; the footer has the room to spell it out, and closes the block that says the project is open source. The count is shown whatever it is, nought included. `null` from `starCount` means GitHub did not answer, which is not the same as zero and renders as no number rather than as one. Nothing depends on the count, so every failure path returns null: a marketing number must not fail a build because GitHub was slow or had spent this IP's anonymous requests. The request carries a 2.5s abort for the first and is cached for an hour against the second, which leaves the pages statically prerendered with hourly ISR. It is wrapped in React's `cache` rather than left to fetch's own memoisation, because the abort signal opts it out of that and both the nav and the footer ask within one render. GitHub's mark sits beside its only consumer rather than in `icons.tsx`, an authored set on one stroke weight and one grid, or in `client-marks.ts`, which is keyed by the agent clients that can join a channel. It is neither, and both files are worse for holding it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully 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.
The landing page linked to the repository twice and asked for nothing either time.
Self-hostin the nav andGitHubin the footer's Project column both led to the same URL, so each becomes the star chip rather than gaining a third link beside it.What changed
Self-hosttext linkStar+ countGitHublist item in ProjectStar on GitHub+ count, closing the open-source blocklib/github.ts—repoUrl,starCount(),formatStars().app/components/star-button.tsx— an async server component. No client JS.Why a chip and not a button
DESIGN.md's ink pill rule: the only primary action on any surface isCreate a channel. An open-source project asking to be starred must not compete with the thing the reader came to do, so this uses the existing.chiptoken — 39px against the pill's 40px, so it reads a step lighter. The nav takes the short label since the mark carries the destination; the footer has the room to spell it out.The count
Shown whatever it is, nought included.
nullfromstarCountmeans GitHub did not answer — not the same as zero — and renders as no number rather than as one.Nothing depends on the count, so every failure path returns
null: a marketing number must not fail a build because GitHub was slow or had spent this IP's anonymous requests. A 2.5s abort covers the first, an hour of caching the second, which leaves/,/uses/[slug]and the 404 statically prerendered with hourly ISR. It is wrapped in React'scacherather than left to fetch's own memoisation, because the abort signal opts the request out of that and both nav and footer ask within one render.Notes for review
icons.tsx, which declares itself an authored set on one stroke weight and one grid, and notlib/client-marks.ts, which is keyed by the agent clients that can join a channel. It sits beside its only consumer instar-button.tsx, carrying the same provenance and trademark noteclient-marks.tsuses (Simple Icons, CC0 1.0, drawn whole and unaltered, never larger than Wave's own mark).aria-labelreadsStar Wave on GitHub, 2 starsin both places; the visible label and count arearia-hiddenso nothing is announced twice. This is what lets the nav get away with the one-word label.formatStarsrounds to tenths before branching, because(9950/1000).toFixed(1)is"9.9"in binary float.app/components/faq.tsx:6andlib/site.ts:59. Out of scope here; worth a follow-up to point both atrepoUrl.Verification
npm run typecheckandnpm run lintclean.mdboundary: 61px gap to the links, no overflow. Mobile: nav chip hides with the links, footer chip stays, no horizontal overflow..chipspec — pill radius, hairline at 6% ink, soft shadow, 13.5px.Not run:
next build, since a dev server held.nextthroughout. The ISR path is standard and every failure is caught, but worth a build before merge.🤖 Generated with Claude Code