Skip to content

feat: safety ratings, filter chips, hide system toggle#535

Merged
laurentiu021 merged 2 commits into
mainfrom
feat/safe-to-disable-filters
May 26, 2026
Merged

feat: safety ratings, filter chips, hide system toggle#535
laurentiu021 merged 2 commits into
mainfrom
feat/safe-to-disable-filters

Conversation

@laurentiu021

@laurentiu021 laurentiu021 commented May 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Safety ratings (Safe/Caution/Critical) on Services and Windows Features
  • Curated SafetyDatabase with 50+ services and 20+ features researched
  • Filter chips on Services toolbar (replaces ComboBox)
  • Safety badge column with colored dot + text + tooltip description
  • "Hide system" toggle on Startup Manager toolbar
  • 3 new ValueConverters for SafetyLevel rendering
  • 3 new FilterChip styles (green/amber/red pills)

Test plan

  • Services tab: safety badges visible on each row
  • Services tab: filter chips work (Safe/Caution/Critical/All)
  • Services tab: tooltip shows description on badge hover
  • Windows Features: safety badge column visible
  • Startup Manager: "Hide system" toggle filters Microsoft entries
  • Build + tests pass

Summary by CodeRabbit

  • New Features

    • Added safety ratings and indicators for Services and Windows Features using a curated safety database.
    • Introduced filter chips to filter by safety level (Safe, Caution, Critical).
    • Added "Hide system entries" toggle in Startup Manager.
  • Style

    • Enhanced UI with new filter chip styling for safety level selection.

Review Change Stack

- Add SafetyLevel enum (Safe/Caution/Critical) on ServiceEntry and WindowsFeature
- Add SafetyDatabase with curated safety data for 50+ services and 20+ features
- Add safety badge column on Services and Windows Features DataGrids
- Add filter chips (Safe/Caution/Critical/All) on Services toolbar
- Add SafetyLevel converters (brush, background, text) registered in App.xaml
- Add FilterChip styles (green, amber, red) in App.xaml
- Add "Hide system" toggle on Startup Manager toolbar
@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Introduces a safety classification system for Windows services and optional features using a curated database, SafetyLevel enum, value converters, model extensions, and updated viewmodel filtering logic. Adds filter chip UI components and Safety display columns to Services and Windows Features views. Updates tests and changelog accordingly.

Changes

Safety Ratings System

Layer / File(s) Summary
SafetyLevel Enum and UI Value Converters
SysManager/SysManager/Models/SafetyLevel.cs, SysManager/SysManager/Helpers/ValueConverters.cs, SysManager/SysManager/App.xaml
SafetyLevel enum (Safe, Caution, Critical) and three WPF value converters (brush, background, text) render safety levels with frozen color instances. Converter resources are registered in App.xaml.
Safety Database and Model Enrichment
SysManager/SysManager/Services/SafetyDatabase.cs, SysManager/SysManager/Models/ServiceEntry.cs, SysManager/SysManager/Models/WindowsFeature.cs, SysManager/SysManager/Services/ServiceManagerService.cs, SysManager/SysManager/Services/WindowsFeaturesService.cs
SafetyDatabase static class provides case-insensitive lookup via GetServiceSafety() and GetFeatureSafety(), backed by curated dictionaries. ServiceEntry and WindowsFeature models gain SafetyLevel (defaults: Critical, Caution) and SafetyDescription properties. ServiceManagerService and WindowsFeaturesService enrich enumerated items with safety metadata during load.
ServicesViewModel Safety Filtering and Counts
SysManager/SysManager/ViewModels/ServicesViewModel.cs
Adds SafeCount, CautionCount, CriticalCount observable properties. Updates FilterOptions to ["Safe", "Caution", "Critical"]. ApplyFilter now matches SelectedFilter against ServiceEntry.SafetyLevel and recalculates safety counts from _allServices.
Filter Chip Styles
SysManager/SysManager/App.xaml
Defines FilterChip base RadioButton style with custom template and visual triggers for checked/mouseover states. FilterChipCaution and FilterChipCritical variants override colors and ellipse dot fills for visual indication.
View Implementations for Safety Display
SysManager/SysManager/Views/ServicesView.xaml, SysManager/SysManager/Views/WindowsFeaturesView.xaml, SysManager/SysManager/Views/StartupView.xaml
ServicesView replaces combo-box filter with text box plus four RadioButton chips (Safe/Caution/Critical/All) and replaces "Rec." column with new "Safety" template column (colored border, dot, text, tooltip). WindowsFeaturesView adds Safety column with same styling. StartupView adds "Hide system" ToggleButton in toolbar.
Test Updates and Changelog
SysManager/SysManager.Tests/ServicesViewModelTests.cs, CHANGELOG.md
Test fixtures now include SafetyLevel on ServiceEntry. Constructor_FilterOptions_ContainsExpected asserts ["Safe", "Caution", "Critical"]. ApplyFilter tests validate filtering by SafetyLevel and result counts. Changelog documents 1.10.0 release with new safety ratings and filter chip features.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • laurentiu021/SystemManager#288: Directly modifies WindowsFeature model and WindowsFeaturesService.ParseFeatureList to extend feature parsing with new safety-level metadata.

  • laurentiu021/SystemManager#439: Updates ServicesViewModelTests.cs to revise ApplyFilter/FilterOptions expectations from recommendation-based "Safe to disable"/"Advanced" to new SafetyLevel ("Safe/Caution/Critical") filtering semantics.

  • laurentiu021/SystemManager#270: Implements HideWindowsEntries filtering in StartupViewModel that directly ties to the "Hide Windows/Microsoft system entries" Startup toggle added in this PR.

Poem

🐰 A safety mosaic takes form,
Three levels bloom—Safe, Caution, Critical's norm,
Chips glow with data, the database knows,
And Services dance where the safety wind blows! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 21.43% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the three main changes: safety ratings system, filter chips UI component, and system entry hide toggle.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/safe-to-disable-filters

Warning

Review ran into problems

🔥 Problems

Stopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a @coderabbit review after the pipeline has finished.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@laurentiu021
laurentiu021 merged commit 966d3de into main May 26, 2026
4 of 5 checks passed
@laurentiu021
laurentiu021 deleted the feat/safe-to-disable-filters branch May 26, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant