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
This PR adds the ability to move secrets across environments to the overview page when a single env is selected. It also updates the move secrets modal to v3 components
Screenshots
multi:
single:
Steps to verify the change
verify moving multi-env to different path still works as expected (with and without overwrite)
verify new single-env move to different path and/or env works as expected (with and without overwrite)
Type
Fix
Feature
Improvement
Breaking
Docs
Chore
Checklist
Title follows the conventional commit format: type(scope): short description (scope is optional, e.g., fix: prevent crash on sync or fix(api): handle null response).
This PR adds the ability to move secrets across environments from the overview page when a single environment is selected, and upgrades the Move Secrets dialog from v2 to v3 components with react-hook-form / Zod validation. The implementation correctly branches between SingleEnvContent (supports env + path selection) and MultiEnvContent (path-only, same-env move) based on visibleEnvs.length.
Key findings:
Carried-over createNotification bug (now in two places): Both SingleEnvContent (line 224) and MultiEnvContent (line 459) call createNotification({ text: "error", title: "..." }) — the literal string "error" ends up as the visible notification body, while the helpful message is in title. Should be { type: "error", text: "..." }.
Default environment pre-selects a potentially different env:SingleEnvContent defaults environment to environments[0]?.slug (first alphabetical env) rather than sourceEnv.slug. If these differ, the Move button is immediately enabled on dialog open, which could lead to accidental cross-environment moves without the user noticing a different destination environment was pre-selected.
Dead code from removed "missing path" check: The faEyeSlash icon, the "missing" union member in the warning type, and the ternary that references them are now unreachable since the "missing path" warning was removed.
Confidence Score: 3/5
Safe to merge after addressing the createNotification bug and reviewing the default environment selection behavior.
The core feature logic is sound and the refactor is well-structured, but a carried-over createNotification bug now exists in two places and shows unhelpful UI feedback. The default environment pre-selection in SingleEnvContent could lead to accidental moves. These are actionable fixes before shipping.
MoveSecretsDialog.tsx — the createNotification calls and default environment value in SingleEnvContent.
Major refactor that splits the old single Content component into SingleEnvContent, MultiEnvContent, FolderPathSelect, and MoveResultsView. Upgrades from v2 to v3 components and adds react-hook-form/Zod validation. Issues: a carried-over createNotification bug (text/type swap) now duplicated in both new content components; default environment pre-selection could trigger accidental moves; dead code from the removed "missing path" check remains.
Adds a useRef-based effect to reset selected entries when the environment filter changes, and passes visibleEnvs down to SelectionPanel. useRef is already imported. No issues found.
Comments Outside Diff (2)
frontend/src/pages/secret-manager/OverviewPage/components/SelectionPanel/components/MoveSecretsDialog/MoveSecretsDialog.tsx, line 459-465 (link)
Swapped text/type in createNotification (MultiEnvContent)
Same issue as in SingleEnvContent — text: "error" passes the literal string "error" as the visible notification body. The message "You must specify a secret path…" is placed in title but should be in text, and type: "error" should control the notification severity.
frontend/src/pages/secret-manager/OverviewPage/components/SelectionPanel/components/MoveSecretsDialog/MoveSecretsDialog.tsx, line 604-614 (link)
Dead code branch — "missing" type is never pushed
The environmentsToBeSkipped array now only ever contains entries with type: "permission" (the previous "missing" path check was removed in this PR). The ternary env.type === "permission" ? faBan : faEyeSlash and faEyeSlash (imported at the top of the file) are therefore unreachable. The TypeScript union "permission" | "missing" in the warning type is also misleading.
Consider removing "missing" from the union type, removing the faEyeSlash fallback branch, and dropping the faEyeSlash import to keep the code clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
This PR adds the ability to move secrets across environments to the overview page when a single env is selected. It also updates the move secrets modal to v3 components
Screenshots
multi:

single:

Steps to verify the change
Type
Checklist
type(scope): short description(scope is optional, e.g.,fix: prevent crash on syncorfix(api): handle null response).