Skip to content

feat: add update check - #1264

Merged
AlexAndBear merged 14 commits into
mainfrom
issues/1158
Sep 26, 2025
Merged

AlexAndBear merged 14 commits into
mainfrom
issues/1158

Conversation

@AlexAndBear

@AlexAndBear AlexAndBear commented Sep 25, 2025 •

Copy link
Copy Markdown
Member

Description

image

Related Issue

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear
AlexAndBear requested a review from kulmann September 25, 2025 15:13
@AlexAndBear
AlexAndBear marked this pull request as ready for review September 25, 2025 18:13
Copilot AI review requested due to automatic review settings September 25, 2025 18:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 an update check feature to OpenCloud that displays version information and notifies users when updates are available in the sidebar navigation.

  • Introduces a new VersionCheck component that checks for updates from update.opencloud.eu
  • Adds capability-based rendering controlled by the check-for-updates capability
  • Removes web client version display from the admin settings and sidebar, focusing on backend version checking

Reviewed Changes

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

Show a summary per file
File Description
VersionCheck.vue New component that fetches update information and displays current status or available updates
VersionCheck.spec.ts Unit tests for the new VersionCheck component covering loading, up-to-date, and update available states
SidebarNav.vue Integrates VersionCheck component and removes web version display
SidebarNav.spec.ts Updates tests to include VersionCheck component testing based on capabilities
capabilities.ts Adds check-for-updates boolean capability to core capabilities interface
InfoSection.vue Removes web client version display from admin settings

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +57 to +58
//TODO: retrieve serverEdition
const serverEdition = 'rolling'

Copilot AI Sep 25, 2025

Copy link

Choose a reason for hiding this comment

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

The hardcoded 'rolling' server edition should be dynamically determined. Consider adding a TODO issue reference or implementing the retrieval logic.

Suggested change
//TODO: retrieve serverEdition
const serverEdition = 'rolling'
// Retrieve serverEdition dynamically from capabilityStore.status.edition if available.
// TODO: If edition is not present, update this logic to retrieve the correct edition property. See issue #TODO-ISSUE-NUMBER.
const serverEdition = capabilityStore.status.edition || 'rolling'

Copilot uses AI. Check for mistakes.
updateData.value = data.channels[serverEdition]
}
} catch (error) {
console.error(error)

Copilot AI Sep 25, 2025

Copy link

Choose a reason for hiding this comment

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

The error handling is too generic. Consider providing a more specific error message or logging structured error information for better debugging.

Suggested change
console.error(error)
console.error(
'[VersionCheck] Failed to check for updates',
{
error,
serverUrl: configStore.serverUrl,
edition: serverEdition,
version: currentServerVersion
}
)

Copilot uses AI. Check for mistakes.
@AlexAndBear
AlexAndBear requested a review from kulmann September 26, 2025 09:01
@AlexAndBear
AlexAndBear requested a review from kulmann September 26, 2025 09:32
kulmann and others added 2 commits September 26, 2025 15:06

@kulmann kulmann left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Love it! 🥇

<span v-text="$gettext('Checking for updates')" />
<oc-spinner class="ml-1" size="xsmall" />
</div>
<template v-else>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Even with the template tag I don't think that it improves readability. :-P But fine by me to keep it like it is.

@AlexAndBear
AlexAndBear merged commit eba35e4 into main Sep 26, 2025
@AlexAndBear
AlexAndBear deleted the issues/1158 branch September 26, 2025 13:26
@openclouders openclouders mentioned this pull request Sep 26, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inform Users about new OpenCloud version

4 participants