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

A note's status says "Shipped in <release>", or "Shipped on <date>" until a release includes it #5789

Merged opened this

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

Merged

A closed note whose fix was merged now reads "Shipped in <release>" once a release holds the fix, and "Shipped on <date>" while none does. `test/apps-feedback.test.ts` passes (17 tests) and `bun x tsc --noEmit` is clean. I did not run the rest of the suite or `design-lint`.

shipped production is serving it deploy 2fa0c24

opened this

A closed note whose fix was merged now reads "Shipped in <release>" once a release holds the fix, and "Shipped on <date>" while none does. test/apps-feedback.test.ts passes (17 tests) and bun x tsc --noEmit is clean. I did not run the rest of the suite or design-lint.

  • How a note finds its release: the merged pull whose description says "Closes #N" is the one that shipped the note's issue. Its release is the newest healthy row in src/release/record.ts with that pull number. The new helpers are mergedPullClosing in src/core/pulls.ts and releaseOfPull in record.ts. statusOf in src/actions/app_notes.ts uses them, and the toolbar panel already prints the label, so proxy.ts is untouched.
  • The date: it is the pull's merge date. A note closed by hand with no merged pull keeps the old behaviour, the issue's close date.
  • Release name: the release table stores a commit, not a version. A release's "name" is therefore its 12-character commit id, the same one the Releases page shows. Mapping a pull to a version such as 0.7.251 would mean searching git history on every status read. I left that out; if you want the version, it's a follow-up.
  • Only the forge's own repository has release rows. For any other app the note always says "Shipped on <date>".
  • Test: the new test closes one note whose pull is in a release and one whose pull is merged but unreleased. It fails without the change. It uses its own app, because the other tests had used up the shared app's daily note limit.

Phone layout (#5222) can proceed.

Closes #5412

commented

A closed note whose fix was merged now reads "Shipped in <release>" once a release holds the fix, and "Shipped on <date>" while none does. test/apps-feedback.test.ts passes (17 tests) and bun x tsc --noEmit is clean. I did not run the rest of the suite or design-lint.

  • How a note finds its release: the merged pull whose description says "Closes #N" is the one that shipped the note's issue. Its release is the newest healthy row in src/release/record.ts with that pull number. The new helpers are mergedPullClosing in src/core/pulls.ts and releaseOfPull in record.ts. statusOf in src/actions/app_notes.ts uses them, and the toolbar panel already prints the label, so proxy.ts is untouched.
  • The date: it is the pull's merge date. A note closed by hand with no merged pull keeps the old behaviour, the issue's close date.
  • Release name: the release table stores a commit, not a version. A release's "name" is therefore its 12-character commit id, the same one the Releases page shows. Mapping a pull to a version such as 0.7.251 would mean searching git history on every status read. I left that out; if you want the version, it's a follow-up.
  • Only the forge's own repository has release rows. For any other app the note always says "Shipped on <date>".
  • Test: the new test closes one note whose pull is in a release and one whose pull is merged but unreleased. It fails without the change. It uses its own app, because the other tests had used up the shared app's daily note limit.

Phone layout (#5222) can proceed.

Approved

Does what the issue asks: a closed note reads "Shipped in <release>" when a healthy release holds the pull that closed it, and "Shipped on <merge date>" until then. Read-only queries with bound parameters, the label is built from sha and date only, and the new test fails without the change. Two things I would do next: (1) add a case for a note closed by hand with no merged pull, which should keep the issue close date, because nothing pins that fallback; (2) show a version instead of a 12-character commit id, as the author already proposed. mergedPullClosing scans up to 50 pull bodies per note with a LIKE, so cache it or index it if the notes panel gets slow with many shipped notes.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs