diff --git a/src/main/runtime/orca-runtime.ts b/src/main/runtime/orca-runtime.ts index c8a48430c57..d19055d5716 100644 --- a/src/main/runtime/orca-runtime.ts +++ b/src/main/runtime/orca-runtime.ts @@ -16771,8 +16771,10 @@ export class OrcaRuntimeService { // Returns the post-condition "no fit-override remains held" (#7588): `true` // when it cleared a held override OR nothing was held to begin with, `false` // only when a restore was attempted and the resize failed (override rolled - // back, still held). reclaimTerminalForDesktop gates its driver/mode - // transitions on this; other callers ignore it. + // back, still held). Informational for every caller today — + // reclaimTerminalForDesktop deliberately does NOT gate on it, because an + // explicit take-back must drop the lock even when the resize cannot + // converge. Do not reinstate a convergence gate there. async applyMobileDisplayMode(ptyId: string): Promise { const mode = this.getMobileDisplayMode(ptyId) const inner = this.mobileSubscribers.get(ptyId) diff --git a/src/main/runtime/remote-desktop-driver.test.ts b/src/main/runtime/remote-desktop-driver.test.ts index 355a65c49b8..e031aed8d18 100644 --- a/src/main/runtime/remote-desktop-driver.test.ts +++ b/src/main/runtime/remote-desktop-driver.test.ts @@ -545,7 +545,7 @@ describe('remote desktop viewer width driver', () => { await expect(runtime.reclaimTerminalForDesktop('pty-1')).resolves.toBe(true) expect(runtime.getTerminalFitOverride('pty-1')).toBeNull() - expect(runtime.getDriver('pty-1').kind).not.toBe('mobile') + expect(runtime.getDriver('pty-1')).toEqual({ kind: 'desktop' }) expect(fitOverrideEvents.slice(notifierBefore).some((e) => e.mode === 'desktop-fit')).toBe(true) // A second click must not be needed, and must stay idempotent. await expect(runtime.reclaimTerminalForDesktop('pty-1')).resolves.toBe(false)