All-databases mode: empty selection loads every database automatically - #572
Conversation
| const subtitle = connectionSubtitle(conn, capabilities, { | ||
| allDatabases: t("newConnection.allDatabases"), | ||
| databaseCount: (count) => | ||
| t("connections.databaseCount", { count, defaultValue: "{{count}} databases" }), |
There was a problem hiding this comment.
WARNING: i18n key mismatch - connections.databaseCount does not exist
The code references t("connections.databaseCount", ...) but this key was never added to any locale. The PR added databaseCount_one / databaseCount_other at the root level, yet they remain unused because the lookup points to a non-existent nested key. As a result, the database count subtitle always falls back to the hardcoded English defaultValue and never picks up localized plural forms.
| t("connections.databaseCount", { count, defaultValue: "{{count}} databases" }), | |
| databaseCount: (count) => | |
| t("databaseCount", { count, defaultValue: "{{count}} databases" }), |
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| const subtitle = connectionSubtitle(conn, capabilities, { | ||
| allDatabases: t("newConnection.allDatabases"), | ||
| databaseCount: (count) => | ||
| t("connections.databaseCount", { count, defaultValue: "{{count}} databases" }), |
There was a problem hiding this comment.
WARNING: i18n key mismatch - connections.databaseCount does not exist
The code references t("connections.databaseCount", ...) but this key was never added to any locale. The PR added databaseCount_one / databaseCount_other at the root level, yet they remain unused because the lookup points to a non-existent nested key. As a result, the database count subtitle always falls back to the hardcoded English defaultValue and never picks up localized plural forms.
| t("connections.databaseCount", { count, defaultValue: "{{count}} databases" }), | |
| databaseCount: (count) => | |
| t("databaseCount", { count, defaultValue: "{{count}} databases" }), |
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| @@ -2157,6 +2188,7 @@ export const NewConnectionModal = ({ | |||
|
|
|||
| if (parsedIsMultiDb && parsed.database) { | |||
There was a problem hiding this comment.
SUGGESTION: Missing loadAllDatabases initialization for empty multi-db import
When importing a connection string for a multi-db driver without a database value, the if (parsedIsMultiDb && parsed.database) guard skips the empty case and leaves loadAllDatabases with its previous state. Add an else if branch to set the all-databases mode explicitly.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 file)
Fix these issues in Kilo Cloud Previous Review Summaries (2 snapshots, latest commit 4441615)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 4441615)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (52 files)
Fix these issues in Kilo Cloud Previous review (commit fa72ab0)Status: 3 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (28 files)
Reviewed by ling-3.0-flash-free · Input: 39.3K · Output: 10.9K · Cached: 284K |
…thing) Multi-database connections no longer require picking databases up front: - The Databases tab gets a mode switch — "All databases" (new default) vs "Choose databases" (the existing explicit selection). All-databases connections persist an empty database param. - On connect, an empty selection fetches the full server list, so databases created or dropped outside the app appear on their own; the sidebar refresh re-syncs the list without persisting anything. - Picking a subset from the sidebar manage popover persists it and leaves all-databases mode; the connection modal is the way back. - build_mysql_options skips `.database(...)` when empty: it now means "connect with no default schema" instead of a rejected handshake. - The multi-database presentation gates (sidebar tree, editor, notebook, autocomplete, window title) move to a shared usesMultiDatabaseLayout helper that turns on for any non-empty runtime selection, so a one-database server still gets db-qualified queries. - Connection cards/list label all-databases connections instead of showing a dangling separator, and the previously untranslated "N databases" counter and Databases-tab hints are now localized in all 11 locales. - Editing a connection in all-databases mode no longer auto-fetches the database list (which could spawn SSH/K8s tunnels on dialog open).
fa72ab0 to
4441615
Compare
There was a problem hiding this comment.
WARNING: Missing loadAllDatabases initialization when importing empty database for multi-db driver
When importing a connection string for a multi-db driver without a database value, the if (parsedIsMultiDb && parsed.database) guard skips the empty case and leaves loadAllDatabases with its previous state. Add an else if branch to set the all-databases mode explicitly when parsedIsMultiDb && !parsed.database.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| @@ -2242,6 +2273,7 @@ export const NewConnectionModal = ({ | |||
|
|
|||
| if (parsedIsMultiDb && parsed.database) { | |||
There was a problem hiding this comment.
WARNING: Missing loadAllDatabases initialization when importing empty database for multi-db driver
When importing a connection string for a multi-db driver without a database value, the if (parsedIsMultiDb && parsed.database) guard skips the empty case and leaves loadAllDatabases with its previous state. Add an else if branch to set the all-databases mode explicitly when parsedIsMultiDb && !parsed.database.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
… database A multi-db connection string without a database left loadAllDatabases at its previous value, so a form already in "Choose databases" ended up in explicit mode with an empty selection (save blocked). Set all-databases mode explicitly and skip the picker fetch, which can spawn SSH/K8s tunnels, in that case.
Summary
TablePro-style "leave it empty to browse everything" for multi-database drivers: a connection can now be saved without selecting any database, and the client loads the full server list dynamically at connect — new databases show up on their own, dropped ones disappear, no connection editing needed. An explicit selection remains available as an opt-in filter.
UX
host:port ·separator — and the previously hard-coded "N databases" counter is now localized.Mechanics
databaseparam. On connect,get_available_databasesprovides the list; the sidebar refresh button re-syncs it (nothing persisted) and toasts+added / -removed. Choosing a subset from the sidebar manage popover persists it and exits the mode.build_mysql_optionsskips.database(...)when empty — it now means "no default schema" instead of a handshake rejected withUnknown database ''.usesMultiDatabaseLayouthelper replaces the seven scatteredselectedDatabases.length > 1gates (sidebar, editor, notebooks, autocomplete, window title): the multi-db presentation now turns on for any non-empty runtime selection, so an all-databases connection with a single database still issues db-qualified queries (it has no default schema). Side benefit: a multi-db connection narrowed to one database keeps its tree and manage button instead of losing them.i18n
New keys in all 11 locales, including the Databases-tab hints that previously existed only as English
defaultValues.Test plan
pnpm vitest run— 3417 green (new: all-databases subtitle labels,usesMultiDatabaseLayout).cargo test --lib— 1044 green (new:.database(...)skipped when empty / kept when set).CREATE DATABASEelsewhere + sidebar refresh → appears; pick subset via manage popover → persists and exits all-mode; re-open modal → "Choose databases" preselected.