Skip to content

Entities 0.6.0: A read-only page for each record, and safer public forms

Entities 0.6.0 gives every record a read-only page in the admin, tightens what public forms accept, and makes trash, restore and the command-line export keep the data they should.

A page to look at a record

Each record now has its own page at /admin/entities/<entity>/data/<uuid>. It shows the values with their labels, thumbnails for images, the titles of linked records and the translated option labels, with Edit and Back buttons. Opening it takes no editing lock, so it does not get in the way of someone editing the record, and it updates live when the record, its linked records or the entity’s fields change. The View entries in the data navigator now open this page; the editor stays at …/edit.

For a site that wants an “Edit” link on its own public pages, PhoenixKitEntities.admin_edit_path/2,3 builds the editor address of a record.

Public forms

Public forms now accept boolean fields. An archived entity no longer accepts submissions, and its form is not shown. Submitted values have a size limit: a field’s own maximum length when it has one, otherwise a fixed ceiling. The visitor’s address is read the same way core reads it behind a proxy.

Submission statistics are now a single counter update. A submission no longer writes an activity row in the entity creator’s name, and nothing is counted for a request the rate limiter refused. Saving the entity keeps the stored counters unless you ask for a reset.

Trash, positions and export

Moving a record to the trash remembers its status, and restoring it brings that status back (draft when nothing was stored). A new record goes after the last one even when some positions are empty. The command-line export now writes the same files as the mirror export, so a backup carries relations as entity names and record slugs. mix phoenix_kit_entities.export --output and mix phoenix_kit_entities.import --input pick a folder for one run without changing the configured one, and the import message lists errors and links it could not resolve.

Fixes

  • The field editor and the icon picker no longer close when a drag ends outside the box.
  • A record open in two tabs no longer turns a save into an empty change.
  • Settings switches change only their own setting and keep what you typed elsewhere.
  • An import dry run no longer crashes while printing a changed entity or record.
  • Back links and breadcrumbs keep the language you are viewing the admin in.

Upgrading

No migration and no configuration. Update the dependency; the PhoenixKit requirement is unchanged. Statistics on entities with public forms keep their stored values.

Full release notes: Entities 0.6.0

0.6.0 · 13 October 2026

Added

  • A read-only page for a record at /admin/entities/:slug/data/:uuid (Web.DataShow): labelled values, thumbnails for images, titles for relations, translated option labels, Edit and Back buttons. It takes no editing lock and follows the record, its linked records and its blueprint live. The editor stays at …/edit; the navigator’s “View” entries open the new page.
  • PhoenixKitEntities.admin_edit_path/2,3 builds the editor path for a record, for hosts that offer admins an “Edit” link from a public page (PhoenixKitWeb.AdminEditHelper, permission "entities").
  • Public forms accept boolean fields; archived entities refuse submissions; submitted values are size-capped; the client address comes from core’s proxy-aware IpAddress.extract_from_conn/1.
  • mix phoenix_kit_entities.export / .import take --input / --output for one run; the import flash reports errors and unresolved links.
  • Mirror.Exporter.export_entity/2 takes include_data: to override the per-entity setting.

Changed

  • Submission statistics are one atomic counter bump: no activity row in the creator’s name, no schema-changed broadcast, nothing written for a request the rate limiter refused. update_entity/3 keeps the stored counters under a row lock; the entity form passes reset_public_form_stats: true only for an explicit reset.
  • Trash and restore stash the stored status; restore returns the record to it ("draft" by default) and, for a single record, re-reads the row under FOR UPDATE, answering {:error, :not_trashed} to a stale restore.
  • A new record’s position is max(position) + 1 under a per-entity lock; a NULL position no longer breaks creates.
  • The CLI export now uses the mirror exporter, so a backup carries portable relation references (target entity names, linked record slugs) and the multilang metadata.
  • Admin pages keep the viewing locale in their Back links and breadcrumbs.

Fixed

  • The field editor and icon picker no longer close on a drag released outside the box.
  • A record open in two tabs no longer turns a save into an empty changeset.
  • Settings switches write only their own keys and leave typed edits in place.
  • Import dry-run no longer crashes printing a changed entity or record.
  • Test suite follows core 2.62’s prefixless primary-language admin paths.

Entities 0.6.0. Install or update: {:phoenix_kit_entities, "~> 0.6"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.