mirror of
https://github.com/stablyai/orca.git
synced 2026-10-20 08:03:28 +00:00
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:
+15
@@ -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', () => {
|
||||
|
||||
+3
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user