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 committed 2026-10-10 06:33:00 +02:00
1 parent fb5c1bfca5
commit 8b2cb49940
4 files changed
+42 -20

No files matched your search

+4 -4
View File
@@ -29,8 +29,8 @@ const TILE_GRID_FONT_KEY = 'codeman-tile-font-size';
// how many tiles the user's own last change left (a session that went away by
// itself does not lower it). Session ids and layout only, never content.
// Written on every change while the grid is open; `open: false` keeps it for
// the Tiles toggle, which brings it back exactly; restored on reload inside
// handleInit. Never sent to the server.
// the Tiles toggle, which brings it back exactly; a grid stored open is
// restored on reload inside handleInit. Never sent to the server.
const TILE_GRID_STORAGE_KEY = 'codeman:tile-grid';
// The count last picked in the Tiles button's right-click menu (2, 4 or 6;
// owner decision 10), per device: what a click opens when there is no stored
@@ -432,8 +432,8 @@ Object.assign(CodemanApp.prototype, {
* queued loads dropped), the main terminal unparked.
*
* `keepStored` (every caller) keeps the grid as it was, holes, count, sizes,
* focus and zoom, for the Tiles toggle and the next reload to bring back;
* false would forget it. `reselect` shows the focused session in the single
* focus and zoom, closed, for the Tiles toggle to bring back (a reload
* restores only a grid stored open); false would forget it. `reselect` shows the focused session in the single
* view through a forced reload; pass false when the caller selects
* something itself. `animate` (the Tiles toggle only, owner answer 4)
* leaves a still copy of the tiles over the stage until the single view has