25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。
TypeScript aicliclickhousedatabasedatabase-clientdatabase-managementdockerguimcpmongodbmysqlpostgresqlredisrustsql-serversqlitetaurivue
fix(mq): hide database browser for message queue connections
onenewcode08edb607729f
diff --git a/apps/desktop/src/lib/__tests__/database/databaseFeatureSupport.spec.ts b/apps/desktop/src/lib/__tests__/database/databaseFeatureSupport.spec.tsindex 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.tsindex 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 {