Skip to content

feat: SVG brand icons and Telegram integration - #42

Merged
AhmadHammad21 merged 4 commits into
mainfrom
feat/telegram-and-brand-icons
May 18, 2026
Merged

AhmadHammad21 merged 4 commits into
mainfrom
feat/telegram-and-brand-icons

Conversation

@AhmadHammad21

@AhmadHammad21 AhmadHammad21 commented May 18, 2026 •

Copy link
Copy Markdown
Owner

Closes #41

Changes

SVG brand icons

  • New IntegrationIcon component (frontend/src/components/icons/) with proper SVG paths for Slack, Telegram, GitHub, PagerDuty, Datadog, SNS, and Email — replaces all emoji placeholders
  • SettingsPage and AlertDetailPage notification rows now use the SVG icons

Telegram integration

  • src/integrations/telegram.py — post_investigation + post_failed_investigation via Telegram Bot API (sendMessage, HTML parse mode)
  • TELEGRAM_BOT_TOKEN + TELEGRAM_CHAT_ID env vars (both required to enable)
  • POST /api/integrations/telegram/test — test endpoint matching Slack pattern
  • Poller + event consumer both deliver to Telegram after Slack; tracked in alert_notifications with channel='telegram'
  • Settings → Integrations: Telegram promoted from "Coming soon" to live card with configured badge, .env hint, and "Send test message" button
  • 7 passing tests in tests/integration/test_telegram.py (mirrors test_slack.py)

Pages to test

  • Settings → Integrations — Slack card (SVG icon), Telegram card (live or coming-soon depending on env), GitHub/PagerDuty/Datadog coming-soon cards
  • Monitoring → alert detail — "Notified via" rows now show SVG icons for all channels

Test plan

  • Settings → Integrations: all cards show SVG icons (no emoji)
  • Telegram card shows "Not configured" when env vars absent
  • Telegram card shows "Configured" + Send test message when both vars set
  • Send test message → message appears in Telegram chat
  • Trigger an investigation → Telegram notification fires and shows as delivered in alert detail
  • uv run pytest tests/integration/test_telegram.py — 7 passed

- New IntegrationIcon component with proper SVG paths for Slack, Telegram,
  GitHub, PagerDuty, Datadog, SNS, and Email
- SettingsPage: Slack card and Coming Soon cards now use SVG icons
- AlertDetailPage: notification channel rows use SVG icons instead of emoji
- Closes prep work for #41 (Telegram integration)
Closes #41

- src/integrations/telegram.py: post_investigation + post_failed_investigation
  using Telegram Bot API sendMessage with HTML parse mode
- appsettings.py: TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID env vars
- integrations router: POST /api/integrations/telegram/test endpoint
- event_consumer + poller: deliver to Telegram after Slack; tracked in
  alert_notifications with channel='telegram'
- SettingsPage: Telegram promoted from Coming Soon to live card with
  configured/not-configured badge, .env hint, and Send test message button
- tests/integration/test_telegram.py: 7 tests covering message rendering
  and bot API delivery (mirrors test_slack.py pattern)
- .env.example: document TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID
…ars to Settings

- _post() now returns (bool, error_detail) tuple so callers can see the raw
  Telegram error response instead of just False
- POST /api/integrations/telegram/test raises HTTP 502 with the actual
  Telegram error body when delivery fails (was silently returning ok: true)
- Settings Environment tab now shows TELEGRAM_BOT_TOKEN (masked) and
  TELEGRAM_CHAT_ID so users can verify both vars are loaded
@AhmadHammad21
AhmadHammad21 merged commit 1e7d717 into main May 18, 2026
2 checks passed
@AhmadHammad21
AhmadHammad21 deleted the feat/telegram-and-brand-icons branch May 18, 2026 19:21
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.

feat: Telegram integration — send investigation alerts via Telegram bot

1 participant