Files
goclaw/ui/web/src/api
978a0f255e Fix/skill violation display (#1304)
* feat(skills): display structured security violations in upload error

When skill upload fails due to security violations, show each violation
as a clear list with line number and reason in the error display.

Changes:
- Add ApiError.getViolations() method to extract violations from response
- Update HTTP upload client to capture violations in error details
- Add violations field to SkillEntry type
- Display violations as bulleted list in SkillSubtitle when present
- Add i18n keys for security violations display (en, vi, zh, ko)

New UI behavior: Instead of a generic "Upload failed" message, users
now see structured violation details:
  Security violations:
  - Line 5: SQL DROP TABLE
  - Line 12: curl pipe to shell

Backward compatible - falls back to generic error message if violations
array is absent from response.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(skills): return structured JSON violations array in upload error response

Replace flat string formatting with a structured violations array (line, reason)
so clients can display per-line security rule details instead of a generic error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Bruno Clermont <bruno.clermont@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 20:54:30 +07:00
..
2026-06-29 20:54:30 +07:00