Skip to content

Feat/lbx 650#2117

Open
japa2k wants to merge 24 commits intomainfrom
feat/LBX-650
Open

Feat/lbx 650#2117
japa2k wants to merge 24 commits intomainfrom
feat/LBX-650

Conversation

@japa2k
Copy link
Copy Markdown
Contributor

@japa2k japa2k commented Mar 25, 2026

When submitting this pull request, I confirm the following (please check the boxes):

  • I have read the Hydra documentation.
  • I have checked that there are no duplicate pull requests related to this request.
  • I have considered, and confirm that this submission is valuable to others.
  • I accept that this submission may not be used and the pull request may be closed at the discretion of the maintainers.

Fill in the PR content:

japa2k and others added 16 commits March 25, 2026 00:06
…wnloadSettingsModal and RepacksModal, and update related user preferences in SettingsContextDownloads
…tails component for enhanced download handling
Comment thread src/renderer/src/pages/settings/settings-context-downloads.tsx Outdated
Comment thread src/renderer/src/pages/settings/settings-context-downloads.tsx
Copy link
Copy Markdown
Contributor

@chubbygrannychaser chubbygrannychaser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found two regressions that should be fixed before merge; see inline comments.

await DownloadManager.startDownload(download).then(() => {
return downloadsSublevel.put(gameKey, download);
});
await downloadsSublevel.put(gameKey, download);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Persisting the download before DownloadManager.startDownload() regresses the failure path. If startDownload() throws while resolving the URL / validating credentials, we now leave a queued+active record in LevelDB even though nothing actually started. The previous order only wrote after a successful start, so please either restore that ordering or clean up the inserted record in the catch block.

Comment thread src/renderer/src/pages/game-details/modals/download-settings-modal.tsx Outdated
setSelectedDownloader(getDefaultDownloader(availableDownloaders));
}, [getDefaultDownloader, userPreferences?.downloadsPath, downloadOptions]);

useEffect(() => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This modal rehydrates deleteArchiveFilesAfterExtraction on open, but automaticExtractionEnabled is still only initialized once from props. If the user toggles extraction, closes the modal, and reopens it, this checkbox can keep stale local state instead of reflecting userPreferences?.extractFilesByDefault ?? true. Please reset that state on open too, the same way you do for the new delete-archive toggle.

userPreferences?.deleteArchiveFilesAfterExtractionByDefault ??
false;

if (shouldDelete) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The automatic-delete path bypasses the existing deleteArchive flow and calls fs.unlink() directly. That loses the extra bookkeeping in src/main/events/library/delete-archive.ts (notably clearing installerSizeInBytes, plus centralized logging/error handling), so auto-deletion can leave stale installer metadata behind. Could this reuse the same deletion path instead of unlinking files inline?

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants