Sorting, search and pages
Three things live around the grid: two buttons above the top left corner, a search field next to the word Inventory, and a column of numbers down the right edge once the crate no longer fits on one page.
The two buttons
The first orders by name, the second by how full each pile is. Both gather identical stacks into one, up to whatever the module allows, and that is where the free slots after a sort come from. Pressing the same button again reverses it.
The drawing announces what the next press will do, A over Z or Z over A, not what the last one did. A pair is sorted as one run of slots rather than one half at a time, so the letters do not start over at the seam. Modules stay in their own tab.
Sorting is worked out on the player's machine
A server holds no language files: it cannot know that this player reads Pierre where their neighbour reads Stone, and sorting by a name nobody sees is not sorting. The order is therefore computed on the player's own machine and sent whole, as a list of items.
What comes back is a rearrangement of what the crate already had, so a made-up list costs its sender a messy crate and nothing more.
The search
The field to the right of the word Inventory dims what does not match rather than hiding it: the slots stay where they are and only the ones that answer keep their brightness. Nothing moves, so clearing the search leaves the crate exactly as it was.
The pages
A page holds four rows at most, and past that the screen splits. The pages share the rows evenly: six rows give two pages of three, not one full page and one nearly empty. The numbers stack down the right edge, in two columns when there are many, and a dot marks the ones carrying something.
There is no scrollbar, and a shift-click reaches every slot, including the pages that are not open.
Paging is a view, and the page number never reaches the server. No server-side slot index can therefore be steered from outside, which is the door duplicated items would come through.
Large counts
Past a certain count, a slot shows 2k rather than 2048, and 2M rather than 2,400,000. The
threshold is a setting, abbreviateAbove, read where the screen is drawn: it belongs to
whoever is looking, not to the server. The exact count stays readable in the slot's tooltip.