-
Notifications
You must be signed in to change notification settings - Fork 8
feat: handle mandatory update refusal by disconnecting from organization only not quitting app #2137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2137 +/- ##
=======================================
Coverage 99.85% 99.85%
=======================================
Files 175 175
Lines 6831 6832 +1
Branches 1315 1303 -12
=======================================
+ Hits 6821 6822 +1
Misses 10 10
🚀 New features to boost your workflow:
|
899bd2f to
bcaf254
Compare
|
Changes regarding the last commit:
|
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Valentin Sirakov <[email protected]>
Signed-off-by: Valentin Sirakov <[email protected]>
Signed-off-by: Valentin Sirakov <[email protected]>
bfc1547 to
02294ce
Compare
02294ce to
d88a60e
Compare
Signed-off-by: Valentin Sirakov <[email protected]>
d88a60e to
324053c
Compare
Signed-off-by: Martin Dobrev <[email protected]>
062a3f4 to
08f1866
Compare
Signed-off-by: Martin Dobrev <[email protected]> chore: refactor and code clean up Signed-off-by: Martin Dobrev <[email protected]> chore: more refactoring Signed-off-by: Martin Dobrev <[email protected]> chore: code cleanup Signed-off-by: Martin Dobrev <[email protected]> chore: code clean up Signed-off-by: Martin Dobrev <[email protected]> chore: code clean up Signed-off-by: Martin Dobrev <[email protected]> chore: code clean up Signed-off-by: Martin Dobrev <[email protected]> chore: code clean up Signed-off-by: Martin Dobrev <[email protected]> chore: code clean up Signed-off-by: Martin Dobrev <[email protected]> chore: unused code removed Signed-off-by: Martin Dobrev <[email protected]> chore: code clean up and reformattinf Signed-off-by: Martin Dobrev <[email protected]> chore: unused function removed Signed-off-by: Martin Dobrev <[email protected]> chore: unused code removed Signed-off-by: Martin Dobrev <[email protected]>
08f1866 to
7c313f4
Compare
There was a problem hiding this comment.
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 implements a multi-organization version management system that allows users to disconnect from organizations requiring updates instead of being forced to quit the entire application. The implementation adds organization-specific connection status tracking, version compatibility checking across organizations, and a comprehensive UI for managing organization connections.
Key Changes:
- Introduced per-organization version state management and connection status tracking
- Implemented semver-based version compatibility checking to detect conflicts when updating for one organization may break compatibility with others
- Replaced app quit functionality with organization disconnect functionality in mandatory upgrade flows
Reviewed changes
Copilot reviewed 25 out of 26 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| front-end/src/renderer/utils/toastOptions.ts | Added warning and info toast options for new notification types |
| front-end/src/renderer/utils/index.ts | Added formatProgressBytes utility function and fixed spacing in stringifyHbarWithFont |
| front-end/src/renderer/utils/axios.ts | Enhanced 426 error interceptor to extract server URL, store per-organization version data, and trigger compatibility checks |
| front-end/src/renderer/types/userStore.ts | Added ConnectionStatus and DisconnectReason types plus connection metadata to ConnectedOrganization |
| front-end/src/renderer/stores/versionState.ts | Implemented organization-specific version tracking with refs for status, URLs, versions, and compatibility results |
| front-end/src/renderer/stores/storeWebsocketConnection.ts | Added connection state tracking per organization and skip connection logic for disconnected orgs |
| front-end/src/renderer/stores/storeUser.ts | Added logic to prevent selecting disconnected organizations requiring upgrades |
| front-end/src/renderer/stores/storeOrganizationConnection.ts | New store managing connection status and disconnect reasons per organization |
| front-end/src/renderer/services/organization/versionCompatibility.ts | New service implementing semver-based compatibility checking across organizations |
| front-end/src/renderer/services/organization/reconnect.ts | New service handling organization reconnection with version checks |
| front-end/src/renderer/services/organization/health.ts | Modified to treat 426 responses as healthy servers |
| front-end/src/renderer/services/organization/disconnect.ts | New service handling organization disconnection with various reasons |
| front-end/src/renderer/services/organization/index.ts | Added exports for disconnect and reconnect services |
| front-end/src/renderer/pages/Settings/components/OrganizationsTab.vue | Enhanced to display connection status, version info, and compatibility warnings with toggle controls |
| front-end/src/renderer/composables/useVersionCheck.ts | Extended to store and retrieve organization-specific version data |
| front-end/src/renderer/components/Organization/ConnectionToggle.vue | New component providing UI toggle for connecting/disconnecting organizations |
| front-end/src/renderer/components/Organization/ConnectionStatusBadge.vue | New component displaying organization connection status with icons and tooltips |
| front-end/src/renderer/components/Organization/CompatibilityWarningModal.vue | New modal warning users about version compatibility conflicts |
| front-end/src/renderer/components/Organization/AddOrganizationModal.vue | Enhanced to check version compatibility when adding new organizations |
| front-end/src/renderer/components/GlobalAppProcesses/components/OptionalUpgrade.vue | Updated to check compatibility and show warnings for optional updates |
| front-end/src/renderer/components/GlobalAppProcesses/components/MandatoryUpgrade.vue | Replaced quit with disconnect functionality and added compatibility warnings |
| front-end/src/renderer/components/GlobalAppProcesses/GlobalAppProcesses.vue | Added organization version checks on app launch with compatibility checking |
| front-end/pnpm-lock.yaml | Updated semver dependency to 7.7.1 |
| front-end/package.json | Added semver 7.7.1 and @types/semver 7.5.8 dependencies |
| back-end/apps/api/src/guards/frontend-version.guard.ts | Updated 426 response to include latestSupportedVersion and renamed minimumVersion field |
| back-end/apps/api/src/guards/frontend-version.guard.spec.ts | Updated test to use new minimumSupportedVersion field name |
Files not reviewed (1)
- front-end/pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
front-end/src/renderer/components/Organization/ConnectionStatusBadge.vue
Show resolved
Hide resolved
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Martin Dobrev <[email protected]>
Signed-off-by: Martin Dobrev <[email protected]>
jbair06
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need to come up with a good testing strategy. That said, let's merge this and get it up on our dev network for some better testing.
Description:
Handles disconnect functionality supporting multiple organizations
Related issue(s):
Fixes #2134 and #2135
Notes for reviewer:
@jbair06 We could not test the following scenarios:
Checklist