fix(assistant): #91 maintien de l'ancre en haut pendant le streaming, libération au scroll manuel
CI / lint (push) Successful in 1m22s
CI / security (push) Successful in 1m0s
CI / test (push) Successful in 3m12s
CI / build (push) Successful in 50s
CI / e2e (push) Successful in 10m34s

This commit is contained in:
2026-09-15 16:24:57 -04:00
parent 731b3e4b47
commit 18b7dee2f6
3 changed files with 43 additions and 7 deletions
+19 -1
View File
@@ -304,7 +304,25 @@ async function main() {
panel.remove();
});
await test("empty content renders no action bar", () => {
await test("manual wheel scroll releases the top-pinning", async () => {
const b = new BooksLM();
const panel = b._render();
b._panel = panel;
document.body.appendChild(panel);
b._messages = [
{ role: "user", content: "premier" },
{ role: "assistant", content: "réponse" },
{ role: "user", content: "deuxième" },
];
b._renderMessages({ anchor: true });
assert.equal(b._pinnedTurn, true, "anchor sets the pin");
const container = panel.querySelector(".bookslm-messages");
container.dispatchEvent(new w.WheelEvent("wheel", { deltaY: -30, bubbles: true }));
assert.equal(b._pinnedTurn, false, "wheel releases the pin");
panel.remove();
});
await test("empty content renders no action bar", () => {
const b = new BooksLM();
const panel = b._render();
b._panel = panel;