Skip to content

fix(notifications): preserve technical acronyms in alert labels - #1084

Merged
izadoesdev merged 3 commits into
mainfrom
codex/notification-copy
Oct 5, 2026
Merged

izadoesdev merged 3 commits into
mainfrom
codex/notification-copy

Conversation

@izadoesdev

@izadoesdev izadoesdev commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Uses uppercase URL, HTTP, ID, SSL, and API consistently in alert field labels.

Slice

Validation

  • Final branch: locked dependency install, bun run lint, bun run check-types, and bun run test passed.

Created and organized with OpenAI Codex assistance. Draft for reviewer verification; no merge or publication performed.


Summary by cubic

Normalizes alert field labels so technical acronyms render consistently in uppercase. Slack and Discord previously showed "Dashboard url" and "Http code"; email output now matches.

  • Moves formatMetadataLabel and isUserFacingMetadata into payload-utils.ts so all providers share the same label formatting and metadata visibility rules.
  • Uppercases api, http, id, ssl, and url in generated labels, with email tests covering the new labels in plain text and HTML.
  • Updates error fallback copy in Slack, Discord, and webhook providers from "Unable to read response" to "Failed to read response".

Written for commit a822efb. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Notification metadata labels now use consistent title casing, with acronyms such as API, HTTP, SSL, and URL displayed in uppercase.
    • Discord, Slack, and webhook error messages now say “Failed to read response” when response details can’t be retrieved.
    • Email notifications include HTTP code, SSL expiry, and API endpoint labels in both plain-text and HTML formats.

@vercel

vercel Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
dashboard Ready Ready Preview Oct 5, 2026 4:26pm UTC
databuddy-status Ready Ready Preview Oct 5, 2026 4:26pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
documentation Skipped Skipped Oct 5, 2026 4:26pm UTC

@unkey-deploy

unkey-deploy Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Unkey Deploy

Name Status Preview Inspect Updated (UTC)
links (preview) Ready Visit Preview Inspect Oct 5, 2026 4:25pm

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 584a8934-ecec-43fb-aa63-80bfef98b786

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 3f3dc95f-3f78-45f2-94e4-26c2962219b8
📥 Commits

Reviewing files that changed from the base of the PR and between 2707b37 and ef7a084.

📒 Files selected for processing (7)
  • packages/notifications/src/__tests__/providers/discord.test.ts
  • packages/notifications/src/__tests__/providers/email.test.ts
  • packages/notifications/src/providers/discord.ts
  • packages/notifications/src/providers/email.ts
  • packages/notifications/src/providers/payload-utils.ts
  • packages/notifications/src/providers/slack.ts
  • packages/notifications/src/providers/webhook.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (3)
Source excerpt: When you discover a new performance improvement, optimization pattern, or fix a performance regression, add a concise bullet to the relevant section below in the same session.

📄 CodeRabbit inference engine (.cursor/rules/performance.mdc)

Files:

  • packages/notifications/src/providers/webhook.ts
  • packages/notifications/src/providers/discord.ts
  • packages/notifications/src/__tests__/providers/discord.test.ts
  • packages/notifications/src/providers/slack.ts
  • packages/notifications/src/__tests__/providers/email.test.ts
  • packages/notifications/src/providers/payload-utils.ts
  • packages/notifications/src/providers/email.ts
Source excerpt: MUST use Tailwind CSS defaults unless custom values already exist or are explicitly requested Source excerpt: MUST use motion/react (formerly framer-motion) when JavaScript animation is required Source excerpt: SHOULD use tw...

📄 CodeRabbit inference engine (.cursor/rules/ui-guidelines.mdc)

Files:

  • packages/notifications/src/providers/webhook.ts
  • packages/notifications/src/providers/discord.ts
  • packages/notifications/src/__tests__/providers/discord.test.ts
  • packages/notifications/src/providers/slack.ts
  • packages/notifications/src/__tests__/providers/email.test.ts
  • packages/notifications/src/providers/payload-utils.ts
  • packages/notifications/src/providers/email.ts
Source excerpt: description: Basic guidelines for the project so vibe coders don't fuck it up globs: alwaysApply: true when using 'text-right', always add 'text-balance' so its not ugly Source excerpt: description: Basic guidelines for the...

📄 CodeRabbit inference engine (.cursor/rules/01-MUST-DO.mdc)

Files:

  • packages/notifications/src/providers/webhook.ts
  • packages/notifications/src/providers/discord.ts
  • packages/notifications/src/__tests__/providers/discord.test.ts
  • packages/notifications/src/providers/slack.ts
  • packages/notifications/src/__tests__/providers/email.test.ts
  • packages/notifications/src/providers/payload-utils.ts
  • packages/notifications/src/providers/email.ts
🔇 Additional comments (7)
packages/notifications/src/providers/discord.ts (1)

123-123: LGTM!

packages/notifications/src/providers/slack.ts (1)

132-132: LGTM!

packages/notifications/src/providers/webhook.ts (1)

65-65: LGTM!

packages/notifications/src/providers/payload-utils.ts (1)

2-3: LGTM!

Also applies to: 25-31

packages/notifications/src/providers/email.ts (1)

7-7: LGTM!

Also applies to: 92-97

packages/notifications/src/__tests__/providers/email.test.ts (1)

6-6: LGTM!

Also applies to: 21-23, 31-39, 69-72, 99-102

packages/notifications/src/__tests__/providers/discord.test.ts (1)

30-30: LGTM!


Walkthrough

Notification metadata labels and filtering changed in email payloads. Discord, Slack, and webhook providers now use updated fallback text when they cannot read an unsuccessful response.

Changes

Metadata labels

Layer / File(s) Summary
Format and filter notification metadata
packages/notifications/src/providers/payload-utils.ts, packages/notifications/src/providers/email.ts, packages/notifications/src/__tests__/providers/email.test.ts, packages/notifications/src/__tests__/providers/discord.test.ts
Metadata labels now normalize whitespace and preserve API, HTTP, ID, SSL, and URL as uppercase acronyms. Email payload construction excludes non-user-facing metadata and template-specific metadata. Tests check the labels and filtering in email output. The Discord test expects Dashboard URL.

Provider response fallbacks

Layer / File(s) Summary
Update unreadable-response fallback text
packages/notifications/src/providers/discord.ts, packages/notifications/src/providers/slack.ts, packages/notifications/src/providers/webhook.ts
The providers use Failed to read response when reading an unsuccessful response fails.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to ef7a0

No material regression is evident in the metadata output or provider error messages; the PR appears ready to merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 7 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: preserving technical acronyms in alert labels.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@izadoesdev

Copy link
Copy Markdown
Member Author

@coderabbitai review

Please review final head 545d138c01eef73aa2d7ff4713eced65ecf86079. The cleanup removes the duplicate email metadata visibility helper, resolves template-specific exclusions once, and updates stale negative assertions to current rendered labels. Cleanup removes 9 lines; whole PR removes 7. Formatting, repository lint, 37 type-check tasks, 31 notification tests and the pre-push root test gate passed. Please review the final combined diff. Please verify the final diff and report actionable findings.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@greptile-apps

greptile-apps Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Changes how alert notification labels are formatted.

The notification-label changes appear safe to merge; no remaining actionable issue was found in the PR diff.

Summary

Alert labels now keep API, HTTP, ID, SSL, and URL uppercase across notification providers. Discord, Slack, and webhook errors also use clearer wording when a response body can’t be read.

  • Email keeps repeated alert details out of its metadata list and shows updated labels in plain text and HTML.
  • Shared formatting gives email, Slack, and Discord consistent labels.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  M[Alert metadata] --> F[Shared label formatter]
  F --> E[Email]
  F --> S[Slack]
  F --> D[Discord]
Loading

Reviews (3) · Last reviewed commit: "test(notifications): cover delivered tec..."

Comment thread packages/notifications/src/providers/payload-utils.ts
Comment thread packages/notifications/src/__tests__/providers/discord.test.ts
@izadoesdev

Copy link
Copy Markdown
Member Author

@greptileai

Please re-review final head ef7a0849f0cabd73688f972b8fd9512893c604cc. Valid findings have been fixed and validated; intentional copy choices and optional refactors are explained in their resolved threads. Please check the final diff for remaining actionable issues.

@izadoesdev

Copy link
Copy Markdown
Member Author

@coderabbitai review

Please re-review final head ef7a0849f0cabd73688f972b8fd9512893c604cc. Valid findings have been fixed and validated; intentional copy choices and optional refactors are explained in their resolved threads. Please check the final diff for remaining actionable issues.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@izadoesdev

Copy link
Copy Markdown
Member Author

@greptileai

Please re-review final head a822efb3ae1a90612bfdc4c737f509fddd827733. Valid findings have been fixed and validated; intentional copy choices and optional refactors are explained in their resolved threads. Please check the final diff for remaining actionable issues.

@izadoesdev

Copy link
Copy Markdown
Member Author

Final head a822efb3ae1a90612bfdc4c737f509fddd827733 is fully validated. Keeping the small, named metadata helpers in the existing repository style rather than adding generated docstrings to satisfy CodeRabbit's advisory coverage warning. The predicate directly lists private metadata exclusions, and the label formatter directly expresses sentence case and technical acronym handling; the provider code and delivered-payload tests expose their contract. No repository CI or contribution rule requires an 80% docstring threshold. Formatting, lint, types, all 31 notification tests and final service/dashboard CI passed, and the fresh Greptile review found no remaining issue.

The docstring suggestion is declined with this scope and evidence. The two substantive review findings are already addressed in their resolved threads.

@izadoesdev
izadoesdev merged commit ced4de2 into main Oct 5, 2026
25 checks passed
@izadoesdev
izadoesdev deleted the codex/notification-copy branch October 5, 2026 16:34

This branch was successfully deployed

3 active and 1 inactive deployments
Preview – dashboard — a822efb3 Deployed Oct 5, 2026 by vercel[bot]
Preview – databuddy-status — a822efb3 Deployed Oct 5, 2026 by vercel[bot]
links - preview — a822efb3 Deployed Oct 5, 2026 by unkey-deploy[bot]
Preview – documentation — a822efb3 Deployed Oct 5, 2026 by vercel[bot]
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