Skip to content

Open-source AI browser agent for Chrome and Firefox (monorepo) 🧠

Put the connection dot on the composer's engine icon

Emre Sokulludee507f33b07
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ce497086c..8ca5d577c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,9 @@ This changelog was generated from the repository Git history and release tags. V
## [Unreleased]
+### Changed
+- The green or red dot that shows whether your chat model answers now sits on the corner of the composer's engine icon, inside the model menu button. It used to sit after the menu's arrow, where it looked like part of the menu but did nothing when clicked; clicking it now opens the model menu. Screen readers hear the connection status as the button's description.
+
## [42.3.0] - 2026-10-20
### Changed
diff --git a/docs/providers-and-models.md b/docs/providers-and-models.md
index df253c174..f976e912b 100644
--- a/docs/providers-and-models.md
+++ b/docs/providers-and-models.md
@@ -16,6 +16,12 @@ 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
+icon's corner shows the selected provider's latest connection check: green when
+it answered, red when it failed, amber while it runs. The dot is part of the
+menu button, so clicking it opens the menu, and the button's accessible
+description carries the status.
+
Browser chat includes the configured main provider and text-model labels in its
trusted per-turn context, so identity answers can use the current selection
instead of guessing. Assistive model labels stay separate. Automatic routes such
diff --git a/package.json b/package.json
index 720da32e1..3aa53e1d5 100644
--- a/package.json
+++ b/package.json
@@ -100,7 +100,7 @@
"test:upload-owner": "node --test test/page-monitor-upload-owner.mjs test/page-monitor-upload-release.mjs",
"test:shard:quick": "npm run test:cms && npm run test:markdown && npm run test:generative-media && npm run test:systemone && npm run test:systemone:fast && node --test test/guard-policy.mjs test/browser-dialogs.mjs test/capsolver-cloud-broker.mjs test/captcha-providers.mjs test/captcha-weighted-fallback.mjs test/captcha-hcaptcha-providers.mjs test/captcha-native-providers.mjs test/captcha-runtime-policy.mjs test/captcha-callback-bridge.mjs test/captcha-bridge-registration.mjs test/captcha-aws-recovery.mjs test/captcha-documented-contracts.mjs test/huggingface-signup-recovery.mjs test/trace-full-export.mjs test/feedback-traces.mjs && npm run test:firefox-bidi && npm run test:billing-notice && npm run test:compass-quota && npm run test:provider-limits && npm run test:provider-catalog && npm run test:provider-instances:ui && npm run test:settings-pages:ui && npm run test:openrouter-capabilities && npm run test:anthropic && npm run test:browser-batch && npm run test:accessibility-tree-benchmark && npm run test:toolbar-guard && npm run test:cloud-bridge-approval && npm run test:discord && npm run test:pdf-read && npm run test:pdf-selection && npm run test:social-contract && npm run test:safesocial && npm run test:build-unpacked && npm run test:attachment-drop && npm run test:workflow-editor && node --test test/profile-sync-stats.mjs && node --test test/memcode-recall.mjs",
"test:shard:runtime-unit": "node --test test/skill-download-wait.mjs && node --test test/agent-lifecycle.mjs test/runtime-startup.mjs test/run-ui-scheduled-lifecycle.mjs test/transport-deadlines.mjs test/cdp-worker-restart.mjs test/bot-memory.mjs test/bot-memory-click-guard.mjs test/bot-memory-registries.mjs test/bot-memory-cloud-controller.mjs test/cdp-clear-receipt.mjs test/cdp-field-submit-recovery.mjs test/conversation-persistence.mjs test/context-live-tool-group.mjs test/integration-races.mjs test/watch-completion-checkpoint.mjs test/runtime-model-identity.mjs test/provider-message-privacy.mjs test/runtime-task-authority.mjs test/planner-repair-authority.mjs test/runtime-progress-continuation.mjs test/chat-resume-chain.mjs test/chat-resume-completion.mjs test/native-chat-execution-ledger.mjs test/chat-send-dispatch-result.mjs test/chat-reply-dedup-race.mjs test/memcode-lifecycle.mjs test/runtime-peer-review.mjs test/read-continuation-schema.mjs test/completion-submit-acknowledgement.mjs test/completion-live-status.mjs test/completion-iframe-submit.mjs test/form-validation-alert-readings.mjs test/control-effect-readings.mjs test/guard-reading-carry-over.mjs test/trusted-retry-readings.mjs test/completion-semantic-commit.mjs test/completion-diagnostics.mjs test/mastodon-publication.mjs test/calculator.mjs test/chat-recovery-protocol.mjs test/chat-pending-reconciliation.mjs test/semantic-page-retry.mjs test/pdf-detection.mjs test/runtime-lifecycle.mjs test/collection-read-progress.mjs test/network-lifecycle.mjs test/text-write-cancellation.mjs test/guard-advisory-writes.mjs test/trusted-field-preparation.mjs test/draftjs-text.mjs test/codemirror-text.mjs test/rich-text-frameworks.mjs test/cdp-managed-text-selection.mjs test/firefox-rich-text-readback.mjs test/contenteditable-beforeinput.mjs test/trusted-field-preparation-ownership.mjs test/typing-preparation-geometry.mjs test/chat-steering.mjs test/resource-mutation-guards.mjs test/completion-steering-receipt-authority.mjs test/steering-revision-recovery.mjs test/pending-clarification-hydration.mjs test/clarify-timeout-policy.mjs test/guard-ask-cards.mjs test/permission-steering-wakeup.mjs test/pure-calculation-reply.mjs test/pure-calculation-tools.mjs test/page-feedback.mjs test/page-feedback-progress.mjs test/page-feedback-unbindable-target.mjs test/guard-advisory-actions.mjs test/rich-text-preflight-page-change.mjs test/keyboard-receiver-frame.mjs test/ask-response-scope.mjs test/auto-mode.mjs test/plan-when-needed.mjs test/model-picker-icon.mjs test/ask-completion-churn.mjs test/page-feedback-policy.mjs test/research-escalation-page-feedback.mjs test/page-feedback-transport-races.mjs test/page-feedback-recovery.mjs test/telegram-read-preparation-agent.mjs test/media-download-agent-handler.mjs test/code-scanning-url-recipient.mjs test/apocalypse-comm-parsing.mjs test/apocalypse-scalar-decoding.mjs test/bitgpu-chat-security.mjs test/social-media-url-upgrades.mjs test/downloaded-file-saved-bytes.mjs test/downloaded-file-local-probe.mjs test/formless-verification-recovery.mjs test/file-upload-accept.mjs test/file-upload-accept-agent.mjs test/workflow-route-generic-completion.mjs test/release-publication-completion.mjs test/workflow-implicit-metadata.mjs test/workflow-field-readings.mjs test/workflow-field-anchors.mjs test/user-turn-kind.mjs test/follow-up-task-context.mjs test/completion-current-execution-evidence.mjs test/video-upload-attachment.mjs test/feedback-automatic-churn.mjs test/feedback-navigation-idle.mjs test/feedback-run-boundaries.mjs test/feedback-ask-viewing.mjs test/lifecycle-terminal-done.mjs test/incomplete-completion-recovery.mjs test/guard-advisory-completion.mjs test/lean-mode.mjs test/prompt-unverified-pages.mjs test/prompt-missing-values.mjs test/lifecycle-planner-digest.mjs test/lifecycle-steering-latency.mjs test/lifecycle-steering-restart.mjs test/lifecycle-vision-fallback.mjs test/delivery-click-locks.mjs test/guards-steering-receipts.mjs test/terminal-user-messages.mjs test/improver-providers.mjs test/improver-providers-agent.mjs test/improver-guards-ledger.mjs test/improver-guards-tools.mjs test/improver-clarify.mjs test/improver-clarify-scheduler.mjs test/improver-misc.mjs test/improver-forms.mjs test/improver-forms-strict-secrets.mjs test/improver-content-press-keys-hint.mjs && npm run test:plan-notifications",
- "test:shard:browser-a": "node --test test/captcha-draft-content.mjs test/captcha-challenge-surfaces.mjs && node test/bot-memory-dom.mjs && node test/bot-memory-click-dom.mjs && node test/ui-content-lifecycle.mjs && node --test test/native-telegram-chat.mjs test/native-telegram-recipient.mjs test/telegram-native-baseline.mjs test/telegram-native-latest.mjs test/native-chat-pre-enter-draft.mjs test/chat-draft-dispatch-ownership.mjs test/native-telegram-alias-preparation.mjs test/telegram-read-preparation-content.mjs test/queued-composer-ownership.mjs test/onboarding-provider-ready.mjs test/sidepanel-permission-gate-ui.mjs test/workflow-native-targets.mjs test/native-whatsapp-chat.mjs test/native-chat-context-identity.mjs test/native-whatsapp-contact.mjs test/whatsapp-chat-selection.mjs test/whatsapp-native-bootstrap.mjs test/whatsapp-drawer-identity.mjs test/whatsapp-read-latest.mjs test/whatsapp-read-preparation.mjs test/whatsapp-chat-completion.mjs test/whatsapp-chat-restart.mjs test/chat-goal-lifecycle.mjs test/chat-completion.mjs test/chat-generic-dispatch.mjs test/completion-live-status-browser.mjs test/native-confirmation-visibility.mjs test/native-button-preparation.mjs test/read-continuation-browser.mjs test/iframe-preparation-focus.mjs test/contenteditable-literal.mjs test/native-chat-empty-editor.mjs test/native-chat-trusted-clear.mjs test/chat-steering-ui.mjs test/recipient-confirmation-ui.mjs test/assistant-message-visibility-ui.mjs test/page-monitor-ui.mjs test/x-compose-trusted-typing.mjs test/page-monitor-dialog.mjs test/page-monitor-dialog-native.mjs test/page-monitor-inline-post.mjs test/bluesky-composer-context.mjs test/page-monitor-anchored.mjs test/page-monitor-upload-owner.mjs test/page-monitor-upload-release.mjs test/page-monitor-native-controls.mjs test/page-monitor-native-preparation.mjs test/native-preparation-cold.mjs test/page-monitor-navigation.mjs test/page-monitor-main-owner.mjs test/page-monitor-collateral-controls.mjs test/accessibility-tree-scoped-budget.mjs test/ax-reference-origin.mjs test/page-monitor-decorative-hit.mjs test/social-ui-navigation.mjs test/native-resource-deletion-binding.mjs test/native-mastodon-confirmation.mjs test/dropdown-menu-inventory.mjs test/page-monitor-passive-progress.mjs test/page-monitor-feed-items.mjs test/media-download-binding.mjs test/media-download-capture-integration.mjs test/social-media-downloader-reinjection.mjs test/upload-file-local-state-guidance.mjs test/monitor-intervention-contract.mjs test/monitor-owned-geometry.mjs test/monitor-viewport-remainder.mjs test/monitor-scroll-churn.mjs test/monitor-local-attribution.mjs test/monitor-lifecycle-leaks.mjs test/lifecycle-run-ui.mjs test/lifecycle-menu-prompts-held.mjs test/delivery-cdp-input.mjs test/delivery-click-ax-response-loss.mjs test/delivery-native-button-geometry.mjs test/delivery-hover-transition.mjs test/delivery-native-button-route.mjs test/delivery-dispatch-boundary.mjs test/delivery-stop-compound.mjs test/guards-control-classification.mjs test/guards-unbound-deletion.mjs test/submit-probe-readings.mjs test/declined-submission-identity.mjs test/improver-content-account-chrome.mjs test/improver-content-recipient.mjs test/improver-content-truncated-replacement.mjs test/improver-forms-probe.mjs test/improver-misc-trace-browser.mjs test/page-feedback-held-time.mjs test/page-monitor-held-observation.mjs",
+ "test:shard:browser-a": "node --test test/captcha-draft-content.mjs test/captcha-challenge-surfaces.mjs && node test/bot-memory-dom.mjs && node test/bot-memory-click-dom.mjs && node test/ui-content-lifecycle.mjs && node --test test/native-telegram-chat.mjs test/native-telegram-recipient.mjs test/telegram-native-baseline.mjs test/telegram-native-latest.mjs test/native-chat-pre-enter-draft.mjs test/chat-draft-dispatch-ownership.mjs test/native-telegram-alias-preparation.mjs test/telegram-read-preparation-content.mjs test/queued-composer-ownership.mjs test/onboarding-provider-ready.mjs test/sidepanel-permission-gate-ui.mjs test/model-picker-status-ui.mjs test/workflow-native-targets.mjs test/native-whatsapp-chat.mjs test/native-chat-context-identity.mjs test/native-whatsapp-contact.mjs test/whatsapp-chat-selection.mjs test/whatsapp-native-bootstrap.mjs test/whatsapp-drawer-identity.mjs test/whatsapp-read-latest.mjs test/whatsapp-read-preparation.mjs test/whatsapp-chat-completion.mjs test/whatsapp-chat-restart.mjs test/chat-goal-lifecycle.mjs test/chat-completion.mjs test/chat-generic-dispatch.mjs test/completion-live-status-browser.mjs test/native-confirmation-visibility.mjs test/native-button-preparation.mjs test/read-continuation-browser.mjs test/iframe-preparation-focus.mjs test/contenteditable-literal.mjs test/native-chat-empty-editor.mjs test/native-chat-trusted-clear.mjs test/chat-steering-ui.mjs test/recipient-confirmation-ui.mjs test/assistant-message-visibility-ui.mjs test/page-monitor-ui.mjs test/x-compose-trusted-typing.mjs test/page-monitor-dialog.mjs test/page-monitor-dialog-native.mjs test/page-monitor-inline-post.mjs test/bluesky-composer-context.mjs test/page-monitor-anchored.mjs test/page-monitor-upload-owner.mjs test/page-monitor-upload-release.mjs test/page-monitor-native-controls.mjs test/page-monitor-native-preparation.mjs test/native-preparation-cold.mjs test/page-monitor-navigation.mjs test/page-monitor-main-owner.mjs test/page-monitor-collateral-controls.mjs test/accessibility-tree-scoped-budget.mjs test/ax-reference-origin.mjs test/page-monitor-decorative-hit.mjs test/social-ui-navigation.mjs test/native-resource-deletion-binding.mjs test/native-mastodon-confirmation.mjs test/dropdown-menu-inventory.mjs test/page-monitor-passive-progress.mjs test/page-monitor-feed-items.mjs test/media-download-binding.mjs test/media-download-capture-integration.mjs test/social-media-downloader-reinjection.mjs test/upload-file-local-state-guidance.mjs test/monitor-intervention-contract.mjs test/monitor-owned-geometry.mjs test/monitor-viewport-remainder.mjs test/monitor-scroll-churn.mjs test/monitor-local-attribution.mjs test/monitor-lifecycle-leaks.mjs test/lifecycle-run-ui.mjs test/lifecycle-menu-prompts-held.mjs test/delivery-cdp-input.mjs test/delivery-click-ax-response-loss.mjs test/delivery-native-button-geometry.mjs test/delivery-hover-transition.mjs test/delivery-native-button-route.mjs test/delivery-dispatch-boundary.mjs test/delivery-stop-compound.mjs test/guards-control-classification.mjs test/guards-unbound-deletion.mjs test/submit-probe-readings.mjs test/declined-submission-identity.mjs test/improver-content-account-chrome.mjs test/improver-content-recipient.mjs test/improver-content-truncated-replacement.mjs test/improver-forms-probe.mjs test/improver-misc-trace-browser.mjs test/page-feedback-held-time.mjs test/page-monitor-held-observation.mjs",
"test:shard:browser-b1": "node test/message-recipient-upload.mjs && node test/message-recipient-clarify-binding.mjs && node --test test/message-recipient-whatsapp.mjs test/message-control-readings.mjs && node test/quality/integration-mv3.mjs --full-form && node test/quality/integration-mv3.mjs --batch && node test/quality/literal-calculate-midrun-mv3.mjs && node test/quality/ask-completion-churn-mv3.mjs && node test/quality/ask-person-activity-mv3.mjs && node test/quality/telegram-cold-preparation-mv3.mjs && node test/quality/native-chat-mv3.mjs && node test/quality/native-chat-presubmit-mv3.mjs && node test/quality/cloud-bot-memory-mv3.mjs",
"test:shard:browser-b2": "node test/quality/whatsapp-contact-matrix.mjs && node test/quality/pdf-detection-mv3.mjs && node test/quality/download-upload-mv3.mjs && node test/quality/upload-release-binding-mv3.mjs && node test/quality/upload-release-binding-mv3.mjs --selector-recovery && node test/quality/upload-release-binding-mv3.mjs --sequential-assets && node test/quality/release-review-world-mv3.mjs && node test/quality/downloaded-file-saved-bytes-mv3.mjs && node test/quality/file-upload-accept-mv3.mjs && node test/quality/bulk-resume-mv3.mjs && node test/quality/shared-action-guards-mv3.mjs && node test/quality/video-upload-attachment-mv3.mjs && node --test test/iframe-probe-match-index.mjs",
"test:shard:browser-c": "node test/quality/literal-frame-mv3.mjs && node test/quality/mastodon-publication-mv3.mjs && node test/quality/mastodon-reply-route-mv3.mjs && node test/quality/mastodon-deletion-mv3.mjs && node test/quality/mastodon-delete-confirmation-mv3.mjs && node test/quality/mastodon-delete-confirmation-mv3.mjs --menu-read && node test/quality/mastodon-delete-confirmation-mv3.mjs --vague && node test/quality/mastodon-delete-after-correction-mv3.mjs && node test/quality/unbound-deletion-mv3.mjs && node test/quality/recipient-clarify-mv3.mjs && node test/quality/open-chat-recipients-mv3.mjs && node test/quality/correction-cross-site-mv3.mjs && node test/quality/anchored-action-mv3.mjs && node test/quality/inline-social-composer-mv3.mjs && node test/quality/x-compose-dialog-mv3.mjs && node test/quality/bluesky-composer-mv3.mjs && node test/quality/dropdown-menu-matrix.mjs && node test/quality/mastodon-deletion-navigation-mv3.mjs && node test/quality/semantic-navigation-matrix.mjs && node test/quality/workflow-replay-mv3.mjs && node test/quality/generative-media-mv3.mjs && node test/quality/cdp-worker-restart-mv3.mjs && node test/quality/steering-worker-restart-mv3.mjs",
diff --git a/src/chrome/src/ui/sidepanel.html b/src/chrome/src/ui/sidepanel.html
index 57b920b9d..b21c24a88 100644
--- a/src/chrome/src/ui/sidepanel.html
+++ b/src/chrome/src/ui/sidepanel.html
@@ -393,16 +393,21 @@
<!-- Native select kept as the value source for existing handlers.
The closed button shows an engine icon, not the model's name, to
save toolbar room: the name is its tooltip and accessible name,
- and the open menu marks it. Brand icons show only in the menu. -->
+ and the open menu marks it. Brand icons show only in the menu.
+ The connection dot sits on the engine's corner, inside the
+ button, so it reads as the model's status and opens the menu. -->
<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-label="LLM Provider">
- <svg class="provider-picker-icon" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
- <path d="M10 4h6"/>
- <path d="M13 4v3"/>
- <path d="M7 7h9l2 2h2v8h-3l-2 2H9l-2-2z"/>
- <path d="M3 11v4"/>
- <path d="M3 13h4"/>
- </svg>
+ <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">
+ <svg class="provider-picker-icon" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
+ <path d="M10 4h6"/>
+ <path d="M13 4v3"/>
+ <path d="M7 7h9l2 2h2v8h-3l-2 2H9l-2-2z"/>
+ <path d="M3 11v4"/>
+ <path d="M3 13h4"/>
+ </svg>
+ <span id="status-dot" class="status-dot offline" data-i18n-title="sp.status.disconnected"></span>
+ </span>
<span class="provider-picker-label" id="provider-picker-label"></span>
<span class="provider-picker-caret" aria-hidden="true">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
@@ -421,7 +426,6 @@
aria-pressed="false"
hidden
><span aria-hidden="true">☢</span></button>
- <span id="status-dot" class="status-dot offline" data-i18n-title="sp.status.disconnected"></span>
<span class="composer-toolbar-spacer" aria-hidden="true"></span>
<div id="permission-gate-menu" class="permission-gate-menu">
<button type="button" id="btn-permission-gate" aria-haspopup="true" aria-expanded="false" aria-controls="permission-gate-popover" data-i18n-title="sp.permissions.button" data-i18n-aria-label="sp.permissions.button">
diff --git a/src/chrome/styles/sidepanel.css b/src/chrome/styles/sidepanel.css
index d1ef98de6..a77e48e8b 100644
--- a/src/chrome/styles/sidepanel.css
+++ b/src/chrome/styles/sidepanel.css
@@ -1187,8 +1187,7 @@ html[dir="rtl"] .permission-gate-input:checked + .permission-gate-switch::before
position: relative;
min-width: 0;
max-width: 200px;
- /* Grow to content only — stretching here pushed the online/offline
- status-dot away from the select and toward the language button. */
+ /* Grow to content only: the toolbar's spacer takes the free room. */
flex: 0 1 auto;
}
@@ -3530,6 +3529,28 @@ html[data-ui-scale="175"] .conversation-action-label {
flex: 0 0 auto;
}
+/* The connection dot is a badge on the engine's lower corner, inside the
+ button: it reads as the model's status, and clicking it opens the menu like
+ the rest of the button. A ring in the button's background keeps it clear of
+ the icon's strokes. */
+.provider-picker-engine {
+ position: relative;
+ display: inline-flex;
+ flex: 0 0 auto;
+}
+
+.provider-picker-engine .status-dot {
+ position: absolute;
+ bottom: -1px;
+ inset-inline-end: -2px;
+ width: 7px;
+ height: 7px;
+}
+
+.provider-picker-engine .status-dot:is(.online, .offline, .connecting) {
+ box-shadow: 0 0 0 2px var(--status-dot-ring, var(--bg-input));
+}
+
.composer-toolbar .provider-picker-label {
display: none;
}
@@ -3539,6 +3560,7 @@ html[data-ui-scale="175"] .conversation-action-label {
background: var(--bg-secondary);
border-color: var(--border);
color: var(--text-primary);
+ --status-dot-ring: var(--bg-secondary);
}
.composer-toolbar .provider-picker-menu {
diff --git a/src/firefox/src/ui/sidepanel.html b/src/firefox/src/ui/sidepanel.html
index 0bada7e8c..5e76bd15f 100644
--- a/src/firefox/src/ui/sidepanel.html
+++ b/src/firefox/src/ui/sidepanel.html
@@ -355,16 +355,21 @@
<!-- Native select kept as the value source for existing handlers.
The closed button shows an engine icon, not the model's name, to
save toolbar room: the name is its tooltip and accessible name,
- and the open menu marks it. Brand icons show only in the menu. -->
+ and the open menu marks it. Brand icons show only in the menu.
+ The connection dot sits on the engine's corner, inside the
+ button, so it reads as the model's status and opens the menu. -->
<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-label="LLM Provider">
- <svg class="provider-picker-icon" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
- <path d="M10 4h6"/>
- <path d="M13 4v3"/>
- <path d="M7 7h9l2 2h2v8h-3l-2 2H9l-2-2z"/>
- <path d="M3 11v4"/>
- <path d="M3 13h4"/>
- </svg>
+ <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">
+ <svg class="provider-picker-icon" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
+ <path d="M10 4h6"/>
+ <path d="M13 4v3"/>
+ <path d="M7 7h9l2 2h2v8h-3l-2 2H9l-2-2z"/>
+ <path d="M3 11v4"/>
+ <path d="M3 13h4"/>
+ </svg>
+ <span id="status-dot" class="status-dot offline" data-i18n-title="sp.status.disconnected"></span>
+ </span>
<span class="provider-picker-label" id="provider-picker-label"></span>
<span class="provider-picker-caret" aria-hidden="true">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
@@ -374,7 +379,6 @@
</button>
<div class="provider-picker-menu hidden" id="provider-picker-menu" role="listbox" tabindex="-1"></div>
</div>
- <span id="status-dot" class="status-dot offline" data-i18n-title="sp.status.disconnected"></span>
<span class="composer-toolbar-spacer" aria-hidden="true"></span>
<div id="permission-gate-menu" class="permission-gate-menu">
<button type="button" id="btn-permission-gate" aria-haspopup="true" aria-expanded="false" aria-controls="permission-gate-popover" data-i18n-title="sp.permissions.button" data-i18n-aria-label="sp.permissions.button">
diff --git a/src/firefox/styles/sidepanel.css b/src/firefox/styles/sidepanel.css
index f8a9ebbe9..1a0e5874c 100644
--- a/src/firefox/styles/sidepanel.css
+++ b/src/firefox/styles/sidepanel.css
@@ -1060,8 +1060,7 @@ html[dir="rtl"] .permission-gate-input:checked + .permission-gate-switch::before
position: relative;
min-width: 0;
max-width: 200px;
- /* Grow to content only — stretching here pushed the online/offline
- status-dot away from the select and toward the language button. */
+ /* Grow to content only: the toolbar's spacer takes the free room. */
flex: 0 1 auto;
}
@@ -3356,6 +3355,28 @@ html[data-ui-scale="175"] .conversation-action-label {
flex: 0 0 auto;
}
+/* The connection dot is a badge on the engine's lower corner, inside the
+ button: it reads as the model's status, and clicking it opens the menu like
+ the rest of the button. A ring in the button's background keeps it clear of
+ the icon's strokes. */
+.provider-picker-engine {
+ position: relative;
+ display: inline-flex;
+ flex: 0 0 auto;
+}
+
+.provider-picker-engine .status-dot {
+ position: absolute;
+ bottom: -1px;
+ inset-inline-end: -2px;
+ width: 7px;
+ height: 7px;
+}
+
+.provider-picker-engine .status-dot:is(.online, .offline, .connecting) {
+ box-shadow: 0 0 0 2px var(--status-dot-ring, var(--bg-input));
+}
+
.composer-toolbar .provider-picker-label {
display: none;
}
@@ -3365,6 +3386,7 @@ html[data-ui-scale="175"] .conversation-action-label {
background: var(--bg-secondary);
border-color: var(--border);
color: var(--text-primary);
+ --status-dot-ring: var(--bg-secondary);
}
.composer-toolbar .provider-picker-menu {
diff --git a/test/model-picker-icon.mjs b/test/model-picker-icon.mjs
index 9a0a9213b..cca139c11 100644
--- a/test/model-picker-icon.mjs
+++ b/test/model-picker-icon.mjs
@@ -16,8 +16,10 @@ for (const build of ['chrome', 'firefox']) {
test(`${build}: the closed model picker is an engine icon`, () => {
const html = read(build, 'src/ui/sidepanel.html');
const button = html.match(/<button type="button" id="provider-picker-btn"[\s\S]*?<\/button>/)[0];
- assert.match(button, /<svg class="provider-picker-icon"[^>]*aria-hidden="true">[\s\S]*?<\/svg>\s*<span class="provider-picker-label" id="provider-picker-label"><\/span>/,
- 'the icon comes first, hidden from assistive technology');
+ assert.match(button, /<span class="provider-picker-engine">\s*<svg class="provider-picker-icon"[^>]*aria-hidden="true">[\s\S]*?<\/svg>\s*<span id="status-dot" class="status-dot offline" data-i18n-title="sp\.status\.disconnected"><\/span>\s*<\/span>\s*<span class="provider-picker-label" id="provider-picker-label"><\/span>/,
+ 'the icon comes first, hidden from assistive technology, with the connection dot on it');
+ assert.match(button, /aria-describedby="status-dot"/, 'the connection status describes the button');
+ assert.equal(html.match(/id="status-dot"/g).length, 1, 'the dot is no longer a separate toolbar item');
const css = read(build, 'styles/sidepanel.css');
assert.match(css, /\.composer-toolbar \.provider-picker-label \{\s*display: none;\s*\}/, 'the name is not shown in the composer');
assert.doesNotMatch(css, /\.composer-toolbar \.provider-picker \{\s*\/\* 100% minus/, 'the picker no longer claims a whole row at large scales');
diff --git a/test/model-picker-status-ui.mjs b/test/model-picker-status-ui.mjs
new file mode 100644
index 000000000..8022d00d9
--- /dev/null
+++ b/test/model-picker-status-ui.mjs
@@ -0,0 +1,170 @@
+// The provider's online/offline dot is a badge on the composer's engine icon,
+// inside the model picker button: it reads as the model's status, and clicking
+// it opens the menu like the rest of the button. Runs the real panel markup and
+// styles in each build's engine (scripts are left out; the dot's class is set
+// the way testConnection() sets it).
+import assert from 'node:assert/strict';
+import fs from 'node:fs/promises';
+import { after, before, describe, test } from 'node:test';
+import { chromium, firefox } from 'playwright';
+
+const read = async (build, file) => (await fs.readFile(new URL(`../src/${build}/${file}`, import.meta.url), 'utf8')).replace(/\r\n/g, '\n');
+
+for (const [build, engine] of [['chrome', chromium], ['firefox', firefox]]) {
+ describe(`${build}: model picker status dot`, () => {
+ let browser, html, css;
+ before(async () => {
+ browser = await engine.launch({ headless: true });
+ html = (await read(build, 'src/ui/sidepanel.html'))
+ .split('\n')
+ .filter((line) => !line.trim().startsWith('<script'))
+ .join('\n');
+ css = await read(build, 'styles/sidepanel.css');
+ });
+ after(async () => { await browser?.close(); });
+
+ async function panel(run, { dir = 'ltr', theme = 'dark', state = 'online' } = {}) {
+ const context = await browser.newContext({ viewport: { width: 420, height: 640 } });
+ try {
+ await context.route('**/*', (route) => {
+ const { pathname } = new URL(route.request().url());
+ if (pathname === '/panel') return route.fulfill({ contentType: 'text/html', body: html });
+ return route.fulfill({ status: 404, body: '' });
+ });
+ const page = await context.newPage();
+ page.setDefaultTimeout(2500);
+ await page.goto('https://owned-panel.invalid/panel');
+ await page.addStyleTag({ content: css });
+ await page.evaluate(({ dir, theme, state }) => {
+ document.documentElement.dir = dir;
+ if (theme === 'light') document.documentElement.dataset.theme = 'light';
+ document.getElementById('status-dot').className = state ? `status-dot ${state}` : 'status-dot';
+ }, { dir, theme, state });
+ return await run(page);
+ } finally {
+ await context.close();
+ }
+ }
+
+ const geometry = (page) => page.evaluate(() => {
+ const rect = (el) => { const r = el.getBoundingClientRect(); return { left: r.left, right: r.right, top: r.top, bottom: r.bottom, width: r.width, height: r.height }; };
+ const button = document.getElementById('provider-picker-btn');
+ const dot = document.getElementById('status-dot');
+ const d = rect(dot);
+ const cx = (d.left + d.right) / 2;
+ const cy = (d.top + d.bottom) / 2;
+ return {
+ button: rect(button),
+ icon: rect(button.querySelector('.provider-picker-icon')),
+ caret: rect(button.querySelector('.provider-picker-caret')),
+ dot: d,
+ center: { x: cx, y: cy },
+ hitsButton: document.elementFromPoint(cx, cy)?.closest('#provider-picker-btn') === button,
+ };
+ });
+
+ // The color a CSS custom property resolves to, as getComputedStyle reports it.
+ const resolved = (page, variable) => page.evaluate((variable) => {
+ const probe = document.createElement('i');
+ probe.style.color = `var(${variable})`;
+ document.body.append(probe);
+ const color = getComputedStyle(probe).color;
+ probe.remove();
+ return color;
+ }, variable);
+
+ test('the dot sits on the engine icon inside the picker button, not after its arrow', async () => {
+ await panel(async (page) => {
+ const placement = await page.evaluate(() => {
+ const dot = document.getElementById('status-dot');
+ const button = document.getElementById('provider-picker-btn');
+ return {
+ inButton: button.contains(dot),
+ withIcon: dot.parentElement.classList.contains('provider-picker-engine')
+ && dot.parentElement.querySelector('.provider-picker-icon') !== null,
+ toolbarChild: dot.parentElement.classList.contains('composer-toolbar'),
+ describedBy: button.getAttribute('aria-describedby'),
+ };
+ });
+ assert.deepEqual(placement, { inButton: true, withIcon: true, toolbarChild: false, describedBy: 'status-dot' });
+
+ const g = await geometry(page);
+ assert.ok(g.dot.width >= 6 && g.dot.height >= 6, `the dot stays visible: ${JSON.stringify(g.dot)}`);
+ assert.ok(g.center.x > g.icon.left + g.icon.width / 2 && g.center.x <= g.icon.right + 2, `the dot is on the icon's right edge: ${JSON.stringify(g)}`);
+ assert.ok(g.center.y > g.icon.top + g.icon.height / 2 && g.center.y <= g.icon.bottom + 2, `the dot is on the icon's lower edge: ${JSON.stringify(g)}`);
+ assert.ok(g.dot.right <= g.caret.left, `the dot stays clear of the arrow: ${JSON.stringify(g)}`);
+ assert.ok(g.dot.left >= g.button.left && g.dot.right <= g.button.right && g.dot.top >= g.button.top && g.dot.bottom <= g.button.bottom, `the dot is inside the button: ${JSON.stringify(g)}`);
+ assert.equal(g.hitsButton, true, 'a click on the dot lands on the button');
+ });
+ });
+
+ if (build === 'chrome') {
+ test('screen readers get the connection status as the button description', async () => {
+ await panel(async (page) => {
+ await page.evaluate(() => {
+ const button = document.getElementById('provider-picker-btn');
+ button.setAttribute('aria-label', 'Model: OpenRouter · gpt-6-luna');
+ document.getElementById('status-dot').title = 'Connected (gpt-6-luna)';
+ });
+ const client = await page.context().newCDPSession(page);
+ const { root } = await client.send('DOM.getDocument', { depth: -1 });
+ const { nodeId } = await client.send('DOM.querySelector', { nodeId: root.nodeId, selector: '#provider-picker-btn' });
+ const [node] = (await client.send('Accessibility.getPartialAXTree', { nodeId, fetchRelatives: false })).nodes;
+ assert.deepEqual(
+ { role: node.role?.value, name: node.name?.value, description: node.description?.value },
+ { role: 'button', name: 'Model: OpenRouter · gpt-6-luna', description: 'Connected (gpt-6-luna)' },
+ );
+ });
+ });
+ }
+
+ test('clicking the dot is a click on the model picker', async () => {
+ await panel(async (page) => {
+ await page.evaluate(() => {
+ window.__clicks = 0;
+ document.getElementById('provider-picker-btn').addEventListener('click', () => { window.__clicks += 1; });
+ });
+ const { center } = await geometry(page);
+ await page.mouse.click(center.x, center.y);
+ assert.equal(await page.evaluate(() => window.__clicks), 1);
+ });
+ });
+
+ test('right to left, the dot moves to the icon corner on the arrow side', async () => {
+ await panel(async (page) => {
+ const g = await geometry(page);
+ assert.ok(g.center.x < g.icon.left + g.icon.width / 2 && g.center.x >= g.icon.left - 2, `the dot is on the icon's left edge: ${JSON.stringify(g)}`);
+ assert.ok(g.center.y > g.icon.top + g.icon.height / 2, `the dot is on the icon's lower edge: ${JSON.stringify(g)}`);
+ assert.ok(g.dot.left >= g.caret.right, `the dot stays clear of the arrow: ${JSON.stringify(g)}`);
+ assert.equal(g.hitsButton, true);
+ }, { dir: 'rtl' });
+ });
+
+ test('a ring in the background color separates the dot from the icon, also on hover', async () => {
+ for (const theme of ['dark', 'light']) {
+ await panel(async (page) => {
+ const shadow = () => page.evaluate(() => getComputedStyle(document.getElementById('status-dot')).boxShadow);
+ const input = await resolved(page, '--bg-input');
+ assert.ok((await shadow()).includes(input), `${theme}: ring in the composer background: ${await shadow()} vs ${input}`);
+ await page.hover('#provider-picker-btn');
+ const hover = await resolved(page, '--bg-secondary');
+ assert.ok((await shadow()).includes(hover), `${theme}: ring follows the hovered button: ${await shadow()} vs ${hover}`);
+ }, { theme });
+ }
+ });
+
+ test('each state keeps its color, and an untested provider shows no dot or ring', async () => {
+ for (const [state, variable] of [['online', '--success'], ['offline', '--error'], ['connecting', '--warning']]) {
+ await panel(async (page) => {
+ const expected = await resolved(page, variable);
+ await page.waitForFunction((expected) => getComputedStyle(document.getElementById('status-dot')).backgroundColor === expected, expected);
+ }, { state });
+ }
+ await panel(async (page) => {
+ // The markup starts offline; the background fades out over 0.3 s.
+ await page.waitForFunction(() => getComputedStyle(document.getElementById('status-dot')).backgroundColor === 'rgba(0, 0, 0, 0)');
+ assert.equal(await page.evaluate(() => getComputedStyle(document.getElementById('status-dot')).boxShadow), 'none');
+ }, { state: '' });
+ });
+ });
+}
diff --git a/test/run.js b/test/run.js
index 51167f401..ef2a7f2a5 100644
--- a/test/run.js
+++ b/test/run.js
@@ -44169,7 +44169,7 @@ test('sidepanel keeps display tools and conversation actions in the header and t
assert.match(controls, /class="composer-control-row"[\s\S]*?id="mode-toggle"[\s\S]*?id="btn-mode-ask"[\s\S]*?id="btn-mode-act"[\s\S]*?id="btn-mode-dev"/, `${label}: the segmented mode controls keep their markup above the composer`);
assert.doesNotMatch(controls, /id="btn-(?:clear|history)"/, `${label}: the mode row should not repeat the conversation actions`);
const composer = html.slice(html.indexOf('<div id="input-wrapper">'), html.indexOf('<button id="selection-ask-action"'));
- assert.match(composer, /id="input-text-layer"[\s\S]*?class="composer-toolbar"[\s\S]*?id="btn-attach"[\s\S]*?id="provider-picker"[\s\S]*?id="provider-picker-menu"[\s\S]*?id="status-dot"[\s\S]*?id="btn-mic"[\s\S]*?id="btn-send"/, `${label}: the composer should put the message first, then attach, the model picker and its status, mic and send`);
+ assert.match(composer, /id="input-text-layer"[\s\S]*?class="composer-toolbar"[\s\S]*?id="btn-attach"[\s\S]*?id="provider-picker"[\s\S]*?id="provider-picker-btn"[\s\S]*?class="provider-picker-icon"[\s\S]*?id="status-dot"[\s\S]*?class="provider-picker-caret"[\s\S]*?id="provider-picker-menu"[\s\S]*?id="btn-mic"[\s\S]*?id="btn-send"/, `${label}: the composer should put the message first, then attach, the model picker with its status on the engine icon, mic and send`);
assert.match(css, /\.composer-toolbar \.provider-picker-menu \{\s*top: auto;\s*bottom: calc\(100% \+ 6px\);/, `${label}: the composer model menu should open upward`);
assert.match(css, /#input-wrapper \{[\s\S]*?flex-direction: column;/, `${label}: the composer should stack the message above its toolbar`);
assert.match(conversation, /id="btn-clear"[\s\S]*?data-i18n-title="sp\.btn\.clear_short"[\s\S]*?data-i18n-aria-label="sp\.btn\.clear_short"[\s\S]*?data-icon="plus"[\s\S]*?sp\.btn\.clear_short/, `${label}: New chat should have a plus icon, short tooltip, accessible name, and localized wide label`);