diff --git a/apps/desktop/src/lib/__tests__/database/databaseFeatureSupport.spec.ts b/apps/desktop/src/lib/__tests__/database/databaseFeatureSupport.spec.ts index 124d39ef77..c46b79320a 100644 --- a/apps/desktop/src/lib/__tests__/database/databaseFeatureSupport.spec.ts +++ b/apps/desktop/src/lib/__tests__/database/databaseFeatureSupport.spec.ts @@ -57,6 +57,17 @@ describe("connection database browser", () => { expect(supportsConnectionDatabaseBrowser("redis")).toBe(false); expect(supportsConnectionDatabaseBrowser("mongodb")).toBe(false); }); + + it("hides the browse-databases entry for message brokers", () => { + // Kafka/Pulsar/RocketMQ/RabbitMQ/NATS all share db_type "mq" and differ only by + // driver_profile, so one exclusion covers every broker. They keep the + // objectBrowser capability for the tenant/topic tree, but have no database + // namespace, so the connection-level browser tab rendered an empty + // "no databases found" state (issue #8515). MQTT never had the entry. + expect(supportsObjectBrowser("mq")).toBe(true); + expect(supportsConnectionDatabaseBrowser("mq")).toBe(false); + expect(supportsConnectionDatabaseBrowser("mqtt")).toBe(false); + }); }); describe("object browser tree nodes", () => { diff --git a/apps/desktop/src/lib/database/databaseFeatureSupport.ts b/apps/desktop/src/lib/database/databaseFeatureSupport.ts index 6e0e35044a..b806d4630e 100644 --- a/apps/desktop/src/lib/database/databaseFeatureSupport.ts +++ b/apps/desktop/src/lib/database/databaseFeatureSupport.ts @@ -228,7 +228,13 @@ export function supportsObjectBrowser(dbType?: DatabaseType): boolean { export function supportsConnectionDatabaseBrowser(dbType?: DatabaseType): boolean { // MongoDB reuses the object browser for collections, not the SQL database list. - return supportsObjectBrowser(dbType) && dbType !== "mongodb"; + // + // Message brokers (`mq` — Kafka/Pulsar/RocketMQ/RabbitMQ/NATS, separated only by + // driver_profile) keep the objectBrowser capability for their tenant/topic tree, + // but they expose no database namespace: the connection-level browser tab listed + // nothing and rendered "no databases found" (issue #8515). Their workbench is the + // MQ admin tab instead. MQTT is already excluded: it has no objectBrowser at all. + return supportsObjectBrowser(dbType) && dbType !== "mongodb" && dbType !== "mq"; } export function supportsObjectBrowserTreeNode(dbType: DatabaseType | undefined, nodeType: TreeNodeType): boolean {