[eric] browser: gate document-order display behind OSW_DOC_ORDER (default on) so the A/B can measure it against legacy rank-order; 14 ranking tests

This commit is contained in:
ciregenz
2026-07-08 14:57:24 -07:00
parent 2234ae46de
commit e0162779a7
4 changed files with 19 additions and 2 deletions
+1 -1
View File
@@ -883,7 +883,7 @@ async function handleListInteractives(wv: BrowserWebview, params: Record<string,
// Dedupe twins, rank what a human acts on first (and the current goal highest), cap the long tail.
const goal = typeof params?.goal === 'string' ? params.goal : '';
const { shown: ranked, truncated } = rankAndCapInteractives(candidates, { goal });
const { shown: ranked, truncated } = rankAndCapInteractives(candidates, { goal, docOrder: params?.docOrder !== false });
const { kept: shown, dropped: covered } = await dropCoveredElements(wv, ranked);
// The previous look's cache feeds two things: * markers for brand-new elements, and STABLE indices so the same element keeps the same number across looks (the model can act on a remembered index without re-reading the whole list, browser-use's stable-hash trick on our node ids).