Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 28, 2025

Users need to manually check for updates and trigger installation, rather than waiting for the automatic 8-hour interval. This adds a "Check for Updates" menu item to the home page that opens a dialog showing current version, platform, and update status.

Backend Changes

  • UpdateService.cs (new): Wraps UpdateChecker.TryUpdate(forceCheck: true) with [JSInvokable] for frontend access
  • Service registration: Added to FwLiteProvider and DI container

Frontend Changes

  • UpdateDialog.svelte (new): Responsive dialog with version display, check button, and result messaging
    • Subscribes to AppUpdateEvent via nextEventAsync() before triggering check (prevents stale events)
    • 30-second timeout with fallback to lastEvent()
    • Shows appropriate message per UpdateResult (Success, ManualUpdateRequired, Failed, Unknown)
    • Links to download page for manual updates
  • HomeView.svelte: Added "Check for Updates" menu item above "Feedback & Support"
  • Type definitions: Created IUpdateService.ts and updated DotnetService enum

Update Flow

// User clicks "Check for Updates" button
subscribeToUpdateEvents();  // Start listening before triggering
await updateService.checkForUpdates();  // Calls UpdateChecker.TryUpdate(forceCheck: true)
const event = await Promise.race([eventSubscription, timeout]);
// Display result based on UpdateResult enum

Platform behavior varies:

  • Windows/Mac/Linux: May auto-update → Success/Started
  • Android/iOS: Manual update required → Shows download link
Original prompt

This section details on the original issue you should resolve

<issue_title>UI to check for and trigger updates</issue_title>
<issue_description>Describe the feature

Currently we check for updates when the user opens the app if we haven't checked for an update within the last 8 hours.

There should be UI for explicitly checking for updates and triggering an update if one is found (depending on the platform. Some platforms only support manual updating, in which case we could send them to the download page).

It's unclear exactly where this UI belongs.
Almost certainly on the home page and probably in its own dialog.

Who is this feature for?
Users we are curious if they have the most current version or are told by support that they should update.

Pages affected
Home page</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@coderabbitai
Copy link

coderabbitai bot commented Oct 28, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI and others added 2 commits October 28, 2025 17:02
Co-authored-by: myieye <12587509+myieye@users.noreply.github.com>
Co-authored-by: myieye <12587509+myieye@users.noreply.github.com>
Copilot AI changed the title [WIP] Add UI for checking and triggering updates Add UI to check for and trigger updates Oct 28, 2025
Copilot AI requested a review from myieye October 28, 2025 17:18
Copilot finished work on behalf of myieye October 28, 2025 17:18
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.

UI to check for and trigger updates

2 participants