Skip to content

User Connections 0.3.0: Module card stats and fixes for tabs, blocks and requests

User Connections 0.3.0 shows follow, connection and block counts on its card in the admin Modules page, and fixes three problems: tab links that lost the site’s prefix, block reasons that crashed, and two people connecting at the same moment.

Counts on the Modules page

The module’s card on the admin Modules page now lists three numbers: Follows, Connections and Blocks, the totals across the site.

Fixes

  • My Connections tab links. The tab strip on the My Connections page linked to /profile/connections without the site’s URL prefix or language. The links are built with the site’s routes again, so they work on sites with a prefix and in every language.
  • Long block reasons. The form allowed a block reason of up to 500 characters, but the database column holds 255. A longer reason crashed instead of showing an error. The limit is now 255, counted the way the database counts, and a longer reason gets a validation error.
  • Two users connecting at once. When two people sent each other a connection request at the same moment, one of them could get a raw “has already been taken” error. The second request is now recognised and the pair is read again, so that person usually gets the automatic accept instead. This needs PhoenixKit 2.22.3 or later; on an older core nothing changes.

Upgrading

No migration and no configuration. Update the dependency. The fix for two users connecting at once only takes effect once PhoenixKit is at 2.22.3 or later, the first core with the unique index on each pair.

Full release notes: User Connections 0.3.0

0.3.0 · 24 October 2026

Added

  • module_stats/0 — follows, connections and blocks counts for this module’s card on the admin Modules page.

Fixed

  • Two users connecting to each other at the same moment no longer get a raw “has already been taken” error. With core’s V188 unique index on the pair (core 2.22.3+), the losing insert is now recognised and the pair is re-read once: the caller gets what it would have got a moment later, usually the auto-accept. Against a core without V188 nothing changes; the pre-check stays the only guard.
  • A block reason longer than 255 characters raised Postgrex.Error on insert instead of returning a changeset error. The limit was 500, but the column is varchar(255). It is now 255, counted in codepoints the way Postgres counts, so accented text built from combining characters cannot slip past it. Reasons of 256–500 characters that used to crash are now rejected with a validation error.
  • The “My Connections” tab links are built with Routes.path/1 again, so they carry the host’s URL prefix and locale (#8).
  • version/0 is read from mix.exs at compile time, so it can no longer drift from the package version.

Changed

  • Dependency refresh: phoenix_kit 2.64.1 and its transitive set.

User Connections 0.3.0. Install or update: {:phoenix_kit_user_connections, "~> 0.3"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.