Skip to content

[P2] fix(updater): route hourly release-notes links to the hourly repo and let the disabled channel tooltip open - #11812

Merged
nwparker merged 1 commit into
mainfrom
nwparker/fix-hourly-update-card-links
Jul 31, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/fix-hourly-update-card-links

Conversation

@nwparker

@nwparker nwparker commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two independent P2s found by the v1.4.163-rc.1..v1.4.163-rc.3 production release scan, both on the update / release-channel surface.

Bug A — a pinned hourly build links "Release notes" to a tag that does not exist (404)

UpdateCard.tsx kept a private releaseUrlForVersion() that hardcoded the main repo:

return version
  ? `https://github.com/stablyai/orca/releases/tag/v${version}`
  : 'https://github.com/stablyai/orca/releases'

Hourly builds are not published there. src/shared/release-channel.ts already knows this — hourly artifacts go to stablyai/orca-hourly (HOURLY_RELEASE_REPO), stable and RC to stablyai/orca (MAIN_RELEASE_REPO). An hourly tag has no counterpart in the main repo, so every "Release notes" / "Check official releases" link rendered on an updater error card while running a pinned hourly build resolved to a GitHub 404.

GeneralUpdateSettingsSection.tsx had the same hardcoded main-repo URL in two more places.

Fix: one shared getReleaseNotesUrlForVersion(version) in src/shared/release-channel.ts:85, deriving the repo from the existing getVersionChannel(version). Seven call sites in UpdateCard.tsx and two in GeneralUpdateSettingsSection.tsx now route through it. It also runs the version through normalizeTagToVersion, so an already-v-prefixed version no longer yields .../releases/tag/vv1.4.163.

Deliberately preserved: the Windows signature-mismatch card passes null, and null still resolves to the main repo's plain releases listing. That is intentional and the existing comment says why — linking the rejected version would let a user bypass the publisher check by re-running it. null also does not use /releases/latest, because /latest breaks when GitHub's API is degraded. Both behaviors are unchanged and are pinned by new tests.

Bug B — the "macOS only" tooltip on the disabled Hourly segment is unreachable by keyboard

ReleaseChannelSection.tsx:184-209 disables the Hourly segment on Linux and Windows and attaches a tooltip explaining why. The code says exactly what it is for:

// Why disabled rather than hidden: a Linux/Windows dev who has heard
// about the hourly channel should see that it exists and why it is
// unavailable, instead of silently not finding it.

SettingsSegmentedControl rendered that option with the native disabled attribute, and TooltipTrigger uses asChild, so the Radix trigger is the disabled button rather than a wrapper around it. A natively disabled button is removed from the tab order, so it can never receive focus — and the focus-driven half of the tooltip never fires. A keyboard or screen-reader user on Linux/Windows tabs straight past a greyed-out segment with an Apple glyph and no way to find out why it is greyed out.

Fix: aria-disabled={opt.disabled} instead of disabled={opt.disabled}. aria-disabled conveys the same state to assistive technology while leaving the button focusable. The component already had an if (!opt.disabled) { onChange(...) } click guard, so the option stays inert.

Scope correction vs. the release-scan finding. The scan reported this as "disabled buttons emit no pointer or focus events … the rationale isn't delivered for mouse users." The pointer half of that is wrong, and it was caught by capturing the screenshots below rather than reasoning about it. Chromium does dispatch pointer events to disabled buttons, so hover already worked on origin/main. The before/after hover screenshots came out byte-identical (matching SHA-256), which is the proof. Only the keyboard path was broken. The fix is unchanged — but it is an accessibility fix, not a mouse-affordance fix, and the code comment was reworded to stop asserting the false claim.

ELI5

A. Orca can install builds from two different shelves: the normal shelf and an extra "hourly" shelf that only exists for macOS. If you were running something off the hourly shelf and the updater showed you an error, the "Release notes" link always pointed at the normal shelf — where your build was never stored. So you clicked it and got GitHub's "this page does not exist". Now the link looks up which shelf your build actually came from.

B. In Settings there is a row of buttons for picking your update channel: Stable / RC / Hourly. On Windows and Linux the Hourly button is greyed out, and it has a little popup that says "hourly builds are macOS-only".

If you use a mouse, you could hover it and read that popup — fine. But if you navigate with the keyboard, you couldn't: a greyed-out button is skipped entirely when you press Tab, so you can never land on it, so the popup explaining why it's greyed out can never appear. Keyboard and screen-reader users got a dead button and no explanation at all.

The fix marks the button as unavailable in a way that still lets you Tab to it and read the explanation, while pressing it still does nothing.

