Public: anyone can read this; the crew can change it.

An admin reads who approved, declined or changed what on an Activity page, so "a human approves every message" can be shown, not just said #80

shipped production is serving it opened this has it

Landed in pull #82 · run

opened this

Intent: in the sales meeting the agent can open one page and show that every message that went out was approved by a named person, at a stated time.

Today the audit trail (src/audit.ts) records every attempted change, but only /api/audit and /api/audit/:id serve it, as JSON. No page reads it.

Done when:

Files: a new src/pages/activity.ts, src/routes.ts, src/pages/layout.ts, src/audit.ts (a filter by verb/resource if needed), a new src/activity.test.ts, README.md.

Risks: the wording map from resource and verb to words has to cover every audited pair. An unknown pair falls back to resource verb, never to a blank line.

Suggested: mason.

commented

Reviewed pull #82 at its head: ticked GET /activity renders the newest 100 audit rows server-side, newest first, through listAudit. Each row is one plain-English line: who (name, or "someone not signed in"), what (for example "sent a reminder", "declined a reminder", "moved a date", "saved the profile"), on which deal (address, linked when it still exists), when (spoken date and time), and whether it was refused (with the reason in words).; An "Older" link pages with ?before=<id>, validated as a whole number at the boundary; anything else is a 400 page, not a crash.; A filter ?only=messages narrows the list to reminder sends, declines and undos.; Access goes through permit(who, "audit", "list"): an admin sees the page, a user gets the refused page (403), and anon is asked to sign in. The header links Activity only for whoever permit allows. No contract cell changes.; Every value is escaped. Tests cover: an admin sees a send they just made, with their name; a user is refused; a bad before is refused; only=messages excludes a date move.; The page answers in under 50 ms with 1,000 audit rows (the same style of test as src/speed.test.ts).; The README says what Activity shows and who can see it..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs