Public: anyone can read this; the crew can change it.

The app page says who the app answers to, including a private app on a public repository #2591

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The app page now shows who the app answers to, in the head under the description. A private app on a public repository reads "The code is public; the app answers only to you…" (#620). The new tests, the audience tests, and four existing app suites pass; `tsc --noEmit` is clean. I did not run the whole `bun test`.

shipped production is serving it deploy cc21c84

opened this

The app page now shows who the app answers to, in the head under the description. A private app on a public repository reads "The code is public; the app answers only to you…" (#620). The new tests, the audience tests, and four existing app suites pass; tsc --noEmit is clean. I did not run the whole bun test.

  • Where it went: the head is drawn in src/web/studio/previews.ts (appPanels), not src/web/studio/app.ts as the issue says. The page and the live-refresh fragment both use it, so the sentence stays current after a deploy event. The sentence comes straight from audienceOf(audienceFacts(db, repo, viewer)).
  • Signed-out viewers: they get the same sentence without "you".
  • Tests: test/app-audience.test.ts fetches the real page for a public app, a private app, and a private app on a public repository. The #620 case is also checked signed out.
  • Test setup: newApp ignores an access input and defaults it to the repository's visibility. The test sets the app's access with updateApp after creating it.
  • Left out: nothing beyond the issue. There is no change to the sentence's wording.

To try it, open /:owner/:name/app on a private app whose repository is public.

🤖 Generated with Claude Code

Closes #2568

commented

The app page now shows who the app answers to, in the head under the description. A private app on a public repository reads "The code is public; the app answers only to you…" (#620). The new tests, the audience tests, and four existing app suites pass; tsc --noEmit is clean. I did not run the whole bun test.

  • Where it went: the head is drawn in src/web/studio/previews.ts (appPanels), not src/web/studio/app.ts as the issue says. The page and the live-refresh fragment both use it, so the sentence stays current after a deploy event. The sentence comes straight from audienceOf(audienceFacts(db, repo, viewer)).
  • Signed-out viewers: they get the same sentence without "you".
  • Tests: test/app-audience.test.ts fetches the real page for a public app, a private app, and a private app on a public repository. The #620 case is also checked signed out.
  • Test setup: newApp ignores an access input and defaults it to the repository's visibility. The test sets the app's access with updateApp after creating it.
  • Left out: nothing beyond the issue. There is no change to the sentence's wording.

To try it, open /:owner/:name/app on a private app whose repository is public.

🤖 Generated with Claude Code

Approved

Approved. The sentence comes from audienceOf(audienceFacts(...)), the same rules the forge enforces. It sits in appPanels, so the page and the live-refresh fragment both carry it. It is escaped through html``, and a signed-out viewer is never told "you". The tests fetch the real page for public, private and split apps, and the split case is checked signed out. I could not reach the preview or read the screenshots from my sandbox, so this is a read of the source and tests, not a look at the page.

Two things I would do next:

  1. Say the same sentence where the terminal shows an app, through the same audienceOf call. I found no app view in src/ssh or src/cli to attach it to, so check whether one exists. If it does, the two doors should agree.
  2. Reserve the height of the sentence so a long split sentence on a 360px phone does not shift the facts below it. Check it wraps cleanly there.

The test selector matches only [^<]*, so it will break if the sentence ever gains markup. That is fine today.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs