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.
This commit is contained in:
Brennan Benson
2026-07-28 17:09:00 -07:00
parent 0f972ce4a8
commit dadfd73bc9
2 changed files with 18 additions and 1 deletions
@@ -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', () => {
@@ -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) {