Skip to content

feat: Add SLA Risk Panel to Home page#199

Merged
BenGWeeks merged 5 commits intomainfrom
claude/feature-issue-146-arcMA
Feb 11, 2026
Merged

feat: Add SLA Risk Panel to Home page#199
BenGWeeks merged 5 commits intomainfrom
claude/feature-issue-146-arcMA

Conversation

@BenGWeeks
Copy link
Contributor

@BenGWeeks BenGWeeks commented Jan 25, 2026

Implement a dashboard panel displaying tickets at risk of breaching Service Level Agreements, providing support agents with immediate visibility into high-priority items requiring attention.

  • Add SLA-related types (SLARiskStatus, SLAConfig, TicketSLAStatus)
  • Create SLA calculation utilities with configurable targets by priority
  • Add /api/devops/sla-status endpoint for fetching SLA data
  • Create SLARiskPanel component with traffic light cards showing breached/at-risk/on-track ticket counts
  • Display at-risk tickets list with time remaining/overdue indicators
  • Add CSS styling for SLA status indicators with visual highlighting

Default SLA targets:

  • Urgent: 1hr response / 4hr resolution
  • High: 4hr response / 8hr resolution
  • Normal: 8hr response / 24hr resolution
  • Low: 24hr response / 72hr resolution
image

Closes #146

Implement a dashboard panel displaying tickets at risk of breaching
Service Level Agreements, providing support agents with immediate
visibility into high-priority items requiring attention.

- Add SLA-related types (SLARiskStatus, SLAConfig, TicketSLAStatus)
- Create SLA calculation utilities with configurable targets by priority
- Add /api/devops/sla-status endpoint for fetching SLA data
- Create SLARiskPanel component with traffic light cards showing
  breached/at-risk/on-track ticket counts
- Display at-risk tickets list with time remaining/overdue indicators
- Add CSS styling for SLA status indicators with visual highlighting

Default SLA targets:
- Urgent: 1hr response / 4hr resolution
- High: 4hr response / 8hr resolution
- Normal: 8hr response / 24hr resolution
- Low: 24hr response / 72hr resolution

Closes #146
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces SLA tracking into the app, adding backend SLA computation and a frontend dashboard panel to surface tickets at risk of breaching SLAs. It wires together types, utilities, an API endpoint, UI components, and styling to deliver the “Tickets at Risk” panel on the Home page.

Changes:

  • Add SLA-related domain types (SLARiskStatus, SLAConfig, TicketSLAStatus, SLAStatusResponse) to the shared type definitions.
  • Implement SLA utilities (src/lib/sla.ts) for computing response/resolution deadlines, risk status, urgency sorting, and human-readable time formatting, plus a /api/devops/sla-status route that serves SLA summaries and at-risk tickets.
  • Add an SLARiskPanel dashboard component, integrate it into the Home page layout, and introduce corresponding CSS for traffic-light summary cards and ticket indicators.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/types/index.ts Defines SLA-related types and shapes for SLA config, per-ticket SLA status, and the API response to support SLA calculations and UI rendering.
src/lib/sla.ts Provides core SLA logic (config resolution, deadline calculation, risk classification, urgency sorting, and relative time formatting) used by the API and UI.
src/components/dashboard/index.ts Re-exports SLARiskPanel to make the dashboard component available via a concise import path.
src/components/dashboard/SLARiskPanel.tsx Implements the client-side SLA Risk panel UI, including loading/error states, traffic-light summary cards, and the at-risk/breached ticket list with relative time indicators.
src/app/page.tsx Integrates the SLARiskPanel into the Home page grid layout alongside existing quick actions, ensuring the SLA panel appears for authenticated users.
src/app/globals.css Adds visual styles for SLA cards and indicator dots, including pulsing breached indicators and color-coded backgrounds aligned with existing priority/status tokens.
src/app/api/devops/sla-status/route.ts Implements the SLA status API route that reads tickets from Azure DevOps, computes SLA statuses, summarizes them, and returns only breached/at-risk tickets for the panel.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@BenGWeeks
Copy link
Contributor Author

Hi @akash2017sky can you:

  • Resolve conflicts
  • Respond to Copilot items
  • Add screenshot

NB This was a draft PR created by Claude app.

@BenGWeeks BenGWeeks marked this pull request as draft February 9, 2026 10:05
@EdiWeeks
Copy link
Collaborator

I will resolve conflicts

EdiWeeks and others added 4 commits February 11, 2026 16:50
Combine SLA Risk Panel additions (PR) with Zap/Kanban/Calendar styles,
ProjectList/OrganizationProvider imports, and new types from main.
Fix pre-existing TS errors where ticket.priority could be undefined.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Value is clamped to 0-100 by Math.max(0, ...), not negative when breached.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@EdiWeeks EdiWeeks marked this pull request as ready for review February 11, 2026 17:14
@EdiWeeks
Copy link
Collaborator

Copilot items are fixed
Screenshot added
Merge conflicts resolved
@BenGWeeks please merge

@BenGWeeks BenGWeeks merged commit eeda05f into main Feb 11, 2026
4 checks passed
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] Add SLA Risk Panel to Home page

4 participants