Skip to content

Feature: Enhance activity logging with context and subject relations - #55

Draft
lcharette wants to merge 15 commits into
6.1from
6.1-feature-activity2.0
Draft

Feature: Enhance activity logging with context and subject relations#55
lcharette wants to merge 15 commits into
6.1from
6.1-feature-activity2.0

Conversation

@lcharette

@lcharette lcharette commented Aug 7, 2026

Copy link
Copy Markdown
Member

Implementation of #43

TODO :

  • Implement backend (Model migration, registration, etc.)
  • Frontend upgrade : Show activity in each context
  • i18n support
  • Enhance current record to add more info
  • Add more activity logging
  • Learn Documentation upgrade

…ations

- Added new fields to the activity model: context_id, context_type, subject_id, subject_type, and metadata.
- Added new ActivityRecorder service to handle activity logging with context and subject relations.
- Refactored code to use ActivityRecorder instead of UserActivityLogger.
- Updated UserActivityLoggerTest to mark it as deprecated.
- Introduced GroupActivityTypes and RoleActivityTypes enums for structured activity types.
- Added MorphableModelInterface to define polymorphic model contracts and updated existing models and interfaces to implement MorphableModelInterface.
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
2653 3 2650 0
View the top 3 failed test(s) by shortest run time
UserFrosting.Sprinkle.Admin.Tests.Controller.User.UserUpdateFieldActionTest::testPostForRemovingRoles
Stack Traces | 0.255s run time
UserFrosting\Sprinkle\Admin\Tests\Controller\User\UserUpdateFieldActionTest::testPostForRemovingRoles
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'No role'
+'ROLE.NONE'

.../Controller/User/UserUpdateFieldActionTest.php:318
UserFrosting.Sprinkle.Admin.Tests.Controller.Role.RolePermissionsActionTest::testPostForRemovingAllPermissions
Stack Traces | 0.259s run time
UserFrosting\Sprinkle\Admin\Tests\Controller\Role\RolePermissionsActionTest::testPostForRemovingAllPermissions
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'No permission'
+'PERMISSION.NONE'

.../Controller/Role/RolePermissionsActionTest.php:194
UserFrosting.Sprinkle.Admin.Tests.Controller.Role.RolePermissionsActionTest::testPostForPermission
Stack Traces | 0.277s run time
UserFrosting\Sprinkle\Admin\Tests\Controller\Role\RolePermissionsActionTest::testPostForPermission
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'No permission'
+'PERMISSION.NONE'

.../Controller/Role/RolePermissionsActionTest.php:131

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@lcharette lcharette self-assigned this Aug 7, 2026
@lcharette lcharette added the New Feature New Feature being worked on label Aug 7, 2026
@lcharette lcharette moved this from Not Started to In Progress in UserFrosting Task Planner Aug 7, 2026
@lcharette lcharette added this to the 6.1.0 milestone Aug 7, 2026
@lcharette lcharette linked an issue Aug 7, 2026 that may be closed by this pull request
…te tracking, and improve metadata for profile and group edits
… new values of attributes.

- Modified ActivityInterface to reflect changes in user_id and added properties.
- Adjusted use of 'subject' instead of 'context'.
- Introduced ActivityDescription component for rendering activity descriptions and property changes in the UI.
- Made user nullable in Activity Table
- Etc.
- Updated the admin user interface to utilize dedicated forms for profile, group, password, role, status, and verification changes.
- Removed group assignment from user creation.
- Introduced UserGroupForm and UserGroupModal components for managing user groups.
- Replaced UserActivateModal with UserStatusModal and UserVerificationModal for better clarity in user status management.
- Updated UserForm to remove group selection and adjusted related components accordingly.
- Refactored API calls in user management modals to use specific functions for user status, verification, and group updates.
- Enhanced tests to cover new modal and form functionalities.
@lcharette

Copy link
Copy Markdown
Member Author

@copilot resolve the merge conflicts in this pull request

# Conflicts:
#	packages/sprinkle-admin/CHANGELOG.md
#	packages/sprinkle-admin/app/locale/en_US/messages.php
#	packages/sprinkle-admin/app/locale/fr_FR/messages.php
#	packages/sprinkle-core/app/locale/en_US/messages.php
#	packages/sprinkle-core/app/locale/fr_FR/messages.php

Co-authored-by: lcharette <2566513+lcharette@users.noreply.github.com>

Copilot AI commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved the merge conflicts and preserved the activity translations in the new YAML locale files. Merge commit: 732f2ec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Feature New Feature being worked on

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

[Feature] Enhancement of the Activity feature

2 participants