feat(slack): show Agent Run progress via thread status - #60
Conversation
Replace live run cards with assistant.threads.setStatus so Slack shows the current step until the final reply posts.
Greptile SummaryThis PR replaces Slack live-run cards with heartbeat-driven assistant thread statuses, preserves final replies and interactive question messages, and adds free-form question answering through Slack modals.
Confidence Score: 4/5The PR is not safe to merge until the worker’s unresolved The thread-status implementation currently references a source module that does not exist, causing module resolution and worker build/type-check failure; no additional concrete security or runtime defects were established. Files Needing Attention: packages/worker/src/integrations/slack/live-run-card.ts
|
| Filename | Overview |
|---|---|
| packages/worker/src/integrations/slack/live-run-card.ts | Replaces live-card lifecycle management with thread-status updates and heartbeats, but imports a missing notification-delivery module. |
| packages/worker/src/integrations/slack/actions.ts | Adds validated free-form modal metadata, parsing, opening, submission, actor resolution, and original-message updates. |
| packages/worker/src/integrations/slack/routes.ts | Routes signed free-form modal interactions through background processing while preserving existing action handling. |
| packages/worker/src/orchestrator/question-answer.ts | Extends the integration question boundary to support validated free-form answers and open-question lookup. |
| packages/worker/src/integrations/slack/client.ts | Adds request timeouts and the assistant thread-status API helper. |
Sequence Diagram
sequenceDiagram
participant Slack
participant Routes as Slack Routes
participant Orch as Orchestrator
participant Status as LiveRunCardCoordinator
Slack->>Routes: Mention Codevil
Routes->>Orch: Submit Agent Run
Orch->>Status: Agent lifecycle event
Status->>Slack: assistant.threads.setStatus
loop Every 90 seconds while active
Status->>Slack: Refresh current status
end
Orch->>Slack: Question or approval message
Slack->>Routes: Option action or modal submission
Routes->>Orch: Answer session-scoped question
Orch->>Slack: Final assistant reply
Reviews (1): Last reviewed commit: "feat(slack): show Agent Run progress via..." | Re-trigger Greptile
| @@ -1,29 +1,29 @@ | |||
| import type { DeliveryState } from "../notification-delivery.js"; | |||
There was a problem hiding this comment.
Summary
assistant.threads.setStatusso the thread shows the current Agent Run step (Codevil is editing code — login.ts...) until the final reply posts.Test plan
pnpm --filter @codevil/worker test