Extract ProgressPresenter module from src/index.ts#19
Conversation
Agent-Logs-Url: https://github.com/TheWizardsCode/SourceBase/sessions/6b1f54f2-9b4a-464d-964b-7d870df76438 Co-authored-by: SorraTheOrc <[email protected]>
|
Automated PR review could not be completed because the AMPA review container failed to start ( raised ). As a result, audit, code-review, and test checks were not executed in an isolated container. Please resolve the AMPA startup issue and rerun this review workflow. |
|
Automated review is currently blocked: AMPA container startup failed before checkout/tests could run. Result: Tests not executed, Audit not executed, Code review not executed in isolated container. Blocking issue tracked in SB-0MNP1PLSX003GOOP; please rerun after that fix lands. |
…rogressPresenter extraction and final result handling
|
@github-copilot Ready to close: No SummaryProgress formatting has been extracted into src/formatters/progress.ts and covered by unit tests, but the requested ProgressPresenter module (encapsulating state, lifecycle management, and onProgress handling) is not present. Stateful maps and lifecycle logic remain inline in src/index.ts and there are no isolated unit tests for a Presenter. Automated CI/test verification was blocked by an AMPA startup failure, so tests were not executed in an isolated container. Acceptance Criteria Status
Children StatusReview PR #19 (SB-0MNP1NYG3008MXVW) — completed/in_reviewNo acceptance criteria defined. |
Progress message state and lifecycle were inline inside
processUrlWithProgressinsrc/index.ts, mixing presentation concerns with orchestration logic.Changes
src/presenters/progress.ts— newProgressPresenterclassstatusMessages: Map<string, any>— tracks the posted Discord message per phase, enabling future update/delete operationshandleProgressEvent(event)— encapsulates phase deduplication, message formatting (viaformatProgressMessage), backtick-wrapping of URLs/titles, thread-preferred posting with channel fallback, and terminal-phase suppressiongetLastPhase(),getLastPostedMessage(),isTerminalPhaseSeen(),getStatusMessages()src/index.tsReplaces ~70 lines of inline state (
lastPhase,terminalPhaseSeen,lastPostedMessage) and the progress event loop with:tests/unit/progress.presenter.spec.ts— 19 new unit testsCovers: phase deduplication, terminal phase suppression, thread→channel fallback,
statusMessagesMap population, phase emoji formatting, and backtick-wrapping of titles/URLs.