Skip to content

Improve Linux update available dialog#3600

Merged
ivan-ottinger merged 3 commits into
trunkfrom
improve-linux-update-dialog
May 22, 2026
Merged

Improve Linux update available dialog#3600
ivan-ottinger merged 3 commits into
trunkfrom
improve-linux-update-dialog

Conversation

@ivan-ottinger
Copy link
Copy Markdown
Contributor

@ivan-ottinger ivan-ottinger commented May 22, 2026

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:

  • Primary button renamed DownloadDownload & copy command. Clicking it now also writes the sudo apt install … command to the clipboard via clipboard.writeText(), so the user doesn't have to retype or hand-copy it from a native dialog (which renders detail: text as non-selectable).
  • Dialog body rewritten as two short paragraphs:
    1. What clicking the button will do.
    2. What the user should do next — quit Studio, open a terminal, paste the command.
  • Removed the misleading hint that double-clicking the downloaded .deb "may also work" on some distributions. In practice this is unreliable (GNOME Software's local-.deb handling is spotty, GDebi isn't installed by default), so we no longer suggest it.
CleanShot 2026-05-22 at 13 01 08@2x

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 .deb in-app and invoke pkexec apt install for 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, inside setupLinuxUpdates(), add at the top:

if ( ! app.isPackaged ) {
    setTimeout( () => {
        void showLinuxUpdateAvailableNotice( '9.9.9', 'https://example.com/studio_9.9.9_amd64.deb' );
    }, 3000 );
    return;
}

Run npm start and confirm:

  • The dialog text reads cleanly as two paragraphs followed by the command on its own line.
  • Clicking Download & copy command opens the browser to the URL and writes the command to the clipboard.
  • After Studio is closed manually (via the window close button or File > Quit), pasting in a terminal yields the sudo apt install … command intact.
  • Clicking Later dismisses 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

  • Have you checked for TypeScript, React or other console errors?

@ivan-ottinger ivan-ottinger marked this pull request as ready for review May 22, 2026 11:10
@ivan-ottinger ivan-ottinger requested a review from Copilot May 22, 2026 11:11
@ivan-ottinger ivan-ottinger requested review from a team and gavande1 May 22, 2026 11:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread apps/studio/src/updates.ts
@ivan-ottinger ivan-ottinger merged commit 2d564ea into trunk May 22, 2026
11 of 12 checks passed
@ivan-ottinger ivan-ottinger deleted the improve-linux-update-dialog branch May 22, 2026 11:37
@wpmobilebot
Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing fb35e30 vs trunk

app-size

Metric trunk fb35e30 Diff Change
App Size (Mac) 1339.06 MB 1339.06 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk fb35e30 Diff Change
load 1758 ms 1781 ms +23 ms ⚪ 0.0%

site-startup

Metric trunk fb35e30 Diff Change
siteCreation 9617 ms 9621 ms +4 ms ⚪ 0.0%
siteStartup 4924 ms 4922 ms 2 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

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.

3 participants