Redesign Discord notification system with rich embeds#8
Merged
Conversation
This reverts commit c61eb59.
Embed provides a colored header bar with title and footer. Plain text content uses Discord markdown (### headers, links, code blocks) for clean readability. Color-coded sidebar: green (success), orange (needs review), red (errors). Simplified formatters, removed unused helpers, updated tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace plain-text content with rich Discord embeds matching the MDXCanvas deploy notification style: colored sidebar (green/yellow/red), author block with GitHub avatar, emoji resource-type badges, embed fields for deployed/review/failed items, and timestamps. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Discord field values are capped at 1024 chars. With 170+ deployed items, a single field overflows and Discord returns 400. Added chunk_field_lines() to split lines into field-sized chunks, and continuation fields use zero-width space headers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Zero-width space spacers were invisible. Replace with a thin horizontal dash line for clear visual separation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
MDXCanvas outputs lowercase types (page, quiz, module_item) but the emoji map had PascalCase keys. Normalized to lowercase lookup and added module_item, announcement, syllabus types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
EmbedBuilder tracks character budget and field count, enforcing Discord embed limits when building Embed dataclasses incrementally. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…in wrappers Remove all constants and chunking functions from send_notification.py (now delegates to discord_limits) and remove chunk_field_lines, emoji_for, RESOURCE_EMOJI, and MAX_FIELD_CHARS from formatting_utils.py. Replace test_embed_chunking.py to test the canonical discord_limits exports instead of the deleted private helpers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the old chunk_field_lines/emoji approach with the new 3-case notification format: error (red), needs-review (yellow), success (green). Uses tabulate pipe-format overview tables, EmbedBuilder/MessageBuilder for limit-aware field packing, and removes all emojis per spec. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… to pass cicd_role_id, and update formatter tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
byubean
approved these changes
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Supersedes #7 (closed without merge). Redesigns Canvas and Docker Discord notifications from plain-text content into rich embeds with colored sidebars, author blocks, emoji badges, field-based sections, and timestamps.
What changed
content:0x57F287) success, yellow (0xFEE75C) review needed, red (0xED4245) error--author-iconCLI arg forsend_course.py— action passeshttps://github.com/{actor}.pngdedupe_remaining_contentnow returns(type, label, url)triples instead of(label, url)pairsCanvas / Docker workflows
Caller workflows require these inputs (introduced in #7, carried forward here):
utils_refremains optional (for smoke-testing against a non-mainutils branch).Downstream course workflow PRs (from #7):
dedupe_remaining_contentreturn typeChanged from
list[tuple[str, str | None]]tolist[tuple[str, str, str | None]]— now includes the content type. Only used internally bycanvas_format.py.Verified
testkapua/testing-repo(170 items, field chunking works)testkapua/testing-repo<@&{cicd_role_id}>) still work viacontentfieldPost-merge checklist
testkapua/testing-repoworkflow refs fromcodex-plain-text-notificationstomain🤖 Generated with Claude Code