Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
7c264da
Add per-window project archives panel (Window Projects…)
claude Mar 17, 2026
0d7b493
Wire Window Projects panel into app delegate and Xcode project
claude Mar 17, 2026
990ebf2
Add Name/Recent sort to Window Projects panel
claude Mar 18, 2026
a225d4c
Implement live window↔project associations, redesign panel UI
claude Mar 18, 2026
debcdc7
fix claude " -> “
YSaxon Mar 19, 2026
5a2bae1
build: fix sandboxed rust/cargo build path resolution under sandbox-exec
YSaxon Jun 17, 2026
ad02ea7
fix: resolve Swift compiler errors and warnings for Window Projects m…
YSaxon Jun 17, 2026
1ff68c9
build: update compiled binary frameworks and dependencies for Xcode 26.3
YSaxon Jun 17, 2026
dc49e49
feat: preserve full terminal screen content and scrollback buffers on…
YSaxon Jun 17, 2026
03813a0
fix: map restored terminal windows to projects and remove from archiv…
YSaxon Jun 17, 2026
f0c1702
fix: ensure complete unlimited scrollback is preserved on cold storag…
YSaxon Jun 17, 2026
da950bf
feat: automatically archive all open associated terminal windows on a…
YSaxon Jun 17, 2026
f73e2c9
feat: capture, store, and display real-time terminal window screensho…
YSaxon Jun 17, 2026
7273f9f
refactor: use PNG instead of JPEG for lossless, razor-sharp terminal …
YSaxon Jun 17, 2026
5497fb2
feat: allow dragging associated windows within the project tree to re…
YSaxon Jun 17, 2026
93884c2
feat: support optional background process survival (orphaning) during…
YSaxon Jun 18, 2026
320699a
fix: resolve crash on exit by skipping graphics context rendering dur…
YSaxon Jun 18, 2026
8a7a378
fix: resolve Swift optional unwrapping compile errors in IntervalTree…
YSaxon Jun 18, 2026
2244322
feat: expose first-class Freeze All button and Freeze context menu it…
YSaxon Jun 18, 2026
35748a9
feat: improve bottom bar buttons with reliable live state sync and se…
YSaxon Jun 18, 2026
39eacc6
fix: isolate unit tests from production files and safely backup/resto…
YSaxon Jun 18, 2026
adfebeb
refactor: simplify test data in iTermWindowProjectsTests to use gener…
YSaxon Jun 18, 2026
33c6e77
fix: make testOnlySetRootProjects helper fully visible to unit tests …
YSaxon Jun 18, 2026
5fb9531
feat: visually differentiate CLOSED vs ORPHANED windows in projects t…
YSaxon Jun 18, 2026
d280d43
fix: resolve crash on exit by skipping UI notifications during applic…
YSaxon Jun 18, 2026
d18a516
fix: resolve window-job reattachment on restore by injecting Archive …
YSaxon Jun 18, 2026
c467894
test: add automated end-to-end integration test script and live-proce…
YSaxon Jun 19, 2026
c8f0034
test: isolate AppleScript tell blocks in E2E integration test to spec…
YSaxon Jun 19, 2026
836b0d7
test: refine E2E test process checking to use gpreppable sleep 1001 c…
YSaxon Jun 19, 2026
c0e3e67
Revert "fix: resolve window-job reattachment on restore by injecting …
YSaxon Jun 19, 2026
076553c
feat: resolve Window Projects crashes on exit, responder focus issues…
YSaxon Jun 19, 2026
de386bf
markdown improvements
YSaxon Jun 22, 2026
2e557e7
temp tools for dynamic probing
YSaxon Jun 22, 2026
79bcabf
wip: checkpoint Gemini's experimental freeze/thaw socket-purge approach
YSaxon Jun 22, 2026
436affe
feat: in-process freeze/thaw reattach via child-parking (+ diagnostics)
YSaxon Jun 22, 2026
f33d3f2
tools: dev freeze/thaw test launcher + log tail
YSaxon Jun 22, 2026
d90c5de
fix: park children on the closeProject (Freeze All) path too; fix dia…
YSaxon Jun 22, 2026
9c8d2cf
feat: orphan adopter skips Window Projects-claimed children at startup
YSaxon Jun 22, 2026
28b8dcb
feat(Option A): persist associations by terminalGuid; stop archiving …
YSaxon Jun 22, 2026
aa18ead
diag: log persisted associations on load + add logResolvedAssociation…
YSaxon Jun 23, 2026
937cc6f
test(WindowProjects): headless unit tests for Option A + arrangement …
YSaxon Jun 23, 2026
0dc4287
dev(WindowProjects): loud diagnostics + dialog if empty arrangement e…
YSaxon Jun 23, 2026
cb58d3d
feat(WindowProjects): drag-overlay GUI, open/detached/closed naming, …
YSaxon Jun 23, 2026
53708c9
fix(WindowProjects UI): use .link drag op for left-pane project drops
YSaxon Jun 23, 2026
84deeb1
fix(WindowProjects): detect detached (running) windows via multiserve…
YSaxon Jun 23, 2026
979eb6a
Merge branch 'windowprojects' into windowprojects-gui
YSaxon Jun 23, 2026
96bd12b
Merge branch 'windowprojects-gui' into windowprojects
YSaxon Jun 23, 2026
52c9a03
feat: make Window Projects storage suite-aware for isolated test runs
YSaxon Jun 23, 2026
aaf1903
more markdown
YSaxon Jun 23, 2026
a204fce
feat(WindowProjects): confirm dialog when closing an associated window
YSaxon Jun 26, 2026
a3553e0
Merge remote-tracking branch 'origin/master' into local_master
YSaxon Jun 29, 2026
8854131
fix merge
YSaxon Jun 29, 2026
343392f
Merge remote-tracking branch 'origin/master' into local_master
YSaxon Jul 6, 2026
ddf3454
Merge tag 'v20260713-nightly' into local_master
YSaxon Jul 13, 2026
1c01cb9
Merge remote-tracking branch 'origin/master' into local_master
YSaxon Jul 14, 2026
575b753
revert to origin/master copy of many binary files
YSaxon Jul 14, 2026
9cc2aa4
remove block broken by merge and supposedly (per AIs) unnecessary
YSaxon Jul 14, 2026
6001d93
Fix our nullability/optionality bugs in Window Projects code
YSaxon Jul 14, 2026
af98722
Annotate not-ours nullability gaps to unblock strict PCH audit
YSaxon Jul 14, 2026
ff270a5
Remove stray duplicate build entries for iTermWindowProjectsTests.swift
YSaxon Jul 14, 2026
e315b75
remove extraneous files for PR
YSaxon Jul 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ModernTests/IntervalTreeGraphEncodingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
import XCTest
@testable import iTerm2SharedARC

fileprivate func iTermMark() -> iTermMark {
return (iTermMark() as iTermMark?)!
}

fileprivate func VT100ScreenMark() -> VT100ScreenMark {
return (VT100ScreenMark() as VT100ScreenMark?)!
}

class IntervalTreeGraphEncodingTests: XCTestCase {

// MARK: - iTermMark GUID Tests
Expand Down
617 changes: 617 additions & 0 deletions ModernTests/iTermWindowProjectsTests.swift

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions iTerm2.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
00BB549157025E2AFE86B3D6 /* iTermProjectsDropOverlay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13ACC6F2DFDB64638DCDB228 /* iTermProjectsDropOverlay.swift */; };
01A01787661B9E1F5177DAB7 /* iTermJobTerminationMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 677BAE3BF6167A6719904C54 /* iTermJobTerminationMonitor.swift */; };
01D8567525D898E2B0DB6FF1 /* iTermWindowBorderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77FCEB05FACE33F5F7947261 /* iTermWindowBorderView.swift */; };
0277DCA424D4359E736F9E65 /* CompanionAlertBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D8B8B423791410F363E9D3A /* CompanionAlertBridge.swift */; };
Expand Down Expand Up @@ -1025,6 +1026,8 @@
759637C82593AFB500E278CC /* iTerm2SandboxedWorkerProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 7596379C2593AE0700E278CC /* iTerm2SandboxedWorkerProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
775288AB392F2F6937D0B97E /* OrchestratorError.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE33CBB56EA96FD0239D8CED /* OrchestratorError.swift */; };
77E49C95CA97F58D042F688E /* iTermScreenshotRedaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97539C440B63BAC6011E9208 /* iTermScreenshotRedaction.swift */; };
7959689433DB95D5BCFC387F /* iTermProjectsPanelController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2343E2DF433BD7B9647283A3 /* iTermProjectsPanelController.swift */; };
82FAE5CD376B4D65172ECCF2 /* NSStringQuotedStringForPasteTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D78783C5E320CF711E81627F /* NSStringQuotedStringForPasteTests.swift */; };
7822303C5D0B67588F07F281 /* CompanionStreamPacer.swift in Sources */ = {isa = PBXBuildFile; fileRef = B577B7726D9E6991593F0069 /* CompanionStreamPacer.swift */; };
7889196D8646277EB77FCAE7 /* iTermSessionPreviewPanel.h in Sources */ = {isa = PBXBuildFile; fileRef = 330E8619FD42B5DC2EDA60D0 /* iTermSessionPreviewPanel.h */; };
79F784C0D62EE69089FB4CD2 /* WorkgroupToolbarShortcut.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE2C2044C323A7D2F314F6C1 /* WorkgroupToolbarShortcut.swift */; };
Expand Down Expand Up @@ -1054,6 +1057,7 @@
8E6EF413219EDC420B51CD17 /* MentionParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD02F2955BAF479EBAC063FE /* MentionParser.swift */; };
8E9796208C12DD69744D3606 /* iTermLocatedString+ScreenCharArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81E145AE29B68F8F2A69891A /* iTermLocatedString+ScreenCharArray.swift */; };
8EA9D682DE4199E114D920A5 /* iTermStreamingScreenshotEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B9A9D7BB06953CE9297F1FC /* iTermStreamingScreenshotEncoder.swift */; };
90A1E13B186F9EA4003EC3E8 /* AppleScriptTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 90A1E13A186F9EA4003EC3E8 /* AppleScriptTest.m */; };
8FA8DE5495DE937551F3B51F /* iTermWorkgroupToolbarItemRegistry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26D937108B4A3A7BC121FF1D /* iTermWorkgroupToolbarItemRegistry.swift */; };
8FE3D19DEFFBE43EF22CE2AA /* WorkgroupAutoRequestReviewToolbarItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84897A6E8B159D2C3608965D /* WorkgroupAutoRequestReviewToolbarItem.swift */; };
90C2E83D1854DB67AD5F08E1 /* AIExplanationRequest+Mac.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C9EF4B4D9DF2F4E3CA2A3F5 /* AIExplanationRequest+Mac.swift */; };
Expand Down Expand Up @@ -4107,6 +4111,8 @@
A6D1784421BC5A1500FE499C /* iTermSavePanelFileFormatAccessory.h in Headers */ = {isa = PBXBuildFile; fileRef = A6D1784121BC5A1500FE499C /* iTermSavePanelFileFormatAccessory.h */; };
A6D1784521BC5A1500FE499C /* iTermSavePanelFileFormatAccessory.h in Headers */ = {isa = PBXBuildFile; fileRef = A6D1784121BC5A1500FE499C /* iTermSavePanelFileFormatAccessory.h */; };
A6D1784721BC5A1500FE499C /* iTermSavePanelFileFormatAccessory.m in Sources */ = {isa = PBXBuildFile; fileRef = A6D1784221BC5A1500FE499C /* iTermSavePanelFileFormatAccessory.m */; };
A6D1784821BC5A1500FE499C /* iTermSavePanelFileFormatAccessory.xib in Resources */ = {isa = PBXBuildFile; fileRef = A6D1784321BC5A1500FE499C /* iTermSavePanelFileFormatAccessory.xib */; };
A6D181293461545E1B15EE6D /* iTermWindowProjectsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C3C91DF2BBB018FD38146E7 /* iTermWindowProjectsModel.swift */; };
A6D1A3E52C7E994B00FECDF2 /* VT100GridTypes+Swift.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6D1A3E42C7E994B00FECDF2 /* VT100GridTypes+Swift.swift */; };
A6D1A3E72C7E996400FECDF2 /* NSRect+iTerm.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6D1A3E62C7E996400FECDF2 /* NSRect+iTerm.swift */; };
A6D1A3E92C7E99A100FECDF2 /* NSPoint+iTerm.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6D1A3E82C7E99A100FECDF2 /* NSPoint+iTerm.swift */; };
Expand Down Expand Up @@ -5806,6 +5812,7 @@
10C7A9E53E5460D18210F62D /* AILiveAppleIntelligenceClassifier.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AILiveAppleIntelligenceClassifier.swift; sourceTree = "<group>"; };
1179CD897A4780286BB29AAC /* iTermDockBadgeController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = iTermDockBadgeController.swift; sourceTree = "<group>"; };
11C735CA9A1AF5E864EC718E /* iTermStreamingPNGWriter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = iTermStreamingPNGWriter.m; sourceTree = "<group>"; };
13ACC6F2DFDB64638DCDB228 /* iTermProjectsDropOverlay.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = iTermProjectsDropOverlay.swift; sourceTree = "<group>"; };
11FDA9247035DE0FCCE7D23D /* iTermCursorBlinkFadeCurveIcon.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = iTermCursorBlinkFadeCurveIcon.h; sourceTree = "<group>"; };
13A6B1D037AF894E662A0EFC /* iTermWorkgroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = iTermWorkgroup.swift; sourceTree = "<group>"; };
13C5AE44EEA24B945DE0A064 /* iTermLargeContentObject.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = iTermLargeContentObject.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -6304,6 +6311,8 @@
20E74F4804E9089700000106 /* ITAddressBookMgr.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = ITAddressBookMgr.h; sourceTree = "<group>"; tabWidth = 4; };
20E74F4904E9089700000106 /* ITAddressBookMgr.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = ITAddressBookMgr.m; sourceTree = "<group>"; tabWidth = 4; };
2205C1FAE857001EC8A263E4 /* PerformanceTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PerformanceTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
2343E2DF433BD7B9647283A3 /* iTermProjectsPanelController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = iTermProjectsPanelController.swift; sourceTree = "<group>"; };
2491A846A993798FA4963536 /* iTermCharacterSourceTestHelper.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = iTermCharacterSourceTestHelper.h; sourceTree = "<group>"; };
232A06BD577404F71FFBC0AF /* SafetyTranscriptProjection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SafetyTranscriptProjection.swift; sourceTree = "<group>"; };
234916CDB04523CFD1E0390B /* ClippingsView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ClippingsView.swift; sourceTree = "<group>"; };
23DA26C236E4BC3ECF3CF916 /* WorkgroupModeSwitcherItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = WorkgroupModeSwitcherItem.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -6660,6 +6669,8 @@
86FC661122588ABDA0EE3245 /* PTYTextViewAccessibilityTest.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = PTYTextViewAccessibilityTest.m; sourceTree = "<group>"; };
8721B9515977EC8CB513CDAA /* PTYSessionPeerPort.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PTYSessionPeerPort.swift; sourceTree = "<group>"; };
8742065A0564169600CFC3F1 /* iTerm2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iTerm2.app; sourceTree = BUILT_PRODUCTS_DIR; };
889A9128E944B618CDE75E18 /* iTermCursorSlideAnimator.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = iTermCursorSlideAnimator.h; path = sources/iTermCursorSlideAnimator.h; sourceTree = SOURCE_ROOT; };
8C3C91DF2BBB018FD38146E7 /* iTermWindowProjectsModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = iTermWindowProjectsModel.swift; sourceTree = "<group>"; };
877B9444B69DE32D9CF87354 /* NotifyingDictionary.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = NotifyingDictionary.swift; sourceTree = "<group>"; };
88578347A529CFE749B6F433 /* AIChatWireLogger.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AIChatWireLogger.swift; sourceTree = "<group>"; };
889A9128E944B618CDE75E18 /* iTermCursorSlideAnimator.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = iTermCursorSlideAnimator.h; path = sources/Drawing/iTermCursorSlideAnimator.h; sourceTree = SOURCE_ROOT; };
Expand All @@ -6676,6 +6687,7 @@
941E5905370297E8D4BD0408 /* TUISafetyPrompt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TUISafetyPrompt.swift; sourceTree = "<group>"; };
95E27DEB0B9DD8AE0960FAE5 /* ChatIconGenerator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ChatIconGenerator.swift; sourceTree = "<group>"; };
97539C440B63BAC6011E9208 /* iTermScreenshotRedaction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = iTermScreenshotRedaction.swift; sourceTree = "<group>"; };
98E9463133DCF8311E0E5B6E /* iTermFindOnPageHelperTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = iTermFindOnPageHelperTests.swift; sourceTree = "<group>"; };
9801DA0646B0541548CD6B0E /* ApplyLayoutBuiltInFunction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ApplyLayoutBuiltInFunction.swift; sourceTree = "<group>"; };
98DA05BC2B6C48B5397AF1D8 /* iTermWorkgroupSessionDetailViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = iTermWorkgroupSessionDetailViewController.swift; sourceTree = "<group>"; };
9A1F7DEDB57FDB370787B646 /* CompanionPushNonceRegistry.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CompanionPushNonceRegistry.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -10109,6 +10121,9 @@
A60D02322683D60F00E19362 /* iTerm2-Bridging-Header.h */,
A60D022F2683D1E200E19362 /* iTerm2SharedARC-Bridging-Header.h */,
A6E1524D27613EEC00D0F41C /* iTerm2XCTests-Bridging-Header.h */,
8C3C91DF2BBB018FD38146E7 /* iTermWindowProjectsModel.swift */,
2343E2DF433BD7B9647283A3 /* iTermProjectsPanelController.swift */,
13ACC6F2DFDB64638DCDB228 /* iTermProjectsDropOverlay.swift */,
A62A779D2F9873C6007CAA0B /* iTermController */,
A6AD64442F984F6400A216BA /* Keyboard */,
A62A77AB2F987810007CAA0B /* Language */,
Expand Down Expand Up @@ -21672,6 +21687,11 @@
29C503BA29752DF6A4DB2A02 /* iTermBlurRowBuffer.swift in Sources */,
8EA9D682DE4199E114D920A5 /* iTermStreamingScreenshotEncoder.swift in Sources */,
564EA2FD15A05A60A95ABBB9 /* PrivateIPChecker.swift in Sources */,
0E917DB125F460B221026B56 /* iTermCharacterSourceTestHelper.h in Sources */,
8E87A30F7C195E310321C9D9 /* iTermCharacterSourceTestHelper.m in Sources */,
A6D181293461545E1B15EE6D /* iTermWindowProjectsModel.swift in Sources */,
7959689433DB95D5BCFC387F /* iTermProjectsPanelController.swift in Sources */,
00BB549157025E2AFE86B3D6 /* iTermProjectsDropOverlay.swift in Sources */,
EDD2335A6BDA84CE2B29C285 /* Box.swift in Sources */,
745A29B54D2537CEDE30520E /* iTermLargeContent.swift in Sources */,
639530D5AD779882EF35DAE4 /* iTermLargeContentObject.h in Sources */,
Expand Down Expand Up @@ -21934,6 +21954,10 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
A6C811F42DCFD5E40088E628 /* SearchEngineTests.swift in Sources */,
EEBDD6CF78595292D0CF8977 /* PrivateIPCheckerTests.swift in Sources */,
56C476620E56B783B8972219 /* iTermCharacterSourceTests.swift in Sources */,
82FAE5CD376B4D65172ECCF2 /* NSStringQuotedStringForPasteTests.swift in Sources */,
CF138846630690AA6A7BCFD5 /* iTermGitClient.m in Sources */,
0CA1074480F384E60CA30B2F /* AILiveDriver.swift in Sources */,
E8482495BB3E33AB7F3292DB /* AILiveHarness.swift in Sources */,
Expand Down
23 changes: 23 additions & 0 deletions sources/AppKit/iTermApplicationDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,11 @@ - (instancetype)init {
forEventClass:kInternetEventClass
andEventID:kAEGetURL];
[[iTermOrphanServerAdopter sharedInstance] setDelegate:self];
// Let Window Projects claim its detached windows' children so they aren't
// adopted into a generic recovered window at startup.
[iTermOrphanServerAdopter sharedInstance].claimedChildPIDsProvider = ^NSSet<NSNumber *> *{
return [[iTermWindowProjectsModel shared] claimedMultiserverChildPIDs];
};
launchTime_ = [[NSDate date] retain];
_workspaceSessionActive = YES;
_focusFollowsMouseController = [[iTermFocusFollowsMouseController alloc] init];
Expand All @@ -369,6 +374,20 @@ - (void)dealloc {
- (void)awakeFromNib {
[ArchivesMenuBuilder setShared:[[ArchivesMenuBuilder alloc] initWithMenuItem:_archivesMenuItem]];

// Add "Window Projects…" to the Window menu near the archive items.
NSMenu *windowMenu = [self topLevelViewNamed:@"Window"];
if (windowMenu) {
NSMenuItem *projectsItem = [[[NSMenuItem alloc]
initWithTitle:@"Window Projects\u2026"
action:@selector(showWindowProjectsPanel:)
keyEquivalent:@""] autorelease];
[projectsItem setTarget:self];
// Insert after the first item so it appears near the top of the Window menu.
NSUInteger insertIndex = MIN(1u, (NSUInteger)windowMenu.numberOfItems);
[windowMenu insertItem:projectsItem atIndex:insertIndex];
[windowMenu insertItem:[NSMenuItem separatorItem] atIndex:insertIndex + 1];
}

NSMenu *viewMenu = [self topLevelViewNamed:@"View"];
[viewMenu addItem:[NSMenuItem separatorItem]];

Expand Down Expand Up @@ -3265,6 +3284,10 @@ - (IBAction)importWindowArrangement:(id)sender {
}];
}

