# `PhoenixKitProjects.Activity`
[🔗](https://github.com/BeamLabEU/phoenix_kit_projects/blob/v0.14.0/lib/phoenix_kit_projects/activity.ex#L1)

Activity logging wrapper for the Projects module.

# `actor_uuid`

```elixir
@spec actor_uuid(Phoenix.LiveView.Socket.t()) :: binary() | nil
```

Extracts `user.uuid` from the LiveView socket assigns.

# `log`

```elixir
@spec log(
  binary(),
  keyword()
) :: term()
```

Logs a projects activity entry via `PhoenixKit.Activity`. Swallows errors so it never crashes the caller.

# `log_failed`

```elixir
@spec log_failed(
  binary(),
  keyword()
) :: term()
```

Logs a user-driven mutation that did NOT land cleanly — the success
path would have called `log/2` with the same action + opts; this
variant tags the metadata with `db_pending: true` so audit-feed
readers can distinguish attempted-but-failed actions from completed
ones. Per the post-Apr 2026 pipeline standard
(publishing-Batch-3 / catalogue-Batch-4 precedent): a Drive/DB
outage must NOT erase admin clicks from the activity feed.

Identical signature to `log/2`. Same rescue/catch shape.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
