Skip to content

Extract ProgressPresenter module #18

@SorraTheOrc

Description

@SorraTheOrc

Extract progress message formatting and lifecycle management from src/index.ts (lines 21-90, 123-207) into a dedicated ProgressPresenter module.

Scope:

  • Extract formatProgressMessage() function with phase emojis and labels
  • Extract message truncation logic
  • Extract statusMessages Map management
  • Extract onProgress callback handling
  • Extract status message lifecycle (create, update, delete)
  • Handle final summary posting

Acceptance Criteria:

  • ProgressPresenter module exists in appropriate location (e.g., src/presenters/)
  • All progress formatting logic is moved out of src/index.ts
  • ProgressPresenter has clear, documented interface
  • State management (statusMessages Map) is properly encapsulated
  • Unit tests verify progress message formatting
  • Unit tests verify status message lifecycle
  • Integration tests verify end-to-end progress behavior unchanged
  • All existing tests continue to pass

Dependencies:

  • Parent: SB-0MN3UDQFM0LB0LAH
  • Related: Interface definitions must be established first (SB-*)

Notes:

  • Consider class-based vs functional approach based on state management needs
  • The onProgress callback has complex logic that needs careful extraction
  • Coordinate with LifecycleManager for status message restoration on startup

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions