Conversation
…ge configurations - Updated Electron dependency from version 39.2.5 to 40.0.0 in package.json and yarn.lock. - Bumped Node.js version requirements in package.json and devEngines to >=24.11.1. - Revised README.md to reflect new supported platforms and minimum version requirements. - Removed deprecated tests related to ELECTRON_OZONE_PLATFORM_HINT in app.main.spec.ts. - Enhanced documentation for development prerequisites and troubleshooting sections.
- Updated the bundle version in electron-builder.json from 26010 to 26011. - Incremented the application version in package.json from 4.11.1 to 4.12.0.
…formats - Revised the supported platforms section to include additional architectures and installation formats for Windows, macOS, and Linux. - Updated download links for Microsoft Store and Mac App Store, ensuring accurate access to application sources.
- Updated the formatting of download links for Microsoft Store, Mac App Store, and Snap Store to improve visual presentation and accessibility. - Changed from a div-based layout to a paragraph-based layout with adjusted image sizes for better responsiveness.
- Introduced a new document detailing the alpha release process for the Rocket.Chat Desktop app, including channel definitions, versioning guidelines, and steps for creating and publishing alpha releases. - Included instructions for users to opt into the alpha channel and troubleshooting tips for common issues.
WalkthroughAdds alpha release documentation and a tagging CLI; bumps package.json to an alpha, increments electron bundleVersion, adds Windows arm64 targets, gates update-available dispatch with a semver check, sets prerelease on GitHub Releases, and standardizes CI branch name from "develop" → "dev". Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
package.json (1)
41-41: Release script only targets x64 architecture, missing ia32.The
releasescript specifies--x64only, which restricts the build to x64 architecture. However, theelectron-builder.jsonconfiguration defines Windows support for bothx64andia32architectures. To match the configured architectures, either remove the--x64flag to use all configured architectures, or explicitly specify both:--x64 --ia32.Note: The project's electron-builder configuration does not include arm64 support for Windows.
🤖 Fix all issues with AI agents
In `@package.json`:
- Around line 145-148: The package.json currently pins engines.node and
devEngines.node to ">=24.11.1", which is overly restrictive; change both "node"
entries (the engines.node and devEngines.node keys) to a broader minimum such as
">=20.0.0" (or a semver expression like ">=20 || >=22 || >=24") so contributors
on older LTS releases can run and develop; update both keys to the chosen
relaxed range and ensure package metadata remains consistent.
- Line 116: Update the electron-builder dependency to 26.5.0 or newer in
package.json (replace the current "electron-builder" version) and update the
Windows targets in electron-builder.json so each win.target entry ("nsis",
"msi", "zip") includes "arm64" in its arch array alongside "x64" and "ia32";
modify the dependency version and the arch arrays for the win targets to ensure
Electron 40 compatibility and include arm64 builds.
🧹 Nitpick comments (4)
electron-builder.json (1)
58-72: Missing arm64 architecture for Windows builds.Per coding guidelines, Windows build commands should include all architectures: x64, ia32, and arm64. Currently only x64 and ia32 are configured for nsis, msi, and zip targets.
♻️ Proposed fix to add arm64 architecture
"win": { "target": [ { "target": "nsis", - "arch": ["x64", "ia32"] + "arch": ["x64", "ia32", "arm64"] }, { "target": "msi", - "arch": ["x64", "ia32"] + "arch": ["x64", "ia32", "arm64"] }, { "target": "zip", - "arch": ["x64", "ia32"] + "arch": ["x64", "ia32", "arm64"] } ],Based on coding guidelines: "When modifying Windows build commands, ensure all architectures are included: x64, ia32, and arm64 with electron-builder".
src/updates/main.ts (1)
252-263: Good defensive check against downgrades.The version guard correctly prevents showing "updates" that would be downgrades. The fallback in the catch block (proceeding with the update if comparison fails) is a safe choice.
Consider adding minimal logging in the catch block to aid debugging when version parsing fails:
♻️ Optional: Add debug logging for parse failures
try { if (!semverGt(version as string, currentVersion)) { dispatch({ type: UPDATES_NEW_VERSION_NOT_AVAILABLE }); return; } - } catch { + } catch (error) { // If version comparison fails, proceed with the update + console.log('Version comparison failed, proceeding with update', JSON.stringify({ + version, + currentVersion, + error: error instanceof Error ? error.message : String(error), + })); }package.json (1)
37-37: Windows build script missing explicit architecture flags.Per coding guidelines, Windows build commands should include all architectures: x64, ia32, and arm64 with electron-builder. The current
build-winscript doesn't specify architectures explicitly.Suggested fix
- "build-win": "yarn build && yarn electron-builder --publish never --win", + "build-win": "yarn build && yarn electron-builder --publish never --win --x64 --ia32 --arm64",Based on learnings, when modifying Windows build commands, ensure all architectures are included.
README.md (1)
256-258: Consider varying sentence structure for readability.Three successive sentences begin with "When", which can feel repetitive. A minor rewording could improve flow.
Suggested improvement
-When `isTrayIconEnabled` is enabled, the app will be hidden on close. -When `isMinimizeOnCloseEnabled` is enabled, the app will be minimized on close. -When both are disabled, the app will quit on close. +If `isTrayIconEnabled` is enabled, the app will be hidden on close. +If `isMinimizeOnCloseEnabled` is enabled, the app will be minimized on close. +With both disabled, the app will quit on close.
- Added 'arm64' architecture support to the build targets in electron-builder.json for NSIS, MSI, and ZIP formats. - Lowered the minimum Node.js version requirement in package.json from >=24.11.1 to >=20.0.0 for better compatibility.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@package.json`:
- Around line 145-149: Update the package.json engine entries to require Node
>=22.0.0 by changing the "engines.node" value and the "devEngines.node" value
from ">=20.0.0" to ">=22.0.0"; locate the "engines" and "devEngines" sections
(symbols "engines.node" and "devEngines.node") and modify both entries
consistently so tooling and contributors use Node 22+.
♻️ Duplicate comments (1)
package.json (1)
116-116: Verify tooling compatibility with Electron 40.0.0.
Please confirm the current electron-builder version supports Electron 40.0.0, and upgrade if required.electron-builder compatibility with Electron 40.0.0 and latest electron-builder release
Enables proper alpha and beta release channels for QA and customer testing. This PR adds the
prereleaseflag to GitHub releases for alpha/beta versions and prevents the auto-updater from offering downgrades as "updates" to users running development builds.Root Cause Analysis
The Problem
Two issues prevented effective alpha channel usage:
GitHub releases not marked as prerelease: When creating releases with tags like
4.12.0-alpha.1, the GitHub release was not marked as "Pre-release", causing it to appear as the "Latest Release" to all visitors.False update notifications: Users running PR/development builds (e.g.,
4.11.0) were being offered "updates" to older stable versions (e.g.,4.10.0). This occurred becausegenerateUpdatesFilesForAllChannels: truein electron-builder automatically enablesallowDowngrade: true.Five Whys
Issue 1: Alpha releases showing as "Latest Release"
prereleaseflag wasn't set in the release API callgetTaggedRelease()didn't check for prerelease version componentsIssue 2: Downgrade offered as update
update-availableevent firedallowDowngradewas enabledgenerateUpdatesFilesForAllChannels: trueautomatically enables itRoot Cause
prerelease: trueflag in GitHub release creation for versions with prerelease componentsThe Fix
Approach
For prerelease flag: Detect prerelease versions using semver's
prereleasearray and pass the flag to GitHub's release API.For downgrade prevention: Compare versions using semver before dispatching
UPDATES_NEW_VERSION_AVAILABLE. If the "update" version is not greater than current, silently ignore it.Implementation
1. GitHub Release Prerelease Flag
workspaces/desktop-release-action/src/github.ts:112-148The semver library's
SemVertype has aprereleasearray that contains components like['alpha', 1]for version4.12.0-alpha.1. An empty array means stable release.2. Version Comparison Before Update Notification
src/updates/main.ts:249-263Files Changed
workspaces/desktop-release-action/src/github.tsisPrereleasedetection andprereleaseflag to release API callsworkspaces/desktop-release-action/dist/index.jssrc/updates/main.tsdocs/alpha-release-process.mdArchitecture
Release Channel Flow
Update Check Flow
Downgrade Prevention Flow
Verification
Testing the Prerelease Flag
After merging, create an alpha release:
# Update package.json to "4.12.0-alpha.1" git tag 4.12.0-alpha.1 git push origin 4.12.0-alpha.1Verify:
alpha.ymlexists in release assetsTesting Downgrade Prevention
Testing Alpha Channel Opt-in
Considerations
What This Doesn't Change
Potential Risks
References
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.