feat: implement session timeout, maintenance scheduler, notification …#564
Merged
Mosas2000 merged 2 commits intoJun 1, 2026
Conversation
…templates, and escalation engine - Session Timeout Modal (StellaBridge#439): * Countdown timer with visual feedback * Extend session action * Auto logout fallback * Accessible modal with ARIA labels * Mobile responsive design * Low-friction copy - Maintenance Window Scheduler (StellaBridge#443): * Window creation with start/end times * Scope control (global, bridge, asset) * Alert suppression during maintenance * Audit trail for all changes * Timezone handling * Admin APIs for management - Notification Template Service (StellaBridge#442): * Template CRUD operations * Preview support with variable substitution * Variable validation * Channel variants (email, webhook, in-app) * Template versioning * Approval flow ready - Incident Escalation Engine (StellaBridge#448): * Escalation timers based on severity * Severity thresholds configuration * Route changes and notifications * Acknowledgement handling * Complete audit history * Retry safety mechanisms All features include database migrations, API endpoints, and comprehensive error handling. Closes StellaBridge#439 Closes StellaBridge#443 Closes StellaBridge#442 Closes StellaBridge#448
|
@Georgechisom Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
…solved conflicts in routes/index.ts
Contributor
Author
|
confict fixed, kindly merge @Mosas2000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements four critical operational features to enhance the Stellar Bridge Watch platform's reliability, user experience, and incident management capabilities.
1. Session Timeout Modal (#439)
Warn users before logout with countdown timer and session extension capability.
SessionTimeoutModal— React component for session timeout warningsFeatures:
User Experience:
2. Maintenance Window Scheduler (#443)
Schedule maintenance windows and suppress non-critical alerts during approved work periods.
MaintenanceService— Manages maintenance windowscreateWindow(window)— Creates new maintenance windowgetActiveWindows()— Retrieves currently active windowsgetUpcomingWindows(hours)— Gets windows starting soonisInMaintenanceWindow(scope, identifier)— Checks if in maintenanceshouldSuppressAlert(alert)— Determines alert suppressionupdateWindow(id, updates)— Updates existing windowdeleteWindow(id)— Removes maintenance windowgetWindowHistory(limit)— Retrieves historical windowsFeatures:
Database Tables:
maintenance_windows— Stores maintenance schedulesAPI Endpoints:
POST /api/v1/maintenance— Create maintenance windowGET /api/v1/maintenance— List all windowsGET /api/v1/maintenance/active— Get active windowsGET /api/v1/maintenance/upcoming— Get upcoming windowsGET /api/v1/maintenance/:id— Get specific windowPUT /api/v1/maintenance/:id— Update windowDELETE /api/v1/maintenance/:id— Delete windowGET /api/v1/maintenance/history— Get window historyPOST /api/v1/maintenance/:id/cancel— Cancel window3. Notification Template Service (#442)
Manage reusable notification templates for email, webhook, and in-app delivery.
NotificationTemplateService— Manages notification templatescreateTemplate(template)— Creates new templategetTemplate(id)— Retrieves template by IDgetAllTemplates(channel)— Lists templates by channelupdateTemplate(id, updates)— Updates existing templatedeleteTemplate(id)— Removes templatepreviewTemplate(id, variables)— Previews with sample datavalidateVariables(template, variables)— Validates variable usagerenderTemplate(id, variables)— Renders final contentgetTemplateVersions(id)— Retrieves version historyFeatures:
{{variable_name}}{{variable_name:default}}Database Tables:
notification_templates— Stores templatesnotification_template_versions— Tracks changesAPI Endpoints:
POST /api/v1/notification-templates— Create templateGET /api/v1/notification-templates— List templatesGET /api/v1/notification-templates/:id— Get templatePUT /api/v1/notification-templates/:id— Update templateDELETE /api/v1/notification-templates/:id— Delete templatePOST /api/v1/notification-templates/:id/preview— Preview templateGET /api/v1/notification-templates/:id/versions— Get versionsPOST /api/v1/notification-templates/:id/approve— Approve templateTemplate Example:
4. Incident Escalation Engine (#448)
Automatically escalate unresolved incidents based on severity, duration, and routing rules.
EscalationService— Manages incident escalationcreateEscalationRule(rule)— Creates escalation rulecheckEscalations()— Checks all incidents for escalationescalateIncident(incidentId)— Manually escalates incidentacknowledgeIncident(incidentId, acknowledgedBy)— Acknowledges incidentresolveIncident(incidentId, resolvedBy)— Resolves incidentgetEscalationHistory(incidentId)— Gets escalation audit trailupdateEscalationRule(id, updates)— Updates rulegetActiveEscalations()— Lists active escalationsFeatures:
Database Tables:
escalation_rules— Escalation policiesescalation_history— Audit trailAPI Endpoints:
POST /api/v1/incidents/:id/escalate— Escalate incidentPOST /api/v1/incidents/:id/acknowledge— Acknowledge incidentPOST /api/v1/incidents/:id/resolve— Resolve incidentGET /api/v1/incidents/:id/escalations— Get escalation historyPOST /api/v1/escalation-rules— Create escalation ruleGET /api/v1/escalation-rules— List rulesPUT /api/v1/escalation-rules/:id— Update ruleDELETE /api/v1/escalation-rules/:id— Delete ruleEscalation Flow:
Database Migrations
Migration 011: Maintenance Windows
maintenance_windowstableMigration 012: Notification Templates
notification_templatestablenotification_template_versionstableMigration 013: Incident Escalation
escalation_rulestableescalation_historytableAPI Documentation
Maintenance Windows
Notification Templates
Incident Escalation
Testing
All features include:
Test Coverage:
Security Considerations
Performance Considerations
Maintenance Windows:
Notification Templates:
Incident Escalation:
Session Timeout:
Future Enhancements
Maintenance Windows:
Notification Templates:
Incident Escalation:
Session Timeout:
Breaking Changes
None. All changes are additive and backward compatible.
Migration Guide
# Via API or admin UI POST /api/v1/escalation-rulesCloses
Closes #439
Closes #443
Closes #442
Closes #448
Checklist