Repository navigation
Offer to reinstall Posit Assistant when it is up to date - #18927
Merged
Merged
Conversation
The update check now records the installed-equals-available case as reinstallAvailable, keeping the manifest's download URL and SHA-256 for it, and carries it across a throttled skip. chat_install_update takes an optional reinstall flag that downloads a fresh copy and publishes it with SlotPolicy::AlwaysFresh instead of re-selecting an existing slot. Addresses #18658
Check for Posit Assistant Updates now shows Reinstall beside OK when the backend reports reinstallAvailable, and accepting it calls chat_install_update with the reinstall flag. en and fr strings, GWT dispatch tests, an e2e dialog test, and a NEWS entry. Addresses #18658
A reinstall writes a user slot, so beside a system or bundled copy of the same version it would shadow that copy rather than repair it. reinstallAvailable now also requires runsUserSlot(): the session's held resolution is a slot under the user's pai/versions. Addresses #18658
RStudio E2E - all platformsAll tests passed!
View / download the full reportView report online -- opens in the browser, no download needed. Available for 14 days. Download playwright-report.zip -- extract and open
All platforms - commit |
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.
Fixes #18658.
Step 5, the last in the plan in #18658. When Check for Posit Assistant Updates finds the user's own installation is already the latest version, the result dialog offers Reinstall, which downloads a fresh copy into a new slot. It is the in-product recovery for an install that passes verification but misbehaves.
What changes
reinstallAvailablewhen the installed version equals the manifest's version for this protocol, the install is not blocked as unsupported, the session runs one of the user's own slots (runsUserSlot(), new inChatInstallation), and a fresh user slot would still be selected (userInstallWouldBeSelected(), the update offer's gate). The manifest's download URL and SHA-256 are kept for that version.posit-assistant-path, the administrator's directory, or the RStudio bundle are never offered Reinstall: a user slot beside them would shadow that copy rather than repair it.reinstallAvailableis carried through a throttled skip inthrottle::PendingUpdate, under the same installed-version-unchanged rule as a pending update, so a skip while the dialog is open doesn't make the click fail.chat_install_updatetakes an optionalreinstallflag. With it,performInstall()checksreinstallAvailableinstead ofupdateAvailable, skips the select-an-existing-slot shortcut, and publishes withSlotPolicy::AlwaysFresh, so a collision bumps the suffix (1.5.0-2) rather than adopting the existing slot. The old slot is left in place. Managed mode refuses it, as it refuses install and update.Testing
283 tests pass, including new ones for
runsUserSlot()and for carrying the reinstall offer through a throttled skip.ant unittestpasses (606), including newdispatchUpdateCheckcases.check-for-updates-command.test.tspasses in desktop-dev with a new test for the Reinstall dialog.A real reinstall was run once in desktop-dev from a throwaway spec against the live manifest: before,
pai/versionsheld1.5.0with{"selected":{"11.0":"1.5.0"}}; after, it held1.5.0and1.5.0-2with{"selected":{"11.0":"1.5.0-2"}}, and no staging directory was left behind.