Audit Log — interface pass
Settings → Audit Log. Real actor/subject data, an avatar column, and a consolidated single-row filter — replacing three stacked filter bars.
The Audit Log surface was functionally wired (Story-1164) but had not had a
design pass and was rendering placeholder text where backend data was
missing. This Story brings it to the design bar and consumes the new
backend fields (subjectLabel, actorImageUrl)
shipped by pramaan-functions Bug-1250 / Bug-1253.
1 · Render the real subject, kill "an item"
Before
Member rows read Sandeep Ghai DEACTIVATED the member an item — a hardcoded placeholder for the null subject label.
After
Rows render subjectLabel when present (… the member Ankit Keshri); when the backend sends null, the row falls back to the friendly subject kind (the member) — never "an item".
The "an item" literal is removed from the codebase (also the
snapshot filename fallback, now Unnamed file). Missing friendly
subject keys added: proceeding, firm,
firm_role (en + hi).
2 · Actor avatar photo, initials fallback
ActorBadge now renders <img src={actorImageUrl}>
for human actors when the event carries an avatar URL, falling back to the
round initials badge when it is null (agents, system, deleted users, or no
photo). Agent and system glyphs are unchanged. The URL is used as returned
each load — never cached or stored.
Requires AuditEventView.actorImageUrl, pulled in by syncing the
vendored OpenAPI mirror from pramaan-functions da8a78b and
regenerating src/gen (HR-22).
3 · One filter row, not three
Before — three stacked segmented bars
Humans Agents
All Settings Matter Firm + matter dropdown
All Lifecycle Content Records & Files Decisions Execution Access & Security
After — single toolbar
Humans | Agents All areas ▾ All categories ▾ All matters ▾ All members ▾
Consistent with every other list page (clients, matters). The 7-wide category bar collapses into a dropdown.
Rationale: the UX doctrine "less is more" and §7 ("cut chrome that steals
prime real estate"). The Humans/Agents toggle stays a high-contrast binary
toggle (two separate backend feeds — it routes between tabs) but moves into
the toolbar; the now-orphaned AuditTabs is deleted.
4 · Member (actor) filter
A fourth dropdown — All members — scopes the Humans feed to a single
acting member via the backend actor (user uuid) param. Gated to
the Humans tab only (agents are not firm members); the member fetch is
skipped on the Agents tab. Options come from useAppListMembers
(status: "all", so deactivated members with history are
selectable).
Files changed
| Area | Change |
|---|---|
audit-entry.tsx | render subjectLabel; pass actorImageUrl |
actor-badge.tsx | avatar <img> + initials fallback |
audit-filters.tsx | single toolbar; Area/Category/Matter/Member dropdowns |
audit-snapshot.tsx | filename fallback → "Unnamed file" |
use-audit-feed.ts | thread actor param |
audit/layout.tsx | drop AuditTabs (moved into toolbar) |
messages/{en,hi}.json | subject keys, dropdown labels, member filter, "Pramaan" title-case |
openapi/app-api.json + src/gen | mirror sync — actorImageUrl |
Verification
- Verified live against staging data: a fresh role change emitted
member.assignedwithsubjectLabel: "Ankit Keshri"and a Member→Partner snapshot; the row renders the name, avatar, and diff. - Pre-deploy rows (before Bug-1250) correctly fall back to "the member" — confirmed it is a data gap, not a UI bug.
pnpm tsc --noEmit,pnpm lint,pnpm buildgreen; en/hi key parity maintained.
Files changed
10 file(s), +184 / -117 lines
| Path | Role | + | - |
|---|---|---|---|
| messages/en.json | Config | +11 | -4 |
| messages/hi.json | Config | +11 | -4 |
| src/app/[locale]/(workspace)/settings/audit/layout.tsx | App route | +3 | -4 |
| src/components/settings/audit-log/actor-badge.tsx | Component | +17 | -4 |
| src/components/settings/audit-log/audit-entry.tsx | Component | +11 | -5 |
| src/components/settings/audit-log/audit-filters.tsx | Component | +126 | -60 |
| src/components/settings/audit-log/audit-log-view.tsx | Component | +2 | -1 |
| src/components/settings/audit-log/audit-snapshot.tsx | Component | +1 | -1 |
| src/components/settings/audit-log/audit-tabs.tsx | Component | +0 | -34 |
| src/components/settings/audit-log/use-audit-feed.ts | Component | +2 | -0 |