You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(platform): Project Environment turns a generic secrets read failure into an empty editor #3887
Scope: isolated local jsdom/Vitest component probe; no production network or writes.
Reproduction
Render ProjectSecretsTab for a non-archived project while useProjectSecrets settles with secrets: [], isLoading: false, isError: true, and a generic 503 error. The actual tab renders the normal Environment heading and Add variable control, with no read-error or unavailable copy and no Retry action. The probe passed one test against source SHA 9ea59724df24d62729a9360f3902d964dab39b3e.
Root cause and impact
useProjectSecrets correctly returns isError and the original error, but ProjectSecretsTab only branches for three structured access codes. Any transient or unknown failure falls through to secrets.map(...) with an empty array and mounts EnvVarListEditor as if the project had no secrets. An administrator can add or delete values while the existing inventory is unavailable, risking duplicate names or accidental overwrites and losing confidence about what is stored.
Expected behavior is a generic failed-read state with Retry, while retaining the existing specialized messages for forbidden/not-found/unauthenticated codes. A successful empty secret list should remain the only state that offers an empty editor and Add control.
Activity