-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add option to exclude groups from database reports #12879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Add option to exclude groups from database reports #12879
Conversation
When I tried adding a checkbox, the label for it was too big and it pushed everything to the right. Adding a vertical layout, moving the grid into it, and putting the checkbox into the horizontal layout fixes this issue.
This isn't part of the kdbx format so we can't write it there directly.
Adds utility functions to create groups and entries for them. Add test to make sure the right amount of entries show up in the database report for password health. Add signal when password health calculation is done so the test harness can wait on it; otherwise the test finishes too soon and doesn't get the right result from the application.
Adds 2 groups, excludes one and makes sure it doesn't show up in the health check.
Entries in the group get marked as excluded. Entry that was selected is marked for inclusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds the ability to exclude entire groups from database reports, complementing the existing entry-level exclusion feature. The implementation stores group exclusion status in CustomData using the same "KnownBad" key as legacy entry exclusions, maintains consistency across all report widgets (Healthcheck, HIBP, and Browser Statistics), and includes comprehensive GUI tests.
Key Changes
- Added group-level exclusion API in Group class with methods to set/get exclusion status and bulk-mark entries
- Updated all three report widgets to handle group exclusions with consistent UI labeling and context menu options
- Restructured EditGroupWidgetMain.ui from a grid layout to a vertical container with a grid layout to accommodate the new exclusion checkbox
- Added database statistics tracking for excluded groups count
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 20 comments.
Show a summary per file
| File | Description |
|---|---|
| src/core/Group.h/cpp | Added excludeFromReports(), setExcludeFromReports(), and markAllEntriesExcludedFromReports() methods |
| src/core/DatabaseStats.h/cpp | Added excludedGroups counter and logic to track group exclusions |
| src/gui/group/EditGroupWidgetMain.ui | Restructured layout to add excludeReportsCheckBox for group exclusion |
| src/gui/group/EditGroupWidget.cpp | Wired up the new checkbox to load/save group exclusion state |
| src/gui/reports/ReportsWidgetHealthcheck.h/cpp | Added tablePopulated signal and context menu options for group exclusion |
| src/gui/reports/ReportsWidgetHibp.cpp | Updated to handle group exclusions with proper UI labels and context menu |
| src/gui/reports/ReportsWidgetBrowserStatistics.cpp | Updated to handle group exclusions with proper UI labels and context menu |
| src/gui/reports/ReportsWidgetStatistics.cpp | Added row displaying count of excluded groups |
| tests/gui/TestGui.h/cpp | Added comprehensive GUI tests for group exclusion workflow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 17 comments.
|
You dont need to redo the layout you can place the checkbox in the grid |
This reverts commit e23aee1.
|
@droidmonkey if I put it in the grid layout it pushes everything to the right. Is that OK? I personally think it looks better if it's below the grid but I can leave it as a grid layout. Here are two screenshots (one with the checkbox added and one with the "Expired" checkbox aligned to the right.
|
|
Put it in the second column |
Had to delay initialization of these classes in `ReportsWidgetBase` because they caused crashes in the constructor initialization list. This is because the base class hasn't been initialized enough yet.
|
@droidmonkey I changed the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 22 out of 22 changed files in this pull request and generated 6 comments.



Summary
Adds an option to exclude groups from showing up in database reports. I refactored the reports code because the menu code (and other parts of the report widget classes) was duplicated across multiple files and was getting pretty complicated. Now there's a base class that implements most of the functionality shared across the 4 classes.
I added the number of excluded groups to the database stats so users know how many groups are excluded. Groups that are excluded show their entries with
(Group Excluded)when excluded entries are shown. This helps differentiate them from entries that are excluded.Group exclusion is stored using
CustomData. The kdbx file format doesn't seem to support group exclusions (and entries previously used to useCustomDatatoo), so I put it inCustomData.The context menu in the database reports displays an option to exclude groups now too. If the user clicks them, the group is excluded. If a user wants to include an entry from an excluded group, a popup appears, and they are asked if they'd like to include all entries from that group. If they choose
No, the group exclusion is removed and all the group entries except for the selected ones are marked as excluded.Fixes #12241.
Screenshots
Testing strategy
I added GUI tests in
TestGui.cppto test the healthcheck report and group exclusions and entry inclusion. It walks through the workflow a user would have. The other pages were tested manually. I had to add a newsignaltoReportsWidgetHealthcheckin order for the test to be able to wait on the table to be populated; otherwise the test executes too fast and has the incorrect result.Type of change