ManageMC: rename, pack artwork, modpack import and the in-game window #2

Merged
Bewerkt merged 11 commits from claude/minecraft-mod-manager-h5capw into main 2026-10-12 14:32:59 +00:00
Bewerkt commented 2026-10-12 13:17:18 +00:00 (Migrated from github.com)

What changes

Rename ManageMod → ManageMC

  • Mod id, Java package, jar (managemc.jar), config (config/managemc.json), data folder (.managemc), MANAGEMC_PACK_URL, UI/docs, and the Docker image ghcr.io/<owner>/managemc. Links to the GitHub repo are unchanged.
  • Note: the database file is now managemc.sqlite. An existing instance (if any) starts empty.

Pack icons, backgrounds, descriptions and a new overview

  • Each pack gets an icon (PNG/JPEG, ≤ 2048 px, 2 MB) and a short description. Images are validated on file signature and dimensions; no SVG because of scripts.
  • Optional background per pack (PNG/JPEG, 320×180 to 4096 px, 8 MB). It fills the ManageMC window in Minecraft as soon as a player connects. On the public pack page it is a banner with the icon bottom-left and the text on a soft gradient. Without a background, the blurred icon is used.
  • Icons and backgrounds share one content-addressed image store (data/images). Icons from the earlier data/icons directory are moved there on startup.
  • Overview in CurseForge style: tiles with image, name and a two-line description, with a copy-link button on hover.
  • The manifest carries iconPath, backgroundPath and description; the mod only accepts server-generated image paths. Images are served with Content-Security-Policy: sandbox.

Import existing modpacks

  • Packs → Import pack accepts a Modrinth .mrpack, a CurseForge export (.zip) or a zip of a mods folder. The new pack takes its name, Minecraft version and loader from the file; for a plain zip the admin picks them.
  • Mods are added by a background job. The dialog shows upload progress, mods processed, and a report of what could not be imported.
  • Modrinth files are resolved by hash and CurseForge files by project/file id, so imported mods keep receiving update checks. Jars in overrides/mods are imported as uploads; configs and resource packs are skipped with a note. Forge/Quilt packs are refused.
  • Security: admin-only (session + CSRF). Archives are read with entry-count and size caps, manifests are fully validated, and downloads only come from the official CDNs and are hash-verified. Providers gained getVersion(); CurseForge projects that are not mods are refused.

The ManageMC window in Minecraft

  • On a client, the sync runs in a separate window process while the game waits. First start asks for the link and shows the pack. During download the pack's background (or blurred icon) shows behind the centered pack name and "Powered by ManageMC". A translucent card shows a progress bar by bytes, "12 of 40 mods · 34.2 of 120.5 MB" and an estimated time left. Then "Ready to play!".
  • The window can be resized from its edges and corners (minimum 720×560) and double-clicked to maximize. The background stays cover-fitted and is re-rendered in full quality after resizing.
  • Protocol: the helper prints exactly one line MANAGEMC_RESULT CONTINUE|RESTART. If the helper can't start, the game syncs in-process as before. Servers sync in-process.
  • Security: text from the server is never rendered as HTML (html.disable on all labels). Images are decoded only after a dimension check.

Fixes

  • Apostrophes in names in mods.toml ("Farmer's Delight") were cut off.
  • The window backdrop was scaled before the window had a size.
  • Progress bar animation timers no longer leak.
  • The server's request timeout is raised to 30 minutes, so large uploads don't time out.

Tests

  • Server: 34 tests. They include the importer end to end: a mods-folder zip, a Modrinth pack with overrides and side hints, refusal of Forge packs, of CurseForge packs without a key, and of broken files. They also cover the format parsers, image validation, background routes and the icon-directory migration.
  • Mod: 36 tests, including the remaining-time estimator, progress texts, byte-level progress and manifest image paths.
  • Manual: in Xvfb, the window with a 1920×1080 background, a simulated download and a resize driven by a robot. In a headless browser, the import dialog (12 jars from a mods zip) and the pack page on desktop and phone.

🤖 Generated with Claude Code

https://claude.ai/code/session_016zdMyacgAzBQEBSiHc6aZJ

## What changes **Rename ManageMod → ManageMC** - Mod id, Java package, jar (`managemc.jar`), config (`config/managemc.json`), data folder (`.managemc`), `MANAGEMC_PACK_URL`, UI/docs, and the Docker image `ghcr.io/<owner>/managemc`. Links to the GitHub repo are unchanged. - **Note:** the database file is now `managemc.sqlite`. An existing instance (if any) starts empty. **Pack icons, backgrounds, descriptions and a new overview** - Each pack gets an icon (PNG/JPEG, ≤ 2048 px, 2 MB) and a short description. Images are validated on file signature and dimensions; no SVG because of scripts. - Optional **background** per pack (PNG/JPEG, 320×180 to 4096 px, 8 MB). It fills the ManageMC window in Minecraft as soon as a player connects. On the public pack page it is a banner with the icon bottom-left and the text on a soft gradient. Without a background, the blurred icon is used. - Icons and backgrounds share one content-addressed image store (`data/images`). Icons from the earlier `data/icons` directory are moved there on startup. - Overview in CurseForge style: tiles with image, name and a two-line description, with a copy-link button on hover. - The manifest carries `iconPath`, `backgroundPath` and `description`; the mod only accepts server-generated image paths. Images are served with `Content-Security-Policy: sandbox`. **Import existing modpacks** - **Packs → Import pack** accepts a Modrinth `.mrpack`, a CurseForge export (`.zip`) or a zip of a `mods` folder. The new pack takes its name, Minecraft version and loader from the file; for a plain zip the admin picks them. - Mods are added by a background job. The dialog shows upload progress, mods processed, and a report of what could not be imported. - Modrinth files are resolved by hash and CurseForge files by project/file id, so imported mods keep receiving update checks. Jars in `overrides/mods` are imported as uploads; configs and resource packs are skipped with a note. Forge/Quilt packs are refused. - Security: admin-only (session + CSRF). Archives are read with entry-count and size caps, manifests are fully validated, and downloads only come from the official CDNs and are hash-verified. Providers gained `getVersion()`; CurseForge projects that are not mods are refused. **The ManageMC window in Minecraft** - On a client, the sync runs in a separate window process while the game waits. First start asks for the link and shows the pack. During download the pack's background (or blurred icon) shows behind the centered pack name and "Powered by ManageMC". A translucent card shows a progress bar by bytes, "12 of 40 mods · 34.2 of 120.5 MB" and an **estimated time left**. Then "Ready to play!". - The window can be resized from its edges and corners (minimum 720×560) and double-clicked to maximize. The background stays cover-fitted and is re-rendered in full quality after resizing. - Protocol: the helper prints exactly one line `MANAGEMC_RESULT CONTINUE|RESTART`. If the helper can't start, the game syncs in-process as before. Servers sync in-process. - Security: text from the server is never rendered as HTML (`html.disable` on all labels). Images are decoded only after a dimension check. **Fixes** - Apostrophes in names in `mods.toml` ("Farmer's Delight") were cut off. - The window backdrop was scaled before the window had a size. - Progress bar animation timers no longer leak. - The server's request timeout is raised to 30 minutes, so large uploads don't time out. ## Tests - Server: 34 tests. They include the importer end to end: a mods-folder zip, a Modrinth pack with overrides and side hints, refusal of Forge packs, of CurseForge packs without a key, and of broken files. They also cover the format parsers, image validation, background routes and the icon-directory migration. - Mod: 36 tests, including the remaining-time estimator, progress texts, byte-level progress and manifest image paths. - Manual: in Xvfb, the window with a 1920×1080 background, a simulated download and a resize driven by a robot. In a headless browser, the import dialog (12 jars from a mods zip) and the pack page on desktop and phone. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016zdMyacgAzBQEBSiHc6aZJ
Sign in to join this conversation.
No description provided.