From 53055556e93cf65eec00f5e550b81f2dc408f5d2 Mon Sep 17 00:00:00 2001 From: Vivek Thuravupala <2700229+godfrzero@users.noreply.github.com> Date: Wed, 20 May 2026 15:19:00 -0700 Subject: [PATCH 1/5] fix: skip file name collision validation when file name is unchanged MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The validate callback parameter shadowed the outer `fileName` variable (which holds the original name with extension). The folder-children filter compared against the bare input value instead of the full `fileName`, so the current file was never excluded — causing a false "already exists" error whenever only the workspace name was edited. Renaming the parameter to `inputValue` restores access to the outer `fileName` so the filter correctly excludes the existing file before checking for collisions. Co-Authored-By: Claude Sonnet 4.6 --- .../src/ui/components/modals/workspace-settings-modal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/insomnia/src/ui/components/modals/workspace-settings-modal.tsx b/packages/insomnia/src/ui/components/modals/workspace-settings-modal.tsx index 63490174a01b..ef1611dcce74 100644 --- a/packages/insomnia/src/ui/components/modals/workspace-settings-modal.tsx +++ b/packages/insomnia/src/ui/components/modals/workspace-settings-modal.tsx @@ -144,11 +144,11 @@ export const WorkspaceSettingsModal = ({ workspace, gitFilePath, project, mockSe { + validate={inputValue => { if ( selectedFolderChildren .filter(name => name !== fileName) - .includes(safeToUseInsomniaFileNameWithExt(fileName)) + .includes(safeToUseInsomniaFileNameWithExt(inputValue)) ) { return 'A file with the same name already exists in the selected folder'; } From d2b2d3884f7bb9db66267d3b2cbe128e4d2b3e6c Mon Sep 17 00:00:00 2001 From: Vivek Thuravupala <2700229+godfrzero@users.noreply.github.com> Date: Wed, 20 May 2026 15:21:49 -0700 Subject: [PATCH 2/5] fix: make .yaml extension shift with input text in workspace settings The invisible sizer span that drives the CSS grid column width had static content (the initial filename), so the column never resized as the user typed and the .yaml suffix stayed at a fixed position. Switching the TextField to controlled mode (value + onChange) lets the sizer span reflect the live input value, causing the .yaml label to follow the text as characters are added or removed. Also removed the excess pr-7 right-padding since the extension is now positioned by the grid rather than by padding offset. Co-Authored-By: Claude Sonnet 4.6 --- .../ui/components/modals/workspace-settings-modal.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/insomnia/src/ui/components/modals/workspace-settings-modal.tsx b/packages/insomnia/src/ui/components/modals/workspace-settings-modal.tsx index ef1611dcce74..576b77a39c80 100644 --- a/packages/insomnia/src/ui/components/modals/workspace-settings-modal.tsx +++ b/packages/insomnia/src/ui/components/modals/workspace-settings-modal.tsx @@ -83,6 +83,8 @@ export const WorkspaceSettingsModal = ({ workspace, gitFilePath, project, mockSe const fileName = gitFilePath?.split('/').pop() || ''; const selectedFolderChildren = gitRepoTreeFetcher.data?.folderList[selectedFolder] || []; + const [fileNameValue, setFileNameValue] = useState(safeToUseInsomniaFileName(fileName || '')); + return ( { if ( selectedFolderChildren @@ -155,19 +159,18 @@ export const WorkspaceSettingsModal = ({ workspace, gitFilePath, project, mockSe return null; }} - defaultValue={safeToUseInsomniaFileName(fileName || '')} className="group relative flex w-full max-w-full shrink-0 flex-col gap-2 overflow-hidden" >