Skip to content

TUI v2 3.1: Extract start-cluster helper for TUI #187

Description

@tomdps

Summary

Implement Issue 3.1 from the TUI v2 plan: extract a minimal reusable "start cluster" helper for the TUI so it can launch runs without duplicating CLI logic.

Scope

  • Add a small adapter module (JS) that encapsulates:
    • explicit input construction (plain text vs /issue ref)
    • provider override resolution
    • config loading (resolveConfigPath, loadClusterConfig)
    • calling orchestrator.start(...)
  • TUI uses this helper rather than duplicating CLI logic.

Non-scope

  • No changes to CLI zeroshot run behavior.
  • No changes to launcher UI or /issue command wiring (Issues 3.2/3.3).

Implementation Plan

  1. Identify the minimal CLI path for starting a cluster and extract reusable helper(s).
  2. Implement startClusterFromText and startClusterFromIssue wrappers (or similar) in a new module (e.g., src/tui/services/start-cluster.js).
  3. Ensure helper accepts provider override + config path and passes correct options into orchestrator.start(...).
  4. Add unit tests for helper inputs/outputs with mocked orchestrator and config loaders.

Tests

  • Unit tests for helper functions (text + issue inputs).
  • Ensure provider override is forwarded to orchestrator options.

Acceptance Criteria

  • zeroshot run behavior unchanged.
  • New helper can be unit-tested independently.
  • TUI can call helper without duplicating CLI logic.

Dependencies

  • Depends on Issue 2.2/2.3 (command system scaffolded).

References

  • docs/tui-v2/IMPLEMENTATION_PLAN.md (Issue 3.1)
  • docs/tui-v2/PRD.md (launcher and issue flows)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions