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.
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 showsthe 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_VALUESvocabulary. Selecting a type narrows the actiondropdown 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/auditquery still filters onactionalone (that's all thebackend supports and all it needs to; the type filter's only job is
shrinking the option list the user picks from).
Notes
"Entity.Verb"string prefix —Account.SetLogo/RemoveLogo/SetBanner/RemoveBannerare prefixedAccountbut recorded againstFarmLogo(a shared row, per
FarmLogo.cs). The mapping must be read off eachaudit.WriteAsync(...)call site.4-gate write-up.