feat: Update Error Notifications with ComponentsV2 #14

Merged
naomi merged 3 commits from feat/errors into main 2026-02-20 20:08:45 -08:00
Owner

Summary

This PR updates Rosalia's Discord error notifications to use Discord's Components V2 for a beautiful, organized display.

Changes Made

  • Removed @mention - Error notifications no longer ping anyone
  • Updated channel - Notifications now go to the correct channel (1474606829504954511)
  • Implemented ComponentsV2 - Using Container (type 17) with Text Display (type 10) components
  • Visual improvements:
    • Added accent color (#E91E63) for the container
    • Added separators (type 14) between sections
    • Organized content with headers for scope, message, and stack trace
    • Code blocks for message and stack trace

Technical Changes

  1. src/modules/pipeLog.ts:

    • Created PipeErrorOptions and DiscordErrorPayloadOptions interfaces
    • Refactored pipeError to accept options object
    • Extracted payload creation into createDiscordErrorPayload helper
    • Implemented ComponentsV2 structure with container, text displays, and separators
  2. src/utils/errorHandler.ts:

    • Updated error handler to use new pipeError interface
  3. src/server/serve.ts:

    • Updated /error webhook endpoint to use new interface

Created by Hikari~ 🌸

## Summary This PR updates Rosalia's Discord error notifications to use Discord's Components V2 for a beautiful, organized display. ### Changes Made - **Removed @mention** - Error notifications no longer ping anyone - **Updated channel** - Notifications now go to the correct channel (1474606829504954511) - **Implemented ComponentsV2** - Using Container (type 17) with Text Display (type 10) components - **Visual improvements**: - Added accent color (#E91E63) for the container - Added separators (type 14) between sections - Organized content with headers for scope, message, and stack trace - Code blocks for message and stack trace ### Technical Changes 1. **`src/modules/pipeLog.ts`**: - Created `PipeErrorOptions` and `DiscordErrorPayloadOptions` interfaces - Refactored `pipeError` to accept options object - Extracted payload creation into `createDiscordErrorPayload` helper - Implemented ComponentsV2 structure with container, text displays, and separators 2. **`src/utils/errorHandler.ts`**: - Updated error handler to use new `pipeError` interface 3. **`src/server/serve.ts`**: - Updated `/error` webhook endpoint to use new interface ✨ Created by Hikari~ 🌸
hikari added 1 commit 2026-02-20 19:53:44 -08:00
feat: update error notifications with ComponentsV2
Node.js CI / CI (pull_request) Failing after 10s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m2s
637fdcf997
Updated Discord error notifications to use Components V2 with a beautiful
container layout. Changes include:

- Removed @mention from error notifications
- Updated channel ID to 1474606829504954511
- Implemented Container component (type 17) with Text Display components (type 10)
- Added accent color (#E91E63) and separators for visual appeal
- Organized error information with headers for scope, message, and stack trace
- Refactored pipeError to use options object for better code organization
naomi added 1 commit 2026-02-20 19:58:30 -08:00
feat: add media container with error image to notifications
Node.js CI / CI (pull_request) Failing after 8s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m6s
0f7ab59889
Added a Media Container component (type 9) with a Media Image accessory
(type 11) to display an error image alongside the error header in Discord
notifications. This creates a more visually appealing and informative
error alert.

Changes:
- Created createMediaContainer helper function to generate the media
  container with error image
- Updated createDiscordErrorPayload to use the media container
- Extracted helper to reduce function length and improve code organization
naomi changed title from Update Error Notifications with ComponentsV2 to feat: Update Error Notifications with ComponentsV2 2026-02-20 20:05:17 -08:00
naomi added 1 commit 2026-02-20 20:06:52 -08:00
chore: pin fastify-raw-body dependency to exact version
Node.js CI / CI (pull_request) Successful in 23s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m3s
c28069e7b0
Pinned fastify-raw-body from ^5.0.0 to 5.0.0 to ensure consistent
dependency versions across all environments.

Changes:
- Pinned fastify-raw-body to 5.0.0
- Regenerated pnpm-lock.yaml
naomi merged commit 9db206ebbc into main 2026-02-20 20:08:45 -08:00
naomi deleted branch feat/errors 2026-02-20 20:08:46 -08:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nhcarrigan/rosalia-nightsong#14