An app that runs Codex once per picture, each in a folder of its own,
left 11,358 Codex folders of one session each on the owner's machine.
The page paged the sessions inside a folder (100 at a time) but drew
every folder: 113,900 elements. In WebKit a click to Sessions held the
main thread up to 2.7s, and since the hidden page stayed in the
document, a click to Library after it took ~240ms instead of ~40ms.
The folders are now drawn a page at a time like a folder's sessions:
the first 100, and a "Show N more folders" that adds the next 100 above
itself without redrawing or moving what is drawn (data-unrolls, as
moreRow). How many are drawn is kept in drawnIn, so it starts again at
a page wherever a folder's sessions do (another agent, the filter), and
unfolding a folder or coming back to the page keeps it. A session
opened from the Usage page has its folder drawn however far down it
is. The bar and a folder's box still pick every session, drawn or not.
New string in zh, zh-TW, ja and de.
Run:
- On the owner's real data (dev backend, 11,584 Codex sessions), WebKit,
this branch's assets vs main's: Sessions 113,900 -> 1,101 elements,
worst main-thread stall 2,675ms -> 44ms; Library click 238ms -> 32-62ms.
- New sessions-folder-paging.test.cjs: 10/10 (chromium + webkit, en, zh,
zh-TW, ja, de, 1000px and 380px). Drawing every folder again turns it
red (expected 100, actual 250).
- Every sessions GUI file (23): all pass except routing-sessions webkit
en, red the same alone on origin/main d9bb0fbc8 (#1672, noted there),
and session-identity once under the back-to-back run, 10/10 alone on
both (noted on #1544).
- go test ./internal/gui: ok.