Skip to content

Check for Updates: cmd/ctrl-click fetches latest perf-tagged prerelease - #7278

Merged
Jinwoo-H merged 3 commits into
mainfrom
Jinwoo-H/perf-update-click
Jul 5, 2026
Merged

Jinwoo-H merged 3 commits into
mainfrom
Jinwoo-H/perf-update-click

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Jul 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds a Cmd-click on macOS / Ctrl-click on Windows and Linux variant of Check for Updates that targets perf prereleases.
  • Filters perf checks to literal vX.Y.Z-rc.N.perf, checks platform manifest readiness through the existing RC feed pinning path, and picks the highest semver match.
  • Keeps Shift-click on the main RC/stable prerelease path by excluding rc.N.perf tags unless the explicit perf modifier is used.
  • Updates renderer/menu hints and IPC options so Shift-click checks latest RC while the platform primary modifier checks latest perf build.

Tag scheme

Perf builds use prerelease identifiers [rc, N, perf], for tags such as v1.4.121-rc.6.perf. In semver, rc.N.perf sorts above its base rc.N but below rc.N+1, so perf builds never outrank the main RC series.

Selection behavior

Perf checks enable prerelease handling but add a perf-only release filter before the generic feed is pinned. Regular RC checks include prereleases but skip perf-tagged releases, so Shift-click does not select .perf builds. If no newer ready perf release exists, Orca reports the same no-update/not-available result as the RC path and does not fall back to stable or RC.

Verification

  • pnpm run typecheck
  • pnpm exec oxlint <changed files>
  • pnpm exec vitest run --config config/vitest.config.ts src/main/updater-prerelease-feed.test.ts src/main/updater.test.ts src/main/menu/register-app-menu.test.ts src/renderer/src/components/sidebar/SidebarSettingsHelpMenu.test.tsx src/renderer/src/lib/update-check-click-options.test.ts
  • pnpm exec vitest run --config config/vitest.config.ts src/main/updater-prerelease-feed.test.ts

Co-authored-by: Orca <help@stably.ai>
@Jinwoo-H
Jinwoo-H marked this pull request as ready for review July 4, 2026 00:44
@coderabbitai

coderabbitai Bot commented Jul 4, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds perf prerelease support to update checks. A shared UpdateCheckOptions type is threaded through preload, IPC, menu, and updater paths. The updater feed logic adds perf-tag detection and perf-specific filtering. updater.ts now handles update-check variants and preflight feed pinning. Renderer and menu code map modifier clicks to prerelease and perf-prerelease options, with helper functions, UI hints, and tests.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary and testing, but it omits required Screenshots, AI Review Report, Security Audit, and Notes sections. Add the missing template sections with screenshot status, AI review findings, security audit notes, and any platform-specific follow-ups.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change to cmd/ctrl-click update checks for perf prereleases.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 5


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 35b9a579-bfdb-4703-95d9-60f55caf145e

📥 Commits

Reviewing files that changed from the base of the PR and between 6941594 and 821c8b6.

📒 Files selected for processing (14)
  • src/main/menu/register-app-menu.test.ts
  • src/main/menu/register-app-menu.ts
  • src/main/updater-prerelease-feed.test.ts
  • src/main/updater-prerelease-feed.ts
  • src/main/updater.test.ts
  • src/main/updater.ts
  • src/main/window/attach-main-window-services.ts
  • src/preload/api-types.ts
  • src/renderer/src/components/settings/GeneralUpdateSettingsSection.tsx
  • src/renderer/src/components/sidebar/SidebarSettingsHelpMenu.test.tsx
  • src/renderer/src/components/sidebar/SidebarSettingsHelpMenu.tsx
  • src/renderer/src/lib/update-check-click-options.test.ts
  • src/renderer/src/lib/update-check-click-options.ts
  • src/shared/types.ts

Comment thread src/main/updater.ts Resolved
Comment thread src/main/updater.ts Resolved
Jinwoo-H and others added 2 commits July 3, 2026 21:11
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Orca <help@stably.ai>

@coderabbitai coderabbitai Bot 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.

♻️ Duplicate comments (1)
src/renderer/src/lib/update-check-click-options.ts (1)

10-14: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Localization regression: getUpdateCheckHint() bypasses translate().

This helper returns a raw hardcoded English string ("... checks the latest RC; ... checks the latest perf build.") with no translate() call. A prior review on this exact tooltip text ("Localize updateCheckHint") was already flagged and marked addressed by wrapping it in translate() with a hash-based key. Centralizing the string construction here reverted that fix — both GeneralUpdateSettingsSection.tsx and SidebarSettingsHelpMenu.tsx now render this untranslated string directly as their title tooltip, so es/ja/ko/zh users won't get a localized hint.

Based on learnings, "use hash-based locale keys with translate('auto.components.<Dir>.<ComponentFile>.<10-char-hash>', 'Default English text')" for settings/menu components — that requires localizing at the call site, not baking English text into a shared lib/ helper.

Consider exposing only the platform-specific modifier labels from this helper and let each consumer build/translate the final sentence:

♻️ Suggested restructuring
-export function getUpdateCheckHint(isMac = isMacShortcutPlatform()): string {
-  const rcClickLabel = isMac ? '⇧+click' : 'Shift+click'
-  const perfClickLabel = isMac ? '⌘+click' : 'Ctrl+click'
-  return `${rcClickLabel} checks the latest RC; ${perfClickLabel} checks the latest perf build.`
-}
+export function getUpdateCheckHintLabels(isMac = isMacShortcutPlatform()): {
+  rcClickLabel: string
+  perfClickLabel: string
+} {
+  return {
+    rcClickLabel: isMac ? '⇧+click' : 'Shift+click',
+    perfClickLabel: isMac ? '⌘+click' : 'Ctrl+click'
+  }
+}

Then in each consumer (e.g. GeneralUpdateSettingsSection.tsx):

const { rcClickLabel, perfClickLabel } = getUpdateCheckHintLabels()
const updateCheckHint = translate(
  'auto.components.settings.GeneralUpdateSettingsSection.<new-hash>',
  '{{value0}} checks the latest RC; {{value1}} checks the latest perf build.',
  { value0: rcClickLabel, value1: perfClickLabel }
)

Source: Learnings

🧹 Nitpick comments (1)
src/renderer/src/components/sidebar/SidebarSettingsHelpMenu.tsx (1)

155-166: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a "why" comment for the pointer-down/onSelect modifier capture.

This two-step capture (record modifiers on onPointerDown, consume them in onSelect) exists solely because Radix's DropdownMenuItem.onSelect receives a generic Event without ctrlKey/metaKey/shiftKey, as established in the prior review's investigation. That constraint isn't obvious from the code — a future edit could "simplify" this back to reading modifiers off the onSelect event and silently reintroduce the bug.

As per coding guidelines, "When writing or modifying code driven by a design doc or non-obvious constraint, add a comment explaining why the code behaves the way it does. Keep comments short — one or two lines, capturing only the non-obvious reason."

📝 Suggested comment
+  // Why: Radix's DropdownMenuItem.onSelect only exposes a generic Event
+  // (no ctrlKey/metaKey/shiftKey), so modifiers must be captured on
+  // pointerdown and consumed here.
   const handleCheckForUpdatesPointerDown = (event: React.PointerEvent): void => {

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 437557b3-0331-4687-94ce-709e66e61361

📥 Commits

Reviewing files that changed from the base of the PR and between 04e2d12 and e068b9a.

📒 Files selected for processing (7)
  • src/main/updater.test.ts
  • src/main/updater.ts
  • src/renderer/src/components/settings/GeneralUpdateSettingsSection.tsx
  • src/renderer/src/components/sidebar/SidebarSettingsHelpMenu.test.tsx
  • src/renderer/src/components/sidebar/SidebarSettingsHelpMenu.tsx
  • src/renderer/src/lib/update-check-click-options.test.ts
  • src/renderer/src/lib/update-check-click-options.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/renderer/src/components/sidebar/SidebarSettingsHelpMenu.test.tsx
  • src/main/updater.ts

@Jinwoo-H
Jinwoo-H merged commit 9981c3b into main Jul 5, 2026
2 checks passed
@Jinwoo-H
Jinwoo-H deleted the Jinwoo-H/perf-update-click branch July 5, 2026 09:53
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
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.

1 participant