my-buds async add: insert new row before .applet-list-buffer, not after — keeps spacer last
All checks were successful
ci/woodpecker/push/pyswiss Pipeline was successful
ci/woodpecker/push/main Pipeline was successful

`_appendBudEntry` queried `.bud-entry-buffer` (a class that doesn't exist — the
shell renders `.applet-list-buffer`), so the lookup missed and the row fell
through to appendChild, landing BELOW the trailing spacer <li> and leaving a
visible gap between the list and the new bud. Query the real class so the new
row inserts before the spacer. FT now asserts the buffer stays last-child.

Code architected by Disco DeDisco <discodedisco@outlook.com>
Git commit message Co-Authored-By:
Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Disco DeDisco
2026-05-29 12:56:03 -04:00
parent af8452f22d
commit 1ac380dfc5
2 changed files with 12 additions and 1 deletions

View File

@@ -54,7 +54,11 @@
rowTitle.textContent = ' the ' + title;
li.appendChild(rowTitle);
var buffer = list.querySelector('.bud-entry-buffer');
// Keep the trailing spacer LAST — _applet-grid-list.html renders it
// as `.applet-list-buffer` (not `.bud-entry-buffer`); querying the
// wrong class fell through to appendChild, dropping the new row
// BELOW the buffer.
var buffer = list.querySelector('.applet-list-buffer');
if (buffer) list.insertBefore(li, buffer);
else list.appendChild(li);
}