What the agent does
The agent lists every resource page and relation manager under app/Filament against tests/Filament first. In this panel every resource page already had a test; 11 relation managers across the HR and Shop resources had none.
Each new test mounts its manager with Livewire::test(..., ['ownerRecord' => ..., 'pageClass' => ...]) as CommentsRelationManagerTest does and checks, with factory records, that the table lists only the owner's rows. Create, edit, delete and filter cases follow what each manager has: the Project TasksRelationManager filters by status, priority and assignee, the Brand and Category ProductsRelationManagers are tested through applyTableFilters on their query-builder filter, and read-only managers are checked for absent actions.
Start it with one API call
POST https://api.phoenix.so/o/{org}/sessions with this body:
{
"agent": "claude",
"input": "Write Pest tests with Filament's Livewire testing helpers for the parts of this panel that have none. First list every resource page and relation manager under app/Filament and the tests under tests/Filament, and work only on the ones without a test. For each relation manager, mount it with Livewire::test(..., ['ownerRecord' => ..., 'pageClass' => ...]) like CommentsRelationManagerTest and cover: it renders, the table shows only the owner's records, create with valid data and with each required field missing, edit and delete actions, and each table filter. Use the model factories. Set up the environment as .github/workflows/tests.yml does, run composer test:pest until it passes, and open a pull request.",
"resources": [
{
"url": "https://github.com/your-org/your-app"
}
]
}- Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
- Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
- Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.
What comes back
Tried on filamentphp/demo at 124bdfd: 11 files changed, 1049 insertions(+), all new tests under tests/Filament/Resources/. composer test:pest went from Tests: 10 skipped, 490 passed (2747 assertions) to Tests: 10 skipped, 601 passed (3353 assertions), exit 0, and Pint returned {"tool":"pint","result":"passed"}. The agent installed PHP 8.4.27 with gd itself to follow .github/workflows/tests.yml. Its Postgres reset step was not run, and no pull request was opened. The run copied the diff to /workspace/.rush/artifacts/, but capture keeps no .diff file, so it did not come back; the answer names only the 11 files.
For the reviewer: DepartmentResource has only ManageDepartments, which the test uses as pageClass, so its EmployeesRelationManager looks unreachable in the UI; keep the test or delete the manager. The Tasks delete action is a deliberate no-op, so its test asserts the notification and that the row stays.
Run it on every night at 2 a.m. Pacific
The nightly tests automation has a schedule trigger on cron 0 2 * * * in America/Los_Angeles, with this request as its prompt. Because the request starts by listing what under app/Filament has no test, a relation manager added during the day is picked up the next night.
The use case this job follows, with its automation and trigger: Write the missing tests.
Why run it on Rush?
The panel looked fully tested because every resource page had a test, yet 11 relation managers had none. Writing them surfaced a manager with no page to host it. Without PHP's gd extension the untouched suite had 74 CouldNotLoadImage failures.
Frequently asked questions
What do the tests check on a manager with no required fields?
Both Addresses managers have no required fields and an empty filter list, so instead of missing-field cases their tests check that an empty create succeeds, alongside rendering and owner scoping.
Was the full CI workflow reproduced?
All but its last step. The agent ran the workflow's setup, from .env and composer install through npm run build to the SQLite file. The ResetDemoDatabaseTest step on pgsql was skipped: the sandbox had no Postgres service or pgsql extension.
More Filament jobs
More jobs like this: Write the missing tests
- Validate a GitOps Repository Before Argo CD Syncs It (Kustomize)
- Write Golden Tests for a Flutter App (Flutter)
- Write GraphQL API Tests for a Spring Boot App (Spring Boot)