Skip to content

Keep the RAM value entered for a modpack server - #372

Merged
athNdev merged 1 commit into
mainfrom
fix/modpack-memory
Nov 6, 2026
Merged

athNdev merged 1 commit into
mainfrom
fix/modpack-memory

Conversation

@athNdev

@athNdev athNdev commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Summary

CreateServer silently raised any requested memory below 4096 MB whenever a modpack was selected:

// Set minimum memory for modpacks
if msg.Memory < 4096 {
    msg.Memory = 4096
}

The wizard prefills the pack recommendation, but a user who changed the field still got 4 GB, with no message. Small packs can run in less, and the choice belongs to the operator.

  • The modpack block now only fills an omitted value (memory <= 0), preferring the pack's recommended_ram and falling back to 4096. A value the caller supplies is stored as entered.
  • The create wizard shows the recommendation as a hint next to the computed size (Recommended for this pack: 6144 MB), so it is visible without being enforced.
  • New regression tests cover both paths: an explicit 2048 MB stays 2048 MB, and an omitted value uses the pack recommendation.

Validation

  • go build ./..., go vet ./...
  • go test ./internal/rpc/services/ (new tests pass)
  • cd web/carbon-panel && bun run check && bun run test (165 pass)
  • Prettier on the touched page

CreateServer raised any memory below 4096 MB for modpacks, silently replacing the user's choice. Only fill an omitted value now, using the pack recommendation, and show that recommendation as a hint in the create wizard.
@athNdev
athNdev merged commit 9e80692 into main Nov 6, 2026
11 checks passed
@athNdev
athNdev deleted the fix/modpack-memory branch November 6, 2026 21:51
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