Skip to content

fix: SQLite connect button and sidebar table listing#39

Merged
abeni16 merged 1 commit into
mainfrom
fix/sqlite-connect-and-tables
Jul 2, 2026
Merged

fix: SQLite connect button and sidebar table listing#39
abeni16 merged 1 commit into
mainfrom
fix/sqlite-connect-and-tables

Conversation

@abeni16

@abeni16 abeni16 commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes three issues that prevented SQLite connections from working properly:

  1. Connect button unresponsive — The zod form schema required port >= 1 but SQLite/DuckDB set port to 0. Validation failed silently because the port field is hidden for file-based engines. Fixed by allowing port >= 0 in the base schema.

  2. Tables not showing in sidebarresolveExpandedDatabaseName returned the connection's file path (e.g. /path/to/db.sqlite) instead of the actual database name (main). Since isDatabaseActive(main) was always false, the tables panel never rendered. Added SQLite/DuckDB fallback to return the first database when no exact match exists (same pattern MySQL already uses).

  3. Entire table listing fails on a single non-standard table namerequire_safe_identifier used ? in the get_tables loop, so any table with a hyphen, dot, or other non-ASCII-alphanumeric character caused the entire listing to fail. Changed to is_safe_identifier + continue to skip only the problematic table (matches DuckDB engine behavior).

- Fix port validation min(1) -> min(0) so SQLite/DuckDB port 0 passes zod schema
- Fix resolveExpandedDatabaseName to fallback to first DB for SQLite/DuckDB
- Fix get_tables to skip unsafe identifiers instead of failing entire listing
@abeni16
abeni16 merged commit a0c254d into main Jul 2, 2026
3 checks passed
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