Skip to content
Closed
Show file tree
Hide file tree
Changes from 79 commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
b6b780e
Serialize bonsplit pane layout into mobile workspace list (layout.v1)
Jul 15, 2026
c76eb70
Decode mobile pane layout into iOS value models
Jul 15, 2026
27db84d
Replace iOS terminal picker menu with pane-grouped surface deck
Jul 15, 2026
bb707a7
Add iOS pane map overlay with live terminal previews
Jul 15, 2026
2d28715
Add DEBUG panes-and-tabs fixture preview route
Jul 15, 2026
ce3e3a6
Polish surface deck and pane map from live simulator verification
Jul 15, 2026
ba4b648
Merge remote-tracking branch 'origin/main' into feat-ios-panes-ux
Jul 17, 2026
29e9f20
Fix escaping-closure capture in sidebar slot view tint
Jul 17, 2026
0891f8b
Anchor pane-map preview window to content and migrate to live themes
Jul 17, 2026
881f34d
Merge remote-tracking branch 'origin/main' into feat-ios-panes-ux
Jul 21, 2026
8c26fef
Test state sync pane layout projection
Jul 21, 2026
03bf449
Test pane layout observer invalidation gaps
Jul 21, 2026
305e785
Test pane preview rendering and fetch scheduling
Jul 21, 2026
b3c7741
Run pane layout packages in iOS CI
Jul 21, 2026
f441a45
test(ios): constrain pane split ratios
Jul 21, 2026
b33638d
Fix pane preview rendering and cancellation
Jul 21, 2026
51d30bf
Share pane layouts across mobile sync transports
Jul 21, 2026
bdddcf2
feat(ios): complete pane-aware workspace navigation
Jul 21, 2026
75fc3a3
Fix actor initializer for Swift 6.3
Jul 21, 2026
bd307f6
Stabilize pane preview scheduler test
Jul 21, 2026
8e3613f
Fix mobile pane layout invalidation
Jul 22, 2026
682fe04
Stabilize pane observer emission assertion
Jul 22, 2026
afe4c04
Merge remote-tracking branch 'origin/main' into feat-ios-panes-ux
Jul 22, 2026
f4dbc09
Align window reference state with current main
Jul 22, 2026
fe5da35
Merge remote-tracking branch 'origin/main' into feat-ios-panes-ux
Jul 22, 2026
d7ea14b
Merge remote-tracking branch 'origin/main' into feat-ios-panes-ux
Jul 22, 2026
3b2a8e1
Isolate panes preview behind debug route
Jul 22, 2026
bc666eb
Fix pane map on iOS 18
Jul 22, 2026
35934fc
Remove mobile observer test counter
Jul 22, 2026
d85a567
Test mobile observer via emitted updates
Jul 22, 2026
7488cf0
Test constrained iOS pane previews
Jul 22, 2026
a37d8b3
Build Safari-style iOS pane map
azooz2003-bit Jul 22, 2026
28f14d6
Merge remote-tracking branch 'origin/main' into feat-ios-panes-ux
azooz2003-bit Jul 22, 2026
24a2c49
Test reversible pane map zoom
azooz2003-bit Jul 22, 2026
c0a6fae
Anchor iOS pane zoom to pinch
azooz2003-bit Jul 23, 2026
e50db56
Test polished iOS pane previews
azooz2003-bit Jul 23, 2026
aad1eff
Polish iOS pane previews and zoom
azooz2003-bit Jul 23, 2026
92792d4
Verify interrupted pane zoom settlement
azooz2003-bit Jul 23, 2026
1b739ac
Merge remote-tracking branch 'origin/main' into feat-ios-panes-ux
azooz2003-bit Jul 23, 2026
24985d8
Polish native iOS pane zoom transitions
azooz2003-bit Jul 23, 2026
bb34705
test(ios): cover pane reorder reconciliation
azooz2003-bit Jul 23, 2026
f074baa
feat(ios): synchronize Safari-style pane layout
azooz2003-bit Jul 23, 2026
b887b36
test(ios): stabilize pane map presentation checks
azooz2003-bit Jul 23, 2026
2677ab8
test(ios): cover direct restored pane presentation
azooz2003-bit Jul 24, 2026
387dda4
fix(ios): restore focused pane on workspace entry
azooz2003-bit Jul 24, 2026
69ae8a5
fix(ios): let pane zoom own toolbar transitions
azooz2003-bit Jul 24, 2026
2892256
fix(ios): prefer focused pane terminal on workspace entry
azooz2003-bit Jul 25, 2026
b62c281
test(ios): cover pane map layout loss route reset
azooz2003-bit Jul 29, 2026
9502fdc
fix(ios): reset pane map route when layout disappears
azooz2003-bit Jul 29, 2026
bec4e06
Merge remote-tracking branch 'origin/main' into feat-ios-panes-ux
azooz2003-bit Jul 31, 2026
ee9eca7
Merge remote-tracking branch 'origin/main' into feat-ios-panes-ux
azooz2003-bit Jul 31, 2026
f5293f7
fix(ios): reconcile pane layout merge decoding
azooz2003-bit Jul 31, 2026
2e156bb
test(ios): assert pane transition endpoint stability
azooz2003-bit Jul 31, 2026
0584137
refactor(ios): model pane geometry as values
azooz2003-bit Jul 31, 2026
86f10d0
test(ios): query inert pane title by identifier
azooz2003-bit Jul 31, 2026
6c2d150
test(ios): mirror workspace toolbar in pane preview
azooz2003-bit Jul 31, 2026
5562acf
fix(ios): stabilize shared workspace title geometry
azooz2003-bit Jul 31, 2026
d129f58
fix(ios): stabilize pane map toolbar geometry
azooz2003-bit Jul 31, 2026
4811f75
fix(ios): remove visible pane numbers from deck
azooz2003-bit Jul 31, 2026
53b92bf
fix(ios): retire superseded pending connect clients
azooz2003-bit Jul 31, 2026
dff67f9
fix(ios): anchor pane map toolbar items natively
azooz2003-bit Jul 31, 2026
70a69a9
Fix iOS pane zoom transition background
azooz2003-bit Aug 1, 2026
58f0bcb
fix(ios): retain pane deck outside zoom route
azooz2003-bit Aug 1, 2026
e844e98
Merge remote-tracking branch 'origin/main' into feat-ios-panes-ux
azooz2003-bit Aug 1, 2026
cac569f
fix(ios): reconcile pane interactions with Mac authority
azooz2003-bit Aug 1, 2026
5cc12c6
test(ios): cover zoom background restoration
azooz2003-bit Aug 1, 2026
3185cdb
test(ios): avoid mutating reorder state in macro
azooz2003-bit Aug 1, 2026
6545e29
fix(mac): restore pane focus after mutation snapshot
azooz2003-bit Aug 1, 2026
3217729
fix(ios): keep surface deck on zoom destination
azooz2003-bit Aug 1, 2026
77e66b5
fix(ios): isolate pane zoom background snapshots
azooz2003-bit Aug 1, 2026
7e64b92
Merge remote-tracking branch 'origin/main' into feat-ios-panes-ux
azooz2003-bit Aug 4, 2026
7cbecf3
fix(panes): resolve Cubic review findings across reorder authority chain
azooz2003-bit Aug 4, 2026
5dbefae
test(panes): cold-open detached pane map must materialize zoom source…
azooz2003-bit Aug 5, 2026
f637c36
fix(panes): pre-warm detached pane-map cells so the first unzoom matc…
azooz2003-bit Aug 5, 2026
719ec2c
fix(panes): deduplicate PaneMapReorderStateTests suite that broke tes…
azooz2003-bit Aug 5, 2026
4cdd8eb
test(panes): drop stale MobileInjectedAttachStartupTests referencing …
azooz2003-bit Aug 5, 2026
1a3ffce
test(panes): import SwiftUI for the cold-open prewarm namespace
azooz2003-bit Aug 5, 2026
b38947c
test(panes): real-shell pane-layout workspace must survive pane-map n…
azooz2003-bit Aug 7, 2026
afb4b6c
fix(panes): host the zoomed terminal as a presentation under pushed s…
azooz2003-bit Aug 7, 2026
61c2901
test(panes): give the cover re-presentation liveness waits CI headroom
azooz2003-bit Aug 7, 2026
bb81ab3
fix(panes): hide covered pane-map chrome from accessibility in push h…
azooz2003-bit Aug 7, 2026
2d0fc11
test(panes): size pane-map return waits for the cover rebuild on CI
azooz2003-bit Aug 7, 2026
00bf152
fix(panes): hide the covered pane-map bar instead of gating items
azooz2003-bit Aug 7, 2026
7386aa1
test(panes): only require pane-map-side hittability in waitForPaneMap
azooz2003-bit Aug 7, 2026
51bf1ab
test(panes): retry the docs-row push if the list swallowed the first tap
azooz2003-bit Aug 7, 2026
5536a50
fix(ios): preserve gated connect failure copy
azooz2003-bit Aug 13, 2026
b27745f
test(panes): dump the AX tree when a pane-map presentation wait times…
azooz2003-bit Aug 13, 2026
38a06df
fix(panes): hide the covered pane map from accessibility at the UIKit…
azooz2003-bit Aug 13, 2026
059ed21
test(panes): dump the AX tree when the post-pane docs push produces n…
azooz2003-bit Aug 13, 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
4 changes: 4 additions & 0 deletions .github/workflows/test-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ jobs:
run: |
swift test --package-path Packages/iOS/CmuxMobilePairedMac

- name: Run CmuxMobileRPC package tests
run: |
swift test --package-path Packages/iOS/CmuxMobileRPC

- name: Run CmuxMobileChanges package tests
run: |
swift test --package-path Packages/iOS/CmuxMobileChanges
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ public struct WorkspaceSyncRecord: MobileSyncRecord {
public let sortIndex: Int
/// Terminal rows belonging to this workspace, in spatial order.
public let terminals: [Terminal]
/// The workspace's complete pane layout, when the Mac supports pane sync.
public let layout: MobileWorkspaceLayout?

/// ``MobileSyncRecord`` identity: the workspace id.
public var syncID: String { id }
Expand All @@ -127,7 +129,8 @@ public struct WorkspaceSyncRecord: MobileSyncRecord {
lastActivityAt: Double,
hasUnread: Bool,
sortIndex: Int,
terminals: [Terminal]
terminals: [Terminal],
layout: MobileWorkspaceLayout? = nil
) {
self.id = id
self.windowID = windowID
Expand All @@ -145,6 +148,7 @@ public struct WorkspaceSyncRecord: MobileSyncRecord {
self.hasUnread = hasUnread
self.sortIndex = sortIndex
self.terminals = terminals
self.layout = layout
}

public init(from decoder: any Decoder) throws {
Expand All @@ -168,6 +172,7 @@ public struct WorkspaceSyncRecord: MobileSyncRecord {
hasUnread = try container.decode(Bool.self, forKey: .hasUnread)
sortIndex = try container.decode(Int.self, forKey: .sortIndex)
terminals = try container.decode([Terminal].self, forKey: .terminals)
layout = try container.decodeIfPresent(MobileWorkspaceLayout.self, forKey: .layout)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: A malformed or newer layout makes the entire workspace record/delta fail to decode instead of retaining its normal workspace data. Isolate this optional capability field so clients fall back to nil layout, matching the legacy workspace response behavior.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Packages/Shared/CMUXMobileCore/Sources/CMUXMobileCore/MobileStateSyncRecords.swift, line 175:

<comment>A malformed or newer layout makes the entire workspace record/delta fail to decode instead of retaining its normal workspace data. Isolate this optional capability field so clients fall back to `nil` layout, matching the legacy workspace response behavior.</comment>

<file context>
@@ -168,6 +172,7 @@ public struct WorkspaceSyncRecord: MobileSyncRecord {
         hasUnread = try container.decode(Bool.self, forKey: .hasUnread)
         sortIndex = try container.decode(Int.self, forKey: .sortIndex)
         terminals = try container.decode([Terminal].self, forKey: .terminals)
+        layout = try container.decodeIfPresent(MobileWorkspaceLayout.self, forKey: .layout)
     }
 
</file context>
Suggested change
layout = try container.decodeIfPresent(MobileWorkspaceLayout.self, forKey: .layout)
layout = try? container.decode(MobileWorkspaceLayout.self, forKey: .layout)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sync layout decode fails closed

Medium Severity

WorkspaceSyncRecord decodes layout with decodeIfPresent, which still throws when the key is present but malformed. The RPC workspace list intentionally uses try? so unknown or bad layouts become nil without failing the row. A newer Mac layout shape on the state-sync path can therefore fail the whole sync payload instead of degrading to layout-less rows.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit afb4b6c. Configure here.

}

private enum CodingKeys: String, CodingKey {
Expand All @@ -187,6 +192,7 @@ public struct WorkspaceSyncRecord: MobileSyncRecord {
case hasUnread = "has_unread"
case sortIndex = "sort_index"
case terminals
case layout
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,61 @@ extension MobileTerminalRenderGridFrame.RowSpan {
var gridCellWidth: Int {
cellWidth ?? max(1, text.renderGridEstimatedCellWidth)
}

/// Resolves each grapheme to the producer-reported width of this span.
///
/// Unicode's ambiguous-width characters can occupy one or two terminal
/// cells depending on the producer. The aggregate ``cellWidth`` is the
/// authority; this method distributes that width only when the mapping is
/// unambiguous enough to preserve every grapheme's producer column.
var resolvedCharacterCellWidths: [Int]? {
guard !text.isEmpty, gridCellWidth > 0 else { return nil }
var widths: [Int] = []
var expandable: [Bool] = []
var hasUntrustedExpansionCandidate = false
widths.reserveCapacity(text.count)
expandable.reserveCapacity(text.count)
for character in text {
let width = character.renderGridEstimatedCellWidth
let canExpand = character.canExpandForAmbiguousRenderGridWidth
widths.append(width)
expandable.append(canExpand)
if width == 1,
!canExpand,
character.unicodeScalars.contains(where: {
$0.value > 0x7F
&& !$0.isRenderGridZeroWidthScalar
}) {
hasUntrustedExpansionCandidate = true
}
}
let total = widths.reduce(0, +)
if total < gridCellWidth {
guard !hasUntrustedExpansionCandidate else {
return nil
}
let expansionCandidates = widths.indices.filter {
widths[$0] < 2 && expandable[$0]
}
let remaining = gridCellWidth - total
guard remaining == expansionCandidates.count else {
return nil
}
for index in expansionCandidates {
widths[index] += 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Mixed ambiguous-width spans can be replayed in the wrong producer columns. Aggregate cellWidth cannot determine which of multiple expandable graphemes consumed the extra cell, so return nil unless there is exactly one unambiguous expansion assignment.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Packages/Shared/CMUXMobileCore/Sources/CMUXMobileCore/MobileTerminalRenderGridFrame+CellWidth.swift, line 67:

<comment>Mixed ambiguous-width spans can be replayed in the wrong producer columns. Aggregate `cellWidth` cannot determine which of multiple expandable graphemes consumed the extra cell, so return `nil` unless there is exactly one unambiguous expansion assignment.</comment>

<file context>
@@ -28,6 +28,56 @@ extension MobileTerminalRenderGridFrame.RowSpan {
+            var remaining = gridCellWidth - total
+            for index in widths.indices where remaining > 0 && widths[index] < 2 {
+                guard expandable[index] else { continue }
+                widths[index] += 1
+                remaining -= 1
+            }
</file context>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Mixed ambiguous-width text can be pinned to the wrong columns: an aggregate width of 3 for αβ does not identify which glyph occupies two cells, yet this assigns the extra cell to the first candidate. Return nil unless the aggregate uniquely determines every ambiguous glyph width, so callers use their non-pinned fallback.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Packages/Shared/CMUXMobileCore/Sources/CMUXMobileCore/MobileTerminalRenderGridFrame+CellWidth.swift, line 67:

<comment>Mixed ambiguous-width text can be pinned to the wrong columns: an aggregate width of 3 for `αβ` does not identify which glyph occupies two cells, yet this assigns the extra cell to the first candidate. Return `nil` unless the aggregate uniquely determines every ambiguous glyph width, so callers use their non-pinned fallback.</comment>

<file context>
@@ -28,6 +28,56 @@ extension MobileTerminalRenderGridFrame.RowSpan {
+            var remaining = gridCellWidth - total
+            for index in widths.indices where remaining > 0 && widths[index] < 2 {
+                guard expandable[index] else { continue }
+                widths[index] += 1
+                remaining -= 1
+            }
</file context>

}
} else if total > gridCellWidth {
let contractionCandidates = widths.indices.filter { widths[$0] > 1 }
let excess = total - gridCellWidth
guard excess == contractionCandidates.count else {
return nil
}
for index in contractionCandidates {
widths[index] -= 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Spans whose reported width is narrower than multiple wide graphemes can be assigned to incorrect columns. The aggregate does not identify which wide grapheme was narrow, so only resolve a unique reduction or fall back instead of choosing from the end.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Packages/Shared/CMUXMobileCore/Sources/CMUXMobileCore/MobileTerminalRenderGridFrame+CellWidth.swift, line 74:

<comment>Spans whose reported width is narrower than multiple wide graphemes can be assigned to incorrect columns. The aggregate does not identify which wide grapheme was narrow, so only resolve a unique reduction or fall back instead of choosing from the end.</comment>

<file context>
@@ -28,6 +28,56 @@ extension MobileTerminalRenderGridFrame.RowSpan {
+        } else if total > gridCellWidth {
+            var excess = total - gridCellWidth
+            for index in widths.indices.reversed() where excess > 0 && widths[index] > 1 {
+                widths[index] -= 1
+                excess -= 1
+            }
</file context>

}
}
return widths

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Leading zero-width scalars disappear from pane-map previews. Return nil when the first resolved grapheme has zero width so the existing whole-span fallback retains its text.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Packages/Shared/CMUXMobileCore/Sources/CMUXMobileCore/MobileTerminalRenderGridFrame+CellWidth.swift, line 84:

<comment>Leading zero-width scalars disappear from pane-map previews. Return `nil` when the first resolved grapheme has zero width so the existing whole-span fallback retains its text.</comment>

<file context>
@@ -28,6 +28,61 @@ extension MobileTerminalRenderGridFrame.RowSpan {
+                widths[index] -= 1
+            }
+        }
+        return widths
+    }
 }
</file context>
Suggested change
return widths
return widths.first == 0 ? nil : widths

}
}

extension Character {
Expand Down
Loading