Skip to content

Develop - #8

Merged
Hermesiss merged 4 commits into
mainfrom
develop
Jul 6, 2025
Merged

Develop#8
Hermesiss merged 4 commits into
mainfrom
develop

Conversation

@Hermesiss

Copy link
Copy Markdown
Owner

Add beta channel to auto update

@Hermesiss
Hermesiss requested a review from Copilot July 5, 2025 23:57

This comment was marked as outdated.

@Hermesiss
Hermesiss force-pushed the develop branch 2 times, most recently from a94e60e to 0bc7092 Compare July 6, 2025 07:44
@Hermesiss
Hermesiss requested a review from Copilot July 6, 2025 07:45

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

This PR adds support for a beta update channel (“latest-dev”) throughout the app:

  • Defines a new setUpdateChannel IPC method and exposes it in preload.
  • Renders a UI switch to toggle between stable and beta channels and invokes the new API.
  • Implements channel switching in UpdateService, initializes on startup, and adjusts CI/CD workflows to publish both latest and latest-dev releases (including blockmap assets).

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/renderer/types/common.ts Added setUpdateChannel to the ElectronAPI types
src/renderer/components/UpdateButton.vue UI switch + logic to persist/use beta update channel
src/main/updateService.ts IPC handler + setUpdateChannel logic
src/main/preload.ts Exposed setUpdateChannel in contextBridge
src/main/tests/updateService.test.ts Updated test assertions for feed URL & mocks
package.json Bumped version to 1.2.5
.github/workflows/build-and-release.yml CI edits for beta releases and blockmap uploads
Comments suppressed due to low confidence (7)

src/renderer/types/common.ts:60

  • Consider adding a JSDoc comment for setUpdateChannel to explain its purpose and valid channel values to future maintainers.
  setUpdateChannel: (channel: 'latest' | 'latest-dev') => Promise<void>;

src/renderer/components/UpdateButton.vue:76

  • This new toggle logic and handleBetaChannelChange behavior should be covered by a unit test (e.g., mocking localStorage and electronAPI.setUpdateChannel).
const useBetaChannel = ref(localStorage.getItem('useBetaChannel') === 'true');

src/main/tests/updateService.test.ts:12

  • Add a test to verify that ipcMain.handle('set-update-channel', ...) is registered and that calling it invokes setUpdateChannel with the correct channel.
  }

.github/workflows/build-and-release.yml:273

  • The workflow uses dist for Linux artifacts but artifacts/macos for macOS; unify the directory paths or confirm both locations exist to avoid missing files.
        id: find-installer

.github/workflows/build-and-release.yml:405

  • This upload references artifacts/linux/... but earlier steps place blockmaps in dist/; the paths should be consistent to ensure successful uploads.
          APPIMAGE=$(find artifacts/linux -name "*.AppImage" -type f | head -1)

.github/workflows/build-and-release.yml:386

  • [nitpick] There is a lot of repetitive upload_asset logic. Consider iterating over an asset list or using a reusable workflow to reduce duplication.
          upload_asset() {

src/main/updateService.ts:43

  • Previously the code configured updateConfigPath per platform; removing that may break platform-specific updates. Ensure updateConfigPath is still set or validate platform behavior.
    this.setUpdateChannel("latest");

@Hermesiss
Hermesiss force-pushed the develop branch 4 times, most recently from b1f140f to 30cf78f Compare July 6, 2025 08:28
@sonarqubecloud

sonarqubecloud Bot commented Jul 6, 2025

Copy link
Copy Markdown

@Hermesiss
Hermesiss merged commit 734169d into main Jul 6, 2025
12 checks passed
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