Skip to content

Fix: Keep "Manage databases" and "Refresh" controls visible when a single database is selected - #635

Open
gcapellib wants to merge 1 commit into
TabularisDB:mainfrom
gcapellib:fix/single-database-shows-manage-controls
Open

Fix: Keep "Manage databases" and "Refresh" controls visible when a single database is selected#635
gcapellib wants to merge 1 commit into
TabularisDB:mainfrom
gcapellib:fix/single-database-shows-manage-controls

Conversation

@gcapellib

Copy link
Copy Markdown
Contributor

Currently, when a single database is selected, the UI switches to a specific view that hides the "Manage databases" and "Refresh" buttons. Users are forced to return to the root connection configuration to select other databases, which degrades the UX.

Solution
This PR unifies the UI behavior by keeping the multi-database layout active even when only one database is selected, while ensuring immediate access to its tables.

Changes in DatabaseProvider.tsx:

Keep controls visible: Adjusted thresholds from > 1 to >= 1 for savedDbList.length and selection.length. The view now displays DATABASES (1) with the management buttons always accessible.

Auto-expand: To compensate for replacing the old single-view layout, the single database is automatically set as activeSchema (firstDb). It expands by default to directly show its tables (saving an extra click).

@kilo-code-bot

kilo-code-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • README.md
Previous Review Summary (commit 8814bda)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 8814bda)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • src/contexts/DatabaseProvider.tsx
  • tests/contexts/DatabaseProvider.test.tsx
  • src-tauri/Cargo.lock

Reviewed by glm-5.2 · Input: 10.1K · Output: 750 · Cached: 108K

@gcapellib
gcapellib force-pushed the fix/single-database-shows-manage-controls branch from f7d0f68 to 8814bda Compare August 14, 2026 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant