Files
git.stella-ops.org/docs/features/unchecked/web/ai-autofix-button-with-remediation-plan-preview-and-pr-tracker.md

2.7 KiB

AI Autofix Button with Remediation Plan Preview and PR Tracker

Module

Web

Status

IMPLEMENTED

Description

Three-component AI remediation workflow: (1) Autofix button that triggers AI-assisted remediation planning per finding, (2) Remediation plan preview showing 3-line summary, step-by-step instructions with code diffs, impact assessment, and Approve/Create PR actions, (3) PR tracker monitoring remediation pull requests with CI check statuses, review status, and merge/close actions across multi-SCM providers.

Implementation Details

  • Feature directory: src/Web/StellaOps.Web/src/app/features/advisory-ai/
  • Components:
    • autofix-button (src/Web/StellaOps.Web/src/app/features/advisory-ai/autofix-button.component.ts)
    • action-button (src/Web/StellaOps.Web/src/app/features/advisory-ai/chat/action-button.component.ts)
    • chat-message (src/Web/StellaOps.Web/src/app/features/advisory-ai/chat/chat-message.component.ts)
    • chat (src/Web/StellaOps.Web/src/app/features/advisory-ai/chat/chat.component.ts)
    • object-link-chip (src/Web/StellaOps.Web/src/app/features/advisory-ai/chat/object-link-chip.component.ts)
    • evidence-drilldown (src/Web/StellaOps.Web/src/app/features/advisory-ai/evidence-drilldown.component.ts)
    • explain-button (src/Web/StellaOps.Web/src/app/features/advisory-ai/explain-button.component.ts)
    • explanation-panel (src/Web/StellaOps.Web/src/app/features/advisory-ai/explanation-panel.component.ts)
    • plain-language-toggle (src/Web/StellaOps.Web/src/app/features/advisory-ai/plain-language-toggle.component.ts)
    • pr-tracker (src/Web/StellaOps.Web/src/app/features/advisory-ai/pr-tracker.component.ts)
    • remediation-plan-preview (src/Web/StellaOps.Web/src/app/features/advisory-ai/remediation-plan-preview.component.ts)
  • Services:
    • chat (src/Web/StellaOps.Web/src/app/features/advisory-ai/chat/chat.service.ts)
  • Models:
    • src/Web/StellaOps.Web/src/app/features/advisory-ai/chat/chat.models.ts
  • Source: Feature matrix scan

E2E Test Plan

  • Setup:
    • Log in with a user that has appropriate permissions
    • Navigate to /triage/artifacts/:artifactId
    • Ensure test data exists (scanned artifacts, SBOM data, or seed data as needed)
  • Core verification:
    • Verify the component renders correctly with sample data
    • Verify interactive elements respond to user input
    • Verify data is fetched and displayed from the correct API endpoints
  • Edge cases:
    • Verify graceful handling when backend API is unavailable (error state)
    • Verify responsive layout at different viewport sizes
    • Verify accessibility (keyboard navigation, screen reader labels, ARIA attributes)