fix: sync client-side secret value visiblity to the type toggle state#941
Merged
Conversation
Signed-off-by: rohan <rohan.chaturvedi@protonmail.com>
nimish-ks
approved these changes
Jul 8, 2026
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
On the single-env secrets editor, toggling a secret's type immediately updates value visibility —
config→ revealed,secret→ masked,sealed→ locked "Sealed" state. On the cross-env editor, the toggle had no visible effect: the change only appeared after deploying and doing a full page refresh.💡 Proposed Changes
Two client-side fixes in
AppSecretRow.tsx:EnvSecretComponentinitialized its reveal state once on mount and never updated it. A new effect syncs visibility when the type changes (config → revealed, secret/sealed → masked), mirroring the single-envSecretRowbehavior. It's a change-detector keyed on the previous type, so mount rules (new/empty values start revealed, "Add value" reveals) and boolean secrets are unaffected.areAppSecretRowEqualignoredserverAppSecretentirely andareEnvSecretEqualonly compared the server value. After a deploy + refetch, only the server copy changes (the client copy already matched), so re-renders were memo-blocked —isSealedAndSavednever activated and rows kept stale state until refresh. Both comparators now also compare server secret id/key/value/type. This also un-sticks the amber "modified" highlight after deploying a type-only change.📝 Release Notes
✨ How to Test the Changes Locally
configreveals the value in every environment,secretmasks them again — instantly, before deploying.sealedand hit Deploy: rows switch to the disabled "Sealed" state immediately, without a refresh.💚 Did You...
tsc --noEmitclean)