feat(update): add manual release checking - #313
Conversation
|
Warning Review limit reached
Next review available in: 53 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe Electron app now checks the latest official GitHub release, compares semantic versions, displays localized update results, opens validated release links, and exposes the action in the tray menu. Tests cover version ordering, response validation, URL security, and failure handling. ChangesUpdate checking
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant TrayMenu
participant ElectronMain
participant UpdateChecker
participant GitHub
participant Dialog
TrayMenu->>ElectronMain: invoke Check for Updates
ElectronMain->>UpdateChecker: checkLatestRelease(currentVersion, signal)
UpdateChecker->>GitHub: request latest release
GitHub-->>UpdateChecker: release response
UpdateChecker-->>ElectronMain: current or available result
ElectronMain->>Dialog: show localized update status
ElectronMain->>Dialog: open validated release link when selected
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
|
@coderabbitai review The earlier automated review was rate-limited; requesting a fresh substantive review now that the cooldown has elapsed. |
|
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@electron/update-checker.test.ts`:
- Around line 46-88: Expand the update-checker tests around checkLatestRelease
to cover equal-version results, forwarding an AbortSignal to fetchLatest,
rejection of draft and prerelease releases, and rejection of GitHub URLs with
invalid paths, tags, queries, or hashes. Keep each case in
electron/update-checker.test.ts and assert the documented result or error for
every validation and cancellation contract.
In `@electron/update-checker.ts`:
- Around line 26-39: Update parseVersion to store major, minor, and patch as
bigint values, and build normalized core identifiers from the original validated
numeric components without precision loss. Reject leading-zero core identifiers
while preserving valid zero values, and add boundary tests covering oversized
identifiers and leading-zero inputs.
In `@src/i18n/locales/vi/common.json`:
- Around line 42-46: Update the Vietnamese `updates.current` translation to
state that the installed OpenScreen version is the latest/current version,
rather than saying OpenScreen has been updated; preserve the existing
`{{currentVersion}}` placeholder.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: ef3436bb-9ad0-4117-a312-c8051b845b0e
📒 Files selected for processing (16)
electron/main.tselectron/update-checker.test.tselectron/update-checker.tssrc/i18n/locales/ar/common.jsonsrc/i18n/locales/en/common.jsonsrc/i18n/locales/es/common.jsonsrc/i18n/locales/fr/common.jsonsrc/i18n/locales/it/common.jsonsrc/i18n/locales/ja-JP/common.jsonsrc/i18n/locales/ko-KR/common.jsonsrc/i18n/locales/pt-BR/common.jsonsrc/i18n/locales/ru/common.jsonsrc/i18n/locales/tr/common.jsonsrc/i18n/locales/vi/common.jsonsrc/i18n/locales/zh-CN/common.jsonsrc/i18n/locales/zh-TW/common.json
|
Addressed all three fresh review findings in |
Summary
Check for Updatesaction to the idle system-tray menugetopenscreen/openscreenrelease-tag page only after explicit user confirmationThis is intentionally the safe manual-checking slice of #301. It does not download, install, execute, or automatically poll for updates; automatic update policy/settings remain future work.
Related issue
Part of #301
Type of change
Release impact
Desktop impact
Screenshots / video
Not included; this adds a native tray item and native result dialogs.
Testing
npx vitest --run electron/update-checker.test.ts(5 passed)npm run test(1,682 passed, 1 skipped across 141 files)npx tsc --noEmitnpx tsc -p tsconfig.test.json --noEmitnpx biome checkon the Electron, updater, test, and locale filesnpm run docs:checknpm run i18n:checknpm run build-vitev1.9.0andhttps://github.com/getopenscreen/openscreen/releases/tag/v1.9.0, matching the guarded contractAuthored with Codex assistance and manually security-reviewed to ensure this path cannot open a non-official download URL.
Summary by CodeRabbit