From b8fcb7f04b6a47cd913710522ead37cc07c56fdd Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 27 Apr 2026 04:23:19 +0000 Subject: [PATCH] fix: preserve s3 rootPath when reloading git repo viewer (#8942) Co-authored-by: Claude Opus 4.7 (1M context) --- frontend/src/lib/components/GitRepoViewer.svelte | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/frontend/src/lib/components/GitRepoViewer.svelte b/frontend/src/lib/components/GitRepoViewer.svelte index 4995e5b636..22b584ef4d 100644 --- a/frontend/src/lib/components/GitRepoViewer.svelte +++ b/frontend/src/lib/components/GitRepoViewer.svelte @@ -24,7 +24,7 @@ let { gitRepoResourcePath, gitSshIdentity, commitHashInput = $bindable() }: Props = $props() - let commitHash = $derived(commitHashInput); + let commitHash = $derived(commitHashInput) async function populateS3WithGitRepo() { const workspace = $workspaceStore @@ -34,7 +34,7 @@ workspace: workspace, resource_path: gitRepoResourcePath, git_ssh_identity: gitSshIdentity, - commit: commitHash, + commit: commitHash } isLoadingRepoClone = true @@ -53,7 +53,7 @@ if (jobSuccess) { await JobService.getCompletedJobResult({ workspace, id: jobId }) } else { - error = (testResult.result as any).error.message ?? "Failed to clone" + error = (testResult.result as any).error.message ?? 'Failed to clone' } }, timeoutCode: async () => { @@ -84,7 +84,7 @@ const result = await ResourceService.getGitCommitHash({ workspace: $workspaceStore!, path: gitRepoResourcePath, - gitSshIdentity: gitSshIdentity?.join(",") + gitSshIdentity: gitSshIdentity?.join(',') }) commitHashInput = result.commit_hash @@ -117,13 +117,12 @@ untrack(() => { fetchGitRepoData() }) - }) $effect(() => { ;[commitHash, pathExists, isCheckingPathExists, isLoadingCommitHash] untrack(() => { - s3FilePicker?.open(undefined) + s3FilePicker?.reloadContent() }) })