Skip to content

Commit 5dee2f5

Browse files
committed
refactor: extract remote-daemon stack out of Workspace.swift
Workspace.swift carried ~4,900 lines of self-contained remote-session infrastructure declared before the Workspace class even began — pending call registry, RPC client, loopback HTTP rewriters, proxy tunnel, SOCKS broker, CLI relay server, and the session controller. Its only edge back to Workspace is the weak reference held by WorkspaceRemoteSessionController. Pure move, no logic changes: - Sources/WorkspaceRemoteDaemon.swift — transport/infra types - Sources/WorkspaceRemoteSession.swift — WorkspaceRemoteSessionController - Workspace.swift shrinks 12,352 -> 7,438 lines Visibility widened from file-scope to internal only where the move splits an existing same-file reference: three transport classes used by the session controller, RemoteDropUploadError, and five Workspace apply* callbacks plus activeRemoteSessionControllerID used by the moved controller.
1 parent 991d36f commit 5dee2f5

4 files changed

Lines changed: 4957 additions & 4921 deletions

File tree

GhosttyTabs.xcodeproj/project.pbxproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
A5001290 /* MarkdownUI in Frameworks */ = {isa = PBXBuildFile; productRef = A5001291 /* MarkdownUI */; };
4040
A5001405 /* PanelContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5001415 /* PanelContentView.swift */; };
4141
A5001406 /* Workspace.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5001416 /* Workspace.swift */; };
42+
A5FF0012 /* WorkspaceRemoteSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FF0002 /* WorkspaceRemoteSession.swift */; };
43+
A5FF0011 /* WorkspaceRemoteDaemon.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FF0001 /* WorkspaceRemoteDaemon.swift */; };
4244
A5001407 /* WorkspaceContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5001417 /* WorkspaceContentView.swift */; };
4345
A5001093 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5001090 /* AppDelegate.swift */; };
4446
A5001094 /* NotificationsPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5001091 /* NotificationsPage.swift */; };
@@ -238,6 +240,8 @@
238240
A5001418 /* MarkdownPanel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Panels/MarkdownPanel.swift; sourceTree = "<group>"; };
239241
A5001419 /* MarkdownPanelView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Panels/MarkdownPanelView.swift; sourceTree = "<group>"; };
240242
A5001416 /* Workspace.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Workspace.swift; sourceTree = "<group>"; };
243+
A5FF0002 /* WorkspaceRemoteSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorkspaceRemoteSession.swift; sourceTree = "<group>"; };
244+
A5FF0001 /* WorkspaceRemoteDaemon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorkspaceRemoteDaemon.swift; sourceTree = "<group>"; };
241245
A5001417 /* WorkspaceContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorkspaceContentView.swift; sourceTree = "<group>"; };
242246
A5001090 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
243247
A5001091 /* NotificationsPage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationsPage.swift; sourceTree = "<group>"; };
@@ -463,6 +467,8 @@
463467
A5001013 /* TabManager.swift */,
464468
A5001511 /* UITestRecorder.swift */,
465469
A5001416 /* Workspace.swift */,
470+
A5FF0002 /* WorkspaceRemoteSession.swift */,
471+
A5FF0001 /* WorkspaceRemoteDaemon.swift */,
466472
A5001417 /* WorkspaceContentView.swift */,
467473
A5001014 /* GhosttyConfig.swift */,
468474
A5001015 /* GhosttyTerminalView.swift */,
@@ -768,6 +774,8 @@
768774
A5001003 /* TabManager.swift in Sources */,
769775
A5001501 /* UITestRecorder.swift in Sources */,
770776
A5001406 /* Workspace.swift in Sources */,
777+
A5FF0012 /* WorkspaceRemoteSession.swift in Sources */,
778+
A5FF0011 /* WorkspaceRemoteDaemon.swift in Sources */,
771779
A5001407 /* WorkspaceContentView.swift in Sources */,
772780
A5001004 /* GhosttyConfig.swift in Sources */,
773781
A5001005 /* GhosttyTerminalView.swift in Sources */,

0 commit comments

Comments
 (0)