Skip to content

auto-updating#14

Merged
ValentinRapp merged 1 commit into
devfrom
auto-updating
Jun 6, 2026
Merged

auto-updating#14
ValentinRapp merged 1 commit into
devfrom
auto-updating

Conversation

@ValentinRapp

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 6, 2026 12:57
@vercel

vercel Bot commented Jun 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
yafw Ready Ready Preview, Comment Jun 6, 2026 12:57pm

@ValentinRapp ValentinRapp merged commit 892e991 into dev Jun 6, 2026
3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 update RPC request/response types and implemented the corresponding Bun-side RPC handler.
  • Introduced an Updating React component and wired App.tsx to check for updates on standalone non-macOS builds and switch UI when updating.
  • Added a Bun-side updater helper and configured electrobun.config.ts release 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 thread src/bun/updater.ts
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 thread src/shared/types.ts
Comment on lines +47 to +52
update: {
params: {};
response: {
updating: boolean;
};
};
@ValentinRapp ValentinRapp deleted the auto-updating branch June 6, 2026 22:28
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.

2 participants