From 41b253eebce072ec254308ca1411621354c32ccb Mon Sep 17 00:00:00 2001 From: Dawid Buszta <344369893+MF-DEEV@users.noreply.github.com> Date: Fri, 23 Oct 2026 17:45:11 +0200 Subject: [PATCH 1/2] fix(sessions): bring antigravity forward before asking it for the session's window Asked from its command line while another app is in front, Antigravity only reorders its own windows and stays behind, yet the command still succeeds, so Open never activated the app. The app now comes forward first and the command line then picks the window. --- .../Services/ClaudeSessions/ClaudeSessionService.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Sources/Vorssaint/Services/ClaudeSessions/ClaudeSessionService.swift b/Sources/Vorssaint/Services/ClaudeSessions/ClaudeSessionService.swift index 61ad11cc9..b48fb3a4c 100644 --- a/Sources/Vorssaint/Services/ClaudeSessions/ClaudeSessionService.swift +++ b/Sources/Vorssaint/Services/ClaudeSessions/ClaudeSessionService.swift @@ -604,6 +604,11 @@ enum ClaudeHostFocus { return result.ok && result.output == "found" ? true : activate(ClaudeSessionHosts.terminal, window: nil) case .antigravity(let port): let folders = port.map { ClaudeIDELock.folders(port: $0, homes: homes) } ?? [] + // The app comes forward first: asked from its command line while + // another app is in front, Antigravity only reorders its own + // windows and stays behind. + let activated = activate(ClaudeSessionHosts.antigravity, + window: ClaudeIDELock.windowHint(cwd: session.cwd, folders: folders)) // Antigravity brings forward the window that already has the // session's folder open when asked to open that folder, with no // permission needed. Only a folder that is open is asked for, so @@ -613,8 +618,7 @@ enum ClaudeHostFocus { if let shell = ClaudeTerminalBridge.shell(of: session.pid) { _ = ClaudeTerminalBridge.focus(shell: shell, folder: ClaudeTerminalBridge.folder()) } - return raised || activate(ClaudeSessionHosts.antigravity, - window: ClaudeIDELock.windowHint(cwd: session.cwd, folders: folders)) + return activated || raised case .app(let bundle): return activate(bundle, window: nil) case .unknown: From 5b039b34e74fb03b898467a825bba14881fd6231 Mon Sep 17 00:00:00 2001 From: Dawid Buszta <344369893+MF-DEEV@users.noreply.github.com> Date: Fri, 23 Oct 2026 17:54:14 +0200 Subject: [PATCH 2/2] fix(sessions): look up the antigravity window by title only when the command line cannot The title lookup matches any window whose title contains the folder's name, so running it before every Open could raise and unminimize a stranger for a moment. The command line already picks the right window whenever the session's folder is open. --- .../ClaudeSessions/ClaudeSessionService.swift | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Sources/Vorssaint/Services/ClaudeSessions/ClaudeSessionService.swift b/Sources/Vorssaint/Services/ClaudeSessions/ClaudeSessionService.swift index b48fb3a4c..49890f3f3 100644 --- a/Sources/Vorssaint/Services/ClaudeSessions/ClaudeSessionService.swift +++ b/Sources/Vorssaint/Services/ClaudeSessions/ClaudeSessionService.swift @@ -604,16 +604,18 @@ enum ClaudeHostFocus { return result.ok && result.output == "found" ? true : activate(ClaudeSessionHosts.terminal, window: nil) case .antigravity(let port): let folders = port.map { ClaudeIDELock.folders(port: $0, homes: homes) } ?? [] - // The app comes forward first: asked from its command line while - // another app is in front, Antigravity only reorders its own - // windows and stays behind. - let activated = activate(ClaudeSessionHosts.antigravity, - window: ClaudeIDELock.windowHint(cwd: session.cwd, folders: folders)) // Antigravity brings forward the window that already has the // session's folder open when asked to open that folder, with no // permission needed. Only a folder that is open is asked for, so // no new window ever opens. - let raised = ClaudeIDELock.openFolder(cwd: session.cwd, folders: folders).map(openInAntigravity) ?? false + let folder = ClaudeIDELock.openFolder(cwd: session.cwd, folders: folders) + // The app comes forward first: asked from its command line while + // another app is in front, Antigravity only reorders its own + // windows and stays behind. A window is looked up by its title + // only when the command line has no folder to ask for. + let activated = activate(ClaudeSessionHosts.antigravity, + window: folder == nil ? ClaudeIDELock.windowHint(cwd: session.cwd, folders: folders) : nil) + let raised = folder.map(openInAntigravity) ?? false // The extension then shows the session's own terminal in it. if let shell = ClaudeTerminalBridge.shell(of: session.pid) { _ = ClaudeTerminalBridge.focus(shell: shell, folder: ClaudeTerminalBridge.folder())