Screenshots

Captured from the Electron dev build over CDP, Settings → Updates → Release channel. Hourly is enabled on macOS (it is the only platform it ships for), so the disabled state cannot render on this host — navigator.userAgent was spoofed to Windows over CDP, since getShortcutPlatform() is what ReleaseChannelSection reads. Disclosing that rather than implying a real Windows box.

Keyboard — this is the bug. Tab to the Hourly segment:

Before (disabled) After (aria-disabled)
before after
Focus skips straight past the greyed-out segment. No focus ring, no tooltip, no explanation. The segment takes focus (visible ring) and the tooltip opens: "Hourly builds are produced only for macOS. Linux and Windows stay on Stable or RC."

Hover — unchanged, and that is the point. Hovering the disabled segment before and after:

hover

The before and after hover captures came out byte-identical (SHA-256 f498c53b2a562dad746251b93509983891bde228069cee92f83ca4331dadc2cd for both), so only one is shown. Chromium dispatches pointer events to natively disabled buttons, so mouse hover already worked on origin/main. See the scope correction above — this is a keyboard/AT fix only.

Proof of fix

Run against this branch with only the production files reverted to origin/main (tests kept), npx vitest run --config config/vitest.config.ts over the four touched test files:

 × builds release-notes links against the repo that published the version
 × links a pinned hourly build to its own repo instead of a 404 main-repo tag
 × marks unavailable options aria-disabled so their tooltip stays reachable
 × keeps the WSL account location controls on Windows-class hosts
 × selects the WSL account location under auto when the global project runtime is WSL

TypeError: getReleaseNotesUrlForVersion is not a function
AssertionError: expected "vi.fn()" to be called with arguments: [ Array(1) ]
AssertionError: expected '<link rel="preload" as="image" href="…' to contain 'role="radio" aria-checked="true" aria…'
AssertionError: expected true to be false // Object.is equality

 Test Files  4 failed (4)
      Tests  5 failed | 20 passed (25)

The last two AccountsPane failures are the same defect showing up on a second consumer: those assertions look for aria-disabled="true" on the WSL account-location segments and find the native disabled attribute instead.

With the fix restored, the same command is 4 files / 25 tests passed.

New coverage added:

  • src/shared/release-channel.test.ts — hourly / stable / RC / null cases for getReleaseNotesUrlForVersion, including the null → main-repo-listing behavior the Windows signature-mismatch card depends on.
  • src/renderer/src/components/UpdateCard.error-card.test.tsx — a new "UpdateCard hourly builds" block asserting the rendered error-card link points at stablyai/orca-hourly.
  • src/renderer/src/components/settings/SettingsFormControls.segmented-control.test.tsx (new file) — asserts an unavailable option renders aria-disabled="true" with no native disabled attribute, and that clicking it does not call onChange.

Proof of no regression

  • Targeted suite at branch tip: 4 files / 25 tests passed.
  • Full desktop suite was run on the merged tree containing all eight scan fixes: 359 files / 3830 tests passed.
  • npx oxfmt --check and npx oxlint clean on all changed files (enforced by lint-staged on commit).
  • AccountsPane.test.tsx is updated, not deleted: the two assertions moved from disabled="" to aria-disabled="true". That is the only behavioral assertion change in this PR, and it is asserting the fix.

Blast radius: SettingsSegmentedControl is shared

Bug B's fix touches a primitive with seven other consumers (WSL runtime pickers in AccountsPane, AgentRuntimeSetting, DefaultWindowsProjectRuntimeSetting, ProjectWindowsRuntimeSetting; the fork-sync segments in RepositoryForkSyncSection; TerminalAdvancedSection; TerminalWindowsShellSection). Verified safe for all of them:

  • Still inert. The onClick guard is unchanged and catches both mouse clicks and keyboard Enter/Space activation, since both dispatch a click event on a <button>.
  • Still looks disabled. The styling at SettingsFormControls.tsx:197 is an explicit opt.disabled ? … : … conditional, not a Tailwind disabled: variant, so it does not depend on the native attribute.
  • No form submission risk. The element is type="button".
  • Accessibility is improved, not degraded. aria-disabled is the ARIA-recommended pattern for a disabled control that must remain discoverable, and it keeps the role="radio" semantics intact.

Testing

  • pnpm lint — clean (oxlint, type-aware audit, reliability gates, max-lines ratchet, localization catalog/extraction/coverage); oxfmt --check clean via lint-staged
  • pnpm typecheck — clean (tsc: node + cli + web)
  • pnpm test (targeted files at tip + full desktop suite on the combined tree)
  • pnpm build — not run; no build-graph, packaging, or dependency change in this PR
  • Added or updated high-quality tests that would catch regressions

