Skip to content

bug(platform): Project Environment turns a generic secrets read failure into an empty editor #3887

Closed

Description

@yannickmonney

Bug: Project Environment turns a generic secrets read failure into an empty editor

  • Classification: P2 confirmed product defect (Projects / Environment)
  • Source SHA: 9ea5972
  • Replay: /Users/yannick/.codex/notes/tale-1000-additional/project-secrets-read-error-probe.log
  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions