feat: add fix confidence indication #198
Conversation
|
🎉 Thank you @tejashwanii for submitting a Pull Request! We're excited to review your contribution. Before Review✅ Ensure all CI checks pass ⚡ Want faster reviews and contributor support? Join our Discord community: 🔗 https://discord.gg/FcXuyw2Rs Maintainers and mentors are active there and can help resolve blockers quickly. Happy Contributing! 🚀 |
|
Correct PR TemplatePlease copy and paste the raw template below into your PR description and fill it out: > **Before opening:** make sure there is an issue tracking this work, and link it below. PRs without a linked issue may be closed without review.
## Linked issue
Closes #
## What this PR does
## Type of change
- [ ] Bug fix
- [ ] New feature
- [ ] ML model / training pipeline
- [ ] Refactor (no behaviour change)
- [ ] Documentation
- [ ] Tests only
## ML tier (if applicable)
- [ ] Tier 1 — Triage
- [ ] Tier 2 — Predictive
- [ ] Tier 3 — Autonomous
- [ ] Not ML-related
## Stack affected
- [ ] Backend
- [ ] Frontend
- [ ] Both
---
## Changes
### Backend
-
### Frontend
-
### New dependencies
-
### Database / schema changes
-
---
## Testing
**How did you test this?**
**Checklist**
- [ ] Tested locally end-to-end (upload ZIP or GitHub URL → scan → findings returned correctly)
- [ ] New ML model falls back gracefully when model file is absent
- [ ] No new `console.error` or unhandled Python exceptions introduced
- [ ] Added or updated tests where applicable
- [ ] `requirements.txt` / `package.json` updated if new dependencies added
- [ ] New model files (`.pkl`, `.pt`, etc.) are gitignored, not committed
---
## Anything reviewers should focus on
## Screenshots (if UI changed)
|
|
@tejashwanii , Do Fix Template issue then only it will go under mentor review! |
Linked issue
Closes #182
What this PR does
Surfaces fix confidence scores in the UI so users know which fixes to apply first. Adds a reusable confidence indicator component that displays:
Type of change
ML tier (if applicable)
Stack affected
Changes
Backend
fix_confidence: Optional[float] = Nonefield toFixmodel inbackend/app/models.pyfix_confidencevalues inbackend/app/remediation/engine.py:Frontend
FixConfidencecomponent infrontend/src/app/components/fix-confidence.tsx:confidence(number | null | undefined)Fixpage (frontend/src/app/pages/fix.tsx):FixConfidencecomponentfix_confidencevalues to all 4 demo fixes (covering all color states)New dependencies
Database / schema changes
Testing
How did you test this?
npm run build→ no errorsChecklist
console.erroror unhandled Python exceptions introducedrequirements.txt/package.jsonupdated if new dependencies added (none added)Anything reviewers should focus on
FixConfidencecomponent is reusable and can be displayed in other parts of the UI (e.g., Findings detail view) by callingfix()API on-demandfix_confidencefor all proposed fixes; production should replace demo heuristics with real model outputsScreenshots (if UI changed)
Proposed Fixes page with confidence indicators:
Each row shows the confidence bar to the right of the action buttons. Hovering over the bar displays the tooltip.