From dadfd73bc9b07c04ffc1290fad08e6cfb5ebbcfc Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Tue, 28 Jul 2026 17:09:00 -0700 Subject: [PATCH] fix(browser): trim the runtime id before hiding the hosted-review modifier hint openHttpLink and terminalUrlOpenHintOptionsFor both trim, so a blank runtime id hid the hint while the click still reached Orca. --- ...ecks-panel-hosted-review-click-routing.test.ts | 15 +++++++++++++++ .../checks-panel-hosted-review-click-routing.ts | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/components/right-sidebar/checks-panel-hosted-review-click-routing.test.ts b/src/renderer/src/components/right-sidebar/checks-panel-hosted-review-click-routing.test.ts index 4f517517652..956877a7cd7 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel-hosted-review-click-routing.test.ts +++ b/src/renderer/src/components/right-sidebar/checks-panel-hosted-review-click-routing.test.ts @@ -132,6 +132,21 @@ describe('checks panel hosted review modifier hint destination', () => { ).toBeNull() }) + // Why: openHttpLink trims before treating a runtime as active, so a blank id must + // not suppress a hint for a click that still reaches Orca. + it('ignores a blank runtime id', () => { + expect( + resolveChecksPanelHostedReviewModifierDestination( + { + openLinksInApp: false, + openLinksInAppModifierInverts: true, + activeRuntimeEnvironmentId: ' ' + }, + true + ) + ).toBe('orca') + }) + // Why: openHttpLink gates routing to Orca on a worktree id, so without one the // modifier lands in the system browser either way. it('stays silent without a worktree', () => { diff --git a/src/renderer/src/components/right-sidebar/checks-panel-hosted-review-click-routing.ts b/src/renderer/src/components/right-sidebar/checks-panel-hosted-review-click-routing.ts index 65e5ebea8ed..62ddcb71b4e 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel-hosted-review-click-routing.ts +++ b/src/renderer/src/components/right-sidebar/checks-panel-hosted-review-click-routing.ts @@ -38,7 +38,9 @@ export function resolveChecksPanelHostedReviewModifierDestination( | undefined, hasWorktree: boolean ): ChecksPanelHostedReviewModifierDestination { - if (!hasWorktree || settings?.activeRuntimeEnvironmentId) { + // Why: trim to match openHttpLink — an untrimmed check hides the hint on a blank + // runtime id while the click still routes to Orca. + if (!hasWorktree || settings?.activeRuntimeEnvironmentId?.trim()) { return null } if (settings?.openLinksInApp === true) {