Skip to content

fix(slack): keep private menu replies in their original thread - #128341

Merged
steipete merged 1 commit into
mainfrom
codex/slack-threaded-menu-ephemeral-20260823
Aug 23, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/slack-threaded-menu-ephemeral-20260823

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where Slack users clicking a native argument-menu button inside a message thread would receive private Web API fallback responses at the top of the channel when Slack did not provide an action responder.

Why This Change Was Made

The Slack action owner now preserves the authoritative parent-thread timestamp already present on the action container or message when calling Slack's native ephemeral-message API. The existing private action type is narrowed to the upstream Block Kit action contract; authorization, workspace validation, normal response URLs, generic slash-command fallbacks, and unthreaded replies are unchanged.

User Impact

Slack argument-menu errors and successful multi-part command replies remain in the conversation thread where the user clicked. Existing top-level replies and the normal Slack response-URL delivery path behave exactly as before.

Evidence

  • Before the fix, real registered Slack argument-menu delivery failed both parent-thread regressions: the Slack Web API received no thread_ts for container-provided and message-provided parent timestamps; the existing top-level case passed.
  • After the fix, 201 owner and sibling tests passed across native slash commands, block interactions, reply delivery, and action threading; 150 tests passed independently.
  • Coverage includes container-over-message precedence, message-only parent context, absent/top-level context, invalid buttons, six successful threaded Web API responses, preserved response-URL limits, workspace validation, and existing authorization behavior.
  • Slack package-boundary declaration generation, typed owner lint, formatting, max-lines ratchet, assertion-safety ratchet, conflict-marker guard, and a fresh authenticated full-branch code review all passed.
  • Production delta: +3 lines; test delta: +36 lines. Exact reviewed head: d4e55093fba6e563ee757bd56dfc8d45c26abbce.

@clawsweeper

clawsweeper Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added channel: slack Channel integration: slack size: S maintainer Maintainer-authored PR labels Aug 23, 2026
@steipete
steipete marked this pull request as ready for review August 23, 2026 19:03
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 23, 2026
@clawsweeper

clawsweeper Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 23, 2026, 3:27 PM ET / 19:27 UTC.

ClawSweeper review

What this changes

The PR preserves a Slack thread timestamp when native argument-menu actions must use the private Web API fallback, with tests for threaded, top-level, container, and message payloads.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

Keep open for normal maintainer merge review. The focused owner-boundary change appears correct with targeted sibling coverage, but this checkout cannot construct the current-main merge result or inspect the installed Slack Bolt types, and fresh GitHub reads are unavailable.

Priority: P2
Reviewed head: d4e55093fba6e563ee757bd56dfc8d45c26abbce

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is a focused, well-covered owner-boundary repair with normal merge-readiness checks and live Slack confirmation still useful.
Proof confidence 🌊 off-meta tidepool Not applicable: Not applicable: this is maintainer-authored, so the external-contributor proof gate does not apply; a redacted real Slack trace would still reduce message-delivery uncertainty.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Not applicable: this is maintainer-authored, so the external-contributor proof gate does not apply; a redacted real Slack trace would still reduce message-delivery uncertainty.
Evidence reviewed 6 items Fallback owner boundary: The action handler authenticates and scopes the interaction before constructing the fallback responder; that responder selects the container parent timestamp before the message parent timestamp and passes it only to the existing ephemeral Web API call.
Focused regression coverage: The tests retain the uncapped multi-reply Web API path for top-level and threaded actions, then cover top-level, container-precedence, and message-parent fallback replies.
Established threading behavior: Current Slack documentation defines parent thread timestamps as the thread identity and documents automatic replies retaining the same Slack thread, supporting the requested visible behavior.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs extensions/slack/src/monitor/slash.test.ts --reporter=verbose

Result: FAIL (failed) — execution before step 1 run: live-proof package manager pnpm is unavailable after its official installer (curl -fsSL https://get.pnpm.io/install.sh | sh -): command failed without output

live-proof package manager pnpm is unavailable after its official installer (curl -fsSL https://get.pnpm.io/install.sh | sh -): command failed without output

Assertions:

  • FAIL expect_output: keeps the action container's parent thread when respond falls back to postEphemeral

How this fits together

Native Slack command menus invoke the Slack plugin’s action handler. When Slack provides no response URL, that handler sends ephemeral replies through the Web API and now carries the clicked message’s parent thread to that API call.

flowchart LR
A[Slack menu click] --> B[Action handler]
B --> C{Response URL present?}
C -->|Yes| D[Response URL reply]
C -->|No| E[Ephemeral Web API reply]
E --> F[Parent thread timestamp]
F --> G[Private reply in original thread]
Loading

Before merge

  • Resolve merge risk (P1) - The fix changes visible Slack delivery targeting; retain or attach a redacted real Slack trace for both container-parent and message-parent thread timestamps before merging.
  • Resolve merge risk (P1) - The positive production delta is small but non-zero (+3); it is justified only because the parent timestamp must be supplied at the existing Web API owner boundary.
  • Resolve merge risk (P1) - This review could not verify the current-main three-way merge, exact-head remote checks, or installed Slack Bolt type declaration because the checkout is incomplete and remote tooling is unavailable.
  • Complete next step (P2) - No discrete repair is identified; the remaining work is normal maintainer validation of the exact merge and real Slack delivery behavior.
Agent review details

Security

None.

PR surface

Source +3, Tests +36. Total +39 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 4 1 +3
Tests 1 47 11 +36
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 51 12 +39

Review metrics

Metric Value Why it matters
Production versus test delta production +3, tests +36 The runtime growth is limited to passing existing parent-thread metadata into the existing ephemeral fallback; tests cover the new precedence and top-level cases.

Merge-risk options

Maintainer options:

  1. Confirm the real Slack fallback (recommended)
    Before merge, retain a redacted Slack API or interaction trace showing that container and message parent timestamps keep private fallback replies in the original thread.
  2. Accept the harness-only evidence
    Merge on the focused tests and typed payload path while accepting that a live Slack delivery trace was not independently inspectable here.

Technical review

Best possible solution:

Preserve the direct fallback-boundary propagation, then confirm the exact merge result and a redacted Slack interaction showing both authoritative parent-thread sources before landing.

Do we have a high-confidence way to reproduce the issue?

No executed current-main reproduction is available: the source and focused harness identify the fallback path, but this read-only checkout lacks pnpm and no real Slack setup is available.

Is this the best way to solve the issue?

Yes, conditionally: carrying the already-authoritative parent timestamp into the existing fallback is the narrowest owner-boundary repair and leaves response-URL behavior unchanged.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against b3b33d24195d.

Labels

Label justifications:

  • P2: This is a bounded repair to Slack’s private reply placement rather than a core-runtime outage or security boundary failure.
  • merge-risk: 🚨 message-delivery: Merging changes the thread destination of private Slack fallback replies, a user-visible delivery property not fully established by unit mocks alone.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Not applicable: this is maintainer-authored, so the external-contributor proof gate does not apply; a redacted real Slack trace would still reduce message-delivery uncertainty.

Evidence

What I checked:

  • Fallback owner boundary: The action handler authenticates and scopes the interaction before constructing the fallback responder; that responder selects the container parent timestamp before the message parent timestamp and passes it only to the existing ephemeral Web API call. (extensions/slack/src/monitor/slash.ts:1150, d4e55093fba6)
  • Focused regression coverage: The tests retain the uncapped multi-reply Web API path for top-level and threaded actions, then cover top-level, container-precedence, and message-parent fallback replies. (extensions/slack/src/monitor/slash.test.ts:1507, d4e55093fba6)
  • Established threading behavior: Current Slack documentation defines parent thread timestamps as the thread identity and documents automatic replies retaining the same Slack thread, supporting the requested visible behavior. Public docs: docs/channels/slack.md. (docs/channels/slack.md:1418, d4e55093fba6)
  • Dependency signal and limitation: The Slack plugin directly depends on @slack/bolt 5.0.0, which establishes the type-contract dependency; its installed type source is absent and network access failed, so the upstream BlockAction declaration could not be independently read. (extensions/slack/package.json:11, d4e55093fba6)
  • Feature history: History identifies the same Slack slash-command owner path as actively maintained by Peter Steinberger, including command-registration ownership and timestamp-delivery work; Sarah Fortune recently maintained Enterprise Grid action routing. (extensions/slack/src/monitor/slash.ts:1150, 7fc1089d95c2)
  • Current-main verification gap: The local PR checkout is grafted and could not find a merge base with the supplied current-main SHA; fetching the missing graph failed because GitHub DNS/network access is unavailable.

Likely related people:

  • steipete: Local history shows repeated merged work on Slack slash-command ownership and delivery timestamps, beyond this proposed commit. (role: long-term Slack command-path contributor; confidence: high; commits: 7fc1089d95c2, d95d591d98a8; files: extensions/slack/src/monitor/slash.ts, extensions/slack/src/monitor/slash.test.ts)
  • Sarah Fortune: Recent merged Slack work covers workspace-scoped Enterprise Grid actions, adjacent to the action payload and event-scope path here. (role: Enterprise Grid action-routing contributor; confidence: medium; commits: 00fc1bd12382; files: extensions/slack/src/monitor/slash.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Verify GitHub’s exact-head merge result and required checks after rebasing onto current main.
  • Retain a redacted real Slack interaction or API trace for container-parent and message-parent fallback replies.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-23T19:09:48.473Z sha d4e5509 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 23, 2026
@steipete
steipete merged commit bd7fb1d into main Aug 23, 2026
182 checks passed
@steipete
steipete deleted the codex/slack-threaded-menu-ephemeral-20260823 branch August 23, 2026 19:42
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: slack Channel integration: slack maintainer Maintainer-authored PR merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant