Skip to content

Fix Workshop Mods for YOMI:HUSTLE when using bionic steam#1745

Closed
Nightwalker743 wants to merge 1 commit into
utkarshdalal:masterfrom
Nightwalker743:agent/fix-yomi-hustle-bionic-steam
Closed

Fix Workshop Mods for YOMI:HUSTLE when using bionic steam#1745
Nightwalker743 wants to merge 1 commit into
utkarshdalal:masterfrom
Nightwalker743:agent/fix-yomi-hustle-bionic-steam

Conversation

@Nightwalker743

@Nightwalker743 Nightwalker743 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Description

Fix Workshop Mods for YOMI:HUSTLE when using bionic steam

Recording

https://drive.google.com/file/d/1E_O43I_LkIXG4x8QPA-Fu3l6uVTVPzZ6/view?usp=drivesdk

Type of Change

  • Bug fix
  • Performance / stability improvement
  • Compatibility improvements
  • Other (requires prior approval)

Checklist

  • If I have access to #code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed.
  • This change aligns with the current project scope (core functionality, stability, or performance). If not, it has been explicitly approved beforehand.
  • I have attached a recording of the change.
  • I have read and agree to the contribution guidelines in CONTRIBUTING.md.

Summary by cubic

Fixes YOMI:HUSTLE Workshop mods on Bionic Steam. We now keep ZIP archives and symlink them directly, restoring removed archives to maintain multiplayer hashes.

  • Bug Fixes
    • Added YOMI_HUSTLE_APP_ID and treat its Workshop payloads as flat .zip files (no extraction).
    • Detect older installs that extracted and deleted ZIPs; force a one-time re-download to restore the original archive.
    • Extended WorkshopSymlinker to symlink only allowed extensions (e.g., .zip) into the target mod directory.
    • Added targeted warnings for YOMI sync errors to help troubleshooting.

Written for commit 0a0cf41. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Improved Workshop mod synchronization for Yomi Hustle.
    • Restores missing original ZIP archives when extracted mod content is incomplete.
    • Ensures ZIP-based mod files are linked correctly across supported mod-path configurations.
    • Added safeguards and warnings when expected ZIP content cannot be found.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

WorkshopManager adds Yomi Hustle-specific recovery and ZIP filtering. WorkshopSymlinker accepts extension filters, propagates them through sync operations, and restricts flat-file symlinks to matching payloads.

Changes

Yomi Hustle workshop synchronization

Layer / File(s) Summary
Extension-filtered flat-file symlinking
app/src/main/java/app/gamenative/workshop/WorkshopSymlinker.kt
WorkshopSymlinker normalizes configured extensions, enables filtered flat-file syncing, and limits payloads to matching extensions.
Yomi synchronization and integration
app/src/main/java/app/gamenative/workshop/WorkshopManager.kt
Yomi Hustle items missing their original ZIP after extraction are marked for re-sync, while manual and automatic symlinking paths pass ZIP-only filtering.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant WorkshopManager
  participant WorkshopSymlinker
  participant WorkshopContent
  WorkshopManager->>WorkshopSymlinker: Sync Yomi items with ZIP filtering
  WorkshopSymlinker->>WorkshopContent: Select ZIP payloads
  WorkshopSymlinker->>WorkshopContent: Create filtered symlinks
Loading

Possibly related PRs

Suggested reviewers: utkarshdalal

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: a YOMI:HUSTLE Workshop fix for Bionic Steam.
Description check ✅ Passed The description follows the required template and includes the change summary, recording, type, and checklist.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Nightwalker743
Nightwalker743 marked this pull request as ready for review July 20, 2026 04:54
@Nightwalker743
Nightwalker743 deleted the agent/fix-yomi-hustle-bionic-steam branch July 20, 2026 04:56

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/src/main/java/app/gamenative/workshop/WorkshopManager.kt`:
- Around line 327-343: Update the YOMI recovery branch in WorkshopManager’s item
filter to use any { ... } != true for the missing-ZIP check. Before returning
true, call invalidateWorkshopItemForRedownload with the item’s directory/item
context so the existing extracted directory tree is deleted and the next
download starts cleanly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 367045d6-ac9b-47e9-8801-c9bf29e13785

📥 Commits

Reviewing files that changed from the base of the PR and between e0c02c8 and 0a0cf41.

📒 Files selected for processing (2)
  • app/src/main/java/app/gamenative/workshop/WorkshopManager.kt
  • app/src/main/java/app/gamenative/workshop/WorkshopSymlinker.kt

Comment on lines +327 to +343
// Older builds extracted YOMI's Workshop ZIPs and deleted the archives.
// Re-download those items once so the original archive (and therefore
// its multiplayer hash) is restored instead of rebuilding a different ZIP.
if (
item.appId == YOMI_HUSTLE_APP_ID &&
File(itemDir, ".zip_extracted").isFile &&
itemDir.listFiles()?.none {
it.isFile && it.extension.equals("zip", ignoreCase = true)
} != false
) {
Timber.tag(TAG).i(
"Item ${item.publishedFileId} '${item.title}' needs sync: " +
"restoring YOMI Workshop ZIP removed by an older build"
)
return@filter true
}

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.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Clear the directory to reclaim disk space and simplify the check.

Simply returning true here flags the item for redownload but does not delete the existing directory. Because older builds extracted the ZIP payload directly into this directory, all of those extracted files will remain indefinitely alongside the newly downloaded ZIP, wasting disk space.

Call the existing invalidateWorkshopItemForRedownload helper to delete the directory tree before returning true. This guarantees a completely fresh download and reclaims space.

Additionally, you can express the missing-ZIP check more idiomatically in Kotlin: any { ... } != true behaves identically to none { ... } != false (handling both empty and null arrays gracefully) but is much easier to read.

♻️ Proposed refactor
             // Older builds extracted YOMI's Workshop ZIPs and deleted the archives.
             // Re-download those items once so the original archive (and therefore
             // its multiplayer hash) is restored instead of rebuilding a different ZIP.
             if (
                 item.appId == YOMI_HUSTLE_APP_ID &&
                 File(itemDir, ".zip_extracted").isFile &&
-                itemDir.listFiles()?.none {
+                itemDir.listFiles()?.any {
                     it.isFile && it.extension.equals("zip", ignoreCase = true)
-                } != false
+                } != true
             ) {
-                Timber.tag(TAG).i(
-                    "Item ${item.publishedFileId} '${item.title}' needs sync: " +
-                        "restoring YOMI Workshop ZIP removed by an older build"
+                invalidateWorkshopItemForRedownload(
+                    itemDir,
+                    partialDir,
+                    "restoring YOMI Workshop ZIP removed by an older build for '${item.title}'"
                 )
                 return@filter true
             }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Older builds extracted YOMI's Workshop ZIPs and deleted the archives.
// Re-download those items once so the original archive (and therefore
// its multiplayer hash) is restored instead of rebuilding a different ZIP.
if (
item.appId == YOMI_HUSTLE_APP_ID &&
File(itemDir, ".zip_extracted").isFile &&
itemDir.listFiles()?.none {
it.isFile && it.extension.equals("zip", ignoreCase = true)
} != false
) {
Timber.tag(TAG).i(
"Item ${item.publishedFileId} '${item.title}' needs sync: " +
"restoring YOMI Workshop ZIP removed by an older build"
)
return@filter true
}
// Older builds extracted YOMI's Workshop ZIPs and deleted the archives.
// Re-download those items once so the original archive (and therefore
// its multiplayer hash) is restored instead of rebuilding a different ZIP.
if (
item.appId == YOMI_HUSTLE_APP_ID &&
File(itemDir, ".zip_extracted").isFile &&
itemDir.listFiles()?.any {
it.isFile && it.extension.equals("zip", ignoreCase = true)
} != true
) {
invalidateWorkshopItemForRedownload(
itemDir,
partialDir,
"restoring YOMI Workshop ZIP removed by an older build for '${item.title}'"
)
return@filter true
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/main/java/app/gamenative/workshop/WorkshopManager.kt` around lines
327 - 343, Update the YOMI recovery branch in WorkshopManager’s item filter to
use any { ... } != true for the missing-ZIP check. Before returning true, call
invalidateWorkshopItemForRedownload with the item’s directory/item context so
the existing extracted directory tree is deleted and the next download starts
cleanly.

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.

1 participant