Violations

Audience: Customer — this page documents the violations page and how to review them.

The violations page (/dashboard/violations) provides comprehensive analytics on rule violations detected in AI-generated code.


URL

/dashboard/violations

Access

Available to all plans. No feature gate.


Data Source

GET /api/v1/rules/violations?period={period}

Summary Cards

Five stat cards across the top:

Card Metric Color
Total Violations summary.totalViolations Red
Correction Rate summary.correctionRate (%) Green
Errors summary.errorCount Red
Warnings summary.warningCount Yellow
Info summary.infoCount Blue

Daily Violations Chart

A stacked bar chart showing violations per day:

  • Red segments = errors
  • Yellow segments = warnings
  • Blue segments = info-level violations

The chart pads missing days with zero counts to fill the full period (1, 7, or 30 days). Hover tooltip shows date, total count, and breakdown.


By Category Breakdown

Horizontal bar chart showing violations grouped by category:

Display Data
Category name category (e.g., coding_standard, security, performance)
Icon Category-specific (Code2, Database, Shield, Zap, FileCode)
Count Number of violations
Fix rate correctionRate percentage

Shows the top 6 categories. Bar width is relative to the highest count.


Top Violated Rules Table

Clickable list of the most frequently violated rules:

Column Description
Severity Color-coded badge with icon
Rule name Clickable — navigates to /dashboard/rules?search={ruleName}
Source template or custom
Category Rule category (underscores replaced with spaces)
Count Number of violations
Correction % Percentage that were subsequently fixed

Files with Most Violations

List of files with the highest violation counts:

Column Description
File name Decrypted if encryption key is active, otherwise truncated hash
Errors Number of error-severity violations
Warnings Number of warning-severity violations
Total Total violations in that file

Clicking a file opens the File Violations Modal showing all violations for that specific file.


Violations by Developer

Developer cards showing per-developer violation statistics. Each card includes:

Metric Description
Developer Decrypted git username or email (or hash fallback)
Total violations Count
Errors Error-severity count
Warnings Warning-severity count
Fix Rate Correction rate percentage
Est. Loss Estimated cost of unfixed violations

Recent Violations Table

A detailed table of the most recent violations with category filtering:

Column Description
Severity Badge with icon (error, warning, info)
Rule Rule name. AI Errors have a purple "AI Error" badge
Source template or custom
File File name (last path segment)
Language Programming language (if available)
Line Line number where violation was detected (if available)
Status Green "Fixed" or red "Unfixed"
Time Timestamp of the violation

Category Filter

CategoryPills component at the top of the table allows filtering recent violations by category. Categories are dynamically derived from the current data.

Row Click

Clicking a row opens the Violation Detail Modal with full information about that specific violation.


Modals

Violation Detail Modal

Shows complete details for a single violation:

  • Rule name, category, severity
  • File path (decrypted if possible)
  • Line number
  • Matched conditions
  • Whether it was corrected
  • Timestamp

File Violations Modal

Shows all violations for a specific file within the selected period. Includes a link to open the violation detail for any row.


Encryption Integration

The violations page integrates with the DecryptToggle system:

  • DecryptedValue — Decrypts encrypted developer names/emails
  • DecryptedFileName — Decrypts file path hashes, showing just the filename

When no encryption key is active, hashes are displayed as truncated hex strings.


See Also