Skip to content

feat(slack): show Agent Run progress via thread status - #60

Merged
skrishnan22 merged 12 commits into
mainfrom
codex/slack-live-preview-ux
Sep 6, 2026
Merged

skrishnan22 merged 12 commits into
mainfrom
codex/slack-live-preview-ux

Conversation

@skrishnan22

Copy link
Copy Markdown
Owner

Summary

  • Replace Slack live run cards with assistant.threads.setStatus so the thread shows the current Agent Run step (Codevil is editing code — login.ts...) until the final reply posts.
  • Keep questions, approvals, and the final Assistant Reply as messages. Heartbeat status before Slack’s 2-minute timeout. Stop retrying on permanent Slack errors; no card fallback.

Test plan

  • pnpm --filter @codevil/worker test
  • In a Slack thread, mention Codevil and confirm status updates while the Agent Run is in progress
  • Confirm the updating card no longer appears
  • Confirm the final reply still posts and clears status
  • Confirm question/approval messages still appear

@greptile-apps

greptile-apps Bot commented Sep 6, 2026

Copy link
Copy Markdown

Greptile Summary

This 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.

  • Projects current Agent Run activity into bounded Slack thread-status text.
  • Retries transient status failures and stops after recognized permanent failures.
  • Routes modal answers through the existing session-scoped question-answer boundary.
  • Currently introduces an unresolved type import that prevents the worker from building.

Confidence Score: 4/5

The PR is not safe to merge until the worker’s unresolved notification-delivery.js import is removed or implemented.

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

Important Files Changed

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
Loading

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";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Missing delivery module

This import references ../notification-delivery.js, but no corresponding source module exists. TypeScript therefore cannot resolve DeliveryState, causing the worker build and type-check to fail. Remove the unused delivery callback path or add and wire the intended module.

@skrishnan22
skrishnan22 merged commit 309870d into main Sep 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant