Skip to content

Audit page: cascading record-type filter to narrow the action dropdown #520

Closed

Description

@mforce

Problem

The Audit page's action filter is a single flat dropdown of ~48 actions
(every value in AUDIT_ACTION_VALUES) — screenshot from the live page shows
the full alphabetical/insertion-order list, which is hard to scan for
someone who knows what kind of record they're looking for (a flock, a sales
order, a user) but not the exact verb.

Proposal

Add a second, prior dropdown — "Record type" — built from the existing
ENTITY_TYPE_VALUES vocabulary. Selecting a type narrows the action
dropdown to only the actions actually recorded against that entity type.
Leaving it on "All types" keeps today's full list.

This is a pure client-side narrowing of an existing filter — the
/api/v1/audit query still filters on action alone (that's all the
backend supports and all it needs to; the type filter's only job is
shrinking the option list the user picks from).

Notes

  • The action→entity-type mapping is NOT derivable from the action's own
    "Entity.Verb" string prefix — Account.SetLogo/RemoveLogo/SetBanner/
    RemoveBanner are prefixed Account but recorded against FarmLogo
    (a shared row, per FarmLogo.cs). The mapping must be read off each
    audit.WriteAsync(...) call site.
  • Owner-suggested design (approach + both dropdown levels) — see PR for the
    4-gate write-up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions