Skip to content

Remove the "Answered in" duration footer from Slack assistant replies - #25237

Merged
abdulrahmancodes merged 1 commit into
mainfrom
claude/slack-bot-vetting-requirements-qhg5hg
Sep 2, 2026
Merged

Remove the "Answered in" duration footer from Slack assistant replies#25237
abdulrahmancodes merged 1 commit into
mainfrom
claude/slack-bot-vetting-requirements-qhg5hg

Conversation

@abdulrahmancodes

@abdulrahmancodes abdulrahmancodes commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Removes the "Answered in {x}s" footer the Slack assistant appended to every answer.

What changed

  • build-slack-assistant-answer-blocks.ts: dropped the "Answered in {x}s" context block, so rich replies are now the markdown body plus the feedback buttons.
  • Plain-text replies (the fallback for answers too long for a markdown block): the worker posts responseText directly. build-slack-assistant-answer-text.ts, which only existed to append the footer, is deleted along with its test.
  • format-slack-assistant-duration.ts deleted (no remaining users); the worker no longer tracks startedAt/durationMilliseconds.
  • Tests updated to the new block layout.

strip-slack-assistant-answer-footer.ts is deliberately kept: it strips the footer from the bot's own earlier messages when replaying thread history into the agent context, and still-live threads contain footered messages posted by previous versions. Its comment now explains that.

Validation

  • yarn typecheck clean
  • yarn lint 0 warnings / 0 errors
  • yarn test:unit 193 tests pass (2 fewer than before: the deleted footer tests)

Generated by Claude Code

Review in cubic

@twenty-ci-bot-public

Copy link
Copy Markdown

👋 Thanks for contributing to Twenty!

Your PR has been set to draft while you work on it. Once you're done, mark it as Ready for review and our automated checks will run.

Looking forward to your contribution!

@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Removes elapsed-time footers from Slack assistant replies while retaining backward-compatible stripping of footers in historical thread messages.

  • Sends the assistant response directly as fallback text.
  • Removes duration tracking, formatting utilities, and the duration context block.
  • Updates block and worker tests for the simplified reply layout.

Confidence Score: 5/5

The PR appears safe to merge with no actionable correctness or security issues identified.

The footer removal is consistently applied across rich and fallback replies, feedback metadata remains intact, legacy thread cleanup is preserved, and no stale references to the deleted utilities remain.

Important Files Changed

Filename Overview
packages/twenty-apps/public/slack/src/logic-functions/slack-assistant-worker.ts Removes duration tracking and sends the raw response text while preserving existing block-length fallback behavior.
packages/twenty-apps/public/slack/src/logic-functions/utils/build-slack-assistant-answer-blocks.ts Removes the duration context block while retaining the markdown answer and feedback controls.
packages/twenty-apps/public/slack/src/logic-functions/utils/strip-slack-assistant-answer-footer.ts Documents why legacy footer stripping remains necessary for historical thread replay.
packages/twenty-apps/public/slack/src/tests/slack-assistant-worker.integration-test.ts Updates integration expectations to match the footer-free block layout.
packages/twenty-apps/public/slack/src/logic-functions/utils/tests/build-slack-assistant-answer-blocks.test.ts Updates unit coverage for replies containing only the answer and feedback controls.

Reviews (1): Last reviewed commit: "Remove the "Answered in" duration footer..." | Re-trigger Greptile

@abdulrahmancodes
abdulrahmancodes force-pushed the claude/slack-bot-vetting-requirements-qhg5hg branch from d4c5fd6 to d23d8a2 Compare September 2, 2026 20:17
@twenty-ci-bot-public

twenty-ci-bot-public Bot commented Sep 2, 2026

Copy link
Copy Markdown

🤖 PR Review

Check Result
🔍 Build safety ⏭️ skipped — external-only
🛡️ Security ✅ passed
🧭 Triage ⏭️ skipped — external-only
📐 Quality ✅ passed
🚦 Auto-approve ✅ passed — complexity low

🛡️ Security Review

No high-severity vulnerabilities detected.


🚦 Auto-approve

Eligible for auto-approval — low-complexity, no high-blast-radius paths.

  • 🧠 Complexity: low
  • 📏 Size: +4 / -94 lines across 8 file(s)

View details

Automated pre-review — human approval still required.

@twenty-ci-bot-public

twenty-ci-bot-public Bot commented Sep 2, 2026

Copy link
Copy Markdown

✅ Quality review · no findings

Safe to merge — no findings

High-level — Clean single-purpose removal of the Slack answer-duration footer; correctly keeps and re-justifies the still-used strip util for backward-compatible history replay, no rollout or data risk
Low-level — Diff is coherent line-by-line — deleted utils/tests fully removed with no dangling references (grep-verified), and the updated strip-util comment is a valid WHY that passes the deletion test


Reviewed against the pr-review standard — high-level then low-level. Advisory; human review still required. Run details.

CoreTeamTwenty
CoreTeamTwenty previously approved these changes Sep 2, 2026

@CoreTeamTwenty CoreTeamTwenty left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Auto-approved — cleared automated quality and security review and is low-complexity.

  • Quality: passed
  • Security: passed
  • Auto-approve: passed — complexity low

Automated approval — a human still merges, and this is re-evaluated on every push.

@CoreTeamTwenty
CoreTeamTwenty dismissed their stale review September 2, 2026 20:20

Superseded — re-approving the latest commit.

@CoreTeamTwenty CoreTeamTwenty left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Auto-approved — cleared automated quality and security review and is low-complexity.

  • Quality: passed
  • Security: passed
  • Auto-approve: passed — complexity low

Automated approval — a human still merges, and this is re-evaluated on every push.

@abdulrahmancodes
abdulrahmancodes added this pull request to the merge queue Sep 2, 2026
Merged via the queue into main with commit dab65c0 Sep 2, 2026
104 checks passed
@abdulrahmancodes
abdulrahmancodes deleted the claude/slack-bot-vetting-requirements-qhg5hg branch September 2, 2026 20:27
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor
Fails
🚫

node failed.

Log

Details
�[31mError: �[39m SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at JSON.parse (<anonymous>)
�[90m    at parseJSONFromBytes (node:internal/deps/undici/undici:4394:19)�[39m
�[90m    at successSteps (node:internal/deps/undici/undici:7048:27)�[39m
�[90m    at readAllBytes (node:internal/deps/undici/undici:5965:13)�[39m
�[90m    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)�[39m
danger-results://tmp/danger-results-c25306d2.json

Generated by 🚫 dangerJS against d23d8a2

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants