Skip to content

Wardrobe: Load mod (.zip) can import several zips at once - #8

Merged
efficiencyx merged 1 commit into
efficiencyx:mainfrom
runnevia-ryn:mod-multi-import
Nov 7, 2026
Merged

efficiencyx merged 1 commit into
efficiencyx:mainfrom
runnevia-ryn:mod-multi-import

Conversation

@runnevia-ryn

@runnevia-ryn runnevia-ryn commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The wardrobe's Load mod (.zip) button can now pick several zips at once (Shift/Ctrl in the file dialog). They are imported one after another, and a zip that fails is skipped so the rest still load. With more than one file, the status line shows progress (Loading 2/5…) and then a summary of what loaded and which files failed and why. Picking a single file behaves and reads exactly as before.

  • importZip updates the shared mod list and state, writes to IndexedDB and calls applyAll(), so the files are imported sequentially rather than in parallel.
  • input.files is copied before input.value = '', because clearing the value also empties the live FileList.
  • engine.js and the stored format are unchanged. Mods still stay in the browser.
  • Bumps ?v= to 32 for the wardrobe modules that import each other (mods/section.js, wardrobe/panel.js, tiles.js, looks.js, color-picker.js) and to 40 for wardrobe.js in wardrobe.html. They form one import cycle, so bumping only some of them would leave a module referenced at two versions.

Why

Loading a set of mods meant opening the file dialog once per zip. In the game's Mods folder you can select a whole range at once, so this brings the wardrobe closer to that.

Validation

  • sh .github/scripts/check-cache-busters.sh: ok, no version skew.

  • node --check on the seven changed JS files (copied to .mjs): passed. Node isn't installed on my Windows machine, so this ran in a separate Linux environment (Node 22) on a copy of the tree with the same changes applied.

  • Manual test on Windows 10, bare-metal JunOS v1.3.1, Chrome 156.0.8078.80. I copied the four changed files into the install's webapp/ and hard-refreshed (Ctrl+Shift+R):

    • one mod zip: same message as before;
    • two or three mod zips: progress shown, all of them loaded and listed;
    • mod zips plus a zip without mod.json: the mods loaded, the summary named the bad zip and its error;
    • reload: imported mods still there;
    • cancelling the dialog: nothing changes.
  • Network tab showed section.js?v=32 and wardrobe.js?v=40 after the refresh.

  • After the version bump: re-tested a multi-zip import; the Network tab showed a single panel.js?v=32 and none of the wardrobe modules at v=31.

  • Console: no new errors. The only entries were the expected console.error for the bad zip and the assets/items/manifest.json 404, which also appears without this change.

  • Not run: Docker / sync-webapp.sh, Colab and Android (no setup for them here). The change is client-side JS only.

  • I ran targeted syntax or automated checks for the files I changed.

  • I exercised the affected behavior directly where practical.

  • I checked the relevant service or browser logs.

Platforms affected

Web frontend only, so the same on Docker, Windows and Colab; tested on Windows. On Android the app's file picker uses ActivityResultContracts.OpenDocument (one file), so it stays single-select there and behaves as before. Supporting several files on Android would need a change to MainActivity.kt, which I left out of this PR.

Checklist

  • The change is focused and preserves existing APIs and configuration unless documented otherwise.
  • I updated documentation and .env.example when behavior or configuration changed. (No configuration change, and the docs don't describe this button.)
  • I did not include secrets, private chat data, model weights, or extracted/recovered game assets.
  • Frontend changes remain dependency-free ES modules and use consistent ?v= cache-busters.
  • For changes under webapp/, I ran ./sync-webapp.sh (-s only for static files) and hard-refreshed, or explained above why I could not. (Windows bare-metal install: files copied in directly, then a hard refresh.)
  • Streaming changes handle markers split across arbitrary chunks and do not expose hidden action or bookkeeping tags. (Not applicable.)
  • Prompt changes preserve prefix stability and keep dynamic context after the user's question, unless the PR explicitly explains why that invariant changes. (Not applicable.)

Screenshots or recordings

None. The only visible change is the status line text, and the mod list next to it shows mod art.

The file input now accepts multiple files. They are imported one at a time, because importZip rewrites the shared mod list and state and re-applies the textures each time. A zip that fails is skipped and the rest still load; the message shows how many loaded and which files failed and why. With a single file the messages are the same as before.

Bumps ?v= to 32 for the wardrobe modules that import each other (mods/section.js, wardrobe/panel.js, tiles.js, looks.js, color-picker.js), and to 40 for wardrobe.js in wardrobe.html.
@runnevia-ryn runnevia-ryn mentioned this pull request Nov 7, 2026
8 of 10 tasks
efficiencyx added a commit that referenced this pull request Nov 7, 2026
…ips at once, UTF-8 fixes for memories, chat titles and llama.cpp tool calls (#8, #9)

Co-Authored-By: RangarNavia <43579415+RangarNavia@users.noreply.github.com>
@efficiencyx
efficiencyx merged commit afa01d2 into efficiencyx:main Nov 7, 2026
8 checks passed
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.

2 participants