feat(site): clarify why secret name is disabled when editing (#26553)

Adds helper text under the disabled `Name` field in the Edit secret
dialog so users understand why it can't be changed:

> Unique identifier (can’t be changed).

Matches the existing pattern used elsewhere (e.g. AI settings). The
secret name is the resource identifier in the API path (`PATCH
/api/v2/users/{user}/secrets/{name}`) and `UpdateUserSecretRequest` has
no `name` field, so rename isn't supported server-side.

Created on behalf of @matifali.

---------

Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com>
This commit is contained in:
blinkagent[bot]
2026-06-23 11:45:58 +05:00
committed by GitHub
co-authored by blink-so[bot]
parent a1ec9df345
commit 4691ef39cd
2 changed files with 8 additions and 1 deletions
@@ -233,7 +233,11 @@ const SecretFields: FC<SecretFieldsProps> = ({
return (
<>
<FormField
field={getFieldHelpers("name")}
field={getFieldHelpers("name", {
helperText: disableName
? "Unique identifier (can’t be changed)."
: undefined,
})}
label={
showRequiredLabels ? (
<RequiredFieldLabel>Name</RequiredFieldLabel>
@@ -298,6 +298,9 @@ export const EditDialogOpened: Story = {
).toBeInTheDocument();
await expect(dialogView.getByLabelText("Name")).toHaveValue(secret.name);
await expect(dialogView.getByLabelText("Name")).toBeDisabled();
await expect(
dialogView.getByText("Unique identifier (can’t be changed)."),
).toBeInTheDocument();
await expect(dialogView.getByLabelText("Description")).toHaveValue(
secret.description,
);