fix(schemas): surface get_schemas failure with error + retry#242
Conversation
When get_schemas rejected, the catch only cleared loading flags and set isConnected: true, leaving schemas empty with no error — the structure tree rendered a silent empty 'no tables' state. The sidebar now shows a 'Failed to load schemas' message + Retry when a schema-capable connection has an error and no schemas. Retry re-runs connect(). - DatabaseProvider: set error/schemas/needsSchemaSelection in the catch - ExplorerSidebar: error branch with AlertCircle + Retry - i18n: add sidebar.schemaLoadError + sidebar.retry (en, ru)
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (10 files)
Reviewed by kimi-k2.6 · 3,437,777 tokens |
The empty-tree fallback now shows a two-line brief above a collapsible Details section that holds the full raw error and a copy button. For Postgres the brief is taken from the part before "\n\n" produced by map_pg_err / format_pg_error (Display, with the Debug dump tucked into the expanded box); other drivers fall through unchanged and are visually truncated by line-clamp. Adds the new sidebar keys (errorDetails, copyError) plus the previously missing schemaLoadError / retry to de, es, fr, it, ja, zh.
|
Hey @verbaux — quick UX adjustment I made on top of your branch before merging. The raw error from a failed
Also filled the new sidebar keys ( I'm ready to merge unless you'd prefer a different layout — let me know. |
|
Hello @debba! |
Problem
When
get_schemasrejects, the structure tree silently renders an empty flat layout —TABLES (0)/VIEWS (0)/ROUTINES (0), no SCHEMAS header, no error. The connection looks open (the test connection succeeds on a separate code path), so it appears connected but shows nothing, with no indication anything failed.Real-world example that exposed it: a Postgres database reached over an SSH tunnel failed the TLS handshake (
InvalidCertificate(UnknownIssuer)). The schema fetch was rejected, but the UI showed only an empty tree (I still see this behavior in my app v0.10.3, but the fix for this issue has been implemented).This PR addresses the missing UX safety net, which covers the whole class of
get_schemasfailures — TLS, permissions, dropped tunnel, network.