From 683b7bad3c9c2c68c217cde901485b8433d6754b Mon Sep 17 00:00:00 2001 From: Frederic Jung Date: Sun, 25 Oct 2026 15:38:49 +0100 Subject: [PATCH] Shorter in-app release notes with a link to GitHub, one release per hour at most --- .claude/skills/release/SKILL.md | 22 ++++++++++++++++++++++ CHANGELOG.md | 3 +++ CLAUDE.md | 7 ++++++- site/i18n/it.js | 3 +++ site/index.html | 12 ++++++++++-- tests/persist.test.js | 16 ++++++++++++++++ 6 files changed, 60 insertions(+), 3 deletions(-) diff --git a/.claude/skills/release/SKILL.md b/.claude/skills/release/SKILL.md index fb36044..fe3c901 100644 --- a/.claude/skills/release/SKILL.md +++ b/.claude/skills/release/SKILL.md @@ -10,8 +10,26 @@ Bumping `version` in `package.json` on `main` is the release button. The that version's CHANGELOG section as notes, and dispatches `release.yml`, which deploys to GitHub Pages (https://seriesoftub.es). +## At most one release per hour + +Players get an update banner and a "What's new" window for every release, so ship at +most one release an hour. Before bumping, check when the last one went out: + +```bash +gh api repos/fjaeckel/seriesoftubes/releases/latest --jq '.tag_name+" "+.published_at' +``` + +- **Less than 60 minutes ago:** don't bump. Commit and push the work with its bullets + under `## [Unreleased]`; it goes out with the next release. Tell the user when the + next release slot opens. +- **60 minutes or more:** release everything under `## [Unreleased]` together, as one + version. +- **Only exception:** the live game is broken for players (it won't start, saves are + lost, a phone can't get past a screen). Then hotfix right away as a patch release. + ## Pick the version +- Several changes batched together: use the biggest one (any feature → minor). - Patch (`x.y.Z`): fixes, small tweaks, wording, icons. - Minor (`x.Y.0`): new features or content. @@ -41,6 +59,10 @@ to GitHub Pages (https://seriesoftub.es). ## Release notes rules +- The first sentence of each bullet is all the in-app "What's new" shows (at most five + bullets; longer notes get a link to the full GitHub release). Make that sentence + stand on its own: "Tier 1 networks can lay their own subsea cable (#22)." Detail goes + after it. - Written for players, in plain English. One bullet per change, issue numbers like `(#37)`. - Never mention hidden easter eggs or explain jokes. - No internal function names. diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c36434..04b8ce5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ All notable changes to this project are documented here. The project follows ## [Unreleased] +- The in-app "What's new" is shorter: the first sentence of each change, at most + five, with a link to the full release notes on GitHub. + ## [1.25.2] — 2026-10-25 - Tier 1 networks can lay their own subsea cable (#22). Pick two cities with a diff --git a/CLAUDE.md b/CLAUDE.md index fee591a..f68ee15 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -28,7 +28,12 @@ To play during development, open `site/index.html` directly or run `npm run serv or any other attribution trailers. - **Releases** happen by bumping `version` in `package.json` on `main` (see the `release` skill). Small fixes or tweaks get a patch release (`x.y.Z`); new features a - minor release. + minor release. **At most one release per hour**: until the hour is up, push work with + its CHANGELOG bullets under `## [Unreleased]` and batch it into the next release. Only a + broken live game justifies an immediate hotfix. +- **Release notes in the app are short**: only the first sentence of each CHANGELOG bullet + (and at most five bullets) shows in "What's new", with a link to the full GitHub + release. Write that first sentence so it stands on its own. - **Names are puns.** No real company names for networks, vendors, cables, banks, data centers or exchanges (Cogentle, Goggle, NetChill, Junipurr, Arrrhipster…). Real conference names (NANOG, RIPE, DENOG) are fine. Avoid lazy "-ish" names: find diff --git a/site/i18n/it.js b/site/i18n/it.js index 8a0542a..c8a51c8 100644 --- a/site/i18n/it.js +++ b/site/i18n/it.js @@ -2248,4 +2248,7 @@ "Replace ten of them and the cable pays for itself in about {n} months.":"Sostituiscine dieci e il cavo si ripaga in circa {n} mesi.", "Cuts still happen, anchors and sharks included, but the repair ship is yours to call.":"I tagli succedono lo stesso, ancore e squali compresi, ma la nave di riparazione la chiami tu.", "Lay the cable {price}":"Posa il cavo {price}", +"…and {n} more change":"…e {n} altra modifica", +"…and {n} more changes":"…e altre {n} modifiche", +"Read the full notes on GitHub":"Leggi le note complete su GitHub", }; diff --git a/site/index.html b/site/index.html index 44a609b..10d5227 100644 --- a/site/index.html +++ b/site/index.html @@ -3339,10 +3339,18 @@ function whatsNew(returning,force){ try{seen=localStorage.getItem('sot-seen-version');localStorage.setItem('sot-seen-version',APP_VERSION);}catch(e){} if(!force&&(!returning||seen===APP_VERSION))return false; openModal(`
${tr('Release notes')}

${tr('New in Series of Tubes {v}',{v:esc(APP_VERSION)})}

- + ${notesHtml(RELEASE_NOTES,APP_VERSION)} ${returning&&S?`

${tr('Your network {name} was saved and is waiting for you.',{name:esc(S.name)})}

`:''} -
${btn(UI.started?tr('Back to my network'):tr('Got it'),UI.started?'closeModal':'helpClose',{},'pink big')}${tr('Full changelog')}
`); +
${btn(UI.started?tr('Back to my network'):tr('Got it'),UI.started?'closeModal':'helpClose',{},'pink big')}${notesLong(RELEASE_NOTES)?'':`${tr('Full changelog')}`}
`); return true;} +/* In-app notes stay short: at most NOTE_MAX changes, each cut to its first sentence. When anything was cut, a + link leads to the full notes of this version on GitHub. The CHANGELOG and the GitHub release keep every word. */ +const NOTE_MAX=5,NOTE_CH=140; +function slimNote(n){const m=String(n).match(/^(.+?[.!?])(\s|$)/);let t=m?m[1]:String(n);if(t.length>NOTE_CH)t=t.slice(0,NOTE_CH-1).replace(/\s+\S*$/,'')+'…';return t;} +const notesLong=ns=>ns.length>NOTE_MAX||ns.some(n=>slimNote(n)!==n); +function notesHtml(ns,ver){const more=Math.max(0,ns.length-NOTE_MAX); + return ``+ + (notesLong(ns)?`

${tr('Read the full notes on GitHub')}

`:'');} function newerVer(a,b){const x=String(a).split('.').map(Number),y=String(b).split('.').map(Number);for(let i=0;i<3;i++){if((x[i]||0)>(y[i]||0))return true;if((x[i]||0)<(y[i]||0))return false;}return false;} // While the game is open, look for a newer release now and then and offer a reload. function checkUpdate(){ diff --git a/tests/persist.test.js b/tests/persist.test.js index 2293532..ee7f566 100644 --- a/tests/persist.test.js +++ b/tests/persist.test.js @@ -76,3 +76,19 @@ test('#46 an update that adds networks gives a courtesy route, and Tier 1 is sho assert.equal(ev("BADGES.find(b=>b.id==='t1').ok()"), true, 'the badge stays'); assert.deepEqual(errors, []); }); + +test('in-app release notes stay short and link to the full notes on GitHub', () => { + const { ev, errors } = load(); + const long = ['Tier 1 networks can lay their own subsea cable (#22). Pick two cities with a landing station, pay a lot, wait.', + 'Short one.', 'A 1.6T wave is now cheaper. More text here.', 'Four.', 'Five.', 'Six.', 'Seven.']; + const h = ev(`notesHtml(${JSON.stringify(long)},'9.9.9')`); + assert.match(h, /lay their own subsea cable \(#22\)\./); + assert.doesNotMatch(h, /Pick two cities/, 'only the first sentence'); + assert.match(h, /A 1\.6T wave is now cheaper\./, 'decimals do not end a sentence'); + assert.match(h, /and 2 more changes/); + assert.match(h, /releases\/tag\/v9\.9\.9/, 'links to the full notes'); + const short = ev(`notesHtml(${JSON.stringify(['One fix.', 'Another fix.'])},'9.9.9')`); + assert.doesNotMatch(short, /releases\/tag/, 'short notes need no link'); + assert.equal(ev(`slimNote('${'x'.repeat(300)}')`).length <= 140, true); + assert.deepEqual(errors, []); +});