Skip to content

CRM 0.8.0: A company page that updates live, and tab intros

CRM 0.8.0 keeps a company’s page up to date while other people work, explains in one line what each tab on a contact or company holds, and fixes a set of pages that showed old data after a change elsewhere.

The company page follows changes

A company’s Members, Interactions, Events and Catalogue tabs now update without a reload. When a contact joins the company, leaves it or is renamed in another session, the roster changes on its own, and the interactions of the members appear as they are logged. The Catalogue tab follows changes to the catalogue’s items, including their category. When you move from one company to another, the page stops listening to the previous one.

A line of help on every tab

Each tab on the contact and company pages now opens with a short line saying what it lists and how something gets there. For example, the company’s Events tab says it is “recorded automatically. Nothing is added here by hand.” The Members tab gets a New contact for this company link that opens the contact form with the company already chosen.

Mirror accounts

When you resolve a difference between a contact or company and its linked account, the form is rebuilt from the resolved record, so pressing Save afterwards no longer undoes the choice you just made. Other fields you had not saved keep their values. The organizations page shows the updated account straight away.

Fixes

  • A contact’s Files tab refreshes its interaction attachments when an interaction is added or deleted elsewhere.
  • Turning a role’s CRM access on or off on the settings page now updates the sidebar.
  • On a role page, ticking the CRM contact column fills it in at once.
  • The preview in the Apply list locale to contacts dialog keeps its count current while the dialog is open, so it matches the message after confirming.
  • On the comparison page, a pair of contacts that no longer shares an email leaves the list instead of staying at “2 contacts”, and emails that differ only in capitals stay in one group.
  • Deleting a contact or changing its main company while someone else edits memberships no longer misses or wrongly announces a company.

Upgrading

No migration and no configuration. Update the dependency.

Full release notes: CRM 0.8.0

0.8.0 · 24 August 2026

Added

  • Live company page (#27). The Members roster, Interactions rollup, Events tab and Catalogue tab follow other sessions without a reload: contacts announce join / leave / rename on a per-company topic after commit; the page keeps a per-member interaction subscription set in sync with the roster and drops the previous company’s subscriptions when the uuid changes; the Catalogue tab follows the catalogue module on the host PubSub (core’s internal server never hears those broadcasts).
  • Tab intros on the contact and company show pages — one line under each heading saying what the tab lists and how something gets into it. The Members tab’s “New contact for this company” link opens the contact form with that company preselected.

Changed

  • Mirror resolution rebuilds the contact/company form from the resolved record (keeping the operator’s unsaved draft on every other field) so Save cannot silently undo the choice just made. Organizations view swaps the rewritten user into its rows.
  • CRM settings remounts after a role toggle so the sidebar re-reads the dashboard registry (which broadcasts badge updates only, never registrations).
  • Role view reloads the user→contact map from columns_saved/1 when the “CRM contact” column is ticked on.

Fixed

  • Contact Files tab’s interaction attachment roll-up refreshes when an interaction is created or deleted elsewhere.
  • List-members locale-apply preview recomputes while the modal is open, so the confirm number matches the flash.
  • Comparison page: re-expanding a duplicate-email group re-queries both the rows and the group list / count badge. A pair that is no longer duplicated leaves the page instead of sitting at “2 contacts” over a one-row drill-down. Group keys are lowercased so a citext GROUP BY cannot flip alice@x / ALICE@X between queries and drop the expanded rows.
  • Company Catalogue tab also refreshes on :category (a default column of the embedded items table). :supplier / :manufacturer / :links were already in the follow-up to #27.
  • delete_contact/1 and set_primary_company/4 read the companies to notify inside their transactions under a row lock, so a concurrent membership is neither missed nor announced for a page that never showed it.
  • Mirror resolution broadcasts the contact change once, after its own commit — not from inside the transaction.

CRM 0.8.0. Install or update: {:phoenix_kit_crm, "~> 0.8"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.