Skip to content

Comments

Test#478

Closed
Wyvest wants to merge 12 commits intoPolyfrost:oneclient/mainfrom
Wyvest:oneclient/main
Closed

Test#478
Wyvest wants to merge 12 commits intoPolyfrost:oneclient/mainfrom
Wyvest:oneclient/main

Conversation

@Wyvest
Copy link
Member

@Wyvest Wyvest commented Feb 23, 2026

Description

Related Issue(s)

Fixes #

How to test

Documentation

Copilot AI and others added 3 commits February 23, 2026 15:38
* Initial plan

* feat: add seamless polypack bundle auto-update for OneClient clusters

Track installed bundles per cluster and automatically re-install
updated modpacks from the DataStorage repo on startup.

Co-authored-by: Wyvest <45589059+Wyvest@users.noreply.github.com>

* fix: handle missing parent directory safely in save_installed_state

Co-authored-by: Wyvest <45589059+Wyvest@users.noreply.github.com>

* refactor: differential bundle updates preserving user configs, toggles, and custom mods

Instead of reinstalling the entire bundle (which overwrites configs and
ignores user state), the update mechanism now:
- Tracks package hashes per installed bundle to distinguish bundle
  packages from user-installed custom mods
- Only installs NEW packages added to the bundle
- Only updates existing bundle packages if the user still has the old
  version linked (respects user removals/toggles)
- Never copies overrides during updates (preserves user configs/settings)
- Leaves user's custom-installed mods completely untouched

Co-authored-by: Wyvest <45589059+Wyvest@users.noreply.github.com>

* fix: simplify update logic, remove broken is_same_project stub, improve warning context

- Replaced broken is_same_project_different_version (always true) with
  clear hash-based diffing: old hashes not in new bundle = replaced mods
- Only install updated packages if user still has old bundle mods linked
- If hash is in old bundle but not linked, user removed it — skip
- Improved warning messages with cluster name and counts

Co-authored-by: Wyvest <45589059+Wyvest@users.noreply.github.com>

* fix: StrippedCluster naming

* feat: bindings

* feat: badly done frontend for downloading mods

Implements frontend code for handling `installBundle` when downloading
mods form bundles

* fix: only install entire bundle when all enabled mods are selected

When selecting some but not all mods inside a bundle, previously the
entire bundle was installed via installBundle. Now, installBundle is
only called when ALL enabled files from a bundle are selected. When
only some mods are selected, they are downloaded individually, so
users get exactly what they chose.

Co-authored-by: Wyvest <45589059+Wyvest@users.noreply.github.com>

* remove: parallel_mod_downloading

* nuke code

* feat: mod updating

Something something my head hurts and rust is stupid
This updates mods (hopefully)
Worked on my machine :clueless:

* feat: mod removal

Removes mods when they are no longer inside the bundle

* feat: mod additions

Installs new mods when they are detected in the bundles

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Wyvest <45589059+Wyvest@users.noreply.github.com>
Co-authored-by: Jacob <kathund@proton.me>
Co-authored-by: Wyvest <wyvestbusiness@gmail.com>
Introduce a global BUNDLE_SYNCING AtomicBool and expose isBundleSyncing via IPC so the frontend can skip syncs while bundle updates run. Update bundle update logic to: ignore disabled files, index external packages, download the new package before removing the old one, then link and track the new package (avoiding mid-download removal). Adjust logging and error handling accordingly to reduce race conditions between the FS watcher and bundle updates.
When bundle files are updated/added/removed, re-extract override folders for affected bundles but skip existing files to preserve user customizations. Adds logic in apply_bundle_updates to collect affected bundle names, lookup the cluster and bundles, and call a new copy_overrides_folder_no_overwrite helper. Implements copy_overrides_folder_no_overwrite in mrpack.rs which extracts 'overrides/' entries from the modpack archive, creates directories as needed, and skips writing files that already exist (with logging and error handling). This keeps config files, resource packs and other overridden assets in sync without overwriting user changes.
Enhance bundle update logic by fetching all linked packages and inferring bundle subscriptions when an installed package matches an enabled bundle file; use the full set of installed package IDs to avoid re-proposing existing packages. Add tracing::instrument(skip(self)) to BundlesManager::get_bundles_for and remove a redundant debug log in bundle download. Remove several noisy tracing::debug calls from core HTTP utilities. Regenerate frontend bindings to expand ApplyBundleUpdatesResult (include failed arrays) and reorder/adjust the ARGS_MAP and Router typings. Also reformat imports in the packages entity module.
Rust: When a package hash exists in the database but the cached file is missing, re-download the package instead of treating it as already present. Both download_package and download_external_package now check the cached file path; if the file is present they short-circuit (external packages are hard-linked into the cluster), otherwise they log a warning and mark the record for update. Added persist_downloaded_package to update existing DB records via dao::update_package_by_hash instead of always inserting. This prevents stale DB entries from causing incorrect skips and centralizes persistence logic.
Make bundle update checking provider-aware by introducing managed/external bundle keys and using linked package provider metadata when matching bundle files to installed packages. Index hidden dependency keys to avoid inferring subscriptions from transitive-only deps, infer subscriptions from installed managed packages, and support bundle combinability when resolving updates. Track planned addition keys to avoid duplicate additions and add detailed logging and skip counters for missing provider metadata. Add has_bundle_package_mapping() to bundle_dao and use it in package removal to avoid deleting bundle overrides when a replacement mapping already exists.
@Wyvest Wyvest closed this by deleting the head repository Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants