Skip to content

Mobile bridge: let pages switch to a saved server profile #5740

Description

@artemgordinskiy

Repo: get-bb/bb · Area: mobile app (apps/mobile), packages/mobile-bridge

Problem

A page running in the mobile app cannot switch the app to another saved server.
Plugins that offer a server switcher (for example a sidebar-footer list of
self-hosted servers) work in the desktop app through window.bbDesktop
(getServerChoices / selectServer), and in browsers by navigating, but the
mobile app has no equivalent:

  • ProfileWebViewScreen's onShouldStartLoadWithRequest hands any top-level
    navigation outside the active profile's origin to Linking.openURL, so the
    other server opens in the system browser instead of switching profiles.
  • resolveShellIncomingLink already switches profiles for an incoming
    https:// link that matches a saved profile, but that path only runs for
    links delivered to the app from outside, not for in-page navigation.
  • isExternallyOpenable allows only http:, https: and mailto:, so a page
    cannot route itself through a bb:// link either.
  • PageToShellMessage offers open-native with only device-settings, so the
    closest a page can get is the device settings screen, two taps from
    Settings → Servers.

Proposal

Either of these would let a page switch servers in one tap:

  1. Switch on in-page navigation to a saved profile. In
    onShouldStartLoadWithRequest, before Linking.openURL, run the URL through
    the same matchProfileForWebLink used for incoming links; if it matches a
    saved profile, switch to it (as resolveShellIncomingLink does) instead of
    opening the browser. No bridge change; existing window.location.assign
    switchers start working.
  2. Bridge messages mirroring the desktop API. Add a server-choices
    request returning { id, name, origin, active } for saved profiles and a
    select-server message (or request) taking a profile id, advertised by a
    new capability so pages can feature-detect it. Including origin would also
    avoid the desktop API's name-based matching.

A smaller step would be adding servers to NATIVE_SCREENS so open-native
can land directly on Settings → Servers.

Context

Seen with bb-app 0.46.1 on two self-hosted servers behind one domain. The
desktop app switches correctly through window.bbDesktop; on iOS the same
action opens Safari.

Activity

  1. added
    mobile
    on Oct 19, 2026
  2. bb-slop-cop commented on Oct 19, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Applied and verified the missing classification:

    • Type: Feature
    • Priority: Low
    • Effort: Medium
    • Labels: mobile

    On current main, the mobile WebView routes off-profile navigation externally, and the bridge has no page-driven profile-switching contract. This requests new mobile functionality; native server selection remains available through Settings → Servers. The workaround supports Low priority, while integration with profile routing supports Medium effort.

    No existing classification values needed preserving. No reproduction report or pull request: the final Type is Feature, so the bug-report and fix paths are skipped.

    AGENT GENERATED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    mobile

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions