Skip to content

Show connected server name in the UI sidebar #862

Description

@hmichopoulos

Problem

When connected to a database, the sidebar only shows the current database name. If you work with several servers — e.g. DEV, QA, STAGE — that each host a database with the same name, there is no way to tell from the UI which server the current session is actually on. It's easy to run a query against the wrong environment.

Proposal

Show a small server label under the database name in the sidebar:

  • the bookmark name when the connection was opened from a bookmark (usually far more meaningful than a long, auto-generated hostname), or
  • the host:port taken from the connection string when the connection was not opened from a bookmark.

The label would be returned by the connect / switch-database / connection-info endpoints and preserved when switching databases on the same connection.

Why

This makes it immediately obvious which server you're querying, which is especially valuable when the same database name exists across multiple environments.

I have a working implementation and would be happy to open a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions