Skip to content

Add Telegram notification channel and update documentation#320

Open
abby-mo wants to merge 65 commits intoramfam101:developfrom
abby-mo:develop
Open

Add Telegram notification channel and update documentation#320
abby-mo wants to merge 65 commits intoramfam101:developfrom
abby-mo:develop

Conversation

@abby-mo
Copy link
Copy Markdown

@abby-mo abby-mo commented Apr 11, 2026

(Please remove this line only before submitting your PR. Ensure that all relevant items are checked before submission.)

Describe your changes

This pull request adds full support for escalation policies in Checkmate monitors, including backend persistence, API exposure, frontend configuration, and notification delivery.

Key changes:

Escalation Policy & Notification
Escalation Policy & Notification
Added escalationPolicies to the monitor schema, types, and API responses. Policies are saved, updated, and returned with monitor data.
Frontend UI now allows configuring escalation steps per monitor, which persist and reload correctly.
Repository and service layers map escalation policies and include them in all relevant API endpoints.
Queue processor schedules and executes escalation steps when a monitor is down.
Email notifications are sent according to escalation steps and channels. End-to-end test confirmed email delivery on escalation.

Fixes #1

Please ensure all items are checked off before requesting a review. "Checked off" means you need to add an "x" character between brackets so they turn into checkmarks.

  • [ X] (Do not skip this or your PR will be closed) I deployed the application locally.
  • [ X] (Do not skip this or your PR will be closed) I have performed a self-review and testing of my code.
  • [ X] I have included the issue # in the PR.
  • [ X] I have added i18n support to visible strings (instead of <div>Add</div>, use):
const { t } = useTranslation();
<div>{t('add')}</div>
  • [X ] I have not included any files that are not related to my pull request, including package-lock and package-json if dependencies have not changed
  • [ X] I didn't use any hardcoded values (otherwise it will not scale, and will make it difficult to maintain consistency across the application).
  • [ X] I made sure font sizes, color choices etc are all referenced from the theme. I don't have any hardcoded dimensions.
  • [ X] My PR is granular and targeted to one specific feature.
  • [X ] I ran npm run format in server and client directories, which automatically formats your code.
  • [ X] I took a screenshot or a video and attached to this PR if there is a UI change.
image

mayssagl and others added 30 commits March 23, 2026 13:49
…#2753)

Add Telegram as a new notification type, allowing users to receive
monitor alerts via a Telegram bot.

Configuration requires:
- Bot token (obtained from @Botfather)
- Chat ID (user, group, or channel)

Changes:
- TelegramProvider: sends HTML-formatted messages via Telegram Bot API
- NotificationsService: route telegram type to TelegramProvider
- Notification model/types: add 'telegram' to NotificationChannel enum
- Server validation: telegram schema (accessToken + address/chat_id)
- Client Types/Validation: telegram schema with accessToken + address
- useNotificationForm: handle telegram defaults
- Notifications create page: render Telegram config UI
- en.json: add telegram i18n keys
The previous commit reformatted the entire en.json (spaces → kept as-is
but accumulated unrelated upstream changes), creating a 1.3k line diff.

Restore the file to match upstream/develop exactly and add only the
Telegram-specific i18n keys required by this PR.
- useNotificationForm: replace nested ternary with if/else if/else block
- TelegramProvider: type error as unknown and access properties safely
  via instanceof checks instead of casting to HTTPError
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…seNotificationForm

Per @ajhollid review: define defaults up-front with a NotificationDefaults type
and eliminate the trailing else branch entirely. The if/else-if blocks only
override when the type is matrix or telegram.
Br0wnHammer and others added 30 commits March 27, 2026 20:06
…nt URL in telegram provider

- Remove redundant 'defaultValue' prop on Telegram chat ID Controller in create/index.tsx;
  the form already initialises via 'defaultValues: defaults' at the useForm level, making
  the per-Controller prop unnecessary and inconsistent with the reviewer's expectation.
- Fix 'View Incident' URL in telegram.ts: was pointing to the infrastructure details page
  (/infrastructure/:id) instead of the incidents page (/incidents/:id).
…ation-type

feat(notifications): add Telegram notification channel (bluewave-labs#2753)
Feat(DLQ): Add DLQ data layer -> types, model, and repository
Fix outdated links and add Prerequisites section
…er/1.9.1

feat: bump scheduler, consume scheduler events
## Changes
- teamsProvider.test.ts: fix got mock wiring (use top-level mockPost
  with dynamic import so mock intercepts correctly), fix getTestMessage
  assertion, fix incident URL path
- superSimpleQueueHelper.test.ts: change default import to named import,
  update constructor from object to 16 positional params, rename
  getMonitorJob -> getHeartbeatJob, add all missing dependencies
- monitorService.test.ts: remove stale constructor params (db,
  stringService, papaparse, errorService), add missing params
  (geoChecksRepository, incidentsRepository), fix method names
  (findLatestChecksByMonitorIds -> findLatestByMonitorIds,
  findDateRangeChecksByMonitor -> findByDateRangeAndMonitorId),
  update assertions from checks -> recentChecks
- jest.config.ts: consolidate @/utils path mapping to resolve .ts files
- Extract shared createMockLogger to test/helpers/

Closes bluewave-labs#3457
All 15 non-English locale files had a structural mismatch with en.json:
- en.json used nested keys (common.buttons.cancel)
- Other locales used flat keys (cancel, DeleteAccountButton)
- Result: 0.3% effective translation coverage at runtime

## Changes

Migration script (client/scripts/migrate-locales.ts):
- Restructures all locale files to match en.json's nested key structure
- Recovers existing translations via safe key-matching strategies
- Backs up originals to locales/backup/

Translation of all 15 languages:
- ar (94.6%), cs (91.6%), de (89.4%), es (92.6%), fi (94.2%)
- fr (86.7%), ja (93.3%), pt-BR (91.0%), ru (93.0%), th (93.4%)
- tr (91.9%), uk (94.3%), vi (92.5%), zh-CN (94.0%), zh-TW (94.2%)

Keys intentionally left in English are technical terms (HTTP, CPU,
Docker, gRPC, etc.), placeholder examples, and brand names.

en.json was NOT modified.
…ale-migration

fix: restructure and translate all i18n locale files
…est-suite-failures

fix: align server test suite with current source implementations
Removed the Translations section from the README.
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.

Notification System - Notification Escalations

6 participants