Conversation
|
@royko10 is attempting to deploy a commit to the IndexLabs Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds an opt-in
dm_replies_in_threadspreference per Slack bot installation. A top-level DM can receive its reply under that message; a follow-up keeps the existing thread root. DMs retain one continuous session per channel, and other installations keep their default behavior.The preference is applied before ingestion, so replies and task delivery snapshots capture the originating thread. Delivery continues to use the task snapshot even after another input moves the binding cursor.
Related Issue
ROY-9: Reply to Slack messages in their originating threads.
Type of Change
Changes Made
How to Test
go test -race ./internal/integrations/slack ./internal/integrations/channel/engine ./internal/handlerfromserver/with the checkout's isolated database: passed, including DB-backed delivery anchoring tests.pnpm typecheck,pnpm lint, andpnpm test: passed. Lint reports existing warnings. Focused API compatibility suite: 106 tests passed.git diff --check: passed. The new threaded-DM regression failed before implementation and passes afterward.Full
make testwas attempted. It fails in unrelated CLI/config/daemon tests under the managed agent runtime (task markers/config isolation and daemon probe failures); all affected backend packages pass. The agent-provider half of that runner is not reached after the first half fails. No real-agent smoke tests or customer Slack messages were sent.Rollout and risks
This PR does not change any live bot. After review and deployment approval, an owner/admin can re-register the intended agent's current Slack app through
POST /api/workspaces/{workspace_id}/slack/install/byo?agent_id={agent_id}, using its current tokens and"dm_replies_in_threads": true. Keep credentials in the authenticated request; never place them in an issue or PR. The existing installation ID and Chat bindings remain intact. Read back the installation throughGET /api/workspaces/{workspace_id}/slack/installationsand verify the preference is true. The Socket Mode supervisor reloads the changed configuration on its next reconciliation.There is no UI toggle in this scoped change. Re-registering with
false, or omitting the field, restores the default. Native slash-command acknowledgments retain their existing behavior because their payload has no originating message timestamp. Scheduled delivery destinations are unchanged. Live Slack verification should be performed only after the separately approved rollout.Checklist
AI Disclosure
AI tool used: Codex via Multica (Mika).
Prompt / approach: Implement a default-off per-bot Slack DM reply preference while retaining session continuity and delivery anchoring. Reproduced the missing behavior, reused the existing task delivery snapshot contract, and ran routing, outbound, API compatibility, and repository checks. Deployment is a separate handoff.