Skip to content

Commit 7729719

Browse files
committed
fix(ui): only show indexing modal when indexing starts successfully
Move modal logic into else branch so it only triggers when indexResponse.ok. Failed indexing still shows warning toast but no progress modal.
1 parent 5fa787c commit 7729719

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

frontend/src/components/dashboard/DashboardHome.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,8 @@ export function DashboardHome() {
157157
toast.warning(`${repo.name} added but indexing failed`, {
158158
description: errMsg
159159
})
160-
}
161-
162-
// Show progress for last repo
163-
if (repo === githubRepos[githubRepos.length - 1]) {
160+
} else if (repo === githubRepos[githubRepos.length - 1]) {
161+
// Only show progress modal for last repo if indexing started successfully
164162
setIndexingRepoId(data.repo_id)
165163
setIndexingRepoName(repo.name)
166164
setShowIndexingModal(true)

0 commit comments

Comments
 (0)