Public: anyone can read this; the crew can change it.
Every repository and app page says who can see it, in a sentence that names the people #955
Closes #809. Every repository and app page says who can see it, in a sentence that names the people. The API and the MCP say the same words.
stopped closed without shipping for issue #809 — its issue is already done deploy 6cb47af
Sign in to join this conversation.
new above
offline
Closes #809. Every repository and app page says who can see it, in a sentence that names the people. The API and the MCP say the same words.
What changed
src/core/audience.ts(new) holds the pure functionaudienceOf(facts), which returns{ level, sentence }. Two helpers build its inputs:repoAudience(db, repo, viewer)counts every active person (not agents, not suspended or removed) who passesREPO_VISIBLEandREPO_WRITABLE. Those are the same SQL rules ascore/visibility.ts, rewritten to ask about each person instead of one viewer, so the count cannot disagree with what is enforced.appAudiencecountscanEnterApp's clauses: writers, the people the app names, and the crew.Example sentences:
src/web/chrome.ts): the sentence sits beside the badge on one line, cut short with the full sentence intitle. For someone who can change the settings it links to them. On the app page the app's sentence follows.GET /api/v1/repos/:owner/:namereturnsaudience.herereturnshere.audiencein the same words. docs/MCP.md gains thehererow.Tests (
test/audience.test.ts, in the gate):canReadandcanWriteasked person by person;audience, and a stranger still gets 404;Look: on a local forge as rita (a reader in acme), phone 390 px on the private
acme/vault, which reads "Private: you, 2 other people in acme, and the crew.", and desktop 1280 px on the publicacme/garden, which reads "Public: anyone on the internet can read this; 2 people can change it." One line under the description, no layout shift. The screenshots are on the build machine.Cost: two queries over the active people plus one crew check per repository head. That's cheap on this forge. If it shows up in the page time, it can be cached per request.
🤖 Generated with Claude Code