Skip to content

check for a newer release, and say so in the bell - #17

Merged
Digit4w merged 1 commit into
devfrom
feat/update-check
Sep 10, 2026
Merged

Digit4w merged 1 commit into
devfrom
feat/update-check

Conversation

@Digit4w

@Digit4w Digit4w commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Step B3 of the in-app update cycle: the check, the cached state, the off switch, and the notice.

Measuring changed the endpoint before the first line. /releases/latest excludes pre-releases, and the only release this product has is one — it answers 404 against the real repository. The list endpoint is the one that works. Pre-releases count while they are what this product publishes; a "receive pre-releases" switch would be vocabulary nothing exercises, and it is born the day a stable release stands beside one.

The newest is decided by version, not by list order: the API sorts by creation date, and this CI reuses an existing release when main is repromoted without a version bump.

The comparator is ours rather than a dependency — what this product emits is x.y.z and nothing else, per the 08/09 decision that 0.x is already the machine-readable contract for "breaks without warning". Anything that does not parse answers not newer: the other side is a string from a third party, and claiming an update wrongly sends someone to reinstall what they already have.

The condition is derived from state, with no network. It runs on every admin read of the bell, and one that needed fetch would make the bell wait on the internet. The check fires from there and is not awaited — the read that finds a stale cache still answers with the old value, and the new version shows up on the next read. The dedupe subject is the VERSION, which is what makes the notice born once per version and dismiss itself on upgrade; it gets its own prefix, because dismissResolved sweeps by prefix and sharing one with the providers would have each half dismissing the other's notices.

Turning the check off forgets what it had already seen — keeping it would leave the screen and the notice standing on a question the person just said they did not want asked.

Verified against the real GitHub API on a disposable install: it found v0.1.0 and correctly reported no update (v normalises against the 0.1.0 in package.json); a seeded v0.4.2 raised an info notice in the bell; turning the check off dismissed it and made check-now answer 409.

🤖 Generated with Claude Code

Measuring changed the endpoint before the first line: `/releases/latest`
EXCLUDES pre-releases, and the only release this product has is one
(`v0.1.0`, cut that way on purpose). It answers 404 against the real
repository. The list endpoint is the one that works, and pre-releases
count while they are what this product publishes — filtering them would
leave the check with nothing to find. A "receive pre-releases" switch
would be vocabulary nothing exercises, and it is born the day a stable
release stands beside one.

The newest is decided by VERSION, not by the list order: the API sorts
by creation date, and this CI reuses an existing release when `main` is
repromoted without a version bump.

The comparator is ours rather than a dependency. What this product emits
is `x.y.z` and nothing else — the 08/09 decision is explicit that `0.x`
is already the machine-readable contract for "breaks without warning".
Anything that does not parse answers "not newer": the other side is a
string from a third party, and claiming an update wrongly sends someone
to reinstall what they already have.

The condition is derived from STATE, with no network — it runs on every
admin read of the bell, and one that needed `fetch` would make the bell
wait on the internet. The network check fires from there and is not
awaited; the read that finds a stale cache still answers with the old
value, and the new version shows up on the next read.

The dedupe subject is the VERSION, which is what makes the notice born
once per version and dismiss itself on upgrade. It gets its own prefix:
`dismissResolved` sweeps by prefix, so sharing one with the providers
would have each half dismissing the other's notices.

Turning the check off forgets what it had already seen. Keeping it would
leave the screen and the notice standing on a question the person just
said they did not want asked.
@Digit4w
Digit4w merged commit d928e71 into dev Sep 10, 2026
3 checks passed
@Digit4w
Digit4w deleted the feat/update-check branch September 10, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant