auto-updating#14
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds an auto-update flow for the standalone (Electrobun) app by introducing a new RPC endpoint to check for updates, starting the update process in the Bun backend, and showing a dedicated “Updating” UI state while the update is applied.
Changes:
- Added
updateRPC request/response types and implemented the corresponding Bun-side RPC handler. - Introduced an
UpdatingReact component and wiredApp.tsxto check for updates on standalone non-macOS builds and switch UI when updating. - Added a Bun-side updater helper and configured
electrobun.config.tsrelease settings for update hosting.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/shared/types.ts | Adds update RPC schema entry. |
| src/mainview/components/Updating.tsx | New updating-screen component (spinner + messaging). |
| src/mainview/App.tsx | Calls update RPC on startup (standalone, non-macOS) and conditionally renders updating UI. |
| src/bun/updater.ts | Adds backend function to download/apply updates. |
| src/bun/index.ts | Adds update RPC handler that checks for update and triggers background update. |
| electrobun.config.ts | Updates app version and adds release.baseUrl config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+15
| import * as Electrobun from "electrobun"; | ||
|
|
||
| export const update = async () => { | ||
| console.log("[YAFW Backend] Starting update download..."); | ||
| try { | ||
| // await Bun.sleep(3000); // Simulate delay for testing | ||
| await Electrobun.Updater.downloadUpdate(); | ||
| if (Electrobun.Updater.updateInfo()?.updateReady) { | ||
| console.log("[YAFW Backend] Update ready. Applying update..."); | ||
| await Electrobun.Updater.applyUpdate(); | ||
| } | ||
| } catch (err) { | ||
| console.error("[YAFW Backend] Background update execution failed:", err); | ||
| } | ||
| }; No newline at end of file |
Comment on lines
+47
to
+52
| update: { | ||
| params: {}; | ||
| response: { | ||
| updating: boolean; | ||
| }; | ||
| }; |
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.
No description provided.