- Notifications
You must be signed in to change notification settings - Fork3
fix: start coder connect on launch after SE is installed#113
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -37,6 +37,10 @@ class AppDelegate: NSObject, NSApplicationDelegate { | ||
vpn = CoderVPNService() | ||
state = AppState(onChange: vpn.configureTunnelProviderProtocol) | ||
fileSyncDaemon = MutagenDaemon() | ||
if state.startVPNOnLaunch { | ||
vpn.startWhenReady = true | ||
} | ||
vpn.installSystemExtension() | ||
} | ||
func applicationDidFinishLaunching(_: Notification) { | ||
@@ -68,16 +72,17 @@ class AppDelegate: NSObject, NSApplicationDelegate { | ||
if await !vpn.loadNetworkExtensionConfig() { | ||
state.reconfigure() | ||
} | ||
} | ||
// TODO: Start the daemon only once a file sync is configured | ||
Task { | ||
await fileSyncDaemon.start() | ||
} | ||
} | ||
deinit { | ||
NotificationCenter.default.removeObserver(self) | ||
} | ||
Comment on lines +82 to +85 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. Drive-by fix: this was on the wrong class, though that wasn't causing any issues. | ||
// This function MUST eventually call `NSApp.reply(toApplicationShouldTerminate: true)` | ||
// or return `.terminateNow` | ||
func applicationShouldTerminate(_: NSApplication) -> NSApplication.TerminateReply { | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -107,6 +107,12 @@ struct LoginTests { | ||
data: [.get: Client.encoder.encode(buildInfo)] | ||
).register() | ||
try Mock( | ||
url: url.appendingPathComponent("/api/v2/users/me"), | ||
statusCode: 200, | ||
data: [.get: Client.encoder.encode(User(id: UUID(), username: "username"))] | ||
).register() | ||
Comment on lines +110 to +115 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. Drive-by fix: We need to mock this route as the token is validated before the server version. | ||
try await ViewHosting.host(view) { | ||
try await sut.inspection.inspect { view in | ||
try view.find(ViewType.TextField.self).setInput(url.absoluteString) | ||
Uh oh!
There was an error while loading.Please reload this page.