Improve Linux update available dialog#3600
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the Linux “update available” dialog shown by apps/studio/src/updates.ts by making the manual install path clearer and reducing friction by copying the sudo apt install … command to the clipboard when the user clicks the primary action.
Changes:
- Update the Linux update dialog copy to two short paragraphs followed by the install command.
- Rename the primary action button to “Download & copy command”.
- Copy the generated
sudo apt install …command to the clipboard on primary action click (and still open the download URL in the browser).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
📊 Performance Test ResultsComparing fb35e30 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
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.
Related issues
How AI was used in this PR
Claude Code helped iterate on the dialog copy and discussed alternative approaches (in-app download via
pkexec, GUI installer handoff). The final landed change is the smallest, lowest-risk improvement — larger updater rework is deferred until after the first Linux release so it can be properly beta-tested.Proposed Changes
Rework the Linux "update available" dialog to make the install path clearer:
Download→Download & copy command. Clicking it now also writes thesudo apt install …command to the clipboard viaclipboard.writeText(), so the user doesn't have to retype or hand-copy it from a native dialog (which rendersdetail:text as non-selectable)..deb"may also work" on some distributions. In practice this is unreliable (GNOME Software's local-.debhandling is spotty, GDebi isn't installed by default), so we no longer suggest it.Studio does not auto-quit after copying. On Linux, GTK hands off clipboard content to the desktop's clipboard manager when an app quits cleanly, but doing that immediately after
clipboard.writeText()races the handoff. Leaving Studio running avoids the race and keeps the command pasteable.A follow-up could download the
.debin-app and invokepkexec apt installfor a fully GUI-driven update, but that's a larger change that needs a full beta round-trip to validate end-to-end — deferred until after the first Linux release.Testing Instructions
Two options:
A. Temporarily trigger the dialog in dev. In
apps/studio/src/updates.ts, insidesetupLinuxUpdates(), add at the top:Run
npm startand confirm:Download & copy commandopens the browser to the URL and writes the command to the clipboard.File > Quit), pasting in a terminal yields thesudo apt install …command intact.Laterdismisses the dialog without side effects.Remove the dev trigger before merging — it's not part of this PR.
B. End-to-end (only possible after this lands in a beta). Install the current Linux beta, then publish a newer beta. On launch, the updated dialog should appear; verify clipboard + browser behavior as in (A).
Pre-merge Checklist