From 670729ddf337c76dbd89d49db78dd539a8ce6cc4 Mon Sep 17 00:00:00 2001 From: Brian O'Kelley Date: Sat, 3 Jan 2026 14:42:59 -0500 Subject: [PATCH] Fix missing newlines between context sections in Addie Slack messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When both member context and channel context were present in Slack messages, they were concatenated directly without proper markdown paragraph spacing. This caused sections to run together visually. Changes: - Remove leading \n from channel context header (was a workaround) - Use array filter/join pattern to properly space sections with \n\n - Add extra newline before --- separator for consistent formatting 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .changeset/addie-newline-fix.md | 4 ++++ server/src/addie/bolt-app.ts | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .changeset/addie-newline-fix.md diff --git a/.changeset/addie-newline-fix.md b/.changeset/addie-newline-fix.md new file mode 100644 index 0000000000..1658dde4dd --- /dev/null +++ b/.changeset/addie-newline-fix.md @@ -0,0 +1,4 @@ +--- +--- + +Fix missing newlines between context sections in Addie message formatting diff --git a/server/src/addie/bolt-app.ts b/server/src/addie/bolt-app.ts index da94d3b7be..433944184a 100644 --- a/server/src/addie/bolt-app.ts +++ b/server/src/addie/bolt-app.ts @@ -418,7 +418,7 @@ async function buildMessageWithMemberContext( let channelContextText = ''; if (threadContext?.viewing_channel_name) { const channelLines: string[] = []; - channelLines.push(`\n## Channel Context`); + channelLines.push('## Channel Context'); channelLines.push(`User is viewing **#${threadContext.viewing_channel_name}**`); if (threadContext.viewing_channel_description) { channelLines.push(`Channel description: ${threadContext.viewing_channel_description}`); @@ -430,8 +430,10 @@ async function buildMessageWithMemberContext( } if (memberContextText || channelContextText) { + // Use double newline between sections for proper markdown spacing + const sections = [memberContextText, channelContextText].filter(Boolean); return { - message: `${memberContextText || ''}${channelContextText}\n---\n\n${sanitizedMessage}`, + message: `${sections.join('\n\n')}\n\n---\n\n${sanitizedMessage}`, memberContext, }; }