Skip to content

Decouple TerminalSession from LocalProcessTerminalView #1

@trsdn

Description

@trsdn

Problem

TerminalSession (model layer) holds a direct reference to LocalProcessTerminalView (AppKit/SwiftTerm view):

var terminalView: LocalProcessTerminalView?

This couples the model to the view layer, preventing isolated testing and future renderer swaps.

Proposed Solution

Introduce a TerminalProcess protocol that abstracts startProcess, send, shellPid. TerminalSession references the protocol, not the concrete type.

Impact

  • Enables unit testing of session logic without SwiftTerm
  • Clean separation of concerns
  • Foundation for potential alternative renderers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions