Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
chore(ui): remove unused V2 SecretPathInput source (#8656)
Andrew Huang0721530d5a7f
diff --git a/frontend/src/components/COMPONENT_LIFECYCLE.md b/frontend/src/components/COMPONENT_LIFECYCLE.mdindex 05593645fe..dd568a9cbf 100644--- a/frontend/src/components/COMPONENT_LIFECYCLE.md+++ b/frontend/src/components/COMPONENT_LIFECYCLE.md@@ -13,7 +13,8 @@ The [V3 migration ledger](V3_MIGRATION.md) tracks source removal, coverage, and| `Accordion`, `Alert`, `CopyButton`, `Dropdown`, `HoverCardv2`, `Skeleton`, `Spinner`, `Table`, `Tabs` | Blocked | Composition, interaction, or state parity still needs verification. || `ConfirmActionModal`, `DeleteActionModal`, `Modal` | Ready for focused deprecation | Follow the overlay recipe in the [V3 migration ledger](V3_MIGRATION.md#overlay-migration-recipe). || `ContentLoader`, `FormControl`, `GenericFieldLabel`, `Tag` | Blocked | The V3 replacements require consumer-specific composition or accessibility changes. |-| `SecretInput`, `SecretPathInput` | Blocked | Security-sensitive or specialist behavior needs workflow-level parity validation. |+| `SecretInput` | Blocked | Security-sensitive or specialist behavior needs workflow-level parity validation. |+| `SecretPathInput` | Removed in candidate | Deleted the unused V2 implementation and family index. No incoming module or declaration references remained at `13f5e7fe562a803a9b6de1d512cb27f67868ea6d`. The independent V3 implementation and its consumers are unchanged; this does not certify workflow parity or removal on merged main. || `NoticeBannerV2` | Removed | Deleted the unused implementation, empty family index, and stale root export. No external or internal consumers remained at `e05f750eb36506dac9a599709055ffb33d5b58ab`. |### Removed unused V2 familiesdiff --git a/frontend/src/components/V3_MIGRATION.md b/frontend/src/components/V3_MIGRATION.mdindex 9bf324e256..e633e278d0 100644--- a/frontend/src/components/V3_MIGRATION.md+++ b/frontend/src/components/V3_MIGRATION.md@@ -67,7 +67,7 @@ In the table, E is the number of external consumer files and I is the number of| `Popoverv2/Popoverv2.tsx` | 0 / 1 | Deleted with unused DatePicker in first wave. | Only DatePicker referenced it outside its own family. || `RadioGroup/RadioGroup.tsx` | 0 / 0 | Deleted in first wave, including an obsolete commented import. | No actual incoming module edge or external symbol reference. || `SecretInput/SecretInput.tsx` | 1 / 0 | V3 specialist input; preserve masking, permission boundaries, reveal, copy, and ref behavior. | `frontend/src/pages/auth/CliRedirectPage/CliRedirectPage.tsx:64` |-| `SecretPathInput/SecretPathInput.tsx` | 12 / 0 | V3 SecretPathInput; verify environment/path selection, permission filtering, loading, and controlled values. | `frontend/src/pages/secret-manager/integrations/RundeckConfigurePage/RundeckConfigurePage.tsx:161` |+| `SecretPathInput/SecretPathInput.tsx` | 12 / 0 | Deleted the unused V2 implementation and family index in this candidate, not yet on merged main. The independent V3 SecretPathInput and its consumers are unchanged; workflow parity remains a separate validation boundary. | No incoming module or declaration references at `13f5e7fe562a803a9b6de1d512cb27f67868ea6d`; no root export, computed/glob ingress, or top-level CSS import or executable initializer. || `Select/Select.tsx` and components | 58 / 0 | V3 Select/Combobox chosen by interaction; preserve option values and form semantics. | `frontend/src/pages/secret-scanning/SecretScanningFindingsPage/components/SecretScanningUpdateFindingModal.tsx:94` || `Skeleton/Skeleton.tsx` | 3 / 1 | V3 Skeleton; preserve meaningful loading shape and table ownership. | `frontend/src/views/PkiAlertsV2Page/components/ViewPkiAlertV2Modal.tsx:54` || `Slider/Slider.tsx` | 0 / 1 | Deleted with unused PasswordGenerator in first wave. | PasswordGenerator was its only external-family consumer. |diff --git a/frontend/src/components/v2/SecretPathInput/SecretPathInput.tsx b/frontend/src/components/v2/SecretPathInput/SecretPathInput.tsxdeleted file mode 100644index 879d4fc8ed..0000000000--- a/frontend/src/components/v2/SecretPathInput/SecretPathInput.tsx+++ /dev/null@@ -1,199 +0,0 @@-import { InputHTMLAttributes, useEffect, useState } from "react";-import { faFolder } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";-import * as Popover from "@radix-ui/react-popover";-import { twMerge } from "tailwind-merge";--import { useProject } from "@app/context";-import { useDebounce } from "@app/hooks";-import { useGetFoldersByEnv } from "@app/hooks/api";--import { Input } from "../Input";--type BaseProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> & {- value?: string | null;- isImport?: boolean;- isVisible?: boolean;- isReadOnly?: boolean;- isDisabled?: boolean;- environment?: string;- containerClassName?: string;- onChange?: (arg: string) => void;- folderNames?: string[];- projectId: string;-};--type Props = Omit<BaseProps, "projectId"> & { projectId?: string };--const SecretPathInputBase = ({- containerClassName,- onChange,- environment,- projectId,- value: propValue,- folderNames: folderNamesProp,- ...props-}: BaseProps) => {- const [inputValue, setInputValue] = useState(propValue ?? "");- const [secretPath, setSecretPath] = useState("/");- const [suggestions, setSuggestions] = useState<string[]>([]);- const [isInputFocused, setIsInputFocus] = useState(false);- const [highlightedIndex, setHighlightedIndex] = useState(-1);- const [debouncedInputValue] = useDebounce(inputValue, 200);- const { folderNames: folders } = useGetFoldersByEnv({- path: secretPath,- environments: [environment || ""],- projectId- });-- useEffect(() => {- setInputValue(propValue ?? "/");- }, [propValue]);-- useEffect(() => {- if (- (debouncedInputValue.length > 0 &&- debouncedInputValue[debouncedInputValue.length - 1] === "/") ||- debouncedInputValue.length === 0- ) {- setSecretPath(debouncedInputValue);- }- }, [debouncedInputValue]);-- useEffect(() => {- const activeFolders = folderNamesProp ?? folders;- const searchFragment = debouncedInputValue.split("/").pop() || "";- const filteredSuggestions = activeFolders- .filter((suggestionEntry) =>- suggestionEntry.toUpperCase().startsWith(searchFragment.toUpperCase())- )- .sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()));-- setSuggestions(filteredSuggestions);- }, [debouncedInputValue, folders, folderNamesProp]);-- const handleSuggestionSelect = (selectedIndex: number) => {- if (!suggestions[selectedIndex]) {- return;- }-- const validPaths = inputValue.split("/");- validPaths.pop();-- const newValue = `${validPaths.join("/")}/${suggestions[selectedIndex]}/`;- onChange?.(newValue);- setInputValue(newValue);- setSecretPath(newValue);- setHighlightedIndex(-1);- setSuggestions([]);- };-- const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {- const mod = (n: number, m: number) => ((n % m) + m) % m;- if (e.key === "ArrowDown") {- setHighlightedIndex((prevIndex) => mod(prevIndex + 1, suggestions.length));- } else if (e.key === "ArrowUp") {- setHighlightedIndex((prevIndex) => mod(prevIndex - 1, suggestions.length));- } else if (e.key === "Enter" && highlightedIndex >= 0) {- handleSuggestionSelect(highlightedIndex);- }- if (["ArrowDown", "ArrowUp", "Enter"].includes(e.key)) {- e.preventDefault();- }- };-- const handleInputChange = (e: any) => {- if (onChange) {- onChange(e.target.value);- }-- setInputValue(e.target.value);- };-- return (- <Popover.Root- open={suggestions.length > 0 && isInputFocused}- onOpenChange={() => {- setHighlightedIndex(-1);- }}- >- <Popover.Trigger asChild>- <Input- {...props}- type="text"- autoComplete="off"- onKeyDown={handleKeyDown}- onFocus={() => setIsInputFocus(true)}- onBlur={() => setIsInputFocus(false)}- value={inputValue}- onChange={handleInputChange}- className={containerClassName}- />- </Popover.Trigger>- <Popover.Portal>- <Popover.Content- align="start"- onOpenAutoFocus={(e) => e.preventDefault()}- className={twMerge(- "relative top-2 z-100 overflow-hidden rounded-md border border-border-control bg-surface-base font-sans text-foreground-default shadow-md"- )}- style={{- width: "var(--radix-popover-trigger-width)",- maxHeight: "var(--radix-select-content-available-height)"- }}- >- <div className="max-h-[25vh] thin-scrollbar w-full flex-col items-center justify-center overflow-y-auto rounded-md text-foreground-inverse">- {suggestions.map((suggestion, i) => (- <div- tabIndex={0}- role="button"- onMouseDown={(e) => {- e.preventDefault();- setHighlightedIndex(i);- handleSuggestionSelect(i);- }}- style={{ pointerEvents: "auto" }}- className="flex items-center justify-between border-border-control text-left"- key={`secret-reference-secret-${i + 1}`}- >- <div- className={`${- highlightedIndex === i ? "bg-surface-cool-active" : ""- } text-md relative mb-0.5 flex w-full cursor-pointer items-center justify-between rounded-md px-2 py-1 outline-hidden transition-all select-none hover:bg-surface-selected data-highlighted:bg-surface-selected`}- >- <div className="flex gap-2">- <div className="flex items-center text-warning">- <FontAwesomeIcon icon={faFolder} />- </div>- <div className="text-md text-left">{suggestion}</div>- </div>- </div>- </div>- ))}- </div>- </Popover.Content>- </Popover.Portal>- </Popover.Root>- );-};--const SecretPathInputWithProjectContext = ({- environment,- ...props-}: Omit<BaseProps, "projectId">) => {- const { currentProject } = useProject();- return (- <SecretPathInputBase- projectId={currentProject?.id || ""}- environment={environment || currentProject?.environments?.[0].slug}- {...props}- />- );-};--export const SecretPathInput = ({ projectId, ...props }: Props) => {- if (projectId !== undefined) {- return <SecretPathInputBase projectId={projectId} {...props} />;- }- return <SecretPathInputWithProjectContext {...props} />;-};diff --git a/frontend/src/components/v2/SecretPathInput/index.tsx b/frontend/src/components/v2/SecretPathInput/index.tsxdeleted file mode 100644index 5d8595891c..0000000000--- a/frontend/src/components/v2/SecretPathInput/index.tsx+++ /dev/null@@ -1 +0,0 @@-export { SecretPathInput } from "./SecretPathInput";