Description
Add surface: SessionSurface to Tab, wire surface selection in new-session flows, and expose keyboard shortcuts / menu entries for creating each session type.
Spec: Epic #250 §5 (mode selection UX).
Scope
File
MacApp/Packages/PaneManager/Sources/PaneManager/TabFeature.swift + menu commands in app target.
Tab changes
```swift
public struct Tab: Equatable, Identifiable, Sendable {
public var id: UUID
public var title: String
public var terminalSessionID: UUID?
public var agentSessionID: UUID?
public var worktreeID: UUID?
public var kind: SessionKind
public var surface: SessionSurface // NEW, immutable after creation
}
```
TabFeature actions
newTab(surface:) — creates a tab with explicit surface. Defaults: shell → .shell; agent → preferredClaudeSurface from SettingsStore (see D-24).
newDialogueSession(workingDirectory:) — convenience creating .agentDialogue(.claudeCode).
newTerminalSession(workingDirectory:) — convenience creating .agentTerminal(.claudeCode).
UI menu entries (app target)
Update RelayApp .commands:
⌘T → New Tab (shell).
⌘⇧N → New Dialogue Session.
⌘⌥N → New Terminal Session.
⌘⇧T (per-tab) → Open as Terminal (active session).
⌘⇧D (per-tab) → Open as Dialogue (active session). (D-25 implements the cross-surface resume.)
Session creation sheet
If a New Session sheet UI exists (or is added as part of onboarding), it exposes a Terminal / Dialogue picker:
- Radio buttons: Terminal / Dialogue.
- Default from
preferredClaudeSurface.
- Preview description per choice — single paragraph explaining difference.
Acceptance Criteria
Relationships
Description
Add
surface: SessionSurfacetoTab, wire surface selection in new-session flows, and expose keyboard shortcuts / menu entries for creating each session type.Spec: Epic #250 §5 (mode selection UX).
Scope
File
MacApp/Packages/PaneManager/Sources/PaneManager/TabFeature.swift+ menu commands in app target.Tab changes
```swift
public struct Tab: Equatable, Identifiable, Sendable {
public var id: UUID
public var title: String
public var terminalSessionID: UUID?
public var agentSessionID: UUID?
public var worktreeID: UUID?
public var kind: SessionKind
public var surface: SessionSurface // NEW, immutable after creation
}
```
TabFeature actions
newTab(surface:)— creates a tab with explicit surface. Defaults: shell →.shell; agent →preferredClaudeSurfacefrom SettingsStore (see D-24).newDialogueSession(workingDirectory:)— convenience creating.agentDialogue(.claudeCode).newTerminalSession(workingDirectory:)— convenience creating.agentTerminal(.claudeCode).UI menu entries (app target)
Update
RelayApp.commands:⌘T→ New Tab (shell).⌘⇧N→ New Dialogue Session.⌘⌥N→ New Terminal Session.⌘⇧T(per-tab) → Open as Terminal (active session).⌘⇧D(per-tab) → Open as Dialogue (active session). (D-25 implements the cross-surface resume.)Session creation sheet
If a New Session sheet UI exists (or is added as part of onboarding), it exposes a Terminal / Dialogue picker:
preferredClaudeSurface.Acceptance Criteria
Tab.surfaceadded, immutable after creation.newTab(surface:)action honors passed surface.surfacefields default to.shellfor shell tabs,.agentTerminal(.claudeCode)for agent tabs.Relationships