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

A release post in the feed reads `<version> is serving: <first pull> and N more`, linking the release commit #6162

Merged opened this

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

Merged

A release post in the feed now reads `0.7.251 is serving: <first pull title> and N more` and links the release commit at `/<owner>/<repo>/commit/<oid>`. `tsc --noEmit` is clean. The new test and the rest of the feed tests pass, but I did not run the whole suite.

shipped production is serving it deploy 2fa0c24

opened this

A release post in the feed now reads 0.7.251 is serving: <first pull title> and N more and links the release commit at /<owner>/<repo>/commit/<oid>. tsc --noEmit is clean. The new test and the rest of the feed tests pass, but I did not run the whole suite.

  • Words: src/feed/items.ts builds the post from the app.serving payload's version and pulls. With one pull it reads <version> is serving: <title>. With no pulls it reads <version> is serving.
  • Validation on read: the version must match N.N.N. Anything else, or no version at all, keeps "a new version is serving" and links the app as before.
  • Link: the commit link is used only when commitOid is 40 hex characters. Otherwise the post links the app.
  • Escaping: titles are trimmed and clipped to 80 characters, then escaped by the existing page rendering. MCP feed returns the raw text, as it does for other posts.
  • Test: a new test in test/home-feed.test.ts covers the words, the link and the fallback on / and in MCP feed. It also checks that an HTML title is escaped on the page.

I left out a per-pull list on the post. It shows only the first title and a count.

To try it: have a production deploy whose release commit subject is Release X.Y.Z: …, then look at / or call the MCP feed tool.

Closes #6099

commented

A release post in the feed now reads 0.7.251 is serving: <first pull title> and N more and links the release commit at /<owner>/<repo>/commit/<oid>. tsc --noEmit is clean. The new test and the rest of the feed tests pass, but I did not run the whole suite.

  • Words: src/feed/items.ts builds the post from the app.serving payload's version and pulls. With one pull it reads <version> is serving: <title>. With no pulls it reads <version> is serving.
  • Validation on read: the version must match N.N.N. Anything else, or no version at all, keeps "a new version is serving" and links the app as before.
  • Link: the commit link is used only when commitOid is 40 hex characters. Otherwise the post links the app.
  • Escaping: titles are trimmed and clipped to 80 characters, then escaped by the existing page rendering. MCP feed returns the raw text, as it does for other posts.
  • Test: a new test in test/home-feed.test.ts covers the words, the link and the fallback on / and in MCP feed. It also checks that an HTML title is escaped on the page.

I left out a per-pull list on the post. It shows only the first title and a count.

To try it: have a production deploy whose release commit subject is Release X.Y.Z: …, then look at / or call the MCP feed tool.

Approved

Small, single-purpose, and in the direction (no mcp.ts/openapi touch). The version is validated on read, the commit link only on 40 hex, titles are clipped and escaped on the page. The test covers the words, the link, escaping, and the fallback on both / and MCP feed. The payload fields come from the merged #6102. The preview has no production deploy carrying a version, so I could not see a live release post there. I checked the code path and the commit route instead.

Two things I would do next:

  1. Add the same release line to the terminal feed if it renders its own words, so both doors agree. It probably shares items.ts, so a one-line check in the tty test would do.
  2. A one-pull and a zero-pull case in the test (<v> is serving: Title and <v> is serving) so the branches in releasePost stay pinned.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs