fix tables route fallback when query table is missing#69
Merged
frectonz merged 2 commits intofrectonz:mainfrom Feb 12, 2026
Merged
fix tables route fallback when query table is missing#69frectonz merged 2 commits intofrectonz:mainfrom
frectonz merged 2 commits intofrectonz:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes an issue in the Tables route where an invalid ?table= query param could select a non-existent tab (-1) and render an empty content area.
Changes:
- Adds logic to detect when the requested table name isn’t present in
data.tables. - Falls back to the first tab (
"0") when the requested table is missing. - Displays a “Table not found” message card when the query param doesn’t match any table.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
|
Thanks this looks good, is it ready to be merged. |
Contributor
Author
Glad you liked the changes! Ready to be merged. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
invalid table query param can blank out the Tables page.
The code i am refering is this
If the table name is not found maybe dropped, returns -1, so defaultValue becomes "-1". No tab/content has that value, so the tab content area renders empty.
How to reproduce this
create db and add some table and value:
bash sqlite3 /tmp/sqlstudio_bug.db "CREATE TABLE users(id INTEGER PRIMARY KEY, name TEXT); INSERT INTO users(name) VALUES ('esube');"Then open that table Open /tables?table=users
then manually change the url to somethung else /tables?table=does_not_exist

Page shows tab list, but no table content.
This change makes the non existing query as follows instead
