Skip to content

Commit a7ea28a

Browse files
authored
Merge pull request #23642 from Nexus-Mods/task/laz-679
Enable bulk install
2 parents d471095 + 1d94d41 commit a7ea28a

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

src/renderer/src/extensions/health_check/views/HealthCheckPage.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,16 +142,21 @@ function HealthCheckPage({ api, onRefresh }: IHealthCheckPageProps) {
142142
hiddenItems.forEach((item) => item.content.toggleHide?.(api, item.entry));
143143
};
144144

145-
// 1-click install all the no-choice downloads (premium-gated for free users).
146-
// TODO(LAZ-471): the real download resolution and cross-check de-duplication of
147-
// in-flight downloads live in the per-item install actions (still stubbed for
148-
// file-level); this just fans out to each contributed item.
145+
// 1-click install all: premium-gated for free users. Items are de-duplicated first by
146+
// collectInstallAllItems (by key) and again here at execution time via the seen set,
147+
// so a file shared across multiple source reports is only queued once.
149148
const installAll = () => {
150149
if (showPremiumAd) {
151150
setShowInstallAllPremium(true);
152151
return;
153152
}
154-
installAllItems.forEach((item) => item.install());
153+
const seen = new Set<string>();
154+
for (const item of installAllItems) {
155+
if (!seen.has(item.key)) {
156+
seen.add(item.key);
157+
item.install();
158+
}
159+
}
155160
};
156161

157162
const activeList =
@@ -233,13 +238,10 @@ function HealthCheckPage({ api, onRefresh }: IHealthCheckPageProps) {
233238
</TabBar>
234239

235240
<div className="flex items-center gap-x-2">
236-
{/* TODO(LAZ-662): install-all is disabled for the MVP; re-enable once
237-
the bulk download resolution + in-flight de-duplication lands. */}
238241
{selectedTab === "active" && installAllItems.length > 0 && (
239242
<Button
240243
appearance="moderate"
241244
brand="neutral"
242-
disabled
243245
leftIconPath={mdiDownload}
244246
rightIcon={showPremiumAd ? <PremiumBadge /> : undefined}
245247
size="sm"

0 commit comments

Comments
 (0)