Skip to content

feat(linux-editor): complete a moved query tab from its database's own session - #3903

Merged
datlechin merged 115 commits into
TableProApp:mainfrom
sedax90:feat/linux-editor-follows-database-session
Oct 31, 2026
Merged

datlechin merged 115 commits into
TableProApp:mainfrom
sedax90:feat/linux-editor-follows-database-session

Conversation

@sedax90

@sedax90 sedax90 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Follows #3902. Rebuilt on main on top of the connection's owner of its other databases.

Summary

  • A query tab that moves to another database, from the bar or with a USE, asks the window for that database's session. Where a connection's catalog holds only its own database (PostgreSQL, SQL Server), the window opens it beside the connection through OtherDatabases, once for all the tabs asking.
  • The tab's completion reads that session's catalog. The tab's own editor session moves as before.
  • When a database's session joins, every query tab of the connection in that database reads its catalog, tabs moved while it opened included.
  • A statement that changes the catalog in a moved tab refreshes the session that holds that database, the connection's own included.
  • A tab restored in another database asks for its session too, once it is in its workspace.
  • Completion drops the last database's catalog the moment the tab moves, and ignores a session opened late for a database the tab left.
  • Not here: a tab of another database's own workspace keeps that database's catalog when it moves, since the connection's session may not know the name of its own default database.
  • Engines whose connection lists every database already (MySQL, ClickHouse, Cassandra, MongoDB) open nothing.

Test plan

  • session_window::tests::other_databases::tabs_moved_to_another_database_read_its_session, a_tab_moved_where_the_catalog_lists_every_database_opens_nothing.
  • editor::tests::completion_reads_only_the_session_of_the_tabs_database.
  • The restored tab's follow and the refresh have no test of their own.
  • CI builds and runs the suites. No local Linux runner was available.

sedax90 and others added 19 commits October 30, 2026 09:37
…or-database-switch

# Conflicts:
#	linux/crates/app/src/ui/editor/tab_scope.rs
#	linux/data/resources/ui/sql-editor.ui
…or-database-switch-more

# Conflicts:
#	linux/crates/app/src/ui/editor/editor_session_slot.rs
#	linux/crates/core/src/dialect/sql_dialect.rs
#	linux/crates/drivers/mongodb/src/dialect.rs
…-editor-database-switch-reconnect

# Conflicts:
#	linux/crates/app/src/ui/editor/editor_session_slot.rs
#	linux/crates/core/src/dialect/sql_dialect.rs
#	linux/crates/drivers/mongodb/src/dialect.rs
#	linux/crates/drivers/postgres/src/dialect.rs
…ion's disconnect, and purge one only after its drafts land
…joins, and leave the sidebar's selection to the tab in front
…wn database, and offer one when none is open
…nux-editor-follows-database-session

# Conflicts:
#	linux/crates/app/src/ui/editor/tab_scope.rs
@datlechin datlechin changed the title feat(linux-editor): take a query tab moved to another database to that database's session feat(linux-editor): complete a moved query tab from its database's own session Oct 30, 2026
@datlechin
datlechin merged commit 998f3cb into TableProApp:main Oct 31, 2026
69 of 73 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.

2 participants