Repository navigation
Labs: several databases open together, one tab bar, switching in place - #260
Merged
Merged
Conversation
…lace Each call now names the database it is for (__conn, read by a new Db extractor in place of State<DbState>), so require_conn serves it from the front pool or the one kept aside for that database; a call sent just before a switch still lands on its own database, and a key whose pool was closed is an error rather than a quiet run on whatever is in front. The page: - One tab bar for every open database: this one's tabs and the kept ones, grouped in the order the databases were opened and labelled with their database. Clicking a kept database's tab switches there on that tab; closing it does not switch. - A switch to a kept database resumes in place: its pool comes back, and the sidebar, tabs and the tab you were on are swapped in at once and refreshed quietly behind. No teardown, no welcome screen, no skeleton in between - the flicker. - The tab on screen keeps its rows when set aside, so returning is instant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Follow-up to #240 (Labs: several connections at once), from a screen recording: switching databases flickered, and tabs from the database you left disappeared.
Rust: every call names its database
Db<'r>extractor (db/connection.rs) replacesState<'_, DbState>in every command. It reads a__connkey from the request payload.require_connserves a routed call from the front pool when the key matchesactive_key, otherwise from the pool kept aside for that key. A key whose pool was closed is an error, never a quiet run on whatever database is in front. Calls without a key behave exactly as before.resume_connectionandpark_connectionmaintainactive_key, andset_active_conn_keynames a freshly connected pool. Up to 8 pools are kept (was 6).cargo test --lib: 371 passed. Unused imports were removed withcargo fix.App
api.jsadds__connto every call while a route is set (Labs only). A fresh connect clears it, so a call can never be sent to a kept database by mistake.connection = null, no welcome screen, no sidebar skeleton. The connection, sidebar (schemas, tables, active table) and tabs swap in at once, then refresh quietly in the background.Checks:
npm test1795 + 10 DOM tests passed (exit 0), design lint clean,npm run check0 errors,npm run buildpassed. Rust checked and tested with DuckDB linked as a prebuilt library.🤖 Generated with Claude Code