env import and single secret creation conflict resolution#956
Open
teyim wants to merge 2 commits into
Open
Conversation
…dialogs and secret rows
…detection functions
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.
🔍 Overview
This PR improves duplicate secret-key handling across environment imports and inline secret editing.
Previously, importing
.envcontent containing repeated keys could produce ambiguous results because users could not explicitly choose which value to retain. Duplicate keys created or edited directly in secret rows also lacked clear, actionable feedback. (Related to #946 )This change introduces a conflict-resolution workflow for imports and inline duplicate-key validation for environment and app secret rows.
💡 Proposed Changes
Import conflict resolution
Inline duplicate-key validation
Internal improvements
.envparsing, grouping, and conflict-resolution utilities.ph-no-captureprotection for sensitive values and validation content.🖼️ Screenshots or Demo
Development.Example.App.testing.Phase.Console.July.mp4
📝 Release Notes
Added an explicit conflict-resolution workflow for duplicate keys found during
.envimports. Users can now review conflicting values and select which occurrence to retain before importing.Duplicate keys entered directly in environment or app secret rows are now highlighted with actionable validation feedback.
There are no breaking changes or migration requirements.
❓ Open Questions
If there are aspects of the changes that you're unsure about or would like feedback on, list them here.
🧪 Testing
Added and updated tests covering:
.envcontent without collapsing duplicate keys.🎯 Reviewer Focus
Suggested review order:
frontend/utils/secrets.ts.envparsing and conflict-resolution behavior.frontend/components/environments/secrets/import/EnvConflictResolution.tsxImport dialogs
SingleEnvImportDialog.tsxMultiEnvImportDialog.tsxInline secret rows
SecretRow.tsxAppSecretRow.tsxEnvironment and app secret lists
Component and utility tests
➕ Additional Context
✨ How to Test the Changes Locally
Start the development stack and open https://localhost/. Import .env content containing duplicate keys with different values, confirm the conflict-resolution step appears, and verify individual selection, reveal/hide, bulk resolution, reset, and continue behavior. Also create duplicate keys directly in environment and app secret rows to confirm inline validation appears and is removed when a conflicting secret is renamed or staged for deletion.
💚 Did You...