Skip to content

In-app browser opens Google Docs and other signed-in services signed out #2929

Closed

Description

@Techno911

What I was doing

An agent finished a document and handed me a Google Docs link in the thread. I clicked it, the document opened in the in-app browser, and I could read it but not edit it: the page showed a "Sign in" button in the corner.

What happens today

The in-app browser runs on its own Electron session (persist:bb-browser, desktop-browser-view.ts), which has none of the cookies from my default browser. Every http(s) link is routed there while the in-app browser preference is on, which is the default:

  • resolveUrlOpenTarget sends any http(s) URL to in-app-browser when the desktop browser is available and the preference is on
  • OPEN_LINKS_IN_APP_BROWSER_DEFAULT is true in the same file

Signing in there is not a workaround: Google refuses account sign-in from embedded browsers, so the in-app session stays anonymous no matter how many times you try. For services like Google Docs, Notion or Figma the in-app browser therefore shows a read-only, signed-out page, and the only way out is to notice the preference in settings and turn the in-app browser off entirely, which also loses it for localhost previews and everything else it is genuinely good at.

The failure is quiet: the page renders, so it looks like the link worked. You only discover it when you try to type.

What I would expect

Links to services that are only usable while signed in should go to the default browser, where the session already exists, while everything else keeps using the in-app browser. That keeps the in-app browser useful without it silently swallowing the links people most want to act on.

Prototype

One list plus one early return in resolveUrlOpenTarget; every link surface in the app already funnels through that function, so nothing else needs touching.

const SIGNED_IN_SERVICE_HOSTS = [
  "google.com",
  "googleusercontent.com",
  "notion.so",
  "figma.com",
  "miro.com",
  "fireflies.ai",
];

export function requiresSignedInBrowser(url: string): boolean {
  if (!isHttpOrHttpsUrl(url)) {
    return false;
  }
  let hostname: string;
  try {
    hostname = new URL(url).hostname.toLowerCase();
  } catch {
    return false;
  }
  return SIGNED_IN_SERVICE_HOSTS.some(
    (host) => hostname === host || hostname.endsWith(`.${host}`),
  );
}

// inside resolveUrlOpenTarget, right after the isHttpOrHttpsUrl check:
if (requiresSignedInBrowser(url)) {
  return "external-browser";
}

Running in a fork here; tests cover the lookalike hosts (evilgoogle.com, google.com.attacker.example) so the suffix match cannot leak.

If a fixed list feels too opinionated, an alternative shape is a user-editable "always open in my browser" host list in settings, seeded with these defaults. Happy to open a PR in whichever shape you prefer.

Activity

  1. added theissue type on Sep 2, 2026
  2. added
    desktop
    on Sep 2, 2026
  3. Techno911 commented on Sep 2, 2026

    @Techno911
    Author

    Follow-up from running this in a fork: clicking a link is not the only way a tab reaches the in-app browser. A popup opened by a page already inside it, the new-tab address bar, and a plugin panel all create tabs through their own callbacks, so the same signed-out Google Docs page can still arrive through a side door.

    In the fork all three tab-creating surfaces (RootComposeView, ThreadDetailView, PluginPanelRightPanelHost) now run the same check before openTab({ kind: "browser" }), with a small coverage test that fails when a new surface opens a browser tab without it. That test found the third surface while it was being written, which is the reason it exists.

    Happy to shape this either way if you take the feature: the check can live in the routing module as it does now, or the tab-open path itself could take the decision so surfaces cannot skip it.

  4. added
    confirmed-repro
    on Sep 2, 2026
  5. bb-slop-cop commented on Sep 2, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

  6. SawyerHood commented on Sep 12, 2026

    @SawyerHood
    Collaborator

    we have cookie import now, closing out

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

    confirmed-reprodesktop

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions