All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning.
0.1.1 - 2026-05-05
Fixed
- Ticket attachment uploads (#2) — successful uploads were silently dropped because
Enum.filter(&match?({:ok, _}, &1))againstconsume_uploaded_entries/3output never matched (the function unwraps{:ok, val}into bareval). Storage error crash — returning
{:error, reason}from theconsume_uploaded_entries/3callback violates the{:ok, term} | {:postpone, term}contract and crashed the LiveView.- Hang on invalid file type — errored upload entries (
:not_accepted,:too_large) now get cancelled beforeconsume_uploaded_entries/3, which previously raised on them. KeyErrorafter upload —file.original_name→file.original_file_namein the admin pending-files list (the schema field name; the old reference crashed the LiveView and resetpending_files).- Image classification — files were hardcoded as
"document", so images never got bucket placement or thumbnail variants. Now classified viaPhoenixKitCustomerSupport.Uploads.file_type_from_mime/1fromentry.client_type.
Changed
- Uploads are consumed in the LiveView
progresscallback (auto_upload: true), so files appear in "Attached files" immediately after drop instead of staying in "Uploading…" until form submit. - Admin attachment tiles wrap in
<a target="_blank" rel="noopener noreferrer">to match user-side behaviour and click through to the original file. - Storage errors now surface in the UI via
:upload_errorsinstead of being logged-only. - Internal: extracted
PhoenixKitCustomerSupport.Uploads.consume_entry/4andcancel_errored_entries/2to deduplicate the upload pipeline acrossWeb.New,Web.UserNew, andWeb.UserDetails(~160 LOC removed).
0.1.0 - 2026-05-04
Initial release of PhoenixKit Customer Support as a standalone Hex package, extracted from PhoenixKit core (>= 1.7.104).
Features
- Ticket lifecycle —
open → in_progress → resolved → closedwith full status-history audit trail (PhoenixKitCustomerSupport.TicketStatusHistory). - Comments and internal notes — public comments visible to ticket owners, plus agent-only internal notes gated by the
customer_support_internal_notes_enabledsetting. - Attachments — file uploads on tickets and comments via
PhoenixKit.Modules.Storage, configurable throughcustomer_support_attachments_enabled. - Assignment — assign tickets to support staff; assignment changes are recorded.
- Reopen flow — closed tickets can be reopened by users or agents when
customer_support_allow_reopenistrue. - Admin LiveViews — list / new / edit / details / settings under
/admin/customer-supportand/admin/settings/customer-support. - User-dashboard LiveViews — list / new / details for the ticket owner under
/dashboard/customer-support/tickets(routes wired byPhoenixKitWeb.Integrationin core viaCode.ensure_loaded?guards). - PubSub events —
PhoenixKitCustomerSupport.Eventsexposes per-user, per-ticket, and global topics for real-time updates. - Module auto-discovery — implements
PhoenixKit.Module; registered with PhoenixKit's module system at compile time, no manual router wiring required.
Settings keys
| Key | Default | Description |
|---|---|---|
customer_support_enabled | false | Enables the module globally. |
customer_support_per_page | 20 | Tickets per page in admin and user list views. |
customer_support_comments_enabled | true | Allow comments on tickets. |
customer_support_internal_notes_enabled | true | Allow agent-only internal notes. |
customer_support_attachments_enabled | true | Allow file attachments on tickets and comments. |
customer_support_allow_reopen | true | Allow reopening of closed tickets. |
Migration notes (from PhoenixKit core)
PhoenixKit core's V109 migration renames the legacy keys so existing installs migrate cleanly:
- Settings keys:
customer_service_*→customer_support_* - Permission key (
phoenix_kit_role_permissions.module_key):customer_service→customer_support - Routes:
/customer-service/*→/customer-support/* - Module:
PhoenixKitCustomerService→PhoenixKitCustomerSupport - Hex package:
phoenix_kit_customer_support
Run mix phoenix_kit.update after upgrading core to apply V109.