Skip to content

feat(variables): add external secrets pages#2721

Merged
rmnbrd merged 7 commits into
stagingfrom
feat/secrets-manager-variables-and-polish
Jun 3, 2026
Merged

feat(variables): add external secrets pages#2721
rmnbrd merged 7 commits into
stagingfrom
feat/secrets-manager-variables-and-polish

Conversation

@rmnbrd

@rmnbrd rmnbrd commented May 29, 2026

Copy link
Copy Markdown
Contributor

Summary

ℹ️ Based on #2720

Adds the full external secrets variables UI after creation: dedicated external secret tabs/pages, service variable tabs, associated external secrets modal, generalized associated-items modal, route restructuring, tests/snapshots, and related UI polish.

Screenshots / Recordings

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 May 29, 2026 15:29
Copilot AI review requested due to automatic review settings May 29, 2026 15:29

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@codecov

codecov Bot commented May 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 61.22449% with 152 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.89%. Comparing base (dba2c9d) to head (398d977).
⚠️ Report is 2 commits behind head on staging.

Files with missing lines Patch % Lines
...es/feature/src/lib/variable-list/variable-list.tsx 49.51% 36 Missing and 16 partials ⚠️
.../src/lib/external-secrets/external-secrets-tab.tsx 73.88% 19 Missing and 16 partials ⚠️
...cret-manager-associated-external-secrets-modal.tsx 78.57% 13 Missing and 5 partials ⚠️
...ce-variables-tabs/service-variables-custom-tab.tsx 44.82% 14 Missing and 2 partials ⚠️
...-variables-tabs/service-variables-built-in-tab.tsx 0.00% 10 Missing ⚠️
...ploy-service-action/use-redeploy-service-action.ts 0.00% 7 Missing ⚠️
.../service-variables-tabs/service-variables-utils.ts 28.57% 5 Missing ⚠️
...ervice-last-deployment/service-last-deployment.tsx 0.00% 2 Missing ⚠️
...src/lib/variable-list/variable-list-action-bar.tsx 0.00% 2 Missing ⚠️
...b/hooks/use-delete-variable/use-delete-variable.ts 0.00% 1 Missing ⚠️
... and 4 more
Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #2721      +/-   ##
===========================================
+ Coverage    44.03%   45.89%   +1.86%     
===========================================
  Files          599     1145     +546     
  Lines        14793    24676    +9883     
  Branches      4401     7364    +2963     
===========================================
+ Hits          6514    11326    +4812     
- Misses        7111    11353    +4242     
- Partials      1168     1997     +829     
Flag Coverage Δ
unittests 45.89% <61.22%> (+1.86%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

@rmnbrd rmnbrd force-pushed the feat/secrets-manager-service-creation-flow branch 5 times, most recently from d04050d to 8848526 Compare June 2, 2026 10:58
Base automatically changed from feat/secrets-manager-service-creation-flow to staging June 2, 2026 14:41
@rmnbrd rmnbrd force-pushed the feat/secrets-manager-variables-and-polish branch from 44e0ca4 to 1a73b02 Compare June 2, 2026 16:00
@rmnbrd rmnbrd force-pushed the feat/secrets-manager-variables-and-polish branch 4 times, most recently from 9a03d67 to b6daf87 Compare June 3, 2026 08:09
Comment thread libs/shared/ui/src/lib/components/navbar/navbar.tsx
Revert change

Add missing "Import from env file" option

Fix failing unit test
@rmnbrd rmnbrd force-pushed the feat/secrets-manager-variables-and-polish branch from b6daf87 to 204de3f Compare June 3, 2026 08:38
import { getServiceVariableScope } from './service-variables-utils'
import { useServiceVariablesTab } from './use-service-variables-tab'

export function BuiltInTab() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think the file should have the same name with the exported function

And it missing a document title!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done here and here


function RouteComponent() {
const { organizationId, projectId, environmentId } = Route.useParams()
const secretManagerEnabled = useFeatureFlagEnabled('secret-manager')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The feature flag should be in the const tabs = [] in this file no? apps/console/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/variables/index.tsx

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We need to redirect the user to /variables if the FF is disabled, so I'd leave it here too.

import { useDeployService } from '../hooks/use-deploy-service/use-deploy-service'
import { useService } from '../hooks/use-service/use-service'

export function useServiceVariablesTab() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Small architecture nit: I’d avoid keeping useServiceVariablesTab as-is

It mixes params, feature flag, secret-manager lookup, service fetching, and redeploy logic. BuiltInTab only needs redeployServiceAction, but calling this hook also runs the secret-manager path, which isn’t useful there. I’d split the redeploy action into a small service hook under lib/hooks/..., and call useVariablesSecretManagers directly in CustomTab where it’s actually needed, wdyt?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Indeed, good idea! 👍

Done: 19d064e

parentId: string
}

export function ExternalSecretsTab({ scope, parentId }: ExternalSecretsTabProps) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ExternalSecretsTab handles create/edit/delete directly, but it doesn’t trigger the same redeploy feedback we have for regular variables. So after adding or updating an external secret, users don’t get the “you need to redeploy” toast even though the change still only applies after redeploy

Could we have the same behavior?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added here: 5e0d4be

@rmnbrd rmnbrd requested a review from RemiBonnet June 3, 2026 15:32
@rmnbrd rmnbrd merged commit 43bf4c4 into staging Jun 3, 2026
11 checks passed
@rmnbrd rmnbrd deleted the feat/secrets-manager-variables-and-polish branch June 3, 2026 15:51
@RemiBonnet

Copy link
Copy Markdown
Member

🎉 This PR is included in version 1.312.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@rmnbrd rmnbrd mentioned this pull request Jun 5, 2026
12 tasks
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