refactor(tiles): the layout helpers read the minimum tile size directly

computeTileLayout and tileGridCapacity took minTileW / minTileH, defaulted
to TILE_MIN_W / TILE_MIN_H, and no caller or test ever passed them. The
parameters are gone and both read the constants; the spec's signature line
says so.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer
2026-10-07 09:37:03 +02:00
parent 6cbaf3f7b6
commit 0746cffe6d
2 changed files with 11 additions and 10 deletions
+3 -2
View File
@@ -401,8 +401,9 @@ xterm. Nothing may outlive a removed tile (24-hour sessions rule).
### 2. `TileGrid` controller and layout helper
- `computeTileLayout({ count, width, height, minTileW, minTileH })` and
`tileGridCapacity(...)`: pure, in `constants.js`, exported on
- `computeTileLayout({ count, width, height })` and
`tileGridCapacity({ width, height })` (against the minimum tile size,
`TILE_MIN_W` x `TILE_MIN_H`): pure, in `constants.js`, exported on
`window.CodemanTileGrid` beside the existing helper namespaces.
`sanitizeTileGridState(raw, liveSessions, detachedIds)`: pure, same place.
- The controller (in a new `src/web/public/tile-grid.js`, load order 7.6, as