Skip to content

[Fix] Slack block context appears in task messages - #1417

Merged
daniel-lxs merged 9 commits into
developfrom
fix/slack-block-text-dedupe-2em4d1neb9fx3
Aug 17, 2026
Merged

[Fix] Slack block context appears in task messages#1417
daniel-lxs merged 9 commits into
developfrom
fix/slack-block-text-dedupe-2em4d1neb9fx3

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

​Opened on behalf of @daniel-lxs. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

Inbound Slack messages now keep their existing attachment and structured-block enrichment separate from authored text. Prompt assembly injects that extra information in a dedicated <slack_message_context> sibling while <slack_message> keeps the normal user turn.

Standard and Fast Slack entry paths both pass the same enrichment through the agent-only context boundary. Transcript parsing recognizes the explicit wrapper grammar, renders only the authored message in the task UI, and leaves malformed input untouched.

Why this change was made

Slack can provide useful information outside its top-level text. Appending that enrichment directly to the message preserved context for the agent but exposed internal labels such as Slack block text: in the user-visible transcript.

Impact

Roomote handles Slack enrichment like other injected context: the agent receives it, but task message bubbles show only the authored Slack text. Existing stored transcripts remain unchanged.

Screenshots

Injected Slack enrichment is hidden while authored text remains visible

@roomote-community

roomote-community Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

No new code issues found. See task

  • Bare block links with targets that differ from fallback links are preserved.
  • Markdown-linked fallback URLs containing parentheses are parsed correctly (packages/slack/src/forwarded-message-context.ts:50).
  • Fast-mode parsing uses authored text for command/question handling and keeps Slack block/attachment context in the agent-only prompt (apps/api/src/handlers/slack/events/fast-agent.ts:98).

Reviewed 0296005

Comment thread packages/slack/src/forwarded-message-context.ts Outdated
Comment thread packages/slack/src/forwarded-message-context.ts Outdated
@daniel-lxs
daniel-lxs marked this pull request as ready for review August 16, 2026 22:31
Comment thread apps/api/src/handlers/slack/helpers/event-normalization.ts
@roomote-roomote roomote-roomote Bot changed the title [Fix] Slack task prompts show duplicate text when messages contain links [Fix] Slack block context appears in task messages Aug 17, 2026
@roomote-roomote

roomote-roomote Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the failing Test check in c458aab. Ordinary SlackNotifier.getMessage() results retain their legacy object shape, while authoredText and agentContext are emitted when structured Slack context actually exists. The exact failing test file passes all 88 tests, the full Slack package passes all 403 tests, and the replacement GitHub Test check is now passing.

@daniel-lxs
daniel-lxs merged commit 38e3cf4 into develop Aug 17, 2026
17 checks passed
@daniel-lxs
daniel-lxs deleted the fix/slack-block-text-dedupe-2em4d1neb9fx3 branch August 17, 2026 03:59
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