Skip to content

[Bug]: Desktop shows a per-profile "Local gateway" option that does not select a local gateway #62768

Description

@szafranski

Bug Description

In Desktop Settings -> Gateway, a named profile shows two connection options:

  • "Local gateway" - "Start a private Hermes backend on localhost."
  • "Remote gateway"

For a named profile, "Local gateway" does not select a per-profile local gateway. It clears the profile override and inherits the default connection. If the default is remote, the profile connects to that remote backend.

There is no separate per-profile local override. To make one profile use a backend on the Desktop machine while the default is remote, the only available configuration is "Remote gateway" with a loopback URL and session token.

The page also says "Set it to Local to inherit the default", which conflicts with the "Start a private Hermes backend on localhost" description on the option itself.

Steps to Reproduce

  1. Configure the default connection to use any remote gateway.
  2. Create a second profile, for example macos.
  3. Start an isolated backend on the Desktop machine:
    hermes --profile macos serve --isolated --host 127.0.0.1 --port 9119
  4. In Desktop, open Settings -> Gateway for macos.
  5. Select "Local gateway" and reconnect.

Expected Behavior

The option should either select a private backend on localhost or be labeled "Use default" / "Inherit default gateway" and show the inherited connection.

Actual Behavior

The profile inherits the default remote gateway. To connect it to the backend on localhost, I must select "Remote gateway" and enter http://127.0.0.1:9119 plus the session token.

Affected Component

  • Other: Electron Desktop app (apps/desktop/)
  • Configuration

Messaging Platform

N/A (CLI only) - this is a Desktop UI issue, but that is the form's only N/A option.

Debug Report

Not included because this is a UI labeling issue with no error or traceback. I can provide additional diagnostics if needed.

Operating System

macOS on Apple Silicon

Python Version

3.12.12

Hermes Version

0.18.2

The same behavior is still present on current main as of 2026-07-11.

Root Cause Analysis

For a named profile, saving local mode deletes its entry from connection.json in coerceDesktopConnectionConfig() (apps/desktop/electron/main.ts). With no per-profile override, resolveRemoteBackend() falls back to the environment or global remote configuration. The conflicting labels are in apps/desktop/src/i18n/en.ts.

Proposed Fix

For a named profile, rename the option to "Use default" or "Inherit default gateway" and show the effective gateway URL. A separate "Local gateway" option should only be shown if it actually selects the bundled localhost backend.

Are you willing to submit a PR for this?

No.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havearea/configConfig system, migrations, profilesarea/profilesMulti-profile isolation, HERMES_HOME scopingcomp/desktopElectron desktop app (apps/desktop/*)type/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions