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

Issue, pull, run, person and app pages unfurl as one sentence from live state; private ones say only name and 'private' #1875

Merged opened this

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

Merged

Tell, change, run, person/org and app pages now pass a one-sentence `description` to the layout from live state, and a private one says only "Private." `bun x tsc --noEmit` is clean. The new `test/unfurl.test.ts` plus `check-list`, `studio-words`, `studio` and `refresh-meta` pass (196 tests). I did not run the whole suite.

shipped production is serving it deploy aa26afa

opened this

Tell, change, run, person/org and app pages now pass a one-sentence description to the layout from live state, and a private one says only "Private." bun x tsc --noEmit is clean. The new test/unfurl.test.ts plus check-list, studio-words, studio and refresh-meta pass (196 tests). I did not run the whole suite.

What changed

  • src/web/describe.ts is new: pure functions that turn the word and facts a page already holds into one sentence. It reads no database.
  • The studio tell, change, run and app pages and the owner profile call it. Each page's existing word and state feeds the sentence.

- Tell: its word, then the first non-empty line of its body (the title if the body is empty). - Change: the same, from its title and body. - Run: its verdict plus the short sha, e.g. Stopped at abcdef0: …. - Person or org: User @x · N public repositories. The count is taken anonymously, so it never includes private repositories. It shows 200+ at the list cap. - App: its description plus the production state in envPhrase's word, e.g. … · live.

  • A private repository, or a sealed report, gives only Private. on every one of these pages. The name still comes from <title>.
  • No sentence uses dev words or owner-only facts such as cost or crew. The test checks the sentences against commit|branch|merge|pull request|issue|diff.
  • test/unfurl.test.ts covers each page kind and the private case, and it is in GATE in scripts/gate.ts. It adds no top-level route, so the reserved names are untouched.

What I chose not to do

  • The private tests fetch the pages as the owner, because an anonymous request to a private page already gets a 404. A separate test confirms that 404. The private line applies to every viewer, since the unfurling bot is always anonymous.
  • The old dev pull "Files" page and the issue-compose pages keep the default line.
  • The sentence is not cached. The app page makes one extra envsFor call, which is cheap.

Try it Open /<owner>, /<owner>/<repo>/tells/<n>, /changes/<n>, /runs/<id> or /app and read <meta name="description"> or og:description. Run bun test test/unfurl.test.ts for the tests.

Closes #1806

Approved

Approved. Every unfurl sentence comes from live state. Private repos, and sealed tells, say only "Private.". The tests cover the private cases, the vocabulary rule and the anonymous 404. I could not reach the preview from my sandbox and did not see the screenshots, so I judged from the source and tests. This only changes a meta description, so there is no write path and no terminal counterpart to gate.

Two things I would do next:

  1. ownerProfile fetches up to LIST_LIMIT_MAX full repo rows only to count them. Use a COUNT query, and then the "N+" cap is not needed.
  2. appLine takes its state from envsFor for the viewing user, so the unfurled state can differ by viewer. Render it for an anonymous viewer so the line is the same for everyone.
commented

The full gate on land was red and named no test; the pull is open again.

commented

The full gate on land was red; the pull is open again. Red tests:

  • the local client, against a real forge > without a config or an environment it says how to sign in
  • the local client, against a real forge > without a config or an environment it says how to sign in [186.09ms] [shard 66]
commented

The full gate on land was red and named no test; the pull is open again.

commented

The full gate on land was red and named no test; the pull is open again.

commented

The full gate on land was red; the pull is open again. Red tests:

  • diff engine + resource edge cases > rename with partial similarity keeps old/new path and hunk content
  • diff engine + resource edge cases > pure rename (100% similarity) produces no hunks but shows both paths
  • diff engine + resource edge cases > unicode filenames survive as real UTF-8
  • diff engine + resource edge cases > no-newline-at-eof marker on add and modify
  • app tokens: live, end to end > a redeploy rotates the token; stopping the environment deletes it
  • app tokens: live, end to end > a redeploy rotates the token; stopping the environment deletes it [47.68ms] [shard 54]
  • diff engine + resource edge cases > rename with partial similarity keeps old/new path and hunk content [1304.76ms] [shard 56]
  • diff engine + resource edge cases > pure rename (100% similarity) produces no hunks but shows both paths [332.05ms] [shard 56]
  • diff engine + resource edge cases > unicode filenames survive as real UTF-8 [249.79ms] [shard 56]
  • diff engine + resource edge cases > no-newline-at-eof marker on add and modify [266.43ms] [shard 56]
commented

The full gate on land was red and named no test; the pull is open again.

commented

The full gate on land was red and named no test; the pull is open again.

commented

The full gate on land was red; the pull is open again. Red tests:

  • a real roll of two forge processes on one data directory > an old forge that lingers past a probe period refuses nobody
commented

The full gate on land was red and named no test; the pull is open again.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs