Reduced diff size#2
Open
utkarshdalal wants to merge 7 commits into
Open
Conversation
Move the Steam Auto Cloud prefix and absolute-path resolution helpers out of syncUserFiles() so the same path mapping can be reused by the later status snapshot code. This is intended to be a mechanical extraction only: the resolver keeps the existing rootoverride, addPath, embedded %GameInstall%, and remote file-list conversion behavior, and syncUserFiles() continues to call the same logic through the new resolver instance.
Move the local-vs-cached UserFileInfo diff calculation out of syncUserFiles() so both sync and status resolution can use one comparison function. This is intended to be a mechanical extraction only: the created, deleted, modified, and changesExist calculations are unchanged, including the existing SHA comparison logging.
Move local save discovery out of syncUserFiles() so the later cloud status snapshot can inspect local files without duplicating scan behavior. This is intended to be a mechanical extraction only: Windows UFS patterns, SteamUserData fallback scanning, prefix keys, timestamps, hashes, cloudRoot, and cloudPath are preserved.
Move the remote-newer conflict decision out of syncUserFiles() so the later status snapshot can classify pending download, upload, and conflict states with the same rules. This is intended to be a mechanical extraction only: cached local-change detection remains timed in microsecAcPrepUserFiles, the cache rehydration shortcut still writes the same DB rows, and conflict timestamps/UFS version are preserved.
Expose a read-only snapshot path for the UI to resolve cloud status without starting a sync. Add an optional phase callback to syncUserFiles() so SteamService can emit DOWNLOADING and UPLOADING status changes while preserving the existing sync flow.
Wire the Steam cloud snapshot and sync phase events into the library and app detail UI. This keeps the SteamAutoCloud sync behavior in the earlier mechanical commits and limits this commit to status presentation, user actions, and service-level state tracking.
8 tasks
cbc25e4 to
a7abdc2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restructures
SteamAutoCloud.ktso the diff againstmasteris purely additive (no churn insidesyncUserFiles()), making PR utkarshdalal#1383 easier to review.What this does
syncUserFiles()— the function body is now byte-identical tomaster, plus only:onPhaseStarted: ((isUploading: Boolean) -> Unit)? = nullparameterCloudPathResolver, file-diff, local-scan, remote-change decision) andfetchSyncSnapshot/CloudSyncSnapshotas a clearly demarcated additive block at the end of the file.fetchSyncSnapshotare renamed (snapshotFilesDiff,snapshotLocalUserFilesAsPrefixMap) so they don't collide with the inline lambdas of the same name still living insidesyncUserFiles().Resulting diff vs master
SteamAutoCloud.ktdiff vs masterThe whole change against master is now insertions only.
syncUserFiles()shows a 5-line diff (1 param + 4 callback calls); the rest is a new section at the bottom of the file.Tradeoff
Some logic that used to live inline in
syncUserFiles()is now duplicated by the snapshot-only helpers at the bottom. That's intentional for review-ability — it keeps the existing sync path untouched and isolates the genuinely-new code path. Can be DRYed up later if desired.Verification
External callers (
SteamService.syncUserFiles,SteamService.fetchSyncSnapshot,CloudSyncSnapshot) keep identical signatures.