- (IBAction)showWindowProjectsPanel:(id)sender {
[[iTermProjectsPanelController shared] showPanel];
}

- (IBAction)saveWindowArrangement:(id)sender {
[[iTermController sharedInstance] saveWindowArrangement:YES];
}
Expand Down
1 change: 1 addition & 0 deletions sources/PTYSession/PTYSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ backgroundColor:(nullable NSColor *)backgroundColor;
// update the tab and window titles, stop "tail find" (searching the live session repeatedly
// because the find window is open), and evaluating partial-line triggers.
@property(nonatomic, assign) BOOL active;
@property(nonatomic, assign) BOOL orphanOnDealloc;

@property(nonatomic, assign) BOOL alertOnNextMark;
// Prevents the pane from being dragged or detached.
Expand Down
6 changes: 5 additions & 1 deletion sources/PTYSession/PTYSession.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
#import "VT100Terminal.h"
#import "VT100Token.h"
#import "WindowArrangements.h"
#import "PseudoTerminal.h"
#import "WindowControllerInterface.h"
#import "iTerm.h"
#import "iTerm2SharedARC-Swift.h"
Expand Down Expand Up @@ -2155,6 +2156,8 @@ + (PTYSession *)sessionFromArrangement:(NSDictionary *)arrangement
arrangement[SESSION_ARRANGEMENT_TMUX_GATEWAY_SESSION_NAME] != nil &&
arrangement[SESSION_ARRANGEMENT_TMUX_GATEWAY_SESSION_ID] != nil);
tmuxDCSIdentifier = arrangement[SESSION_ARRANGEMENT_TMUX_DCS_ID];
aSession->_isArchive = NO;
[aSession->_screen setTerminalEnabled:YES];
} else {
if (isTmuxGateway) {
[aSession.screen performBlockWithJoinedThreads:^(VT100Terminal *terminal, VT100ScreenMutableState *mutableState, id<VT100ScreenDelegate> delegate) {
Expand Down Expand Up @@ -3800,6 +3803,7 @@ - (void)hardStop {
}];
[_view release]; // This balances a retain in -terminate.
[[self retain] autorelease];
_shell.orphanOnDealloc = self.orphanOnDealloc;
[_shell stop];
_shell.delegate = nil;
[_textview setDataSource:nil];
Expand Down Expand Up @@ -6758,7 +6762,7 @@ - (BOOL)encodeArrangementWithContents:(BOOL)includeContents
if (includeContents) {
__block int numberOfLinesDropped = 0;
if (!self.isBrowserSession) {
const BOOL unlimited = [options[PTYSessionArrangementOptionsUnlimitedHistory] boolValue];
const BOOL unlimited = [options[PTYSessionArrangementOptionsUnlimitedHistory] boolValue] || [PseudoTerminal useUnlimitedHistoryForArrangement];
[result encodeDictionaryWithKey:SESSION_ARRANGEMENT_CONTENTS
generation:iTermGenerationAlwaysEncode
block:^BOOL(id<iTermEncoderAdapter> _Nonnull encoder) {
Expand Down
10 changes: 10 additions & 0 deletions sources/Tasks/PTYTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ typedef NS_OPTIONS(NSUInteger, iTermJobManagerAttachResults) {

// No reading or writing allowed for now.
@property(atomic, assign) BOOL paused;
@property(atomic, assign) BOOL orphanOnDealloc;
@property(nonatomic, readonly) BOOL isSessionRestorationPossible;
@property(nonatomic, readonly) id sessionRestorationIdentifier;

Expand Down Expand Up @@ -189,6 +190,15 @@ typedef NS_OPTIONS(NSUInteger, iTermJobManagerAttachResults) {

+ (NSMutableDictionary *)mutableEnvironmentDictionary;

- (void)setJobManagerType:(iTermGeneralServerConnectionType)type;
- (void)closeFileDescriptorAndDeregisterIfPossible;

// In-process freeze/thaw support. Stops reading this task's file descriptor and
// parks its running child on its multiserver connection (keeping the fd open and
// the process alive) so a thawed window can re-adopt it. Returns the parked
// child's pid, or -1 if the task isn't a re-adoptable multiserver child.
- (pid_t)parkChildForReattachment;

- (instancetype)init;

- (BOOL)hasBrokenPipe;
Expand Down
Loading