-
Notifications
You must be signed in to change notification settings - Fork 3
Add ChatGPT Atlas browser support #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -63,6 +63,7 @@ body: | |
| - Brave | ||
| - Vivaldi | ||
| - Firefox (experimental) | ||
| - ChatGPT Atlas | ||
|
|
||
| validations: | ||
| required: false | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| // | ||
| // AtlasBrowser.swift | ||
| // SimplyTrack | ||
| // | ||
|
|
||
| import Foundation | ||
|
|
||
| /// ChatGPT Atlas-specific implementation of browser interface. | ||
| /// Handles URL detection and incognito mode detection for ChatGPT Atlas. | ||
| /// Atlas is Chromium-based and shares the same AppleScript interface as Chrome. | ||
| class AtlasBrowser: BaseBrowser { | ||
| static let appBundleId = "com.openai.atlas" | ||
| static let webBundleId = "com.openai.atlas.web" | ||
| static let supportedBundleIds = [appBundleId, webBundleId] | ||
|
|
||
| init() { | ||
| super.init(bundleId: Self.appBundleId, displayName: "ChatGPT Atlas") | ||
| } | ||
|
|
||
| /// ChatGPT Atlas-specific AppleScript for URL retrieval | ||
| override var currentURLScript: String { | ||
| return """ | ||
| tell application id "\(Self.webBundleId)" | ||
| if (count of windows) > 0 then | ||
| set currentTab to active tab of window 1 | ||
| return URL of currentTab | ||
| end if | ||
| end tell | ||
| """ | ||
| } | ||
|
|
||
| /// Checks if ChatGPT Atlas is currently in incognito mode. | ||
| /// Uses the 'mode' property available in Atlas's Chromium AppleScript interface. | ||
| /// Note: Permissions are already verified by getCurrentURL() call, so no need to re-check. | ||
| /// - Returns: true if incognito mode is detected, false otherwise | ||
| override func isInPrivateBrowsingMode() -> Bool { | ||
| let script = """ | ||
| tell application id "\(Self.webBundleId)" | ||
| if (count of windows) > 0 then | ||
| return mode of window 1 is equal to "incognito" | ||
| end if | ||
| end tell | ||
| """ | ||
|
|
||
| let scriptResult = executeAppleScript(script) | ||
|
|
||
| guard let result = scriptResult.result, | ||
| let isIncognito = Bool(result.lowercased()) | ||
| else { | ||
| return false | ||
| } | ||
|
|
||
| return isIncognito | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,8 @@ | |
| <string>com.brave.Browser</string> | ||
| <string>com.vivaldi.Vivaldi</string> | ||
| <string>org.mozilla.firefox</string> | ||
| <string>com.openai.atlas</string> | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need the wrapper app id in AppleEvents entitlements? |
||
| <string>com.openai.atlas.web</string> | ||
| <string>com.apple.systemevents</string> | ||
| </array> | ||
| <key>com.apple.security.temporary-exception.files.home-relative-path.read-only</key> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| // | ||
| // BrowserSupportTests.swift | ||
| // SimplyTrackTests | ||
| // | ||
| // Created by Hermes Agent on 06.05.2026. | ||
| // | ||
|
|
||
| import Testing | ||
|
|
||
| @testable import SimplyTrack | ||
|
|
||
| struct BrowserSupportTests { | ||
|
|
||
| @Test func chatGPTAtlasIsRecognizedAsSupportedBrowser() { | ||
| let service = WebTrackingService() | ||
|
|
||
| let browser = service.getBrowser(for: "com.openai.atlas") | ||
|
|
||
| #expect(browser != nil) | ||
| #expect(browser?.bundleId == "com.openai.atlas") | ||
| } | ||
|
|
||
| @Test func chatGPTAtlasWebProcessIsRecognizedAsSupportedBrowser() { | ||
| let service = WebTrackingService() | ||
|
|
||
| let browser = service.getBrowser(for: "com.openai.atlas.web") | ||
|
|
||
| #expect(browser != nil) | ||
| #expect(browser?.bundleId == "com.openai.atlas") | ||
| #expect(browser?.displayName == "ChatGPT Atlas") | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have evidence that
NSWorkspace.frontmostApplication.bundleIdentifiercan returncom.openai.atlas.web? If the frontmost app is always the visible wrappercom.openai.atlas, then we should keep onlycom.openai.atlasfor browser detection and usecom.openai.atlas.webonly as the AppleScript target/entitlement.