You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bd70fef
Browse filesBrowse the repository at this point in the historyBrowse files
Protect Dashboard: Add a threat report for links that name threats (#53693)
* Protect Dashboard: Add a threat report for links that name threats
* Protect Dashboard: Redirect top-level threats links into the dashboard route
* Protect Dashboard: Test that threat ids in the URL show the report
* Protect Dashboard: Drop the threat report's summary notice
* Protect Dashboard: Show a notice while the threat report checks statuses
* Protect Dashboard: Use the red alert shield on the report's Needs attention card
* Protect Dashboard: Show the safe shield above a threat report with nothing to fix
* Protect Dashboard: Tighten the threat report's status checks
* A failed Scan report shows the alert's threats as "Status unavailable" with an error notice, instead of "No longer detected" under the safe shield.
* A site without Scan sees "No known vulnerabilities found" rather than "Your site is safe right now", matching the Scan tab.
* A history refresh requested while a fetch is running now fetches again after it, so a fix that lands mid-request still shows as Fixed.
* Threats history has ignored stay in Ignored after the reader ignores another one before history loads.
* The post-fix reload starts before paint, so a fixed threat no longer flashes as "No longer detected".
* The redirect drops ids that aren't all digits, as the client does, instead of merging what's left of them.
* Protect Dashboard: Hold the threat report's all-clear until Scan has a report
* Before Scan's first report, the alert's threats show as "Status unavailable" with a notice to come back once it finishes, instead of "Your site is safe right now".
* When other threats remain on the site, the report drops the green shield and says "Other threats on your site still need attention", which also fits sites without Scan.
* "See them on the Overview" is a link that leaves the report.
* Protect Dashboard: Read Scan fresh before the threat report calls a threat gone
* The report asks WordPress.com for Scan's report when it opens, and keeps unmatched ids as "Checking" until it answers. The page's cached copy can predate the alert, which made a just-found threat read as "No longer detected" under "Your site is safe right now".
* A history load adds the threats history ignored to the client's ignored list instead of skipping it, so ignoring one threat before history loads no longer hides the others from the Ignored group or the inspector.
* The history refetch clears its in-flight request in the same callback that checks for a queued refresh.
* Stage tells the report whether the plan has Scan history, from the same check the History tab uses.
* The Scan card and the report share one fetch for Scan's report.
* Prefix the package changelog entry.
* Protect Dashboard: Wait for Scan's fresh report before the threat report's all-clear and actions
* The safe shield waits for the fresh read, so ids already in Fixed or Ignored no longer get an all-clear drawn from the page's cached report.
* Fix, ignore and unignore wait for the fresh read too, so its older response can't undo an edit made before it landed.
* A rejected history request clears the in-flight request instead of blocking later loads.
* Test the first-load ignored list, and reset the history store between tests.
* Protect Dashboard: Keep the reader's threat edits when an older Scan read lands
Replaces the button gating from the previous commit, which left gaps (Delete, Undo, the inspector during scan polls) and made the inspector's footer flicker.
* The scan store logs the reader's edits (ignore, unignore, delete, a finished fix). A read's answer is applied, then the edits made since it started are replayed, so an older read never undoes one and fresh server data is still kept.
* Reads of Scan's report, including a fix's final status, apply newest-started first; an older answer that lands later is dropped. A failed read shows its error but doesn't outrank a good answer.
* The ignored-list load merges with ignores made while it was in flight.
* Fix, Ignore and Unignore go back to depending on the plan alone; the threat report still waits for the fresh read before its all-clear.
* Drop the unreachable catch on the history request.
---------
Co-authored-by: Brandon Kraft <public@brandonkraft.com>
Protect dashboard: Add a threat report page that shows the threats a link names, grouped into ones that need attention, fixed, ignored and no longer detected.
0 commit comments