Extract Newsletters module to phoenix_kit_newsletters package - #413
Merged
Conversation
Module was renamed from PhoenixKit.Modules.Mailing to PhoenixKit.Modules.Newsletters but the smoke test list was not updated, causing setup_all to fail on Code.ensure_loaded!/1.
Fix module_test: replace Mailing with Newsletters
…ix task SeedTemplates.run() calls System.halt(1) on failure, which kills the migration process. Use Templates.seed_system_templates() directly (same approach as V31) so validation failures are logged gracefully without aborting the migration.
…plates Mix task" This reverts commit 773a777.
System.halt(1) kills the entire VM when called from migrations (V15 calls SeedTemplates.run() and has a try/rescue wrapper, but System.halt bypasses all rescue handlers). Raising an exception instead allows migration rescue blocks to handle the failure gracefully.
Fix SeedTemplates: raise exception instead of System.halt on failure
…ion settings Co-authored-by: alexdont <alexdont@users.noreply.github.com>
- Add TableRowMenu Phoenix component (table_row_menu.ex) with link, button, and divider sub-components supporting color variants - Add RowMenu JS hook using position:fixed to escape overflow-clip table containers; handles viewport edge detection, keyboard nav, and outside-click dismissal - Replace inline action buttons in Users, Roles, Sessions, Live Sessions, and Emails tables with dropdown menus - Add toggleable card/table view to Roles, Sessions, and Live Sessions tables (Users and Emails already had it); replaces manual md:hidden/md:block split in Sessions with unified table_default - Register TableRowMenu import in phoenix_kit_web.ex
ddon
added a commit
that referenced
this pull request
Mar 15, 2026
…le SQS broadcast counter
- Extract duplicated permission check in roles template into @can_manage_permissions assign
- Replace Module.concat("Broadcast") with newsletters_mod.increment_broadcast_counter/2 call
- Remove unused Ecto.Query import from SQS processor
- Add PR review files for #413 and #414
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ddon
added a commit
that referenced
this pull request
Mar 15, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
Code reviewFound 2 issues:
phoenix_kit/test/phoenix_kit/module_test.exs Lines 25 to 36 in 7b546bd
🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
4 tasks
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 free
to 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
Extracts
PhoenixKit.Modules.Newslettersfrom phoenix_kit core into a standalone package (phoenix_kit_newsletters), and adds a cross-module dependency system toPhoenixKit.ModuleRegistry.Changes
New:
required_modules/0callback systemPhoenixKit.Module— new optional callbackrequired_modules/0 :: [String.t()](default:[])PhoenixKit.ModuleRegistry— newdependency_warnings/0function that detects enabled modules with disabled dependenciesNew: Auto-discovery for external module public routes
integration.ex— newcompile_module_public_routes/1that auto-discovers public (non-admin) routes from external PhoenixKit modules viaroute_module/0safe_route_call(NewslettersRoutes, ...)pattern/:language/:groupfrom intercepting paths like/newsletters/unsubscribeRemoved: Newsletters module from core
lib/modules/newsletters/(15 files)lib/phoenix_kit_web/routes/newsletters.exPhoenixKit.Modules.Newslettersfrominternal_modules/0in ModuleRegistrysqs_processor.exandprocess_scheduled_jobs_worker.ex— replaced directNewsletters.*calls withModuleRegistry.get_by_key("newsletters")+Code.ensure_loaded?guardsV79 migration stays in core
Tables (
phoenix_kit_newsletters_*) continue to be created by phoenix_kit's versioned migration system. The new package contains only Elixir code.Related
New package: BeamLabEU/phoenix_kit_newsletters#1
Test plan
mix compile --warnings-as-errorspassesmix credo --strict— no issuesmix dialyzer— passes{:phoenix_kit_newsletters, path: "..."}added:ModuleRegistry.all_modules()includesPhoenixKit.Modules.Newslettersdependency_warnings/0returns correct warnings when Emails disabled