diff --git a/src/App.svelte b/src/App.svelte index cce3116..f0fca95 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -315,6 +315,8 @@ let unlistenStartupRepository: (() => void) | undefined; let activeRepoPath = ""; let activeView: AppView = "management"; + let reviewCenterInitialQuery = ""; + let reviewCenterInitialSourceId = ""; let repoTabs: RepoTab[] = []; let repoTabContextMenu: RepoTabContextMenu | null = null; let recentRepoPaths: string[] = []; @@ -2587,9 +2589,11 @@ void backgroundRepoStatusTick(false); } - function openReviewCenter() { + function openReviewCenter(repository = "", sourceId = "") { if (isBusy) return; closeRepoTabContextMenu(); + reviewCenterInitialQuery = repository; + reviewCenterInitialSourceId = sourceId; activeView = "review-center"; trackEvent("review_center_opened", { integrations: Object.values(gitIntegrationSettings.providers).filter((provider) => provider.enabled && provider.tokenStored).length }); } @@ -5178,7 +5182,7 @@ {isBusy} language={appLanguage} onOpenManagement={openRepoManagement} - onOpenReviewCenter={openReviewCenter} + onOpenReviewCenter={() => openReviewCenter()} isActive={(path) => activeView === "repository" && sameRepoPath(activeRepoPath, path)} onSelect={selectRepoTab} onClose={closeRepoTab} @@ -5343,15 +5347,19 @@ {#if activeView === "management"} openReviewCenter(repository, sourceId)} /> {:else if activeView === "review-center"} { appSettingsOpen = true; }} /> diff --git a/src/lib/components/RepositoryDashboard.svelte b/src/lib/components/RepositoryDashboard.svelte index e1ac24e..9095a73 100644 --- a/src/lib/components/RepositoryDashboard.svelte +++ b/src/lib/components/RepositoryDashboard.svelte @@ -1,5 +1,8 @@