Skip to content

D-23: MainFeature — view routing by tab.surface #273

@kirich1409

Description

@kirich1409

Description

Update MainFeature view layer to render either TerminalView or DialogueView based on the currently selected tab's surface.

Spec: Epic #250 §5.

Scope

File

MacApp/Relay/MainFeature.swift or the corresponding view file.

Switch

```swift
switch selectedTab.surface {
case .shell, .agentTerminal:
TerminalView(store: store.scope(state: .currentTerminalFeature, action: .terminal))
case .agentDialogue:
DialogueView(store: store.scope(state: .currentDialogueFeature, action: .dialogue))
}
```

Ensure scoping maps to the active tab's AgentSessionFeature.State.presentation case.

Empty states

  • No tabs → Welcome screen (unchanged).
  • Tab with no started session → placeholder.

Acceptance Criteria

  • View routes correctly: .shell / .agentTerminal → TerminalView; .agentDialogue → DialogueView.
  • Switching between tabs of different surfaces updates view instantly.
  • Per-window environment injection for DesignSystem (.designSystem(...)) applied to DialogueView the same way as to TerminalView.

Relationships

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions