Skip to content

fix(windows): reload nothing when switching back to a connection - #3269

Merged
datlechin merged 1 commit into
mainfrom
fix/workspace-switch-reload
Oct 5, 2026
Merged

datlechin merged 1 commit into
mainfrom
fix/workspace-switch-reload

Conversation

@datlechin

Copy link
Copy Markdown
Member

Why

Every click between two connections in the connections strip reloaded the one you returned to: on PostgreSQL, four catalog queries and a whole-schema column fetch. A switch takes the pane out of the window and back, so SwiftUI reruns onAppear and every .task. Activation then reloaded the schema whenever changeManager.pluginDriver == nil, which is always true for SQL engines. Other views there wiped staged work or reloaded content.

Change

  • Coming back to a connection reloads nothing. A pure activation policy decides, and the coordinator owns one schema load a switch cannot cancel. Opening a connection fetches its columns once, not twice.
  • Users & Roles keeps staged changes and Undo across a tab or connection switch.
  • A tab picked in a background connection runs the tab-change handoff, so unsaved grid edits stay with their tab.
  • Object source, ClickHouse parts, charts, maps, JSON, History, the assistant, agent highlight, inspector drafts and the Redis key filter keep their state. No fd leak on SQLite.

Verified

CoordinatorActivationTests switches a hosted window back and forth and sees no refetch, with a control proving the same switch fetches once the provider is gone. Measured on a Debug build against PostgreSQL with log_statement=all.

Not in this PR

  • Snowflake still rereads warehouses and roles per switch: caching them needs invalidation on USE ROLE.
  • Kafka and SurrealDB table tabs skip their custom browse query. Different cause.
  • No per-workspace first responder to restore after a switch.

A connection switch takes the pane out of the window and puts it back, so
SwiftUI reruns onAppear and every task. Activation reloaded the schema on
every switch for SQL engines, and several views reset or reloaded state the
same way. Lifetime work now belongs to the coordinator and the owners.
@mintlify

mintlify Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
TablePro 🟢 Ready View Preview Oct 5, 2026, 2:35 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@datlechin
datlechin merged commit a90d8be into main Oct 5, 2026
16 checks passed
@datlechin
datlechin deleted the fix/workspace-switch-reload branch October 5, 2026 16:30

This branch was successfully deployed

1 active deployment
staging - docs — deb6afbb Deployed Oct 5, 2026 by mintlify[bot]
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.

1 participant