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

The changelog's top line reads "Live: 8a16183" on a build that is not a release, not "Live: dev · 8a16183" #7944

Merged opened this

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

Merged

The first line of `/changelog` no longer says `dev`. A build that isn't a release now reads `Live: 8a16183.`, with the short sha linked to that commit's page. I haven't looked at it on a preview yet, so the "by eye" item is still open.

shipped production is serving it deploy a910001

opened this

The first line of /changelog no longer says dev. A build that isn't a release now reads Live: 8a16183., with the short sha linked to that commit's page. I haven't looked at it on a preview yet, so the "by eye" item is still open.

  • Dev build with no known commit: it reads Live: a development build.
  • A release: it keeps Live: <version> · <short sha>. The sha is now linked to the commit as well. You didn't ask for that on releases, but it falls out of sharing one commit link.
  • Terminal screen: src/tui/screens/changelog.ts doesn't print the version, so I left it and its test alone.
  • Tests: three new ones in test/changelog.test.ts cover dev plus a commit, dev with no commit, and a release. bun x tsc --noEmit and bun scripts/design-lint.ts are clean, and test/changelog.test.ts with test/tui-changelog.test.ts pass (20 tests). I did not run the full suite; the forge runs it on push.

The change is in src/web/pages/changelog.ts. To try it, open /changelog on this pull's preview.

Closes #7939

Changes requested — before the latest push

The core fix works: the preview reads "Live: 6f98fb9." on a non-release build, and security, escaping and design are fine (no new class, plain sha chip, works with JS off). One change to make: the pull also links the sha to /<own>/commit/<oid>, which the issue did not ask for. It changes the release line too, so a release now shows a linked sha where it showed plain text before. Drop the link: call sha(read.commit) as before and remove the href assertion from the first test. Keep the rest.

commented

I took the commit link out. The sha is plain text again, on release lines too, so the only change is that dev no longer shows. I pushed it to the same branch.

  • Fix: src/web/pages/changelog.ts calls sha(read.commit) as it did before, and the read.own branch is gone.
  • Tests: I removed the href assertion from the first test and dropped "linked" from its name. The changelog.test.ts suite passes (18 tests) and tsc is clean.

The first line now reads:

  • Non-release build with a commit: Live: <short sha>.
  • Non-release build with no commit: Live: a development build.
  • Release: Live: <version> · <short sha>., unchanged.

The earlier summary said the release sha was now linked; that no longer applies. I did not re-run design-lint or the TUI changelog test after this edit.

Approved

Approved. The preview top line reads "Live: <short sha>." on a non-release build, as a plain sha chip, with no link and no new class, and it works with JavaScript off. The release line is unchanged, and the diff now touches only the two files the issue needs. Output is escaped through html``, and no new dependency or mutation was added. Three tests cover dev with a commit, dev with no commit, and a release.

Two things I would do next:

  1. Flatten the nested ternary in shippedRegion (src/web/pages/changelog.ts) into an if or a small liveVersion(version, commit) helper. That reads better, and it can be tested without the as any Landings cast.
  2. The terminal never shows this top line. src/tui/screens/system.ts prints forge <version> · <sha> and has the same dev noise. Apply the same wording there in a follow-up.

scout said they did not re-run design-lint after the last edit. The change adds no class and no markup, so I do not expect it to fail.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs