Improved stability of loading views
If you're an active Basedash user, you may have experienced the dreaded "Oops, something went wrong" error. It happens when we run into an error somewhere along the way of loading data for a view (or raw table). This is usually caused by a logic error in our code that converts your view into a SQL query that we run on your database.
This bug can be incredibly annoying, so we spent this past week focused on solving it. The solution took form in a few different ways:
- We fixed one cause of this issue, where loading a raw table could fail if it contained too many columns. This was caused because we used to pass all of the attributes in the API header, leading to an overflow of data. We switched to using POST calls and passing this data in the body of the API call, which fixed the issue.
- We fixed another cause of this issue, where hiding a primary key column on a view would cause it to fail. This was caused by an issue with column aliasing which we were able to get around with some clever SQL querying.
- We improved the error message when this issue occurs, with a button to message the team with context around the issue. This helps us debug and prioritize occurrences of the issue.
- Finally, we now track occurrences of this issue as a KPI to determine when a new root cause pops up, allowing us to fix it as soon as the issue goes live.
This is the first step to improving stability of the app. We plan to vastly expand our testing suite which will prevent new bugs from entering the app wherever possible.
Other improvements and fixes
- Improved intro animation of "Run query" button
- Fixed app crash caused by database columns being deleted outside of Basedash
- Updated Ngrok connection to automatically strip out host protocol
- Replaced data preview overlay with a banner when creating a new view
- Removed header in the preview window of the view builder
- Fixed name showing as always being taken when connecting a data source
- Added a link to chat with the team when encountering a view loading error
- Updated display names of tables and attributes to be humanized by default
- Fixed issue with the filter popover appearing below the form panel in list layout