feat(dashboard): extract PR status loader and surface badges
Move pull-request discovery and caching into a dedicated background loader component. The repository dashboard no longer performs the network/keychain work itself and instead receives a shared badge state that is refreshed and persisted independently. The app wires the loader into top-level state and binds badge data into the dashboard view. - Add a background loader to fetch, group and cache open PR counts. - Simplify dashboard to accept and render pull-request badge state. - Wire loader into app-level state and bind badges to the dashboard.
This commit is contained in:
+9
-1
@@ -10,6 +10,9 @@
|
||||
|
||||
import TitleBar from "./lib/TitleBar.svelte";
|
||||
import RepoToolbar from "./lib/RepoToolbar.svelte";
|
||||
import PullRequestStatusLoader from "./lib/components/PullRequestStatusLoader.svelte";
|
||||
import type { PullRequestBadgeState } from "./lib/pullRequestBadges";
|
||||
let pullRequestBadges: Record<string, PullRequestBadgeState> = {};
|
||||
import RepositoryDashboard from "./lib/components/RepositoryDashboard.svelte";
|
||||
import ReviewCenter from "./lib/components/ReviewCenter.svelte";
|
||||
import RepoTabs from "./lib/RepoTabs.svelte";
|
||||
@@ -5548,10 +5551,15 @@
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
<PullRequestStatusLoader
|
||||
repos={dashboardRepos} language={appLanguage}
|
||||
integrations={gitIntegrationSettings} loadCredential={loadStoredCredential}
|
||||
bind:pullRequestBadges
|
||||
/>
|
||||
{#if activeView === "management"}
|
||||
<RepositoryDashboard
|
||||
repos={dashboardRepos} language={appLanguage} {isBusy}
|
||||
integrations={gitIntegrationSettings} loadCredential={loadStoredCredential}
|
||||
{pullRequestBadges}
|
||||
onOpen={selectRepoTab} onAdd={chooseRepositoryFolder} onClone={openCloneDialog}
|
||||
onInit={initializeRepository}
|
||||
onFavorite={toggleFavoriteRepo} onClose={closeDashboardRepository}
|
||||
|
||||
Reference in New Issue
Block a user