Skip to content

polish(api): finalize 4.0.0 public API + navigator/status fixes#475

Merged
thomasmny merged 2 commits into
masterfrom
polish/4.0.0-api-freeze
Jun 18, 2026
Merged

polish(api): finalize 4.0.0 public API + navigator/status fixes#475
thomasmny merged 2 commits into
masterfrom
polish/4.0.0-api-freeze

Conversation

@thomasmny

Copy link
Copy Markdown
Owner

Follow-up to #474 (the dynamic world statuses & navigator categories feature, already on master). This is the 4.0.0 API-freeze polish plus the bug fixes and cleanup found while reviewing that work. It is exactly the delta on top of master, so it merges cleanly.

Public API (freezing in 4.0.0)

  • Stamp every @since TODO as @since 4.0.0.
  • Document the compare-by-id equality contract on BuildWorldStatus / NavigatorCategory (they are interfaces now, so the enum-era == no longer holds).
  • Add NavigatorCategory#getStyledName() to match BuildWorldStatus.
  • WorldStatusRegistry#getStatus accepts @Nullable, matching getCategory.
  • Remove the unused BuildWorldStatus#isVisibleInNavigator() — navigator visibility is decided by category membership.
  • Record the BuildWorld#asProfileable() removal and correct the isBuiltIn / getCategoryForWorld docs.

Fixes

  • StatusMenu: lay the grid out row by row so a large status count can't overflow the inventory and throw.
  • NavigatorLayoutMenu: never hand out the settings slot as free; don't strand a displaced category at slot -1.
  • Re-home a deleted category's folders to the default so they (and the worlds inside them) stay reachable.
  • Resolve navigator category heads off-thread instead of blocking the main thread on profile lookups.
  • PlaceholderAPI %status% keeps its colour again.
  • Derive custom-status permissions from the full id so two distinct ids can't collide.
  • Handle legacy hex colour formats when migrating status display names.

Cleanup

  • Extract StringUtils#uniqueId (shared slug generator) and ItemBuilder#categoryTexture (shared default-texture rule).
  • Batch the folder re-home into a single write; make content rows the single source for the StatusMenu grid math.

Adds the 4.0.0 CHANGELOG.md. Build + core tests pass.

API freeze prep:
- Stamp every "@SInCE TODO" as "@SInCE 4.0.0"
- Document the compare-by-id equality contract on BuildWorldStatus and
  NavigatorCategory (the enum-era "==" no longer holds)
- Add NavigatorCategory#getStyledName() to match BuildWorldStatus
- Make WorldStatusRegistry#getStatus accept @nullable, matching getCategory
- Remove the unused BuildWorldStatus#isVisibleInNavigator(); navigator
  visibility is decided by category membership
- Correct the isBuiltIn / getCategoryForWorld docs to match real behaviour

Fixes:
- StatusMenu: lay the status grid out row by row so a large status count can
  no longer overflow the inventory and throw
- NavigatorLayoutMenu: never hand out the settings slot as free, and don't
  strand a displaced category at slot -1
- Re-home a deleted category's folders to the default so they (and the worlds
  inside them) stay reachable
- Resolve navigator category heads off-thread instead of blocking the main
  thread on profile lookups
- PlaceholderAPI %status% keeps its colour again
- Derive custom-status permissions from the full id so two ids cannot collide
- Handle legacy hex colour formats when migrating status display names

Cleanup:
- Extract the duplicated slug generator to StringUtils#uniqueId
- Use getStyledName() at the category render sites

Adds the 4.0.0 CHANGELOG.
…y status grid

- Extract the category default-texture choice into ItemBuilder#categoryTexture
  so the synchronous ItemBuilder#icon and the asynchronous
  MenuItems#renderCategoryIcon share one rule instead of duplicating it.
- rehomeFolders: collect the re-homed folders and persist them in a single
  batch write instead of a full-file write per folder, fetching the storage
  once.
- StatusMenu: make the content-row count the single source for both the grid
  capacity and the inventory size, dropping the +2/-2 border round-trip.
@thomasmny thomasmny merged commit b4adc89 into master Jun 18, 2026
2 checks passed
@thomasmny thomasmny deleted the polish/4.0.0-api-freeze branch June 18, 2026 21:02
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