Skip to content

Commit 9d06e16

Browse files
committed
feat: stabilized tasks ux + term recoverability
1 parent 9abece6 commit 9d06e16

25 files changed

+2670
-976
lines changed

Axel.xcodeproj/project.pbxproj

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
43BD82802F1D70000092A96C /* Sparkle in Frameworks */ = {isa = PBXBuildFile; platformFilters = (macos, ); productRef = 43BD827F2F1D70000092A96C /* Sparkle */; };
1919
43BD82832F1D90000092A96C /* GhosttyKit in Frameworks */ = {isa = PBXBuildFile; platformFilters = (macos, ); productRef = 43BD82822F1D90000092A96C /* GhosttyKit */; };
2020
43D900F22F3060FF00323371 /* Axel.icon in Resources */ = {isa = PBXBuildFile; fileRef = 43D900F12F3060FF00323371 /* Axel.icon */; };
21+
92F9F81D9C73F02C7FA61BB3 /* RecoveredSessionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86858D2EBCB04868D3E1B813 /* RecoveredSessionsView.swift */; };
2122
A1000001201A0001 /* AxelApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1000001101A0001 /* AxelApp.swift */; };
2223
A1000001201A0002 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1000001101A0002 /* ContentView.swift */; };
2324
A1000001201A0003 /* Task.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1000001101A0003 /* Task.swift */; };
@@ -79,6 +80,7 @@
7980
A1000001201A0103 /* TaskSkill.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1000001101A0103 /* TaskSkill.swift */; };
8081
A1000001201A0104 /* SkillManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1000001101A0104 /* SkillManager.swift */; };
8182
A1000001201A0110 /* EmptyStateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1000001101A0110 /* EmptyStateView.swift */; };
83+
A1000001201A0ABC /* TerminalCloseConfirmationSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1000001101A0ABC /* TerminalCloseConfirmationSheet.swift */; };
8284
A1000001201A0111 /* TaskUndoManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1000001101A0111 /* TaskUndoManager.swift */; };
8385
A1000001201A0112 /* TasksSceneView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1000001101A0112 /* TasksSceneView.swift */; };
8486
A1000001201A0113 /* AIProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1000001101A0113 /* AIProvider.swift */; };
@@ -92,6 +94,7 @@
9294
B81242E637B124591F5B7B93 /* SessionStatusService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C177CAE09A36E267719D856 /* SessionStatusService.swift */; };
9395
BAF581097CA2F8F7B7EBBCB1 /* SyncIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACF7B9EBCB92787E60FE8BF0 /* SyncIntegrationTests.swift */; };
9496
C4TERMINSPEC201A0001 /* TerminalInspectorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4TERMINSPEC101A0001 /* TerminalInspectorView.swift */; };
97+
D83C5EA8B2548DEC8D10DA27 /* SessionRecoveryService.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABB3623AE837474A68F802B1 /* SessionRecoveryService.swift */; };
9598
E435BED8E7D96547E09E1C1C /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 23797E4E4415996BCCFE8E45 /* Cocoa.framework */; };
9699
SCRPT0001201A0001 /* ScriptingSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = SCRPT0001101A0001 /* ScriptingSupport.swift */; };
97100
SCRPT0001201A0002 /* Axel.sdef in Resources */ = {isa = PBXBuildFile; fileRef = SCRPT0001101A0002 /* Axel.sdef */; };
@@ -134,6 +137,7 @@
134137
43D900F12F3060FF00323371 /* Axel.icon */ = {isa = PBXFileReference; lastKnownFileType = folder.iconcomposer.icon; path = Axel.icon; sourceTree = "<group>"; };
135138
43E774722F298D900093DEC6 /* AxelUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AxelUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
136139
6238124A78A2C3A74FCFEDBB /* WorktreeService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorktreeService.swift; sourceTree = "<group>"; };
140+
86858D2EBCB04868D3E1B813 /* RecoveredSessionsView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = RecoveredSessionsView.swift; sourceTree = "<group>"; };
137141
9C177CAE09A36E267719D856 /* SessionStatusService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionStatusService.swift; sourceTree = "<group>"; };
138142
A1000001001A0001 /* Axel.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Axel.app; sourceTree = BUILT_PRODUCTS_DIR; };
139143
A1000001101A0001 /* AxelApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AxelApp.swift; sourceTree = "<group>"; };
@@ -199,6 +203,7 @@
199203
A1000001101A0103 /* TaskSkill.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TaskSkill.swift; sourceTree = "<group>"; };
200204
A1000001101A0104 /* SkillManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SkillManager.swift; sourceTree = "<group>"; };
201205
A1000001101A0110 /* EmptyStateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyStateView.swift; sourceTree = "<group>"; };
206+
A1000001101A0ABC /* TerminalCloseConfirmationSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TerminalCloseConfirmationSheet.swift; sourceTree = "<group>"; };
202207
A1000001101A0111 /* TaskUndoManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TaskUndoManager.swift; sourceTree = "<group>"; };
203208
A1000001101A0112 /* TasksSceneView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TasksSceneView.swift; sourceTree = "<group>"; };
204209
A1000001101A0113 /* AIProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AIProvider.swift; sourceTree = "<group>"; };
@@ -208,6 +213,7 @@
208213
A1000001101A0117 /* TasksTableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TasksTableView.swift; sourceTree = "<group>"; };
209214
A1000001101A0200 /* TaskQueueService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TaskQueueService.swift; sourceTree = "<group>"; };
210215
A100000110A10030 /* TaskAssignee.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TaskAssignee.swift; sourceTree = "<group>"; };
216+
ABB3623AE837474A68F802B1 /* SessionRecoveryService.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SessionRecoveryService.swift; sourceTree = "<group>"; };
211217
ACF7B9EBCB92787E60FE8BF0 /* SyncIntegrationTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SyncIntegrationTests.swift; sourceTree = "<group>"; };
212218
BE366A3151FDDA78680EDF0C /* SyncEngineTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SyncEngineTests.swift; sourceTree = "<group>"; };
213219
C4TERMINSPEC101A0001 /* TerminalInspectorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TerminalInspectorView.swift; sourceTree = "<group>"; };
@@ -219,7 +225,17 @@
219225
/* End PBXFileReference section */
220226

221227
/* Begin PBXFileSystemSynchronizedRootGroup section */
222-
43E774732F298D900093DEC6 /* AxelUITests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = AxelUITests; sourceTree = "<group>"; };
228+
43E774732F298D900093DEC6 /* AxelUITests */ = {
229+
isa = PBXFileSystemSynchronizedRootGroup;
230+
exceptions = (
231+
);
232+
explicitFileTypes = {
233+
};
234+
explicitFolders = (
235+
);
236+
path = AxelUITests;
237+
sourceTree = "<group>";
238+
};
223239
/* End PBXFileSystemSynchronizedRootGroup section */
224240

225241
/* Begin PBXFrameworksBuildPhase section */
@@ -391,6 +407,7 @@
391407
A1000001101A0111 /* TaskUndoManager.swift */,
392408
0178D0EB98540F719EB6D5CE /* TaskAssignmentCoordinator.swift */,
393409
SCRPT0001101A0001 /* ScriptingSupport.swift */,
410+
ABB3623AE837474A68F802B1 /* SessionRecoveryService.swift */,
394411
);
395412
path = Services;
396413
sourceTree = "<group>";
@@ -400,6 +417,7 @@
400417
children = (
401418
A1000001101A0094 /* NavigationTypes.swift */,
402419
A1000001101A0110 /* EmptyStateView.swift */,
420+
A1000001101A0ABC /* TerminalCloseConfirmationSheet.swift */,
403421
A1000001101A0116 /* AIProviderUI.swift */,
404422
A1000001101A0013 /* SkillsView.swift */,
405423
A1000001101A0015 /* ContextView.swift */,
@@ -428,6 +446,7 @@
428446
A1000001101A0117 /* TasksTableView.swift */,
429447
A1000001101A0070 /* SimpleTerminalView.swift */,
430448
A1000001401A001A /* Terminal */,
449+
86858D2EBCB04868D3E1B813 /* RecoveredSessionsView.swift */,
431450
);
432451
path = macOS;
433452
sourceTree = "<group>";
@@ -597,9 +616,9 @@
597616
);
598617
mainGroup = A1000001401A0001;
599618
packageReferences = (
600-
43BD82762F1D5F650092A96C /* XCLocalSwiftPackageReference "Packages/AutomergeWrapper" */,
619+
43BD82762F1D5F650092A96C /* XCLocalSwiftPackageReference "AutomergeWrapper" */,
601620
43BD82702F1D5F650092A96C /* XCRemoteSwiftPackageReference "supabase-swift" */,
602-
43BD82812F1D90000092A96C /* XCLocalSwiftPackageReference "Packages/GhosttyKit" */,
621+
43BD82812F1D90000092A96C /* XCLocalSwiftPackageReference "GhosttyKit" */,
603622
43BD827E2F1D70000092A96C /* XCRemoteSwiftPackageReference "Sparkle" */,
604623
);
605624
productRefGroup = A1000001401A0003 /* Products */;
@@ -698,6 +717,7 @@
698717
A1000001201A0043 /* TaskMetrics.swift in Sources */,
699718
A1000001201A0044 /* DiffView.swift in Sources */,
700719
A1000001201A0110 /* EmptyStateView.swift in Sources */,
720+
A1000001201A0ABC /* TerminalCloseConfirmationSheet.swift in Sources */,
701721
A1000001201A0061 /* TeamView.swift in Sources */,
702722
A1000001201A0070 /* SimpleTerminalView.swift in Sources */,
703723
A1000001201A0080 /* SwipeableCardView.swift in Sources */,
@@ -726,6 +746,8 @@
726746
A1000001201A0117 /* TasksTableView.swift in Sources */,
727747
18772BF65693156AC43F75D2 /* TaskAssignmentCoordinator.swift in Sources */,
728748
SCRPT0001201A0001 /* ScriptingSupport.swift in Sources */,
749+
D83C5EA8B2548DEC8D10DA27 /* SessionRecoveryService.swift in Sources */,
750+
92F9F81D9C73F02C7FA61BB3 /* RecoveredSessionsView.swift in Sources */,
729751
);
730752
runOnlyForDeploymentPostprocessing = 0;
731753
};
@@ -766,7 +788,7 @@
766788
DEVELOPMENT_TEAM = 8ZJ55A62XN;
767789
GENERATE_INFOPLIST_FILE = YES;
768790
IPHONEOS_DEPLOYMENT_TARGET = 26.0;
769-
MARKETING_VERSION = 0.1.9;
791+
MARKETING_VERSION = 0.1.10;
770792
PRODUCT_BUNDLE_IDENTIFIER = md.axel.AxelUITests;
771793
PRODUCT_NAME = "$(TARGET_NAME)";
772794
SDKROOT = iphoneos;
@@ -788,7 +810,7 @@
788810
DEVELOPMENT_TEAM = 8ZJ55A62XN;
789811
GENERATE_INFOPLIST_FILE = YES;
790812
IPHONEOS_DEPLOYMENT_TARGET = 26.0;
791-
MARKETING_VERSION = 0.1.9;
813+
MARKETING_VERSION = 0.1.10;
792814
PRODUCT_BUNDLE_IDENTIFIER = md.axel.AxelUITests;
793815
PRODUCT_NAME = "$(TARGET_NAME)";
794816
SDKROOT = iphoneos;
@@ -818,7 +840,7 @@
818840
"@loader_path/../Frameworks",
819841
);
820842
MACOSX_DEPLOYMENT_TARGET = 15.6;
821-
MARKETING_VERSION = 0.1.9;
843+
MARKETING_VERSION = 0.1.10;
822844
PRODUCT_BUNDLE_IDENTIFIER = com.axel.AxelTests;
823845
PRODUCT_MODULE_NAME = AxelTests;
824846
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -844,7 +866,7 @@
844866
"@loader_path/../Frameworks",
845867
);
846868
MACOSX_DEPLOYMENT_TARGET = 15.6;
847-
MARKETING_VERSION = 0.1.9;
869+
MARKETING_VERSION = 0.1.10;
848870
PRODUCT_BUNDLE_IDENTIFIER = com.axel.AxelTests;
849871
PRODUCT_MODULE_NAME = AxelTests;
850872
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1016,7 +1038,7 @@
10161038
"@executable_path/Frameworks",
10171039
);
10181040
MACOSX_DEPLOYMENT_TARGET = 15.6;
1019-
MARKETING_VERSION = 0.1.9;
1041+
MARKETING_VERSION = 0.1.10;
10201042
"OTHER_LDFLAGS[sdk=macosx*]" = (
10211043
"-lc++",
10221044
"-framework",
@@ -1076,7 +1098,7 @@
10761098
"@executable_path/Frameworks",
10771099
);
10781100
MACOSX_DEPLOYMENT_TARGET = 15.6;
1079-
MARKETING_VERSION = 0.1.9;
1101+
MARKETING_VERSION = 0.1.10;
10801102
"OTHER_LDFLAGS[sdk=macosx*]" = (
10811103
"-lc++",
10821104
"-framework",
@@ -1137,11 +1159,11 @@
11371159
/* End XCConfigurationList section */
11381160

11391161
/* Begin XCLocalSwiftPackageReference section */
1140-
43BD82762F1D5F650092A96C /* XCLocalSwiftPackageReference "Packages/AutomergeWrapper" */ = {
1162+
43BD82762F1D5F650092A96C /* XCLocalSwiftPackageReference "AutomergeWrapper" */ = {
11411163
isa = XCLocalSwiftPackageReference;
11421164
relativePath = Packages/AutomergeWrapper;
11431165
};
1144-
43BD82812F1D90000092A96C /* XCLocalSwiftPackageReference "Packages/GhosttyKit" */ = {
1166+
43BD82812F1D90000092A96C /* XCLocalSwiftPackageReference "GhosttyKit" */ = {
11451167
isa = XCLocalSwiftPackageReference;
11461168
relativePath = Packages/GhosttyKit;
11471169
};
@@ -1174,7 +1196,7 @@
11741196
};
11751197
43BD82742F1D63F40092A96C /* AutomergeWrapper */ = {
11761198
isa = XCSwiftPackageProductDependency;
1177-
package = 43BD82762F1D5F650092A96C /* XCLocalSwiftPackageReference "Packages/AutomergeWrapper" */;
1199+
package = 43BD82762F1D5F650092A96C /* XCLocalSwiftPackageReference "AutomergeWrapper" */;
11781200
productName = AutomergeWrapper;
11791201
};
11801202
43BD827F2F1D70000092A96C /* Sparkle */ = {
@@ -1184,7 +1206,7 @@
11841206
};
11851207
43BD82822F1D90000092A96C /* GhosttyKit */ = {
11861208
isa = XCSwiftPackageProductDependency;
1187-
package = 43BD82812F1D90000092A96C /* XCLocalSwiftPackageReference "Packages/GhosttyKit" */;
1209+
package = 43BD82812F1D90000092A96C /* XCLocalSwiftPackageReference "GhosttyKit" */;
11881210
productName = GhosttyKit;
11891211
};
11901212
/* End XCSwiftPackageProductDependency section */

Axel/App/macOS/MacScenes.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,15 @@ final class SparkleUpdater {
7979
}
8080

8181
class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDelegate {
82+
/// Flag to suppress window opening when handling notification actions
83+
private var isHandlingNotificationAction = false
84+
8285
func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {
86+
// Don't open workspace picker when handling notification actions
87+
if isHandlingNotificationAction {
88+
return false
89+
}
90+
8391
// If no windows are visible, open the workspace picker
8492
if !flag {
8593
// Will be handled by SwiftUI's window restoration
@@ -118,6 +126,9 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
118126
let actionIdentifier = response.actionIdentifier
119127
let userInfo = response.notification.request.content.userInfo
120128

129+
// Suppress workspace picker from opening when handling notification actions
130+
isHandlingNotificationAction = true
131+
121132
// Handle approve/reject actions
122133
if actionIdentifier == "APPROVE_ACTION" || actionIdentifier == "REJECT_ACTION" {
123134
Task { @MainActor in
@@ -128,6 +139,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
128139
}
129140
}
130141

142+
// Reset flag after a short delay to ensure app activation has completed
143+
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { [weak self] in
144+
self?.isHandlingNotificationAction = false
145+
}
146+
131147
completionHandler()
132148
}
133149

-351 KB
Loading
-10.2 KB
Loading
-40.4 KB
Loading
170 Bytes
Loading
-496 Bytes
Loading
-40.4 KB
Loading
-169 KB
Loading
-496 Bytes
Loading

0 commit comments

Comments
 (0)