Skip to content

Security log: filter by type from the Type column header - #346

Merged
fylorn merged 1 commit into
devfrom
security-log-type-filter
Oct 19, 2026
Merged

fylorn merged 1 commit into
devfrom
security-log-type-filter

Conversation

@fylorn

@fylorn fylorn commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

What

The security log can now be narrowed to one type, from the Type column header itself (no extra toolbar control):

  • Clicking the header opens a menu: all types, secrets & privacy, dangerous commands, content filter (radio items).
  • While a type is selected the header shows its name in the foreground colour, so a filtered table is obvious at a glance.
  • The log reads that type from core (guard on GET /security/events, already supported), so paging and the per-day counts are exact.
  • Export follows the filter.
  • An empty filtered result keeps the table and its header, with a "show all types" action in the body.
  • The page summary (hits and outcomes) still counts every type; jumping in from the overview resets the filter to all.
  • Switching to a type that has not been read yet shows the matching rows from the all-types page until the filtered read lands, so the header (and its focus) never disappears behind a skeleton.

Also adds DropdownMenuRadioGroup / DropdownMenuRadioItem to src/ui/dropdown-menu.tsx, styled like the checkbox item. The Type column is 112px (from 92) so the longest label plus the chevron fits at the Windows 14px body size.

Checks

  • pnpm typecheck, pnpm test (1216 tests; new case for the filtered export).
  • Checked in the mock preview: zh/en, each type, empty filtered state, reset, header width at 13px and 14px.

🤖 Generated with Claude Code

The Type column header opens a menu (all types, secrets & privacy,
dangerous commands, content filter). While a type is selected the header
shows its name, the log and export only include that type, and an empty
result keeps the table with a "show all types" action. The page summary
still counts every type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fylorn
fylorn merged commit c8524e0 into dev Oct 19, 2026
6 checks passed
@fylorn
fylorn deleted the security-log-type-filter branch October 19, 2026 03:13
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant