feat(updater): restart-to-update sidebar row with per-channel escalation#2381
Open
harshitsinghbhandari wants to merge 5 commits into
Open
Conversation
Adds two optional fields to the UpdateStatus downloaded variant so the main process can advertise how long an update has been staged and whether per-channel rules consider it overdue. Adds semver as a direct dependency for the upcoming escalation evaluator. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
latest channel escalates after 48h staged. nightly escalates on the important feed flag or when the running version is behind the latest stable release (semver). Missing stable info or unparseable versions never escalate. 8 unit tests in the update-settings test style. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… process On update-downloaded, records the staged version and stagedAt, then runs the evaluator immediately and every 30 minutes (unref'd interval) while the update sits uninstalled. Feed data (latest stable version, nightly important flag) comes from read-only GitHub release yml fetches regex-parsed for flat keys; every failure is silent and this path never broadcasts an error state (issue AgentWrapper#2270). Skipped entirely in dev builds. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Renders only when an update is downloaded and staged: transparent with
passive text while fresh, orange (working tokens plus color-mix fill
and border) once the main-process evaluator flags it escalated. The
expanded row shows Restart to update over a v{version} ready sub-line;
the collapsed icon rail gets a RefreshCw button with the same copy in
its tooltip. Clicking installs immediately; the row is the prompt.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
Implements T2 and T3 of the staged-update escalation work:
UpdateStatuswith optionalstagedAt(epoch ms) andescalatedfields, present on thedownloadedstate.evaluateEscalation()function (frontend/src/main/escalation-evaluator.ts) with 8 unit tests.setIntervalinauto-updater.tsthat re-evaluates escalation after eachupdate-downloadedand rebroadcasts the status.updates.install(); no confirmation dialog, the row itself is the prompt. Zero footprint unless an update is downloaded.Escalation rules
now - stagedAt >= 48himportant: trueon the staged release yml, ORsemver.lt(runningVersion, latestStableVersion)(skipped if stable version could not be fetched)Feed data comes from read-only fetches of the GitHub release yml files (owner/repo regex-parsed from the bundled
app-update.yml, platform suffix per the feed.mjs convention, 10s abort timeout). Every failure is silent: this path never broadcasts an error state (see #2270) and dev builds skip it entirely, soescalatedstays false outside the packaged app. No yaml dependency; regex on flat keys is deliberate.UI
--orange/bg-workingtokens, with a subtlecolor-mixorange fill and border matching the existing styles.css idiom.Verification
npm run typecheck: clean.vite.main.config.ts,vite.preload.config.ts,vite.renderer.config.ts, there is no aggregatebuildscript in frontend/package.json): all exit 0.npm test: 383/383 tests pass across 41 files, including the 8 new escalation-evaluator tests (stable under/at/over 48h, nightly important, nightly behind stable 0.10.4 vs ahead of 0.10.3, missing stable info, unparseable versions).Notes
importantfeed key ships separately (publish side is a sibling PR); until then the key is absent from nightly release ymls and reads as false, so nightly escalation relies only on the behind-stable semver check.semver(plus@types/semverdev). It was previously only transitive.Part of #2377.
🤖 Generated with Claude Code