Audit row
The query audit log as a dense, expandable table.
<mm-audit-log style="--mm-audit-max-height: 70vh">
<mm-audit-row time="2026-10-27T09:42:11Z" actor="support-triage-agent" actor-kind="agent"
service-account="svc-support" client="mcp" source="postgres-shop" provider="postgresql"
query="SELECT c.email, c.phone, o.total_gbp FROM orders_daily o JOIN customers_dim c USING (customer_id)"
outcome="denied" reason="Denied because svc-support has no grant on shop.public.customers."
duration="38" tables="mrn://postgresql/table/shop.public.orders_daily,mrn://postgresql/table/shop.public.customers"></mm-audit-row>
</mm-audit-log>
Guidance
The query audit log records every query run through Marmot: who ran it (a person, or an agent and
the service account it runs as), from which client, against which source, what it asked, how many
rows came back and whether it was allowed. Rows are 36px and dense; the header band is sticky
inside the log's scroll area (set --mm-audit-max-height for long views).
It is an ARIA table, not a grid: the log is read-only data, so screen readers keep their table
commands (moving by row and column, hearing headers), and the only control per record is a
disclosure button. A grid would force cell-by-cell arrow keys onto people who only want to move
between records and open one. Each mm-audit-row is a row group holding its row and, when
expanded, a full-width detail row, like a tbody per record. Columns are shared through
--mm-audit-columns.
Keyboard: the log is one tab stop. Up and Down move between records, Home and End jump to the first and last, Enter or Space expands or collapses the focused record, and Escape collapses it from anywhere inside and returns focus to its row. Tab moves into an expanded record's actions. Disclosure pattern: https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/
Properties
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
label | label | string | '' | Names the table. Defaults to "Query audit log". |
loading | loading | boolean | false | Placeholder rows while the first page loads. |
error | error | string | '' | An error message with a retry button, shown when there are no rows. |
emptyHeading | empty-heading | string | '' | Empty-state title. |
emptyDescription | empty-description | string | '' | Empty-state sentence. |
Events
| Event | Detail | Description |
|---|---|---|
mm-retry | CustomEvent<Record<string, never>> | The retry button on the error was activated. |
Slots
| Slot | Description |
|---|---|
| Default | mm-audit-row elements, newest first. |
empty-action | An action for the empty state, such as widening the time range. |
CSS parts
| Part | Description |
|---|---|
table | The table. |
header | The sticky header row. |
CSS custom properties
| Property | Description |
|---|---|
--mm-audit-columns | The grid columns shared by the header and rows. |
--mm-audit-max-height | Height at which the log scrolls under its sticky header. Defaults to none. |
Examples
Every state of mm-audit-log in Storybook, with keyboard and screen reader tests.