docs(tiles): a reload brings the grid back only when it was open

The wiki, decision 11 in the tile-grid plan, its Persistence section, the
layout-memory test header and two tile-grid.js comments said the Tiles
button and a page reload bring the grid back however it was closed. Only
the Tiles button does: a grid closed before the reload stays stored as
open: false, the page shows the single view, and the toggle puts the grid
back. The behaviour was right; the wording now says that.

A test pins it through the real close path: arrange the grid, close it with
the toggle, start a fresh page, and the restore leaves the single view
while the toggle still brings back the cells, count, divider sizes, focus
and zoom. ('a stored closed grid leaves the single view' in
tile-grid-restore.test.ts covers the same from a raw stored value through
handleInit.)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer
2026-10-10 06:33:00 +02:00
parent fb5c1bfca5
commit 8b2cb49940
4 changed files with 42 additions and 20 deletions
+7 -5
View File
@@ -401,8 +401,8 @@ the harness/model request; see "As built")
### Persistence
Decided: per device (per browser), restored on reload, and by the Tiles toggle
(decision 11). Stored in localStorage key `codeman:tile-grid`, never on the
Decided: per device (per browser), restored on reload when it was open, and by
the Tiles toggle however it was closed (decision 11). Stored in localStorage key `codeman:tile-grid`, never on the
server:
```json
@@ -1129,9 +1129,11 @@ exits green. Use the browser runner for those files and read the file count.
last setting was, if there was no setting before take the working ones, that
ones needs input and then the most recent ones in order"). The layout
(cells and holes, tile count, divider sizes, focus, a zoom the user chose)
is saved per browser on every change and comes back exactly from the toggle
and a reload, however the grid closed; it is never filled to the remembered
count nor trimmed to the window. A session gone since frees its cell for the
is saved per browser on every change and comes back exactly from the toggle,
however the grid closed, and from a reload when the grid was open (a grid
closed before the reload stays remembered for the toggle; the page shows the
single view); it is never filled to the remembered count nor trimmed to the
window. A session gone since frees its cell for the
ranking; with none left, the grid opens from the ranking (`rankTileSessions`:
working, then needing input, then most recent), which also fills every place
the grid fills on its own (a count picked in the menu, a freed cell, an open
+5 -3
View File
@@ -98,8 +98,8 @@ keeps the focus.
A moved tile takes the size of the place it lands in: column widths and row heights stay
where you dragged the dividers. Tiles do not move while one is zoomed. Where everything is,
the empty slot included, is saved with the grid and comes back on reload and when you turn
the grid off and on.
the empty slot included, is saved with the grid and comes back when you turn the grid off
and on, and on a page reload while the grid is open.
Closing a tile leaves its place empty when the grid keeps its shape (six tiles to five), and a
new tile takes the first empty place. When the number of tiles changes the grid's shape (four
@@ -135,7 +135,9 @@ same. Narrowing the window below the desktop width also returns to the single vi
The grid is saved in this browser every time you change it (moving, resizing, adding or
removing a tile, changing the count, focusing or zooming a tile), and never sent to the
server. However you leave it (the Tiles button, another tab, Home, a link, closing its last
tile or session), the Tiles button and a page reload bring it back as it was. A session
tile or session), the Tiles button brings it back as it was. A page reload brings it back
when the grid was open; after you left it, a reload shows the single view and the Tiles
button still brings the grid back. A session
that was closed in the meantime frees its place for another one, picked the way a new grid
picks them; the place stays empty only when no other session is left. Right after a page
reload the page does not know yet which sessions are waiting for your answer, so that pick