Uh oh!
There was an error while loading. Please reload this page.
Extract Customer Service module and rename to Customer Support - #514
Merged
Conversation
…kage
- Remove lib/modules/customer_service/ tree (22 files: context, 4 schemas,
events, 9 LiveViews, 8 templates) and lib/phoenix_kit_web/routes/customer_service.ex
- Drop PhoenixKit.Modules.CustomerService from internal_modules/0 in
module_registry.ex and add corresponding entry to known_external_packages/0
- Surgical edits in integration.ex: remove CustomerServiceRoutes alias,
collapse {tickets_admin, referrals_admin} destructure to single
referrals_admin binding, drop unquote(tickets_admin), replace inline
/dashboard/customer-service/tickets routes (and locale variant) with
Code.ensure_loaded?(PhoenixKitCustomerService.Web.UserList) guards,
remove customer_service_routes safe_route_call wiring
- Fix stale Module.concat([PhoenixKit, Modules, Tickets, Ticket]) in
auth.ex anonymize_user_tickets/1 — pre-existing no-op since the
Tickets→CustomerService rename; now points at PhoenixKitCustomerService.Ticket
- Update outdated example in module_registry.ex feature_enabled_checks/0 doc
- Bump @Version 1.7.103 → 1.7.104
Migrations (V35/V51/V53/V58/V72/V74/V75/V77) and the SupportAgent system
role stay in core. Settings keys (customer_service_*) and permission key
unchanged. Gettext strings remain in core's PhoenixKitWeb.Gettext backend.
Plan: dev_docs/plans/2026-05-03-customer-service-extraction.mdLine-wrap reflow only — no behavior change. Picked up by mix format during the customer_service extraction work; lifted into its own commit to keep the extraction commit clean.
Customer Service ticketing has been renamed to Customer Support to match the new standalone package at BeamLabEU/phoenix_kit_customer_support. Changes: - Module reference: PhoenixKitCustomerService -> PhoenixKitCustomerSupport - Atom: :phoenix_kit_customer_service -> :phoenix_kit_customer_support - Settings keys: customer_service_* -> customer_support_* - URL paths: /customer-service/* -> /customer-support/* - Permission key: customer_service -> customer_support - Hex package: phoenix_kit_customer_service -> phoenix_kit_customer_support Add V109 migration that renames 7 settings keys and the phoenix_kit_role_permissions.module_key in-place. The DB tables (phoenix_kit_tickets, phoenix_kit_ticket_*) are domain-named and keep their existing names.
The tests asserted PhoenixKitCustomerSupport / "customer_support" registry state, but the package is now external (not a test dep), so those keys don't exist at test runtime. Replace assertions with still-internal modules / drop ones that were testing the removed internal module.
ddon pushed a commit
that referenced
this pull request
May 4, 2026
PR #514 extracted Customer Service to phoenix_kit_customer_support and renamed the module surface; reviewed and closed two minor findings. Changes (review close-outs): - Backfill V108 docstring section in lib/phoenix_kit/migrations/postgres.ex (was missing — pre-existing gap from PR #512 that this PR was the natural place to close) - Drop unused _prefix arg from rename_role_permission/4 in v109.ex (table name is already prefix-qualified at the call site) Skipped on purpose: rewriting V109's DO \$\$ blocks as parameterized queries. V109 is unpublished but the values are migration-time constants, the existing implementation is tested and idempotent, and minimizing surface area before publish beats stylistic polish. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
phoenix_kit_role_permissions.module_key— so existing installs migrate cleanlyChanges
Module extraction (commits 57cb97f, 6360da5, 4816194)
lib/modules/customer_service/(~6000 LOC) — now in the standalone packagemodule_registry.ex— dropPhoenixKit.Modules.CustomerServicefrominternal_modules/0, add entry toknown_external_packages/0integration.ex— replace inline/dashboard/customer-service/ticketsroutes withCode.ensure_loaded?guards on the external moduleauth.ex— repointanonymize_user_tickets/1at the externalPhoenixKitCustomerSupport.TicketRename to "Customer Support" (commit 2fa4075)
PhoenixKitCustomerService→PhoenixKitCustomerSupport:phoenix_kit_customer_service→:phoenix_kit_customer_supportcustomer_service_*→customer_support_*(7 keys)/customer-service/*→/customer-support/*customer_service→customer_supportphoenix_kit_customer_service→phoenix_kit_customer_supportV109 migration
lib/phoenix_kit/migrations/postgres/v109.exmirroring V77's patternauto_granted_perm:*+phoenix_kit_role_permissions.module_keyin-place; idempotent; reversibledown/1phoenix_kit_tickets,phoenix_kit_ticket_*) are not renamed — they're domain-named, not module-named@current_version108 → 109; ⚡ LATEST tag moved from V107 to V109Verified
mix precommit(compile + credo + dialyzer + format check) — PASS/customer-serviceNotes for maintainer
@versionleft as-is — bump and CHANGELOG entry are yoursdev_docs/plans/2026-05-03-customer-service-extraction.mdTest Plan
mix precommitclean on core