paseo-follow-up 1.4.0-beta.29 → 1.4.0-beta.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +1 -1
- package/shared/changelog.ts +29 -5
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ Every switch in setup is the same one Settings shows, so nothing is applied twic
|
|
|
38
38
|
|
|
39
39
|
## What's new
|
|
40
40
|
|
|
41
|
-
After
|
|
41
|
+
After a major update (1.x to 2.0), the next time you open Paseo it shows **What's new**: the notes for every version since that device last looked, newest open, older ones folded. It shows once per device per version (once per host in the phone app), never on a fresh install and never over setup. Betas, minor and patch updates never pop it up. Betas have no notes of their own; their changes are collected in the next stable release. Home's last line says which version you run, with **Release notes** for the full list; for three days after an update to a version with its own notes it reads **Updated to X · What's new** instead. The notes ship inside the package as [CHANGELOG.md](CHANGELOG.md), so they work offline and match the installed version.
|
|
42
42
|
|
|
43
43
|
## Use
|
|
44
44
|
|
|
@@ -221,7 +221,7 @@ This replaces the separate **Wait** plugin (`paseo-wait`). While that plugin is
|
|
|
221
221
|
Install the beta:
|
|
222
222
|
|
|
223
223
|
```sh
|
|
224
|
-
paseo plugin update follow-through --version 1.4.0-beta.
|
|
224
|
+
paseo plugin update follow-through --version 1.4.0-beta.30
|
|
225
225
|
# or, for a fresh install:
|
|
226
226
|
paseo plugin install npm:paseo-follow-up@beta
|
|
227
227
|
```
|
|
@@ -278,7 +278,7 @@ paseo plugin reload follow-through # after changes
|
|
|
278
278
|
|
|
279
279
|
Integration checks use a separate Paseo home with synthetic agents.
|
|
280
280
|
|
|
281
|
-
Release notes: a PR that changes something users see adds `changes/<branch>.md` with one to three plain-language bullets ([rules](changes/README.md)). Before
|
|
281
|
+
Release notes: a PR that changes something users see adds `changes/<branch>.md` with one to three plain-language bullets ([rules](changes/README.md)). Before a stable version bump, `npm run release:notes <version>` moves them into CHANGELOG.md (`-- --allow-empty` for a release with nothing user-facing). For a beta it writes nothing and the fragments wait for the next stable release. `npm run verify` fails if a stable package version has no notes.
|
|
282
282
|
|
|
283
283
|
Version tags (`vX.Y.Z`) publish to npm through Trusted Publishing.
|
|
284
284
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paseo-follow-up",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.4.0-beta.
|
|
4
|
+
"version": "1.4.0-beta.30",
|
|
5
5
|
"description": "Follow every workspace PR stack in Paseo, answer agent questions, batch repairs for the main agent, and see what needs you.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
package/shared/changelog.ts
CHANGED
|
@@ -58,12 +58,31 @@ export type WhatsNewInput = {
|
|
|
58
58
|
export type WhatsNew =
|
|
59
59
|
| { show: true; notes: ReleaseNote[] }
|
|
60
60
|
/** `record` is the version to store as seen without showing anything (first install, downgrade, nothing new). */
|
|
61
|
-
| { show: false; reason: "first-run" | "onboarding" | "seen" | "older" | "no-notes"; record: string | null };
|
|
61
|
+
| { show: false; reason: "first-run" | "onboarding" | "seen" | "older" | "not-major" | "no-notes"; record: string | null };
|
|
62
|
+
|
|
63
|
+
/** The major a version belongs to once released: a prerelease of X.0.0 (2.0.0-beta.1) is still before X. */
|
|
64
|
+
function releasedMajor(v: string): number | null {
|
|
65
|
+
const p = parseVersion(v);
|
|
66
|
+
if (!p) return null;
|
|
67
|
+
return p.pre.length && p.minor === 0 && p.patch === 0 ? p.major - 1 : p.major;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The one rule for every prompt Follow-up makes about its own updates (the What's new sheet, and any update notice):
|
|
72
|
+
* only a newly released major version earns one (1.x to 2.0). Betas, minors and patches are recorded quietly; their
|
|
73
|
+
* changes wait in changes/ and ship in the next stable release's notes. A first install (no `from`) is never announced.
|
|
74
|
+
*/
|
|
75
|
+
export function announcesUpdate(from: string | null, to: string): boolean {
|
|
76
|
+
if (!from) return false;
|
|
77
|
+
const a = releasedMajor(from), b = releasedMajor(to);
|
|
78
|
+
return a != null && b != null && b > a;
|
|
79
|
+
}
|
|
62
80
|
|
|
63
81
|
/**
|
|
64
82
|
* Whether this device shows "What's new" now. With no baseline at all (no device record and no previous daemon
|
|
65
83
|
* version) this is a first install: onboarding covers it, so the installed version is recorded silently. Onboarding
|
|
66
|
-
* wins over the sheet and leaves the stored version alone, so the sheet can come after onboarding ends.
|
|
84
|
+
* wins over the sheet and leaves the stored version alone, so the sheet can come after onboarding ends. Only a new
|
|
85
|
+
* major opens it (announcesUpdate); any other update records the installed version silently.
|
|
67
86
|
*/
|
|
68
87
|
export function whatsNew({ installed, deviceSeen, previous, onboarding, notes }: WhatsNewInput): WhatsNew {
|
|
69
88
|
if (onboarding) return { show: false, reason: "onboarding", record: null };
|
|
@@ -72,6 +91,7 @@ export function whatsNew({ installed, deviceSeen, previous, onboarding, notes }:
|
|
|
72
91
|
const c = compareVersions(installed, lastSeen);
|
|
73
92
|
if (c === 0) return { show: false, reason: "seen", record: deviceSeen ? null : installed };
|
|
74
93
|
if (c < 0) return { show: false, reason: "older", record: installed };
|
|
94
|
+
if (!announcesUpdate(lastSeen, installed)) return { show: false, reason: "not-major", record: installed };
|
|
75
95
|
const since = notesSince(notes, lastSeen, installed);
|
|
76
96
|
return since.length ? { show: true, notes: since } : { show: false, reason: "no-notes", record: installed };
|
|
77
97
|
}
|
|
@@ -100,10 +120,14 @@ export const releaseNotesViewSchema = z.object({
|
|
|
100
120
|
});
|
|
101
121
|
export type ReleaseNotesView = z.infer<typeof releaseNotesViewSchema>;
|
|
102
122
|
|
|
103
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* Home's "Updated to X 2h ago · What's new" line shows for three days after an update to a version with notes of its
|
|
125
|
+
* own. Betas ship none, so after one the line stays "Follow-up X · Release notes" rather than opening an empty sheet.
|
|
126
|
+
*/
|
|
104
127
|
export const RECENT_UPDATE_MS = 3 * 86_400_000;
|
|
105
|
-
export function recentUpdate(view: Pick<ReleaseNotesView, "previous" | "updatedAt">, now: number): boolean {
|
|
106
|
-
|
|
128
|
+
export function recentUpdate(view: Pick<ReleaseNotesView, "version" | "previous" | "updatedAt" | "notes">, now: number): boolean {
|
|
129
|
+
if (!view.previous || view.updatedAt == null || now - view.updatedAt < 0 || now - view.updatedAt >= RECENT_UPDATE_MS) return false;
|
|
130
|
+
return view.notes.some(n => n.version === view.version && n.items.length > 0);
|
|
107
131
|
}
|
|
108
132
|
/** The notes What's new shows when opened by hand: everything since the previous version, else this version's own. */
|
|
109
133
|
export function recentNotes(view: Pick<ReleaseNotesView, "version" | "previous" | "notes">): ReleaseNote[] {
|