Skip to content

Fix module access guards and Legal module issues - #407

Merged
ddon merged 7 commits into
BeamLabEU:devfrom
timujinne:dev
Mar 13, 2026
Merged

Fix module access guards and Legal module issues#407
ddon merged 7 commits into
BeamLabEU:devfrom
timujinne:dev

Conversation

@timujinne

Copy link
Copy Markdown
Contributor

Summary

  • Add module access guards, flash auto-dismiss, sitemap filtering, toggle cleanup
  • Fix Legal module broken connection with DB-backed Publishing
  • Fix Legal module Configure button guard when disabled
  • Bump version to 1.7.72

Changes

Added

  • Module access guards — disabled modules hide action buttons and block mount on settings/endpoints
  • Error flash auto-dismiss after 8 seconds
  • enabled?() mount guards to AI, Media, Entities, Publishing, Sitemap endpoints
  • Error logging in Legal list_generated_pages instead of silent rescue

Fixed

  • Legal module broken connection with DB-backed Publishing (post.pathpost.uuid, updated_atpublished_at)
  • Legal module Configure button guard when module is disabled
  • Sitemap RouterDiscovery including routes from disabled modules
  • DB.Listener missing {:eventually, _ref} case for auto_reconnect

Changed

  • Remove duplicate enable/disable toggles from 7 module settings pages (Emails, Email Tracking, Legal, Referrals, Billing, Customer Service, Shop)
  • Simplify primary_language lookup in Publishing.DBStorage

Test Plan

  • Pre-commit checks passed (mix format, mix credo --strict, mix dialyzer)
  • Manual testing of module enable/disable flow
  • Legal module pages verified with DB-backed publishing

- Add phoenix_kit_entity_data to orphan detection checks; files
  referenced via URL paths in JSONB data fields were not found
- Add protected_file_uuids config mechanism for parent apps to exclude
  files used in code (e.g. static media registries) from orphan detection
  Supports list, zero-arity function, and MFA tuple formats
…le cleanup

- Error flash auto-dismisses after 8 seconds (was: never)
- Module cards on Modules page hide action buttons when module is disabled
- Add enabled?() mount guards to AI, Media, Entities, Publishing, Sitemap endpoints
- Sitemap RouterDiscovery filters out routes from disabled modules
- Remove duplicate enable/disable toggles from 7 settings pages (Emails,
  Email Tracking, Legal, Referrals, Billing, Customer Service, Shop)
- Fix DB.Listener missing {:eventually, _ref} case for auto_reconnect
- Simplify primary_language lookup in Publishing.DBStorage
- Replace post.path (removed in file→DB migration) with post.uuid
- Replace metadata.updated_at with metadata.published_at
- Fix edit URL to use UUID-based route instead of file path
- Add error logging in list_generated_pages instead of silent rescue
@ddon
ddon merged commit ee7bd4f into BeamLabEU:dev Mar 13, 2026
6 checks passed
ddon added a commit that referenced this pull request Mar 16, 2026
- Remove obsolete bulk_operation_topic test that referenced removed functionality
- Implement missing should_regenerate_cache?/1 function in Shared module
- Verify cache system stability and proper single broadcast behavior

These changes fix the critical issues identified in PRs #407-#418:
1. Test failures from removed PubSub bulk operations
2. Missing cache regeneration logic
3. Double broadcast issues in post status changes

All 601 tests pass, including 239 publishing-specific tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants