Skip to content

feat: event monitoring setup wizard, omnichannel notifications, and poller improvements - #38

Merged
AhmadHammad21 merged 3 commits into
mainfrom
feat/event-monitoring-setup-wizard
May 18, 2026
Merged

AhmadHammad21 merged 3 commits into
mainfrom
feat/event-monitoring-setup-wizard

Conversation

@AhmadHammad21

@AhmadHammad21 AhmadHammad21 commented May 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Init wizard: full 4-step setup flow (account → AWS config → IAM permissions → EventBridge infra) with skip disclaimers on skippable steps, back buttons on all steps after step 1, and redirect fix for unauthenticated users on empty DB
  • Omnichannel notification tracking: new alert_notifications table tracks per-channel delivery (Slack, SNS) with delivered/failed status; trigger_source column on alerts distinguishes poller vs event consumer; surfaced in AlertDetailPage as triggered-by badge and "Notified via" section
  • Integrations tab: Slack card with configured status, .env hint, and "Send test message" button; GitHub/PagerDuty/Datadog/Telegram flagged as Coming Soon
  • Poller fixes: failed investigations now send Slack via post_failed_investigation (matches event consumer); Lambda error rate window uses poll interval instead of hardcoded 1 hour to prevent stale alerts re-firing; added debug logs for tick activity
  • Session persistence for event investigations: event-triggered investigations persist session + messages so the Monitoring page "View investigation" button opens the original agent thread instead of starting a new chat
  • Bearer auth + Swagger: switched to HTTPBearer so Swagger UI authorize dialog works correctly

Test plan

  • Fresh DB: navigate to / → redirected to /init wizard
  • Complete all 4 wizard steps; back buttons preserve entered values
  • Skip step 2 → amber disclaimer expands before allowing skip
  • Skip step 4 → amber disclaimer expands before allowing skip
  • Trigger a poller investigation → Monitoring page shows trigger source badge and Slack notification row
  • Trigger an event consumer investigation → same badges visible
  • Failed investigation → Slack notification still fires, shows as failed in notifications
  • Settings → Integrations → Slack "Send test message" delivers a Block Kit message
  • Monitoring → alert detail → "View investigation" opens original chat thread

- Add migration 011: trigger_source column on alerts, alert_notifications table
- Record trigger_source ('poller'/'event_consumer') on every alert
- Track per-channel delivery (slack, sns) in alert_notifications with delivered/failed status
- Make slack _post() return bool; propagate through post_investigation/post_failed_investigation
- notify_slack() returns bool for accurate delivery tracking
- Add /api/integrations router with POST /slack/test endpoint
- Integrations tab: Slack card with configured status + test button; GitHub/PagerDuty/Datadog/Telegram as coming soon
- AlertDetailPage: trigger source badge + notified-via section with per-channel status
- Fix Vite proxy missing /api/integrations entry
- Poller: fix failed investigations sending no Slack notification by calling
  post_failed_investigation directly when status is 'failed' (matches event consumer)
- Poller: use poll interval as Lambda error rate window so only errors since
  last tick trigger new investigations (prevents stale alerts re-firing)
- Poller/event consumer: add debug logs for alarm counts, Lambda counts,
  investigation start (with truncated session id) and completion with confidence
- Init wizard: add skip disclaimers to steps 2 and 4 (amber warning + monitoring.md link
  + "Go to dashboard anyway" confirmation) so users understand what they're skipping
- Init wizard: add back buttons to steps 3 and 4 so users can revise earlier answers
…alignment

- App.tsx: guard init skip only for logged-in non-admin users (null user
  was bypassing the wizard on empty DB)
- InitPage: fix Re-check button alignment in step 3 — drop flex-1,
  use justify-between so Back and Re-check sit at opposite ends
@AhmadHammad21
AhmadHammad21 merged commit ecd4c1b into main May 18, 2026
2 checks passed
@AhmadHammad21
AhmadHammad21 deleted the feat/event-monitoring-setup-wizard branch May 18, 2026 18:03
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