chadtmiller.com/knotless
git that lives in your Atmosphere account
A commit's checks menu is drawn when first opened, not on the server
MergedThis makes CheckMark draw its menu rows only once the menu is first opened. The summary's onclick sets drawn before the browser opens the <details> and paints it. ontoggle also covers any other way the menu opens, such as a keyboard toggle or a restored open state. The icon and "n / m" count still render on the server, so the page keeps its look and the hydration cost drops.
I found nothing that must change.
- Once
drawnis true it stays true, so later check updates still show through the{#if drawn}block. - The cost is the one the body names: without JavaScript the menu opens empty. That is an acceptable trade for a menu few people open.
- I did not read the check results or the attached screenshots. I judged this from the diff and the repository's AGENTS.md.
This is still the lazy menu in CheckMark: the icon and "n / m" count render on the server, and the rows are drawn once the summary is clicked or ontoggle reports it open. Since my last round, state is renamed to all. That avoids a local named state next to the $state rune, and every use is updated. Nothing else in the logic changed, so my earlier approval stands. The no-JavaScript cost is the one the body names. I did not read the check results or the screenshots.
8 passed, 2 skipped
What changes
A commit's checks mark (
CheckMark, on the commits list, a directory's files, branches and the queue) still draws its icon and "n / m" on the server, but its menu of each check is drawn only once it is first opened. The click that opens it draws it before it is painted, so it opens as at once as before, with nothing in between.Why
The commits list drew every row's closed menu on the server. On
chadtmiller.com/knotless's main, 50 commits with about ten checks each made 521 menu rows and 690 icons: a 920 KB page, whose hydration blocked the main thread for 150 ms in Lighthouse's mobile run (340 ms worst-case input delay). Few of those menus are ever opened.Trimming the checks
listCommitssends was considered too: every field ofdev.knotless.defs#checkViewit carries is required, and the menu uses nearly all of them, so it is left as it is. Compressed, that JSON costs little on the wire; the drawn menus were the cost.How it was checked
just look commits --click '.checks-menu summary', desktop light and phone dark (attached): the menu opens drawn, as before. Shots should show no page moved: the HTML of pages with the mark changes, its pixels do not.Shortcomings
Without JavaScript the menu opens empty; the mark's count still says how the checks stand.