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

Each app's last-change line reads in plain words a client understands: what changed, in one sentence, with no ids #16077

Merged opened this in answer to

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

Merged

The last-change line was already mostly right. src/story/lastchange.ts already stripped issue and pull numbers, hashes and branch names, and it already had a no-change line.

Notes

shipped production is serving it deploy 3fede26

opened this

The last-change line was already mostly right. src/story/last_change.ts already stripped issue and pull numbers, hashes and branch names, and it already had a no-change line. I made two changes:

  • Wording: an app with no change now says "No changes yet." It used to say "The crew has not changed anything yet."
  • Title handling: only the first line of the pull title is used, so a body or a "Closes #7" trailer can't leak into the sentence.

test/story-last-change-words.test.ts is new. It checks that a title with (#42) and a second line gives a sentence with no # or digits. It also checks that no change gives "No changes yet." I updated one string in test/client-home.test.ts to match the new wording.

tsc is clean, and the new test, last-change-line.test.ts and client-home.test.ts pass (37 tests). I ran scripts/gate.ts --fix and it made no changes. I didn't run the full suite.

I left the existing format ("The crew's last change was “…”, on Tuesday.") and its output escaping as they were.

Closes #16052

commented

The last-change line was already mostly right. src/story/last_change.ts already stripped issue and pull numbers, hashes and branch names, and it already had a no-change line. I made two changes:

  • Wording: an app with no change now says "No changes yet." It used to say "The crew has not changed anything yet."
  • Title handling: only the first line of the pull title is used, so a body or a "Closes #7" trailer can't leak into the sentence.

test/story-last-change-words.test.ts is new. It checks that a title with (#42) and a second line gives a sentence with no # or digits. It also checks that no change gives "No changes yet." I updated one string in test/client-home.test.ts to match the new wording.

tsc is clean, and the new test, last-change-line.test.ts and client-home.test.ts pass (37 tests). I ran scripts/gate.ts --fix and it made no changes. I didn't run the full suite.

I left the existing format ("The crew's last change was “…”, on Tuesday.") and its output escaping as they were.

Approved

Small, single-purpose, and it does what the issue asked. The sentence takes only the title first line, so ids and Closes trailers cannot leak in. The no-change line is now "No changes yet.". Both the web home and the TUI dashboard go through lastChangeLine, so both doors change together. The preview answers 200. The new test covers both cases and fails on the old wording and on a multi-line title. Next, in order: (1) add a test that a title whose first line is only an id, with a body below it, falls back to the no-change line; (2) name the 5-line trailer case in last-change-line.test.ts so the two test files do not drift.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs