Merged
Conversation
Allows system administrators to monitor imports across all tenants, view success/failure rates, and inspect failed rows.
There was a problem hiding this comment.
Pull request overview
Adds System Admin (Filament sysadmin panel) support for viewing import runs and their failed rows, and updates sysadmin feature coverage accordingly.
Changes:
- Introduces a new
ImportResource(list + view pages) in the SystemAdmin panel, including a failed-rows relation manager. - Adds sysadmin policies for
ImportandFailedImportRow. - Extends the SystemAdmin resource feature test suite to cover rendering the imports list page.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Feature/SystemAdmin/SystemAdminResourceTest.php | Adds a feature test ensuring the sysadmin imports list page renders and shows records. |
| app-modules/SystemAdmin/src/Policies/ImportPolicy.php | Adds sysadmin policy for the Import model. |
| app-modules/SystemAdmin/src/Policies/FailedImportRowPolicy.php | Adds sysadmin policy for failed import row records. |
| app-modules/SystemAdmin/src/Filament/Widgets/TopTeamsTableWidget.php | Adjusts the “Top Teams” widget query (removes non-personal-team constraint). |
| app-modules/SystemAdmin/src/Filament/Resources/ImportResource/RelationManagers/FailedRowsRelationManager.php | Adds relation manager to display failed rows for an import. |
| app-modules/SystemAdmin/src/Filament/Resources/ImportResource/Pages/ViewImport.php | Adds sysadmin view page for an import record. |
| app-modules/SystemAdmin/src/Filament/Resources/ImportResource/Pages/ListImports.php | Adds sysadmin list page for imports. |
| app-modules/SystemAdmin/src/Filament/Resources/ImportResource.php | Defines the sysadmin Import resource (table, infolist, filters, relations, routes). |
| .env.example | Updates Mailcoach example env vars (adds endpoint + sync toggle; clears default domain). |
...emAdmin/src/Filament/Resources/ImportResource/RelationManagers/FailedRowsRelationManager.php
Show resolved
Hide resolved
- Simplify assertions for authentication isolation. - Add route-based test cases for unauthenticated and regular users, and unverified sysadmins. - Ensure verified sysadmins can access panel routes as expected.
Add JSON_THROW_ON_ERROR to json_encode in FailedRowsRelationManager to prevent silent false returns. Add SystemAdministrator $admin parameter to ImportPolicy and FailedImportRowPolicy for consistency with other sysadmin policies.
Rector's RemoveUnusedPublicMethodParameterRector correctly flags these as unused. Since the methods just return false without checking the authenticated user, the parameter is unnecessary.
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.
No description provided.