- Shipped
- September 9, 2026 at 2:32 AM UTC
- Author
- Kamo
- Commit
- 525a24d
Follow-up polish on the Games entitlement gate. No behaviour change; the tests that pin it are unchanged and still pass. **************** was typed `GamesOrganization | Organization`, which bought nothing: the real `Organization`'s isChess / isHoldem / isKamoUniverse getters already satisfy the structural interface, so the union only forced a cast inside `canUseGame` — and a cast in the one function whose whole job is to be trusted about entitlement is the wrong thing to have written. The parameter is the narrow interface now, the real object is assignable to it with no cast, and the optional chain is kept and explained: a gate can run before the organization has loaded, and "not yet known" must read as "no game". `useGamesSections` built three parallel `Record`s keyed by the same three ids — label, icon and open — which is precisely the drift this change set was about, in miniature: a fourth game added to two of them and forgotten in the third is a menu row with no icon, and nothing says so. They are one `GAME_MENU` table now, one row per game with all three facts together, keyed by `GameApp['id']` so a game added to GAME_APPS and not to this does not compile. Hoisted to module scope, since none of it depends on a render.