diff --git a/packages/insomnia/src/icons/256x256.png b/packages/insomnia/src/icons/256x256.png new file mode 100644 index 000000000..05bdf675f Binary files /dev/null and b/packages/insomnia/src/icons/256x256.png differ diff --git a/packages/insomnia/src/ui/components/codemirror/one-line-editor.tsx b/packages/insomnia/src/ui/components/codemirror/one-line-editor.tsx index 1d66e334a..877dcdcb8 100644 --- a/packages/insomnia/src/ui/components/codemirror/one-line-editor.tsx +++ b/packages/insomnia/src/ui/components/codemirror/one-line-editor.tsx @@ -172,10 +172,15 @@ export const OneLineEditor = forwardRef codeMirror.current.on('dragstart', preventDefault); codeMirror.current.setCursor({ line: -1, ch: -1 }); - // Actually set the value - codeMirror.current?.setValue(defaultValue || ''); - // Clear history so we can't undo the initial set - codeMirror.current?.clearHistory(); + + // console.log("did mount - " + defaultValue, "_:" + codeMirror.current.getValue()) + + if (defaultValue === codeMirror.current.getValue()) { + // Actually set the value + codeMirror.current?.setValue(defaultValue || ''); + // Clear history so we can't undo the initial set + codeMirror.current?.clearHistory() + } // Setup nunjucks listeners if (!readOnly && handleRender && !settings.nunjucksPowerUserMode) { codeMirror.current?.enableNunjucksTags( diff --git a/packages/insomnia/src/ui/components/panes/request-pane.tsx b/packages/insomnia/src/ui/components/panes/request-pane.tsx index e49b1be29..848045244 100644 --- a/packages/insomnia/src/ui/components/panes/request-pane.tsx +++ b/packages/insomnia/src/ui/components/panes/request-pane.tsx @@ -108,7 +108,8 @@ export const RequestPane: FC = ({ ':workspaceId', ) as WorkspaceLoaderData; // Force re-render when we switch requests, the environment gets modified, or the (Git|Sync)VCS version changes - const uniqueKey = `${activeEnvironment?.modified}::${requestId}::${gitVersion}::${activeRequestSyncVersion}::${activeRequestMeta?.activeResponseId}`; + const uniqueKeyReq = `${activeEnvironment?.modified}::${requestId}::${gitVersion}::${activeRequestSyncVersion}` + const uniqueKey = `${uniqueKeyReq}::${activeRequestMeta?.activeResponseId}`; if (!activeRequest) { return ; @@ -129,7 +130,7 @@ export const RequestPane: FC = ({ queryAllWorkspaceUrls(workspaceId, models.request.type, requestId)} nunjucksPowerUserMode={settings.nunjucksPowerUserMode} setLoading={setLoading} diff --git a/packages/insomnia/src/ui/components/request-url-bar.tsx b/packages/insomnia/src/ui/components/request-url-bar.tsx index 6da24518c..5204efd80 100644 --- a/packages/insomnia/src/ui/components/request-url-bar.tsx +++ b/packages/insomnia/src/ui/components/request-url-bar.tsx @@ -194,6 +194,10 @@ export const RequestUrlBar = forwardRef(({ const { url, method } = activeRequest; const isEventStreamOpen = useReadyState({ requestId: activeRequest._id, protocol: 'curl' }); const isCancellable = currentInterval || currentTimeout || isEventStreamOpen; + + + console.log("did mount uniquenessKey", uniquenessKey); + return (