Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: say when a browser panel page needs the system browser (#13761)
Nilay82f16ca5545f
diff --git a/studio/backend/routes/browser.py b/studio/backend/routes/browser.pyindex 5ed366f6c90..5b99574d4bf 100644--- a/studio/backend/routes/browser.py+++ b/studio/backend/routes/browser.py@@ -274,6 +274,42 @@ _FRAME_HTML = r"""<!doctype html>let jar = "";Object.defineProperty(document, "cookie", { get: () => jar, set: () => {}, configurable: true });} catch {}+ let refused = false;+ const tellRefused = () => {+ if (refused) return;+ refused = true;+ post({ type: "needsBrowser" });+ };+ // Only IndexedDB's refusals: a refused service worker or cache rarely breaks a page.+ const refusals = new WeakSet();+ // Other sites' scripts report errors as "Script error." with no error, so IndexedDB's is noted as thrown.+ let indexedDbThrew = false;+ const refusedByIndexedDb = (error) => {+ if (error?.name !== "SecurityError") return false;+ refusals.add(error);+ return true;+ };+ for (const name of ["open", "deleteDatabase", "databases"]) {+ const original = IDBFactory.prototype[name];+ if (typeof original !== "function") continue;+ IDBFactory.prototype[name] = function (...args) {+ try {+ const result = original.apply(this, args);+ return name === "databases" ? result.catch((error) => { refusedByIndexedDb(error); throw error; }) : result;+ } catch (error) {+ if (refusedByIndexedDb(error)) {+ indexedDbThrew = true;+ setTimeout(() => { indexedDbThrew = false; });+ }+ throw error;+ }+ };+ }+ window.addEventListener("error", (event) => { if (event.error ? refusals.has(event.error) : indexedDbThrew) tellRefused(); });+ window.addEventListener("unhandledrejection", (event) => { if (refusals.has(event.reason)) tellRefused(); });+ for (const type of ["fullscreenerror", "webkitfullscreenerror"]) {+ document.addEventListener(type, () => { if (!document.fullscreenEnabled) tellRefused(); }, true);+ }/* BROWSER_NETWORK_JS */const shellPathname = location.pathname;// Throttle to 200 ms: some sites replaceState per scroll.diff --git a/studio/backend/tests/test_browser_routes.py b/studio/backend/tests/test_browser_routes.pyindex feb09305dac..9e22d12aa46 100644--- a/studio/backend/tests/test_browser_routes.py+++ b/studio/backend/tests/test_browser_routes.py@@ -95,6 +95,30 @@ def test_the_shell_guards():assert "requestSubmit = " not in shell+def test_the_shell_tells_the_panel_when_the_sandbox_refuses_a_feature():+ # Checked in Chromium, Firefox and WebKit, as this suite has no browser to run the shell in.+ shell = browser_mod._FRAME_HTML+ boot = shell[shell.index("const boot = ") : shell.index("const escapeAttr")]+ assert boot.count('post({ type: "needsBrowser" });') == 1+ for guard in (+ "if (refused) return;",+ 'for (const name of ["open", "deleteDatabase", "databases"])',+ "IDBFactory.prototype[name] = function (...args) {",+ 'if (error?.name !== "SecurityError") return false;',+ "refusals.add(error);",+ 'return name === "databases" ? result.catch(',+ "if (event.error ? refusals.has(event.error) : indexedDbThrew) tellRefused();",+ "if (refusals.has(event.reason)) tellRefused();",+ 'for (const type of ["fullscreenerror", "webkitfullscreenerror"])',+ "if (!document.fullscreenEnabled) tellRefused();",+ ):+ assert guard in boot, guard+ assert boot.index("IDBFactory.prototype[name] = ") < boot.index("const shellPathname")+ assert "securityError(" not in boot+ # The page may replace DOMException or Promise before it touches IndexedDB.+ assert "instanceof DOMException" not in boot and "instanceof Promise" not in boot++def test_the_shell_counts_the_pages_requests_and_maps_srcdoc_paths():shell = browser_mod._FRAME_HTML# Inside boot, where cfg and post exist, before any page script can capture fetch.diff --git a/studio/frontend/scripts/check-bundle-budget.ts b/studio/frontend/scripts/check-bundle-budget.tsindex 05cbdc581bf..cf33bbf707f 100644--- a/studio/frontend/scripts/check-bundle-budget.ts+++ b/studio/frontend/scripts/check-bundle-budget.ts@@ -133,8 +133,11 @@ export const BUDGET = {// The "Only show models that fit" Settings row adds 289 B raw / 77 B transfer (6,771,372 -> 6,771,661 B raw,// 2,035,798 -> 2,035,875 B transfer against 52a3fbefe, 95 chunks, identical under Node 22.22.2 and 24). Main// already measured 111 B raw / 54 B transfer over the previous limits, so they are set to the measured build.- transferBytes: 2_035_875,- rawBytes: 6_771_661,+ // Main was 48 B raw / 29 B transfer over at ffa8fc3b9 (6,771,709 B raw, 2,035,904 B transfer). The browser+ // panel's notice for pages that hit a sandbox limit (#13761) adds 143 B raw / 44 B transfer (-> 6,771,852 B raw,+ // 2,035,948 B transfer, one machine and build, Node 24, chunk count unchanged at 95). Raised by both.+ transferBytes: 2_035_948,+ rawBytes: 6_771_852,};// The chunk count is reported but not budgeted. Splitting a page out of the entry raises it while lowering thediff --git a/studio/frontend/src/features/browser/frame-message.ts b/studio/frontend/src/features/browser/frame-message.tsindex 91e014391ab..e6c1827e0a9 100644--- a/studio/frontend/src/features/browser/frame-message.ts+++ b/studio/frontend/src/features/browser/frame-message.ts@@ -18,6 +18,7 @@ export type FrameMessage =| { type: "reload" }| { type: "upload" }| { type: "scriptNavigation" }+ | { type: "needsBrowser" }/** Find in page: how many matches the query has, and which one is shown (-1: none). */| { type: "findResult"; count: number; active: number }/** The page's current markup, for printing; null when it couldn't be copied or was too large. */@@ -194,6 +195,7 @@ export function parseFrameMessage(data: unknown): FrameMessage | null {return { type: "reload" };case "upload":case "scriptNavigation":+ case "needsBrowser":return { type: message.type };case "findResult": {const { count, active } = message;@@ -234,3 +236,9 @@ export function parseFrameMessage(data: unknown): FrameMessage | null {return null;}}++// One notice per tab and kind; needsBrowser comes once per page, so it stays until closed or the page goes.+export const frameNotice = (type: "upload" | "scriptNavigation" | "needsBrowser", tabId: string) => ({+ id: `browser-${type}-${tabId}`,+ ...(type === "needsBrowser" && { duration: Number.POSITIVE_INFINITY }),+});diff --git a/studio/frontend/src/features/browser/tab-view.tsx b/studio/frontend/src/features/browser/tab-view.tsxindex cf68494fe70..ae02a5b8e21 100644--- a/studio/frontend/src/features/browser/tab-view.tsx+++ b/studio/frontend/src/features/browser/tab-view.tsx@@ -25,6 +25,7 @@ import { useNativeBrowser } from "./native-view";import { NewTabPage } from "./new-tab-page";import { useBrowserPrefsStore } from "./prefs-store";import { fitZoomToPage, zoomTab } from "./zoom";+import { frameNotice } from "./frame-message";import type { FrameMessage } from "./page-frame";import { PageFrame } from "./page-frame";import {@@ -139,12 +140,20 @@ function useFrameMessages(tabId: string, origin: string | null) {store.reload(tabId);break;case "upload":- case "scriptNavigation": {- const tab = store.tabs.find((candidate) => candidate.id === tabId);- const entry = tab ? currentEntry(tab) : null;- const url = tab?.displayUrl ?? (entry?.kind === "web" ? entry.url : null);- toast(t(message.type === "upload" ? "browser.error.upload" : "browser.error.scriptNavigation"), {- action: url ? { label: t("browser.openExternal"), onClick: () => openExternalLink(url) } : undefined,+ case "scriptNavigation":+ case "needsBrowser": {+ // Read at click time: the notice can outlive a pushState to another route.+ const pageUrl = () => {+ const tab = useBrowserStore.getState().tabs.find((candidate) => candidate.id === tabId);+ const entry = tab ? currentEntry(tab) : null;+ return tab?.displayUrl ?? (entry?.kind === "web" ? entry.url : null);+ };+ const shown = pageUrl();+ toast(t(`browser.error.${message.type}`), {+ ...frameNotice(message.type, tabId),+ action: shown+ ? { label: t("browser.openExternal"), onClick: () => openExternalLink(pageUrl() ?? shown) }+ : undefined,});break;}@@ -259,6 +268,15 @@ function WebPage({const blocked = state.status === "error" && state.resubmit === true;const pageOrigin = state.status === "ready" ? new URL(state.page.url).origin : null;const onFrameMessage = useFrameMessages(tab.id, pageOrigin);+ // A notice's action opens the tab's current address, so it goes with the page it is about.+ useEffect(+ () => () => {+ for (const type of ["upload", "scriptNavigation", "needsBrowser"] as const) {+ toast.dismiss(frameNotice(type, tab.id).id);+ }+ },+ [tab.id],+ );const updateTab = useBrowserStore((store) => store.updateTab);const reload = useBrowserStore((store) => store.reload);diff --git a/studio/frontend/src/i18n/locales/ar.ts b/studio/frontend/src/i18n/locales/ar.tsindex 0cbc4b97c95..77f606bda6d 100644--- a/studio/frontend/src/i18n/locales/ar.ts+++ b/studio/frontend/src/i18n/locales/ar.ts@@ -453,6 +453,7 @@ export const ar = {resubmit: "هذه الصفحة ناتجة عن إرسال نموذج. إعادة تحميلها ترسل النموذج مجددًا، وقد يكرر ذلك ما قام به.",upload: "لا يعمل رفع الملفات في هذا العرض. افتح الصفحة في متصفح النظام لإرسالها.",scriptNavigation: "حاولت هذه الصفحة الانتقال إلى عنوان آخر عبر سكربت، وهذا العرض لا يمكنه متابعة ذلك. افتحها في متصفح النظام بدلًا من ذلك.",+ needsBrowser: "حاولت هذه الصفحة استخدام ميزة في المتصفح يحظرها هذا العرض، لذا قد لا تعمل بعض أجزائها. افتحها في متصفح النظام بدلًا من ذلك.",},native: {externalPrompt: "يريد {host} فتح {url}",diff --git a/studio/frontend/src/i18n/locales/de.ts b/studio/frontend/src/i18n/locales/de.tsindex b119ca12655..c553cb7b577 100644--- a/studio/frontend/src/i18n/locales/de.ts+++ b/studio/frontend/src/i18n/locales/de.ts@@ -453,6 +453,7 @@ export const de = {resubmit: "Diese Seite stammt aus einem Formular. Erneutes Laden sendet das Formular noch einmal und kann dessen Aktion wiederholen.",upload: "Datei-Uploads funktionieren in dieser Ansicht nicht. Öffne die Seite im Systembrowser, um sie zu senden.",scriptNavigation: "Diese Seite wollte per Skript zu einer anderen Adresse wechseln, was diese Ansicht nicht nachvollziehen kann. Öffne sie stattdessen im Systembrowser.",+ needsBrowser: "Diese Seite wollte eine Browserfunktion nutzen, die diese Ansicht blockiert, daher funktionieren Teile davon möglicherweise nicht. Öffne sie stattdessen im Systembrowser.",},native: {externalPrompt: "{host} möchte {url} öffnen",diff --git a/studio/frontend/src/i18n/locales/en.ts b/studio/frontend/src/i18n/locales/en.tsindex 7182fcfa6a5..861070e049b 100644--- a/studio/frontend/src/i18n/locales/en.ts+++ b/studio/frontend/src/i18n/locales/en.ts@@ -450,6 +450,7 @@ export const en = {resubmit: "This page came from a form. Loading it again sends the form again, which could repeat what it did.",upload: "File uploads don't work in this view. Open the page in your system browser to send it.",scriptNavigation: "This page tried to go to another address by script, which this view can't follow. Open it in your system browser instead.",+ needsBrowser: "This page tried to use a browser feature this view blocks, so parts of it may not work. Open it in your system browser instead.",},native: {externalPrompt: "{host} wants to open {url}",diff --git a/studio/frontend/src/i18n/locales/es.ts b/studio/frontend/src/i18n/locales/es.tsindex a458cc26e94..94cc547951f 100644--- a/studio/frontend/src/i18n/locales/es.ts+++ b/studio/frontend/src/i18n/locales/es.ts@@ -453,6 +453,7 @@ export const es = {resubmit: "Esta página proviene de un formulario. Volver a cargarla envía el formulario de nuevo, lo que podría repetir lo que hizo.",upload: "Las subidas de archivos no funcionan en esta vista. Abre la página en el navegador del sistema para enviarla.",scriptNavigation: "Esta página intentó ir a otra dirección mediante un script, algo que esta vista no puede seguir. Ábrela en el navegador del sistema.",+ needsBrowser: "Esta página intentó usar una función del navegador que esta vista bloquea, así que puede que partes de ella no funcionen. Ábrela en el navegador del sistema.",},native: {externalPrompt: "{host} quiere abrir {url}",diff --git a/studio/frontend/src/i18n/locales/fr.ts b/studio/frontend/src/i18n/locales/fr.tsindex bc7d0c18aaf..5068426ab0e 100644--- a/studio/frontend/src/i18n/locales/fr.ts+++ b/studio/frontend/src/i18n/locales/fr.ts@@ -453,6 +453,7 @@ export const fr = {resubmit: "Cette page provient d'un formulaire. La recharger renvoie le formulaire, ce qui pourrait répéter son action.",upload: "L'envoi de fichiers ne fonctionne pas dans cette vue. Ouvrez la page dans le navigateur du système pour l'envoyer.",scriptNavigation: "Cette page a tenté d'aller à une autre adresse par script, ce que cette vue ne peut pas suivre. Ouvrez-la plutôt dans le navigateur du système.",+ needsBrowser: "Cette page a tenté d'utiliser une fonction du navigateur que cette vue bloque, certaines parties peuvent donc ne pas fonctionner. Ouvrez-la plutôt dans le navigateur du système.",},native: {externalPrompt: "{host} veut ouvrir {url}",diff --git a/studio/frontend/src/i18n/locales/he.ts b/studio/frontend/src/i18n/locales/he.tsindex 71a59fdaf0c..192bf2cce73 100644--- a/studio/frontend/src/i18n/locales/he.ts+++ b/studio/frontend/src/i18n/locales/he.ts@@ -469,6 +469,8 @@ export const he = {"העלאת קבצים אינה פועלת בתצוגה זו. פתח את הדף בדפדפן המערכת כדי לשלוח אותו.",scriptNavigation:"דף זה ניסה לעבור לכתובת אחרת באמצעות סקריפט, ותצוגה זו לא יכולה לעקוב אחריו. פתח אותו בדפדפן המערכת במקום זאת.",+ needsBrowser:+ "דף זה ניסה להשתמש בתכונת דפדפן שתצוגה זו חוסמת, ולכן חלקים ממנו עלולים לא לעבוד. פתח אותו בדפדפן המערכת במקום זאת.",},native: {externalPrompt: "{host} מבקש לפתוח את {url}",diff --git a/studio/frontend/src/i18n/locales/hi.ts b/studio/frontend/src/i18n/locales/hi.tsindex 9ebb326cd94..632c0baa912 100644--- a/studio/frontend/src/i18n/locales/hi.ts+++ b/studio/frontend/src/i18n/locales/hi.ts@@ -453,6 +453,7 @@ export const hi = {resubmit: "यह पेज एक फ़ॉर्म से आया है। इसे फिर से लोड करने पर फ़ॉर्म दोबारा भेजा जाएगा, जिससे वही काम दोहराया जा सकता है।",upload: "इस व्यू में फ़ाइल अपलोड काम नहीं करता। भेजने के लिए पेज को सिस्टम ब्राउज़र में खोलें।",scriptNavigation: "इस पेज ने स्क्रिप्ट से किसी दूसरे पते पर जाने की कोशिश की, जिसे यह व्यू फ़ॉलो नहीं कर सकता। इसे सिस्टम ब्राउज़र में खोलें।",+ needsBrowser: "इस पेज ने ब्राउज़र की ऐसी सुविधा इस्तेमाल करने की कोशिश की जिसे यह व्यू ब्लॉक करता है, इसलिए इसके कुछ हिस्से शायद काम न करें। इसे सिस्टम ब्राउज़र में खोलें।",},native: {externalPrompt: "{host} {url} खोलना चाहता है",diff --git a/studio/frontend/src/i18n/locales/it.ts b/studio/frontend/src/i18n/locales/it.tsindex f5be5f92d6b..3dc903b5de1 100644--- a/studio/frontend/src/i18n/locales/it.ts+++ b/studio/frontend/src/i18n/locales/it.ts@@ -452,6 +452,7 @@ export const it = {resubmit: "Questa pagina deriva da un modulo. Ricaricarla invia di nuovo il modulo e potrebbe ripeterne l'azione.",upload: "Il caricamento di file non funziona in questa vista. Apri la pagina nel browser di sistema per inviarlo.",scriptNavigation: "Questa pagina ha provato ad andare a un altro indirizzo tramite script, cosa che questa vista non può seguire. Aprila nel browser di sistema.",+ needsBrowser: "Questa pagina ha provato a usare una funzione del browser che questa vista blocca, quindi alcune parti potrebbero non funzionare. Aprila nel browser di sistema.",},native: {externalPrompt: "{host} vuole aprire {url}",diff --git a/studio/frontend/src/i18n/locales/ja.ts b/studio/frontend/src/i18n/locales/ja.tsindex 373fa77193a..72cfdb02a1a 100644--- a/studio/frontend/src/i18n/locales/ja.ts+++ b/studio/frontend/src/i18n/locales/ja.ts@@ -454,6 +454,7 @@ export const ja = {resubmit: "このページはフォーム送信の結果です。再読み込みするとフォームが再送信され、同じ操作が繰り返される可能性があります。",upload: "この表示ではファイルをアップロードできません。送信するにはシステムのブラウザでページを開いてください。",scriptNavigation: "このページはスクリプトで別のアドレスに移動しようとしましたが、この表示では追従できません。システムのブラウザで開いてください。",+ needsBrowser: "このページはこの表示でブロックされるブラウザ機能を使おうとしたため、一部が動作しない可能性があります。システムのブラウザで開いてください。",},native: {externalPrompt: "{host} が {url} を開こうとしています",diff --git a/studio/frontend/src/i18n/locales/ko.ts b/studio/frontend/src/i18n/locales/ko.tsindex f65253e0086..a5dac398aeb 100644--- a/studio/frontend/src/i18n/locales/ko.ts+++ b/studio/frontend/src/i18n/locales/ko.ts@@ -453,6 +453,7 @@ export const ko = {resubmit: "이 페이지는 양식 제출 결과입니다. 다시 불러오면 양식이 다시 전송되어 같은 작업이 반복될 수 있습니다.",upload: "이 보기에서는 파일 업로드가 작동하지 않습니다. 보내려면 시스템 브라우저에서 페이지를 여세요.",scriptNavigation: "이 페이지가 스크립트로 다른 주소로 이동하려 했지만 이 보기에서는 따라갈 수 없습니다. 시스템 브라우저에서 여세요.",+ needsBrowser: "이 페이지가 이 보기에서 차단하는 브라우저 기능을 사용하려고 해서 일부가 작동하지 않을 수 있습니다. 시스템 브라우저에서 여세요.",},native: {externalPrompt: "{host}에서 {url}을(를) 열려고 합니다",diff --git a/studio/frontend/src/i18n/locales/pt-br.ts b/studio/frontend/src/i18n/locales/pt-br.tsindex e89617733e5..f1ad70b301f 100644--- a/studio/frontend/src/i18n/locales/pt-br.ts+++ b/studio/frontend/src/i18n/locales/pt-br.ts@@ -453,6 +453,7 @@ export const ptBR = {resubmit: "Esta página veio de um formulário. Carregá-la de novo reenvia o formulário, o que pode repetir o que ele fez.",upload: "O envio de arquivos não funciona nesta visualização. Abra a página no navegador do sistema para enviá-lo.",scriptNavigation: "Esta página tentou ir para outro endereço por script, o que esta visualização não consegue acompanhar. Abra-a no navegador do sistema.",+ needsBrowser: "Esta página tentou usar um recurso do navegador que esta visualização bloqueia, então partes dela podem não funcionar. Abra-a no navegador do sistema.",},native: {externalPrompt: "{host} quer abrir {url}",diff --git a/studio/frontend/src/i18n/locales/ru.ts b/studio/frontend/src/i18n/locales/ru.tsindex 75fa5b554b9..3c04f5398c0 100644--- a/studio/frontend/src/i18n/locales/ru.ts+++ b/studio/frontend/src/i18n/locales/ru.ts@@ -453,6 +453,7 @@ export const ru = {resubmit: "Эта страница получена после отправки формы. Повторная загрузка отправит форму снова, и действие может повториться.",upload: "Загрузка файлов в этом режиме не работает. Откройте страницу в системном браузере, чтобы отправить форму.",scriptNavigation: "Эта страница попыталась перейти по другому адресу с помощью скрипта, чего этот режим не поддерживает. Откройте её в системном браузере.",+ needsBrowser: "Эта страница попыталась использовать функцию браузера, которую этот режим блокирует, поэтому некоторые её части могут не работать. Откройте её в системном браузере.",},native: {externalPrompt: "{host} хочет открыть {url}",diff --git a/studio/frontend/src/i18n/locales/sv.ts b/studio/frontend/src/i18n/locales/sv.tsindex bfbd0a3b98e..453c90af2a4 100644--- a/studio/frontend/src/i18n/locales/sv.ts+++ b/studio/frontend/src/i18n/locales/sv.ts@@ -475,6 +475,8 @@ export const sv = {"Filuppladdningar fungerar inte i den här vyn. Öppna sidan i systemets webbläsare för att skicka den.",scriptNavigation:"Sidan försökte gå till en annan adress via skript, vilket den här vyn inte kan följa. Öppna den i systemets webbläsare i stället.",+ needsBrowser:+ "Sidan försökte använda en webbläsarfunktion som den här vyn blockerar, så delar av den kanske inte fungerar. Öppna den i systemets webbläsare i stället.",},native: {externalPrompt: "{host} vill öppna {url}",diff --git a/studio/frontend/src/i18n/locales/zh-CN.ts b/studio/frontend/src/i18n/locales/zh-CN.tsindex 071e16a7b43..ece39729964 100644--- a/studio/frontend/src/i18n/locales/zh-CN.ts+++ b/studio/frontend/src/i18n/locales/zh-CN.ts@@ -453,6 +453,7 @@ export const zhCN = {resubmit: "此页面来自表单提交。重新加载会再次提交表单,可能会重复执行该操作。",upload: "此视图不支持上传文件。请在系统浏览器中打开该页面后再提交。",scriptNavigation: "此页面尝试通过脚本跳转到其他地址,此视图无法跟随。请在系统浏览器中打开。",+ needsBrowser: "此页面尝试使用此视图阻止的浏览器功能,部分内容可能无法正常工作。请在系统浏览器中打开。",},native: {externalPrompt: "{host} 想要打开 {url}",diff --git a/studio/frontend/tests/browser-frame-message.test.ts b/studio/frontend/tests/browser-frame-message.test.tsindex d214892dfd2..448d397ed5c 100644--- a/studio/frontend/tests/browser-frame-message.test.ts+++ b/studio/frontend/tests/browser-frame-message.test.ts@@ -3,7 +3,7 @@import assert from "node:assert/strict";import { test } from "node:test";-import { parseFrameMessage } from "../src/features/browser/frame-message.ts";+import { frameNotice, parseFrameMessage } from "../src/features/browser/frame-message.ts";const from = (message: Record<string, unknown>) => parseFrameMessage({ source: "unsloth-browser", ...message });@@ -54,6 +54,16 @@ test("an upload notice carries nothing a page could fill", () => {assert.deepEqual(from({ type: "scriptNavigation", url: "https://evil.example/" }), { type: "scriptNavigation" });});+test("a page the sandbox refused a feature reaches the panel as a bare notice", () => {+ assert.deepEqual(from({ type: "needsBrowser", url: "https://evil.example/" }), { type: "needsBrowser" });+});++test("the sandbox notice stays until the page goes, the others time out", () => {+ assert.deepEqual(frameNotice("needsBrowser", "t1"), { id: "browser-needsBrowser-t1", duration: Number.POSITIVE_INFINITY });+ assert.deepEqual(frameNotice("upload", "t1"), { id: "browser-upload-t1" });+ assert.deepEqual(frameNotice("scriptNavigation", "t2"), { id: "browser-scriptNavigation-t2" });+});+test("a page's zoom is a step in, out or back to 100%, and nothing else", () => {assert.deepEqual(from({ type: "zoom", direction: 1 }), { type: "zoom", direction: 1, wheel: false });assert.deepEqual(from({ type: "zoom", direction: -1, wheel: true }), { type: "zoom", direction: -1, wheel: true });