Skip to content

Entities 0.1.7: Drag and drop to order entities and records

Entities 0.1.7 lets admins put the entities list and each entity’s records in their own order by dragging them.

On the entities list at /admin/entities, entities can now be dragged into place, and the order is saved at once. In the data navigator, records of the selected entity can be dragged the same way, in both the table and the card view, as long as there are at least two. The first drag switches that entity from automatic sorting, by creation date, to manual sorting, so the new order stays after a refresh. If that switch fails, a warning says the positions were saved but may not survive a refresh. A failed save shows “Failed to save the new order”.

Reordering, archiving and restoring entities now check admin access before touching the database, and answer “Not authorized” otherwise. Error logs from the record and entity forms now name the record involved.

Upgrading

The order is kept in the position columns that PhoenixKit’s V81 and V108 migrations add. If your database is older, run mix phoenix_kit.update first.

Full release notes: Entities 0.1.7

0.1.7 · 2 May 2026

Changed

  • Web.Entities reorder/archive/restore handlers now gate on Scope.admin? before any DB access — closes the missing-auth gap surfaced in PR #11 review.
  • Card-view duplication in Web.DataNavigator collapsed via the :draggable attr on <.draggable_list> — ~80 lines removed.
  • position_update_query/2 raises ArgumentError on non-binary scope values (was silently fall-through).
  • ensure_manual_sort/1 logs at Logger.error and surfaces a warning flash when the sort-mode flip fails — admins now see the silent setting-flip outcome instead of the failure being swallowed.

Added

  • Audit row shape table in AGENTS.md documenting actor_uuid / resource_uuid / metadata conventions across entity and entity_data activity rows.
  • Race-tolerance comment on maybe_add_entity_position/1 documenting the concurrent-position-conflict resolution strategy.

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