AI Review Report

Reviewed by Claude Opus 5 as part of a 45-agent release scan with adversarial refutation (21 candidates raised, 6 confirmed, 13 refuted). Risks checked for this change:

  • Cross-platform: this PR is about platform difference. Bug B only manifests on Linux/Windows (Hourly is enabled on macOS, so the disabled state never renders there) — which is why it survived local testing. Bug A only manifests on macOS, since hourly builds are macOS-only. No hardcoded metaKey, no path assumptions, no shell invocation. getReleaseNotesUrlForVersion builds a URL string only.
  • Updater safety: confirmed the null → main-repo-listing path is untouched, so the Windows signature-mismatch card still refuses to link the rejected artifact. verifyUpdateCodeSignature is not referenced or reassigned anywhere in this diff.
  • Shared-primitive blast radius: all seven other SettingsSegmentedControl consumers audited (see above).
  • Provider neutrality / SSH / folder workspaces: not applicable — no git, provider, or execution-host code paths touched.

Security Audit

  • No new dependencies, no lockfile change, no install hooks.
  • No shell execution, no eval, no dynamic import().
  • Input handling: getReleaseNotesUrlForVersion interpolates a version string into a https://github.com/… URL. The repo half is chosen from a closed set of two module-level constants — it is never caller-controlled. The version half comes from the updater's own release feed, not user input, and is passed through normalizeTagToVersion. The result is only ever handed to Orca's existing external-link opener, which is unchanged.
  • The disabled → aria-disabled swap widens which events the element emits, so it was checked for a click-through hole. The pre-existing if (!opt.disabled) guard closes it, and a new test pins that.
  • No auth, secrets, IPC, or path handling touched.

Notes

  • Bug B is not observable on macOS, because Hourly is supported there and the segment is never disabled. The disabled state is reached via getShortcutPlatform() in src/renderer/src/lib/shortcut-platform.ts, which reads navigator.userAgent.
  • Bug A's fix now covers GeneralUpdateSettingsSection.tsx too, which was beyond the original finding — the scan flagged UpdateCard.tsx only, but the same hardcoded URL was present there and would 404 identically.

Made with Orca 🐋

…o and let the disabled channel tooltip open

Co-authored-by: Orca <[email protected]>
@nwparker
nwparker merged commit b998f7b into main Jul 31, 2026
42 checks passed
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The shared getReleaseNotesUrlForVersion helper now selects release URLs for hourly, stable, RC, and null versions. Update cards and update settings use this helper for release-note links. Tests cover hourly release URLs and resolver behavior. Segmented-control options now use aria-disabled, remain focusable, and ignore clicks when unavailable. Related tests verify accessibility and selection behavior.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes both primary fixes: hourly release-note routing and keyboard-accessible disabled channel tooltips.
Description check ✅ Passed The description covers the required summary, screenshots, testing, AI review, security audit, and notes, including the skipped build with justification.
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 💡 1
📝 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.

🧹 Nitpick comments (1)
src/renderer/src/components/settings/SettingsFormControls.tsx (1)

182-184: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove duplicated implementation commentary.

Keep the production rationale to one line. Remove the redundant test comment.

  • src/renderer/src/components/settings/SettingsFormControls.tsx#L182-L184: Replace the three-line comment with a one-line accessibility rationale.
  • src/renderer/src/components/settings/SettingsFormControls.segmented-control.test.tsx#L32-L33: Remove the comment because the test name states the behavior.

As per coding guidelines, comments must be concise, limited to non-obvious information, and preferably one line.

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 45f14b43-391d-4bf2-ae62-87b9beb580e6

📥 Commits

Reviewing files that changed from the base of the PR and between e698241 and 9afd9c7.

📒 Files selected for processing (8)
  • src/renderer/src/components/UpdateCard.error-card.test.tsx
  • src/renderer/src/components/UpdateCard.tsx
  • src/renderer/src/components/settings/AccountsPane.test.tsx
  • src/renderer/src/components/settings/GeneralUpdateSettingsSection.tsx
  • src/renderer/src/components/settings/SettingsFormControls.segmented-control.test.tsx
  • src/renderer/src/components/settings/SettingsFormControls.tsx
  • src/shared/release-channel.test.ts
  • src/shared/release-channel.ts

