AdithyaSK HF Staff commited on
Commit
67afa6e
·
verified ·
1 Parent(s): 53508e7

Deploy HF RL Explorer

Browse files
Files changed (2) hide show
  1. tests/ui-audit.mjs +7 -3
  2. web/rlx.css +7 -1
tests/ui-audit.mjs CHANGED
@@ -101,8 +101,9 @@ async function health(p, label) {
101
  await p.click('[data-kind="all"]');
102
  await p.waitForTimeout(1200);
103
  await p.fill("#q", "terminal-bench");
104
- await p.waitForTimeout(400);
105
- ok("home: search narrows the list", await p.$$eval("#list .card", (cs) => cs.length > 0 && cs.every((c) => /terminal/i.test(c.textContent))));
 
106
  await p.fill("#q", "");
107
  const page1 = await p.textContent("#tr-page");
108
  await p.click("#tr-next");
@@ -288,7 +289,10 @@ async function health(p, label) {
288
  ok("verl: its math is typeset (KaTeX), not left as TeX", await until(p, "h1 .math .katex", 20000) && !(await p.textContent("h1")).includes("\\frac"));
289
  await health(p, "verl row 1440");
290
  await go(p, "t/FineEnvs/MiMo-V2.6-RL-harbor-general/tasks/s3k_0052_accounting_audit_tax_en_t2_rl_008", 600);
291
- ok("judge: a model-graded task offers a judge, through the relay", await until(p, "#run-card", 30000) && /Judge model/.test(await p.textContent("#run-card")) && /relay/.test(await p.textContent("#run-card")));
 
 
 
292
  await health(p, "model-graded task 1440");
293
  await p.context().close();
294
  }
 
101
  await p.click('[data-kind="all"]');
102
  await p.waitForTimeout(1200);
103
  await p.fill("#q", "terminal-bench");
104
+ // the server answers the search (/api/search): wait for its answer, not a fixed time (a Space is a round trip away)
105
+ const narrowed = await p.waitForFunction(() => { const cs = [...document.querySelectorAll("#list .card")]; return cs.length > 0 && cs.every((c) => /terminal/i.test(c.textContent)); }, null, { timeout: 15000 }).then(() => true, () => false);
106
+ ok("home: search narrows the list", narrowed);
107
  await p.fill("#q", "");
108
  const page1 = await p.textContent("#tr-page");
109
  await p.click("#tr-next");
 
289
  ok("verl: its math is typeset (KaTeX), not left as TeX", await until(p, "h1 .math .katex", 20000) && !(await p.textContent("h1")).includes("\\frac"));
290
  await health(p, "verl row 1440");
291
  await go(p, "t/FineEnvs/MiMo-V2.6-RL-harbor-general/tasks/s3k_0052_accounting_audit_tax_en_t2_rl_008", 600);
292
+ // signed in, the run panel offers the judge; signed out (a Space without a session), the page still says how it's graded
293
+ ok("judge: a model-graded task offers a judge, through the relay", await until(p, "#run-card", 30000) && (
294
+ (/Judge model/.test(await p.textContent("#run-card")) && /relay/.test(await p.textContent("#run-card")))
295
+ || (/Sign in/i.test(await p.textContent("#run-card")) && /Graded by a model/.test(await p.textContent("main")))));
296
  await health(p, "model-graded task 1440");
297
  await p.context().close();
298
  }
web/rlx.css CHANGED
@@ -343,7 +343,13 @@ body[data-view="home"] .top-search { visibility: hidden; }
343
  /* the row beside a thumbnail is narrow: the collection's name gives way (an ellipsis), the date and kind never do */
344
  .card .row1 .dn { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
345
  .card .row1 .dn > svg { vertical-align: -2px; margin-right: 5px; }
346
- .card .row1 .kind-tag, .card .row1 .when:not(.org) { flex: none; } /* a task id in that slot (.when.org) still truncates */
 
 
 
 
 
 
347
  .card.sp .row1 .dn ~ .faint, .card.sp .row1 .dn ~ .org { display: none; } /* "FineEnvs on OpenEnv / FineEnvs": the org says it twice */
348
  .card .chips { flex-wrap: wrap; row-gap: 6px; }
349
  @media (max-width: 560px) { .card .row1 .dn + .faint, .card .row1 .dn ~ .org { display: none; } }
 
343
  /* the row beside a thumbnail is narrow: the collection's name gives way (an ellipsis), the date and kind never do */
344
  .card .row1 .dn { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
345
  .card .row1 .dn > svg { vertical-align: -2px; margin-right: 5px; }
346
+ /* nothing in the row may push past the card, whatever the font (a slow web font lays out wider first): the
347
+ collection's name gives way first, the date only as a last resort (and a task id in that slot, .when.org, truncates) */
348
+ .card .row1 .kind-tag { flex: none; }
349
+ .card .row1 .dn { flex-shrink: 1000; }
350
+ .card .row1 .when:not(.org) { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
351
+ /* on a phone the row beside a thumbnail can't hold kind, collection and date: the date goes to its own line */
352
+ @media (max-width: 560px) { .card .row1 { flex-wrap: wrap; row-gap: 2px; } .card .row1 .when:not(.org) { margin-left: 0; flex-basis: 100%; } }
353
  .card.sp .row1 .dn ~ .faint, .card.sp .row1 .dn ~ .org { display: none; } /* "FineEnvs on OpenEnv / FineEnvs": the org says it twice */
354
  .card .chips { flex-wrap: wrap; row-gap: 6px; }
355
  @media (max-width: 560px) { .card .row1 .dn + .faint, .card .row1 .dn ~ .org { display: none; } }