Skip to content

fix(secret-manager): UI fixes#2747

Merged
rmnbrd merged 6 commits into
stagingfrom
fix/secret-manager/ui-fixes
Jun 9, 2026
Merged

fix(secret-manager): UI fixes#2747
rmnbrd merged 6 commits into
stagingfrom
fix/secret-manager/ui-fixes

Conversation

@rmnbrd

@rmnbrd rmnbrd commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Issue: This PR introduces a few UI improvements for the Secret Manager feature.

Changes:

  • Adds an acknowledgment checkbox when creating an external secret at the environment level, warning the users about the high costs it implies.
  • In the "Add secret" modal, we are fetching the API to retrieve the list of references. This API endpoint can sometimes fail with a 4xx error if the IAM permissions are not correctly set. The fix is to disable the auto-retry strategy and turn the InputSelect into a simple InputText. That way users will still be able to manually type the value they want.
  • When an error is returned by "Add secret" modal's POST request, the toast was not clickable because clicking outside the modal was considered as an attempt to dismiss it. A new isToastInteraction helper has been added to detect whether the toast has been clicked or not.

Screenshots / Recordings

SCR-20260609-nqfg

Testing

  • Changes tested locally in the relevant Console's pages and Storybooks
  • yarn test or yarn test -u (if you need to regenerate snapshots)
  • yarn format
  • yarn lint

PR Checklist

  • I followed naming, styling, and TypeScript rules (see .cursor/rules)
  • I performed a self-review (diff inspected, dead code removed)
  • I titled the PR using Conventional Commits with a scope when possible (e.g. feat(service): add new Terraform service) - required for semantic-release
  • I only kept necessary comments, written in English (watch for useless AI comments)
  • I involved a designer to validate UI changes if I am not a designer
  • I covered new business logic with tests (unit)
  • I confirmed CI is green (Codecov red can be accepted)
  • I reviewed and executed locally any AI-assisted code

@rmnbrd rmnbrd marked this pull request as ready for review June 9, 2026 13:27
Copilot AI review requested due to automatic review settings June 9, 2026 13:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR applies UI/UX fixes around external secrets creation and toast/modal interactions, improving reliability when secret-manager provider lookups fail and preventing modals from being unintentionally dismissed during toast interactions.

Changes:

  • Ensure toasts render above overlays/modals and prevent toast interactions from triggering modal “outside click” behavior.
  • Pass scope into the external secret creation modal and add an environment-scope acknowledgement step.
  • Improve resilience of provider secret reference lookup (disable retries, fallback to manual reference input on error) and add tests.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
libs/shared/ui/src/lib/components/toast/toast.tsx Adds z-toast to ensure toast z-index stacks above modal/overlay and to support toast interaction detection.
libs/shared/ui/src/lib/components/modal/modal.tsx Prevents toast interactions from being treated as outside-modal interactions.
libs/domains/variables/feature/src/lib/external-secrets/external-secrets-tab.tsx Passes scope into AddSecretModal and updates hook dependencies accordingly.
libs/domains/variables/feature/src/lib/external-secrets/external-secrets-tab.spec.tsx Adds assertions/tests ensuring scope is passed through to the modal for different scopes.
libs/domains/variables/feature/src/lib/external-secrets/add-secret-modal/add-secret-modal.tsx Adds environment-level cost acknowledgement UI + fallback to text reference input when provider secrets fail; disables query retries.
libs/domains/variables/feature/src/lib/external-secrets/add-secret-modal/add-secret-modal.spec.tsx New tests covering retry disabling, fallback input rendering, and acknowledgement gating.
libs/domains/clusters/feature/src/lib/hooks/use-secret-manager-provider-secrets/use-secret-manager-provider-secrets.ts Exposes retry option to control React Query retry behavior from callers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 45.45455% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.00%. Comparing base (582fa50) to head (3b2bad6).
⚠️ Report is 1 commits behind head on staging.

Files with missing lines Patch % Lines
...rnal-secrets/add-secret-modal/add-secret-modal.tsx 52.63% 8 Missing and 1 partial ⚠️
libs/shared/ui/src/lib/components/modal/modal.tsx 0.00% 7 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #2747      +/-   ##
===========================================
- Coverage    46.16%   46.00%   -0.17%     
===========================================
  Files         1208     1129      -79     
  Lines        25695    24489    -1206     
  Branches      7572     7292     -280     
===========================================
- Hits         11863    11267     -596     
+ Misses       11761    11252     -509     
+ Partials      2071     1970     -101     
Flag Coverage Δ
unittests 46.00% <45.45%> (-0.17%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread libs/shared/ui/src/lib/components/modal/modal.tsx Outdated
Comment thread libs/shared/ui/src/lib/components/modal/modal.tsx Outdated
@rmnbrd rmnbrd merged commit f2287d4 into staging Jun 9, 2026
12 checks passed
@rmnbrd rmnbrd deleted the fix/secret-manager/ui-fixes branch June 9, 2026 14:56
@RemiBonnet

Copy link
Copy Markdown
Member

🎉 This PR is included in version 1.315.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants