mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
This commit fixes two UX issues with environment variable bulk updates:
1. Comment Preservation (High Priority Bug):
- When bulk updating environment variables via Developer view, existing
manually-entered comments are now preserved when no inline comment is provided
- Only overwrites existing comments when an inline comment (#comment) is explicitly
provided in the pasted content
- Previously: pasting "KEY=value" would erase existing comment to null
- Now: pasting "KEY=value" preserves existing comment, "KEY=value #new" overwrites it
2. Save Notification (UX Improvement):
- "Save all Environment variables" button now always shows success notification
- Previously: only showed notification when changes were detected
- Now: provides feedback even when no changes were made
- Consistent with other save operations in the codebase
Changes:
- Modified updateOrCreateVariables() to only update comment field when inline comment
is provided (null check prevents overwriting existing comments)
- Modified handleBulkSubmit() to always dispatch success notification unless error occurred
- Added comprehensive test coverage for bulk update comment preservation scenarios
Tests:
- Added 4 new feature tests covering comment preservation edge cases
- All 22 existing unit tests for parseEnvFormatToArray pass
- Code formatted with Pint
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| Proxy | ||
| Service | ||
| ApplicationBuildpackCleanupTest.php | ||
| BuildpackSwitchCleanupTest.php | ||
| CheckTraefikVersionJobTest.php | ||
| CleanupRedisTest.php | ||
| CloudInitScriptTest.php | ||
| CloudProviderTokenApiTest.php | ||
| ConvertArraysTest.php | ||
| ConvertContainerEnvsToArray.php | ||
| ConvertingGitUrlsTest.php | ||
| CoolifyTaskRetryTest.php | ||
| DatabaseBackupCreationApiTest.php | ||
| DatabaseBackupJobTest.php | ||
| DeletesUserSessionsTest.php | ||
| DeploymentCancellationApiTest.php | ||
| DockerCustomCommandsTest.php | ||
| EnvironmentVariableCommentTest.php | ||
| EnvironmentVariableMassAssignmentTest.php | ||
| EnvironmentVariableSharedSpacingTest.php | ||
| ExecuteContainerCommandTest.php | ||
| GithubAppsListApiTest.php | ||
| GithubSourceChangeTest.php | ||
| GithubSourceCreateTest.php | ||
| HetznerApiTest.php | ||
| HetznerServerCreationTest.php | ||
| IpAllowlistTest.php | ||
| LoginRateLimitIPTest.php | ||
| MultilineEnvironmentVariableTest.php | ||
| SentinelUpdateCheckIndependenceTest.php | ||
| ServerPatchCheckNotificationTest.php | ||
| ServerSettingSentinelRestartTest.php | ||
| ServerSettingWasChangedTest.php | ||
| ServerStorageCheckIndependenceTest.php | ||
| ServiceFqdnUpdatePathTest.php | ||
| StartupExecutionCleanupTest.php | ||
| TeamInvitationEmailNormalizationTest.php | ||
| TeamInvitationPrivilegeEscalationTest.php | ||
| TeamPolicyTest.php | ||
| TrustHostsMiddlewareTest.php | ||
| Utf8HandlingTest.php | ||