Repository navigation
Count every open incident in the dashboard's Incidents badge - #499
Merged
jbrooksuk merged 1 commit intoNov 2, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #496.
The "Incidents" badge in the dashboard sidebar read
Status::incidents()->unresolved, which is built on the guest scopeviewableBy(false). An open incident visible only to users, or hidden, didn't count, so the badge showed 0 in green while the "Open incidents" card and table on the same dashboard showed it.The badge now counts
Incident::query()->unresolved(), the same query as the Overview card's open incidents. The public status page still usesStatus::incidents().Tested: a Pest test in
IncidentResourceTestwith an open "Users" incident, an open hidden one and a fixed public one expects a red badge of 2; on main it reads 0. Full suite in a local PHP 8.5 container: the same 71 failures as on main (500s from tests that render pages, environment), everything else passes. Pint passes.