@greptile-apps

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes two independent bugs found in a production release scan: hourly-build release-notes links 404ing against the wrong GitHub repo, and a keyboard-inaccessible "macOS only" tooltip on the disabled Hourly channel segment. Both fixes are minimal, well-tested, and carry no behavioural regressions on the unaffected paths.

  • Bug A (URL routing): Introduces getReleaseNotesUrlForVersion(version) in src/shared/release-channel.ts, which derives the GitHub repo (stablyai/orca or stablyai/orca-hourly) from getVersionChannel. Seven call sites in UpdateCard.tsx and two in GeneralUpdateSettingsSection.tsx now use it, replacing hardcoded main-repo strings. The null → main-repo-listing path (used by the Windows signature-mismatch card) is explicitly preserved.
  • Bug B (accessibility): Swaps disabled for aria-disabled on SettingsSegmentedControl buttons, keeping them in the tab order so the tooltip explaining unavailability is reachable by keyboard. The pre-existing if (!opt.disabled) click guard prevents activation, and styling uses an explicit class conditional rather than the native :disabled pseudo-class, so appearance is unchanged.

Confidence Score: 5/5

Safe to merge — both changes are narrowly scoped, fully tested, and the blast-radius analysis for the shared SettingsSegmentedControl primitive is correct.

The URL-routing fix consolidates a previously duplicated hardcoded string into a single tested helper whose logic is straightforward and covered by four distinct test cases (hourly, stable, v-prefixed RC, null). The aria-disabled change is a one-attribute swap on a component whose styling already uses an explicit conditional rather than the native :disabled pseudo-class, and the pre-existing click guard remains intact. All seven other consumers of SettingsSegmentedControl benefit from the fix without any call-site changes. Test coverage is additive across three new/updated files and all 25 targeted tests pass clean.

Files Needing Attention: No files require special attention.

Important Files Changed

Filename Overview
src/shared/release-channel.ts Adds getReleaseNotesUrlForVersion — correctly routes null to main-repo listing, hourly versions to HOURLY_RELEASE_REPO, and all other channels to MAIN_RELEASE_REPO via existing getVersionChannel logic.
src/renderer/src/components/UpdateCard.tsx Replaces seven calls to the removed local releaseUrlForVersion helper with getReleaseNotesUrlForVersion; null-version (signature-mismatch) case explicitly preserved.
src/renderer/src/components/settings/SettingsFormControls.tsx Swaps disabled for aria-disabled on segmented-control buttons; the click guard and explicit Tailwind class conditional keep styling and activation behaviour unchanged.
src/renderer/src/components/settings/GeneralUpdateSettingsSection.tsx Replaces two hardcoded main-repo href strings with getReleaseNotesUrlForVersion(updateStatus.version), closing the same 404 on the Settings → Updates surface.
src/shared/release-channel.test.ts New test block covers hourly, stable, rc (v-prefixed), and null cases for getReleaseNotesUrlForVersion; all four paths are pinned.
src/renderer/src/components/UpdateCard.error-card.test.tsx Adds an hourly-build scenario verifying the rendered error-card Release notes link targets stablyai/orca-hourly.
src/renderer/src/components/settings/SettingsFormControls.segmented-control.test.tsx New test file pins aria-disabled presence (and absence of native disabled), tooltip-on-focus, and click-guard for unavailable segmented-control options.
src/renderer/src/components/settings/AccountsPane.test.tsx Updates two assertions from disabled to aria-disabled to match the corrected rendered output; no behavioural assertions removed.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["getReleaseNotesUrlForVersion(version)"] --> B{version is null?}
    B -- Yes --> C["repo = MAIN_RELEASE_REPO\nReturn: github.com/stablyai/orca/releases"]
    B -- No --> D{"getVersionChannel(version) === hourly?"}
    D -- Yes --> E["repo = HOURLY_RELEASE_REPO\nstablyai/orca-hourly"]
    D -- No --> F["repo = MAIN_RELEASE_REPO\nstablyai/orca"]
    E --> G["Return: github.com/repo/releases/tag/v + normalizeTagToVersion(version)"]
    F --> G

    subgraph Callers
        H["UpdateCard.tsx - 7 call sites"]
        I["GeneralUpdateSettingsSection.tsx - 2 call sites"]
    end
    H --> A
    I --> A
Loading

Reviews (1): Last reviewed commit: "[P2] fix(updater): route hourly release-..." | Re-trigger Greptile

@nwparker
nwparker deleted the nwparker/fix-hourly-update-card-links branch July 31, 2026 21:05
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…o and let the disabled channel tooltip open (stablyai#11812)

Co-authored-by: Orca <[email protected]>
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