A side menu, categories, and a store switcher

Everything that is not a title moved out of the bar into a menu on the left that
folds away with the button in the bar; the state is remembered between runs. It
carries the stores on this machine, the two actions, the categories and the
language.

Categories narrow the grid one at a time, with counts: the state of a title on
this machine, then a row per platform and per kind. The axes are built from what
the catalog contains — a WarpEngine catalog has no genre — and a category that
disappears under you falls back to Everything rather than leaving a blank grid.

With more than one store installed, clicking another in the menu opens it: the
grid, the categories and the folders follow, the choice is remembered, and stores
sharing an id are told apart by their folder. app:state now reports every store,
store:use switches, and the engine is re-checked per store because two stores can
be at different versions.

While the CLI runs, the menu, the log drawer and the filters stay live; only what
would start a second call is disabled.

Fixes the grid, which was broken and passing every check: its implicit rows split
the window's height evenly instead of following their content, so every card came
out 94px tall with its box art collapsed to nothing and its buttons clipped away.
The DOM was intact throughout — ten cards, twenty buttons — which is exactly why
the counts said nothing. Rows are content-sized now, and the art is one band of
one height, with the title's first letter where the catalog has no image.

So the window is looked at and not only counted, `SELFTEST_SHOT` has it
photograph itself; the terminal has no screen-recording permission here. The
selftest also clicks the store that is not open when there are two, and checks
that the bar, the grid and the categories follow.

Also fixes scripts/release.sh, which could not upload a package whose name has a
space in it — "WarpEngine Store-1.1.0-arm64.dmg" does — because the list was one
string split on whitespace. And `make release` cleans dist/ first, so a release
cannot pick up the previous version's artifacts.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-18 14:12:37 +02:00
co-authored by Claude Opus 5
parent 0f5da38a27
commit cd5361e222
12 changed files with 735 additions and 134 deletions
+33 -21
View File
@@ -1,24 +1,32 @@
The client no longer carries a store address. It asks the site which stores exist
`GET /api/stores` — and installs what comes back: one record and there is
nothing to decide, several and the setup screen shows a picker.
# WarpEngine Store 1.2.0
Adding a store is now a database row on the site, maintained from its admin panel,
rather than a release of this app.
**A side menu.** Everything that is not a title moved out of the bar into a menu on
the left that folds away with `☰`: the stores on this machine, the two actions, the
categories and the language. Open or closed is remembered between runs.
### What a record gives it
**Categories.** The grid narrows to *Installed*, *Updates* or *Not installed*, to a
platform (`godot`, `tic80`, `love`, …), or to native/hosted titles — one at a time,
each with its count. The axes are built from what the catalog actually contains, so
nothing empty is listed, and a category that disappears under you falls back to
*Everything* rather than leaving a blank grid.
- **`storeRepositoryUrl`** → the store's `config.json`, which stays the authority
on how that store behaves: platforms, statuses, where things land.
- **`catalogUrl`** and **`name`** override the config's `store.base_url` and
`store.name` — the registry is what says which catalog a store is *for*.
- **the store id**, from the repository name: `ttg-desktop-store` becomes `ttg`.
**Switching stores.** With more than one store installed, clicking another in the
menu opens it: the grid, the categories and the folders follow, and the client
reopens on the store last used. Two stores installed from the same catalog into
different folders are told apart by their folder, since their id is identical.
A store repository with no `config.json` still installs. The engine merges
whatever it is handed onto its own defaults, so the client writes a three-field
config and the store behaves like the default one pointed at that catalog.
While the store is working, the menu, the log drawer and the filters keep working —
only what would start a second call is disabled.
`STORES_API` overrides the registry address, which is the one thing about a
particular site left in the client.
**The grid was broken, and now is not.** Its rows split the window's height evenly
rather than following their content, so every card came out 94px tall: the box art
collapsed to nothing and the action buttons were clipped away below the fold. The
DOM was intact the whole time — ten cards, twenty buttons — which is why every
automated count passed. Cards now carry a band of art of one height, with the
title's first letter where the catalog has no image.
Unchanged from 1.1.0: which stores exist is the site's answer (`GET /api/stores`),
not something baked into this app, and `STORES_API` overrides that address.
### Opening it on macOS
@@ -39,8 +47,12 @@ Linux packages need a build on those platforms (`make dist-win` / `dist-linux`).
### Verified
Against a local endpoint serving the same payload the site returns, with two
records — one store whose repository has a `config.json` and one without. Both
installed, and the engine listed all ten titles with the synthesised config. The
window was checked on both outcomes: the grid with a store present, the setup gate
with a populated picker when there is none.
`SELFTEST_SHOT=shot.png npm run uitest` has the window photograph itself, which is
how the collapsed rows were found and how the fix was confirmed — in English and in
Hungarian, with the menu open and closed.
`npm run uitest` loads the window and reports what rendered; with two stores in one
root — a sandbox copy beside the real install — it now also clicks the store that
is not open and checks that the bar, the grid and the categories follow. Both runs
pass, and `npm run smoke` drives the same bridge with no window at all: ten titles,
five native and five hosted, every installed one with something to launch.