Commit 0a94a3f28 for llama.cpp
commit 0a94a3f289687883617b9a2abbc7e0ade2d6b6c4
Author: Aleksander Grygier <aleksander.grygier@gmail.com>
Date: Mon Nov 9 21:08:01 2026 +0100
ui : retry opening the sidebar when a demo imports its traces (#31952)
A cold dev server reloads the page once it has optimized its
dependencies, and that reload can land right after the harness opened
the phone sidebar, closing it again before Settings is clicked. Repeat
the pass over the menu keys up to three times while Settings is not
reachable.
Assisted-by: Claude (Opus 5.5 Medium)
diff --git a/tools/ui/demo/helpers.ts b/tools/ui/demo/helpers.ts
index c82b27069..66df4fba7 100644
--- a/tools/ui/demo/helpers.ts
+++ b/tools/ui/demo/helpers.ts
@@ -390,10 +390,14 @@ async function importTraces(page: Page, file: string): Promise<void> {
page.locator('aside button[aria-label="Expand navigation"]')
];
- for (const key of keys) {
- if (await reachable(settings)) break;
+ // a few rounds, as a cold dev server reloads the page once it has optimized its dependencies,
+ // which can land right after a key opened the sidebar and close it again
+ for (let round = 0; round < 3 && !(await reachable(settings)); round++) {
+ for (const key of keys) {
+ if (await reachable(settings)) break;
- if ((await key.count()) > 0 && (await reachable(key.first()))) await key.first().click();
+ if ((await key.count()) > 0 && (await reachable(key.first()))) await key.first().click();
+ }
}
await settings.click();