feat(client): agent activity history UI — "what Carol changed" #351
No reviewers
Labels
No labels
area:auth
area:ci
area:db
area:infra
area:native
area:pwa
area:service
epic
feature
foundation
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
james/carol!351
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "350-activity-history-ui"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Makes the audit trail (#348,
GET /api/agent/audit) user-visible: api-client hooks + a paginated, read-only activity screen showing every change Carol made, newest first. Undo is a separate follow-up.What's in it
@carol/api-client—useAuditLog()+useAuditLogInfinite()over/api/agent/audit, mirroring the conversations hooks;keys.auditLog.lib/activity/describeAuditEvent.ts— pure, tested mapper from an event'sverb_nounaction to a relative i18n verb key + the raw entity type.app/(app)/activity.tsx— a dedicated routable screen (out of the fixed sidebar, likenotes.tsx), reached via a card in Settings. Cursor "load more", loading/error/empty branches, DS tokens, Carol's voice.account.tsx— anActivityCardlinking to/activity.activitynamespace (verb fragments + entity nouns);es.jsonuntouched.Two issues I caught and fixed during review (beyond the agent's output)
activity.verb.createbut the screen renders viauseTranslation("activity"), sot("activity.verb.create")resolved to the literal key string on screen (verified against the real i18n config — the node tests only assert the helper's return value, so they didn't catch it). Fixed by returning a relative key (verb.create).entityType, soperson_organizationwould render as "I created a person_organization". Now localized via anactivity.entity.*catalog (person→"contact",person_note→"note",person_organization→"connection",profile→"profile") with a de-snaked fallback for future types. Verified end-to-end against the real i18n config:person→ "I created a contact" ·person_note→ "I added a note" ·person_organization→ "I deleted a connection" ·profile→ "I updated a profile" · unlabeledjob→ "I created a job" (fallback).Verification (local)
@carol/api-client: typecheck ✓ · lint ✓ ·check✓ (no spec/codegen change) · test ✓ 42@carol/client: typecheck ✓ · lint ✓ · test ✓ 154 (incl. updateddescribeAuditEventcases)en.jsonvalid⚠️ Needs maintainer verification (headless limit)
Client vitest is
node-env — the visual screen (list, load-more, Settings card, navigation) needs a real PWA/device check.Out of scope (follow-ups)
Part of epic #47; makes #348 visible.
Closes #350
🤖 Generated with Claude Code
📊 Test coverage
Patch coverage: no testable lines changed.
Overall (
app/,lib/,db/, excluding UI per ADR-0019):Soft thresholds per ADR-0019. Coverage is informational and does not block merge.