Skip to content

Conversation

@remyjette
Copy link
Collaborator

What is this fixing or adding?

While there is an attempt to title_sorted the worlds, it's done on the wrong dict. tutorials is never iterated; it's only accessed by index (via tutorials[world_name].items()) thus its order does not matter. The dict that needs to be sorted is worlds, as that's what's iterated (via % for world_name, world_type in worlds.items() %})

As a result, on main the worlds on the tutorial page are not title_sorted like they are in the Supported Games list (notice how on https://archipelago.gg/tutorial/ "A Hat in Time" and "A Link to the Past" are both sorted with the As rather than with the Hs and Ls respectively).

In addition, worlds/__init__.py loads all world sources first, then all apworlds. AutoWorldRegister.world_types is a dict which as of Python 3.7 maintains insertion order. If a custom WebHost is adding additional worlds via custom_worlds, those will all be after any worlds from the worlds/ folder. Since worlds is never sorted, when rendering /tutorial/ on the WebHost, all custom worlds end up coming after all worlds in worlds/:

image

How was this tested?

Confirmed locally that "Archipelago" is still first:

image

And that "A Hat in Time" is now sorted with the Hs:

image

Put pokemon_frlg.apworld in custom_worlds. Loaded the webhost before the change, see screenshot above. Loaded after the change:

image

@github-actions github-actions bot added affects: webhost Issues/PRs that touch webhost and may need additional validation. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Dec 23, 2025
@remyjette remyjette added the is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. label Dec 23, 2025
Copy link
Collaborator

@silasary silasary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is such a subtle change, but can confirm it does work.

@PoryGone
Copy link
Collaborator

I assume this is also fixed by this PR:
image

@remyjette
Copy link
Collaborator Author

Yep, I have this on my webhost
Screenshot_20251224_091138_Edge.jpg

Copy link
Contributor

@nicholassaylor nicholassaylor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@remyjette remyjette added waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. and removed waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Dec 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

affects: webhost Issues/PRs that touch webhost and may need additional validation. is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants