Repository navigation
Conversation
The Security hub lists the org's detections under Activity, with a switch that saves on toggle, edit and a confirmed delete. With none set up the page offers five ready-made ones. The editor is a form page in the shape of the SLO editor, with the same destination picker, and the audit log opens it prefilled from its platform, category and outcome filters. The audit log's label maps and access check move to the hub's kit so both pages share them.
Lab states for the list, the empty on-ramp, the member view, a failed load, and the editor new, from a template, on an existing detection and with a server error, plus a filtered audit log. Scene tests cover the three access states, what each row says, the on-ramp, create and edit against the API's answers, the toggle, the confirmed delete, the invalid error's message and the audit log's prefill link.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
Warning The review of |
🍁 Maple PR previewThe preview is ready:
Web-only preview ( Smoke test: passed Sign in with the PR preview form on the sign-in page and the preview access key ( Deployed from |
Fifth layer of the unified audit log, on top of #2532: the Detections page. An org admin can now create the alerts the previous layer made possible.
What it adds
/security/detections). Admins only, with the same three access states as the audit log: asking, allowed, and an admins-only notice.The page states once what the backend guarantees: every member can see a detection's name and that it fired; only org admins see the events it counted.
Screenshots
Audit log with filters applied. The "before" is this build with the control switched off, so its rail already shows the new entry.
Verified
bun run --cwd apps/web typecheck,ui:index:checkandui:patterns:checkpass.oxlint -c .oxlintrc.effect.jsonis clean on the changed files.Not verified: the page has only run against lab fixtures, not a signed-in app with a real API. The delete dialog and the open destination menu are covered by scene tests but have no screenshot.
Known rough edges, left as they are: on a phone the severity badge wraps under the condition, so rows are tall; a failed load still shows the "New detection" button.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.