Repository navigation
check for a newer release, and say so in the bell - #17
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/latestexcludes 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
mainis repromoted without a version bump.The comparator is ours rather than a dependency — what this product emits is
x.y.zand nothing else, per the 08/09 decision that0.xis 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
fetchwould 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, becausedismissResolvedsweeps 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.0and correctly reported no update (vnormalises against the0.1.0inpackage.json); a seededv0.4.2raised aninfonotice in the bell; turning the check off dismissed it and made check-now answer 409.🤖 Generated with Claude Code