CRM 0.5.0: A Client tab on projects
CRM 0.5.0 connects the CRM with the Projects module. A project can name its client company, and the project page gets a Client tab that shows that company, its people and their latest interactions, without leaving the project.
The Client tab
With both modules installed, the CRM offers the project hub a Client feature. In the project’s Modules & features panel you pick the client from a Company list of the CRM’s companies, by name. Companies in the trash are not offered. The tab then shows the company with its number of member contacts, an Open in CRM link and the Recent interactions of its members, newest five. A project without a client says “No client linked to this project yet.” and tells you where to pick one.
The tab only reads. Logging and editing interactions stays in the CRM. Only people with the CRM permission see the tab. If the client company has been moved to the CRM trash, the card carries a Trashed badge instead of looking like a live client.
All texts on the tab can be translated, including the member count, which uses proper plural forms. It loads its CRM data once the page is connected and shows a placeholder until then.
Upgrading
No migration. Update the dependency. The tab appears once the Projects module is installed; neither module needs the other to work.
Full release notes: CRM 0.5.0
0.5.0 · 9 August 2026
Added
- Client tab for the
phoenix_kit_projectshub.PhoenixKitCRMnow answersphoenix_kit_project_extensions/0— the hub’s duck-typed, one-way provider contract, so there is no dependency on the projects package in either direction. A project links one CRM company through per-instance config (company_uuid, no FK), and the contributed tab (PhoenixKitCRM.Web.ProjectClientLive) renders that company, its member contacts and their most recent interactions read-only, with link-outs into the CRM admin. The extension declaresmodule_key: "crm", so the hub requires the CRM permission of anyone who sees the tab, and[:view], so the hub hands it no write surface. PhoenixKitCRM.Companies.company_options/0— untrashed companies as%{value:, label:}picker options. It backs the extension’s company select; it is public and stable for any sibling module that wants the same picker.Interactions.list_for_contacts/2accepts a:limit. The arity-1 form is unchanged for callers that legitimately want the whole rollup.
Fixed
- The Client tab crashed on any project whose linked company had at least one
logged interaction: the timeline read
interaction.kind, and the schema field isinteraction_type, so rendering raisedKeyError. Because the hub renders contributed tabs as nestedlive_renders, that took the host project page down with it. The badge now shows the same gettext-backedInteraction.type_label/1the CRM interaction timelines use. - A company trashed in CRM no longer presents as the project’s live client —
config-based linkage has no FK to cascade, so the card now carries a
Trashedbadge rather than silently showing a soft-deleted company. - The tab is translatable. It set the session locale and then rendered
hardcoded English, including a hand-rolled plural for the member count;
every string is now gettext, and the count is a real
ngettext(Estonian and Russian plural rules are not English’s). - The recent-interactions read is capped in the query. It previously read
every interaction of every member contact, with
:contactand:partiespreloaded, and discarded all but the newest five in memory.
Changed
- The extension’s
company_uuidconfig field is a:selectovercompany_options/0instead of a free-text “Company UUID” — linking a client is picking a name, not pasting a uuid copied off the company page. ProjectClientLiveusesuse PhoenixKitWeb, :live_viewlike every other LiveView in this module (AGENTS.md names the convention explicitly), and defers its CRM reads to the connected mount, painting a skeleton on the disconnected pass. The hub renders a landing extension tab in the project page’s dead render too, so the reads previously ran twice per load.- Dropped eight unused entries from
mix.lock(igniter and its tree), left behind by a dependency upgrade —mix precommitfails on them viadeps.unlock --check-unused.
CRM 0.5.0. Install or update: {:phoenix_kit_crm, "~> 0.5"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.