Open-source AI browser agent for Chrome and Firefox (monorepo) đź§
JavaScript ai-agentai-agentsai-toolsbrowser-aibrowser-automationbrowser-extensionchrome-aichrome-devtoolschrome-extensionchrome-extensionsfirefox-addonfirefox-addonsfirefox-extensionfirefox-extensionsgemmagemma4minimaxoffline-aioffline-llmqwen
Model picker: Compass Max logo, "More providers…" status, docs
Barack Sokulludab6de200873
diff --git a/docs/providers-and-models.md b/docs/providers-and-models.mdindex dcf1f9410..b3c7e4cdb 100644--- a/docs/providers-and-models.md+++ b/docs/providers-and-models.md@@ -16,7 +16,9 @@ decision switches. See [the settings guide](https://webbrain.one/docs/settings/#and [data flow](privacy-and-data-flow.md#decision-models-and-completion-verification)for setup and disclosure details. Existing `#multimodal` settings links still work.-In the side panel's composer, the model menu is an engine icon. The dot on the+In the side panel's composer, the model menu shows the selected provider's logo,+the same as its row in the menu (Compass Max uses the Compass logo), and an+engine icon while the logo loads or when the provider has none. The dot on theicon's corner shows the selected provider's latest connection check: green whenit answered, red when it failed, amber while it runs. The dot is part of themenu button, so clicking it opens the menu, and the button's accessiblediff --git a/src/chrome/src/ui/provider-icons.js b/src/chrome/src/ui/provider-icons.jsindex 790afd8cb..9c8db9af0 100644--- a/src/chrome/src/ui/provider-icons.js+++ b/src/chrome/src/ui/provider-icons.js@@ -12,6 +12,8 @@ import {export const PROVIDER_ICON_FILES = {webbrain_cloud: 'webbrain_cloud.png',+ // Compass Max is the same provider at a larger tier.+ webbrain_cloud_max: 'webbrain_cloud.png',webbrain_companion: 'webbrain_cloud.png',llamacpp: 'llamacpp.svg',ollama: 'ollama.svg',diff --git a/src/chrome/src/ui/sidepanel.html b/src/chrome/src/ui/sidepanel.htmlindex fa1e57fb5..fb27f78e8 100644--- a/src/chrome/src/ui/sidepanel.html+++ b/src/chrome/src/ui/sidepanel.html@@ -391,9 +391,10 @@</button><div class="provider-picker" id="provider-picker"><!-- Native select kept as the value source for existing handlers.- The chosen model's logo shares the button with its connection- badge. The engine is the fallback for a missing logo; the- model's name remains in the tooltip and accessible name. -->+ The selected provider's logo, the same as its menu row, shares+ the button with its connection badge. The engine is the+ fallback for a missing logo; the model's name remains in the+ tooltip and accessible name. --><select id="provider-select" class="provider-select-native" title="LLM Provider" tabindex="-1" aria-hidden="true"></select><button type="button" id="provider-picker-btn" class="provider-picker-btn" aria-haspopup="listbox" aria-expanded="false" aria-controls="provider-picker-menu" aria-describedby="status-dot" aria-label="LLM Provider"><span class="provider-picker-engine">diff --git a/src/chrome/src/ui/sidepanel.js b/src/chrome/src/ui/sidepanel.jsindex acb3ec9ba..416107f8d 100644--- a/src/chrome/src/ui/sidepanel.js+++ b/src/chrome/src/ui/sidepanel.js@@ -8492,7 +8492,10 @@ function appendProviderPickerOption(id, name, meta, iconProviderId = id) {return;}providerSelect.value = id;- syncProviderPickerButton();+ // "More providers…" only opens Settings, and the change handler puts the+ // current provider back. Syncing the button to it first would drop the+ // logo and the connection status, which nothing checks again.+ if (id !== MORE_PROVIDERS_OPTION_VALUE) syncProviderPickerButton();providerSelect.dispatchEvent(new Event('change', { bubbles: true }));});diff --git a/src/firefox/src/ui/provider-icons.js b/src/firefox/src/ui/provider-icons.jsindex b2807d9d0..79d00b17f 100644--- a/src/firefox/src/ui/provider-icons.js+++ b/src/firefox/src/ui/provider-icons.js@@ -12,6 +12,8 @@ import {export const PROVIDER_ICON_FILES = {webbrain_cloud: 'webbrain_cloud.png',+ // Compass Max is the same provider at a larger tier.+ webbrain_cloud_max: 'webbrain_cloud.png',webbrain_companion: 'webbrain_cloud.png',llamacpp: 'llamacpp.svg',ollama: 'ollama.svg',diff --git a/src/firefox/src/ui/sidepanel.html b/src/firefox/src/ui/sidepanel.htmlindex 06ba6b16f..87ed82170 100644--- a/src/firefox/src/ui/sidepanel.html+++ b/src/firefox/src/ui/sidepanel.html@@ -353,9 +353,10 @@</button><div class="provider-picker" id="provider-picker"><!-- Native select kept as the value source for existing handlers.- The chosen model's logo shares the button with its connection- badge. The engine is the fallback for a missing logo; the- model's name remains in the tooltip and accessible name. -->+ The selected provider's logo, the same as its menu row, shares+ the button with its connection badge. The engine is the+ fallback for a missing logo; the model's name remains in the+ tooltip and accessible name. --><select id="provider-select" class="provider-select-native" title="LLM Provider" tabindex="-1" aria-hidden="true"></select><button type="button" id="provider-picker-btn" class="provider-picker-btn" aria-haspopup="listbox" aria-expanded="false" aria-controls="provider-picker-menu" aria-describedby="status-dot" aria-label="LLM Provider"><span class="provider-picker-engine">diff --git a/src/firefox/src/ui/sidepanel.js b/src/firefox/src/ui/sidepanel.jsindex 4ed26a431..b6bd68dd4 100644--- a/src/firefox/src/ui/sidepanel.js+++ b/src/firefox/src/ui/sidepanel.js@@ -8322,7 +8322,10 @@ function appendProviderPickerOption(id, name, meta, iconProviderId = id) {return;}providerSelect.value = id;- syncProviderPickerButton();+ // "More providers…" only opens Settings, and the change handler puts the+ // current provider back. Syncing the button to it first would drop the+ // logo and the connection status, which nothing checks again.+ if (id !== MORE_PROVIDERS_OPTION_VALUE) syncProviderPickerButton();providerSelect.dispatchEvent(new Event('change', { bubbles: true }));});diff --git a/test/model-picker-icon.mjs b/test/model-picker-icon.mjsindex a33184970..bb405e4b0 100644--- a/test/model-picker-icon.mjs+++ b/test/model-picker-icon.mjs@@ -210,6 +210,58 @@ for (const build of ['chrome', 'firefox']) {});}+for (const build of ['chrome', 'firefox']) {+ test(`${build}: "More providers…" opens Settings without dropping the logo or the connection status`, async () => {+ const en = (await import(`../src/${build}/src/ui/locales/en.js`)).default;+ const panel = read(build, 'src/ui/sidepanel.js');+ const syncedIcons = [];+ const buttons = [];+ let settingsOpened = 0;+ const providerSelect = { value: 'openrouter', selectedOptions: [{ textContent: 'OpenRouter — Active' }] };+ const element = () => ({+ dataset: {}, listeners: [], setAttribute() {}, appendChild() {},+ addEventListener(type, fn) { if (type === 'click') this.listeners.push(fn); },+ });+ const context = vm.createContext({+ syncProviderPickerIcon() { syncedIcons.push(providerSelect.value); },+ t: (key, params = {}) => String(en[key] || key).replace(/\{(\w+)\}/g, (_, k) => params[k] ?? ''),+ document: { createElement: element },+ Event: class { constructor(type) { this.type = type; } },+ providerIconUrl: () => '',+ setProviderPickerOpen() {},+ providerSelect,+ MORE_PROVIDERS_OPTION_VALUE: '__more_providers__',+ selectedProviderId: 'openrouter',+ providerSelectionRequestId: 0,+ providerTestRequestId: 0,+ providerPickerLabel: { textContent: '' },+ providerPickerLabelById: new Map([['openrouter', 'OpenRouter']]),+ providerPickerModelById: new Map(),+ providerPickerSourceById: new Map(),+ providerPickerBtn: { title: '', setAttribute() {} },+ providerPickerMenu: { appendChild(btn) { buttons.push(btn); }, querySelectorAll: () => [] },+ statusDot: { className: 'status-dot online', title: 'Connected (anthropic/claude-sonnet-4)' },+ statusDotProviderId: 'openrouter',+ statusDotTitle: () => 'Connected (anthropic/claude-sonnet-4)',+ openProvidersSettingsPage: async () => { settingsOpened++; },+ });+ vm.runInContext(['setStatusDot', 'syncProviderPickerButton', 'markSelectedProviderUntested', 'appendProviderPickerOption']+ .map((name) => extract(panel, name)).join('\n'), context);+ const start = panel.indexOf("providerSelect.addEventListener('change', async () => {");+ const handler = vm.runInContext(`(${panel.slice(panel.indexOf('async () => {', start), panel.indexOf('\n});', start) + 2)})`, context);+ let change;+ providerSelect.dispatchEvent = () => { change = handler(); };+ context.appendProviderPickerOption('__more_providers__', 'More providers…', '');+ buttons[0].listeners[0]();+ await change;+ assert.equal(settingsOpened, 1);+ assert.equal(providerSelect.value, 'openrouter', 'the current provider stays selected');+ assert.equal(syncedIcons.includes('__more_providers__'), false, 'the logo is never resolved for the sentinel');+ assert.deepEqual([context.statusDot.className, context.statusDot.title],+ ['status-dot online', 'Connected (anthropic/claude-sonnet-4)'], 'the connection status is kept');+ });+}+test('every language names the active model', async () => {for (const build of ['chrome', 'firefox']) {for (const code of ['en', 'tr', 'es', 'fr', 'de', 'nl', 'pt', 'pl', 'ru', 'uk', 'zh', 'ja', 'ko', 'ar', 'he', 'fa', 'hi', 'bn', 'id', 'ms', 'tl', 'th', 'vi']) {diff --git a/test/model-picker-status-ui.mjs b/test/model-picker-status-ui.mjsindex 82ef45b4d..c483cc78d 100644--- a/test/model-picker-status-ui.mjs+++ b/test/model-picker-status-ui.mjs@@ -159,8 +159,10 @@ for (const [build, engine] of [['chrome', chromium], ['firefox', firefox]]) {const green = await resolved(page, '--success');await page.waitForFunction(green => getComputedStyle(document.getElementById('status-dot')).backgroundColor === green, green);+ const logoBefore = await page.locator('.provider-picker-logo').elementHandle();await selectModel(page, 'anthropic/claude-sonnet-4');await loadedLogo(page, 'openrouter.svg');+ assert.equal(await logoBefore.evaluate(img => img.isConnected), true, 'a model change keeps the logo instead of loading it again');assert.equal(await page.locator('#provider-picker-btn').getAttribute('aria-label'), 'Model: openrouter · anthropic/claude-sonnet-4','the model is still named in the tooltip');await selectModel(page, 'claude-sonnet-4', 'anthropic');@@ -217,6 +219,13 @@ for (const [build, engine] of [['chrome', chromium], ['firefox', firefox]]) {});});+ test('Compass Max shows the Compass logo even without an alias from the menu', async () => {+ await panel(async (page) => {+ await selectModel(page, 'max', 'webbrain_cloud_max');+ await loadedLogo(page, 'webbrain_cloud.png');+ });+ });+test('a missing logo asset restores the engine fallback with the status badge visible', async () => {await panel(async (page) => {await selectModel(page, 'openai/gpt-6-luna');