fix(ui): prefer Compose env values and polish error pages

When a managed variable shares a Compose-defined key, show the
hardcoded Compose value as read-only and exclude it from managed
rows. Render Contact support as a button, use the collapsible
component for 419 proxy help, and style its list/code markers.
This commit is contained in:
Andras Bacsai
2026-08-07 18:31:19 +02:00
parent 47da47d8e0
commit e50108a905
8 changed files with 78 additions and 24 deletions
@@ -182,6 +182,34 @@ YAML,
->toBe(['API_TOKEN']);
});
it('shows a Compose-defined value as read-only when a managed variable has the same key', function () {
$service = Service::factory()->create([
'environment_id' => $this->environment->id,
'docker_compose_raw' => <<<'YAML'
services:
app:
image: nginx
environment:
- API_TOKEN=from-compose
YAML,
]);
EnvironmentVariable::create([
'key' => 'API_TOKEN',
'value' => 'from-environment-tab',
'resourceable_type' => Service::class,
'resourceable_id' => $service->id,
]);
$component = Livewire::test(All::class, ['resource' => $service])
->call('loadEnvironmentVariables');
expect($component->instance()->environmentVariablePageRows)
->toHaveCount(1)
->and($component->instance()->environmentVariablePageRows->first()['kind'])->toBe('hardcoded')
->and($component->instance()->environmentVariablePageRows->first()['environmentVariable']['value'])->toBe('from-compose');
});
it('searches service environment variables without requiring preview variables', function () {
$service = Service::factory()->create([
'environment_id' => $this->environment->id,