add false-positive filter and bulk-clear for findings

Active Feedback Rules gets a status filter, and Field Baseline
Deviations gets multi-select with a bulk apply bar. Bulk scope is
restricted to exact-value/field only, so a batch action can never
create a broad rule that would suppress a genuinely new deviation.
This commit is contained in:
larssand
2026-09-08 08:57:54 +02:00
parent 67609e415f
commit db87f65d97
4 changed files with 138 additions and 4 deletions

View File

@@ -81,11 +81,35 @@ class DashboardTests(unittest.TestCase):
self.assertIn("/api/feedback/revoke", source)
self.assertIn(".revoke(", source)
def test_dashboard_exposes_feedback_bulk_endpoint(self):
source = inspect.getsource(dashboard)
self.assertIn("/api/feedback/bulk", source)
self.assertIn(".add_many(", source)
def test_dashboard_has_bulk_review_bar(self):
self.assertIn('id="bulkReviewBar"', HTML)
self.assertIn('id="selectAllDeviations"', HTML)
self.assertIn("deviation-select", HTML)
self.assertIn('id="bulkReviewSubmit"', HTML)
def test_bulk_review_scope_never_offers_broad_scopes(self):
start = HTML.index('id="bulkReviewScope"')
end = HTML.index('</select>', start)
bulk_scope_html = HTML[start:end]
self.assertIn('value="value"', bulk_scope_html)
self.assertIn('value="field"', bulk_scope_html)
self.assertNotIn('value="entity"', bulk_scope_html)
self.assertNotIn('value="stream"', bulk_scope_html)
def test_dashboard_has_active_feedback_rules_panel(self):
self.assertIn('id="feedbackRules"', HTML)
self.assertIn("revoke-feedback-rule", HTML)
self.assertIn('id="feedbackRuleSummary"', HTML)
def test_dashboard_has_feedback_rule_status_filter(self):
self.assertIn('id="feedbackRuleStatusFilter"', HTML)
self.assertIn('value="false_positive">False positive', HTML)
def test_dashboard_has_scoped_review_form(self):
self.assertIn('id="reviewScope"', HTML)
self.assertIn('value="entity"', HTML)