Conversation
- Eager-load storeApp relation in getInstanceStatus()
- Add name, app_url, created_at, and store_app{uuid,name,git_url}
to the /instance/{uuid}/status response
- Update @response PHPDoc annotation for Scramble/OpenAPI
- Expand test assertions to cover all new fields
There was a problem hiding this comment.
Pull request overview
Release bundle for 2026-03-24 that expands API instance status output, improves admin UX around user groups/store apps, and updates logging/dependencies to support new operational integrations.
Changes:
- Extend authenticated instance status API response to include instance/store-app details and (conditionally) credentials.
- Enhance Filament admin resources (user groups/users relation manager; store app lagoon scripts; safer group links).
- Add decryption-failure handling and update logging stack composition; bump PHP/JS dependencies.
Reviewed changes
Copilot reviewed 14 out of 16 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Feature/Filament/Admin/Resources/UserGroupResource/RelationManagers/UsersRelationManagerTest.php | Adds coverage for new “Add User” relation-manager action flows and validations. |
| tests/Feature/Api/AuthenticatedApiTest.php | Updates assertions for the expanded instance status payload. |
| app/Http/Controllers/Api/AuthenticatedApiController.php | Expands /api/instance/{uuid}/status response shape and conditional credential inclusion. |
| app/Filament/Admin/Resources/UserGroupResource/RelationManagers/UsersRelationManager.php | Reworks users relation manager UI and adds custom “Add User” workflow. |
| app/Filament/Admin/Resources/UserGroupResource.php | Adds required group name field to the form. |
| app/Filament/Admin/Resources/UserResource.php | Avoids generating invalid group URLs when a user has no groups. |
| app/Filament/Admin/Resources/PolydockStoreAppResource.php | Adds extensive Lagoon script configuration and display sections. |
| app/Filament/Admin/Resources/PolydockAppInstanceResource.php | Avoids generating invalid group URLs when an instance has no group. |
| app/Jobs/ProcessPolydockAppInstanceJobs/ProgressToNextStageJob.php | Adjusts stage progression behavior after post-deploy completion. |
| app/Listeners/ProcessPolydockAppInstanceStatusChange.php | Exposes app_admin_api_key in remote registration results when present. |
| app/Models/PolydockVariable.php | Adds decrypt failure handling with logging and a fallback return value. |
| database/factories/UserGroupFactory.php | Fixes factory defaults (removes manual id; uses company name). |
| config/logging.php | Makes stack channels dynamic (LOG_STACK + lagoon + slack). |
| composer.json | Adds Slack alerting packages and bumps app package constraint. |
| composer.lock | Locks updated PHP deps (incl. Slack packages). |
| package-lock.json | Locks updated JS deps (Rollup/caniuse-lite/etc.). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| $stackChannels = explode(',', (string) env('LOG_STACK', 'single')); | ||
|
|
||
| if (env('LAGOON_PROJECT')) { | ||
| $stackChannels[] = 'LagoonLogs'; | ||
| } | ||
|
|
||
| if (env('LOG_SLACK_WEBHOOK_URL')) { | ||
| $stackChannels[] = 'slack'; | ||
| } | ||
|
|
||
| $stackChannels = array_unique(array_filter($stackChannels)); |
There was a problem hiding this comment.
explode(',', env('LOG_STACK')) can produce channel names with leading/trailing whitespace (e.g. "single, daily" -> " daily"), which will not match configured channel keys. Consider trimming each entry (e.g. array_map('trim', ...)) before array_filter/array_unique.
| // Include credentials if they exist and instance is at least in claimed status | ||
| if ($instance->status === PolydockAppInstanceStatus::RUNNING_HEALTHY_CLAIMED) { | ||
| $data['app_admin_username'] = $instance->getGeneratedAppAdminUsername(); | ||
| $data['app_admin_password'] = $instance->getGeneratedAppAdminPassword(); | ||
| $data['app_admin_api_key'] = $instance->getKeyValue('app-admin-api-key'); | ||
| } |
There was a problem hiding this comment.
Comment says credentials are included when the instance is "at least in claimed status", but the condition only matches RUNNING_HEALTHY_CLAIMED. If claimed instances can transition into other running statuses (e.g. unhealthy/unresponsive), the API would stop returning credentials despite being claimed. Either broaden the condition to cover all claimed-running statuses or tighten the comment to match the current behavior.
| Forms\Components\Select::make('role') | ||
| ->options(UserGroupRoleEnum::class) | ||
| ->required(), |
There was a problem hiding this comment.
Select::make('role') is not a users table column; it’s pivot data on the user_user_group relationship. With the current setup, the Edit action will try to save role onto the User model (which is not fillable) and the field may not persist (or may throw a mass-assignment error). Adjust the field to target pivot data (e.g. pivot.role) and ensure the Edit/Attach logic updates the pivot record rather than the user record.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Changes in this release:
29a541f chore: ensure we can edit lagoon scripts
9080db7 chore: bump claw
371d675 chore: bump deps
201f7b3 chore: bump deps
e7ae1b7 chore: incase of decrypt failure
b52a764 chore: bump deps
2dca3cf chore: expose claim state response
227521c Expose git_url and full details on instance status endpoint