Skip to content

Rewrite Slack markdown tables before delivery - #50

Open
fineas-bot[bot] wants to merge 1 commit into
mainfrom
codex/slack-markdown-table-output
Open

Rewrite Slack markdown tables before delivery#50
fineas-bot[bot] wants to merge 1 commit into
mainfrom
codex/slack-markdown-table-output

Conversation

@fineas-bot

@fineas-bot fineas-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

Root cause: Slackbot v2 streamed final answers as Chat SDK markdown_text without adapting GitHub-style pipe tables. Slack does not render those tables, so replies like the Attio lead update in slack:C0B7WSP2NCB:1782400644.013719 show up as raw pipe-delimited rows and long URLs. The earlier native-table work was the inverse path: ingesting Slack native table blocks into context, not rendering outgoing Markdown tables back to Slack.

Fix:

  • Normalize outgoing Markdown pipe tables into Slack-friendly bullet groups before live streaming, recovered streaming, fallback delivery, and plain-text final posts.
  • Preserve non-table text and fenced code blocks.
  • Add an emulator regression for the exact Attio-style final answer shape.

Validation:

  • Reproduced the bug with the new regression before the implementation: raw | Lead | Attio record | Task | text reached the Slack stream.
  • bun test test/chat-sdk-emulate.test.ts -t "rewrites markdown pipe tables"
  • bun test test/chat-sdk-emulate.test.ts
  • bun tsgo --project tsconfig.json --noEmit
  • bun test test

Related/overlap: PR #36 also touches Slackbot v2 files, but handles incoming Slack native table ingestion. This PR fixes outgoing final-answer rendering.

Slack does not render GitHub-style pipe tables, so final answers that use markdown tables show up in Slack as raw pipes and long rows.

Normalize markdown pipe tables in Slackbot v2 output into Slack-friendly bullet groups across live streaming, recovered streaming, fallback, and plain-text final delivery.
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.

0 participants