Skip to content

feat(connections): search queries across connections - #2103

Merged
datlechin merged 3 commits into
TableProApp:mainfrom
sophiathedev:feat/cross-conn-query-search
Aug 13, 2026
Merged

feat(connections): search queries across connections#2103
datlechin merged 3 commits into
TableProApp:mainfrom
sophiathedev:feat/cross-conn-query-search

Conversation

@sophiathedev

@sophiathedev sophiathedev commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Extends the Quick Switcher's Queries scope across every currently connected TablePro window.

This is a follow-up to #2098, which added cross-connection object search.

Preview

Quick Switcher showing query history from the Chinook and Analytics connections

What you get

Open Quick Switcher with Cmd+Shift+O, then select Queries or press Cmd+4. Saved queries and up to 200 recent history entries now include their connection and database context. Search also matches saved keywords, connection names, database names, and schemas.

Return reuses a compatible query editor when possible. Option+Return and Open in New Tab open a native window tab. The SQL is loaded for review but never executed automatically.

Scope and loading

Results come only from sessions that are currently connected and have a live driver. Global favorites appear once under the connection where Quick Switcher was opened. Connection-specific favorites and history from inactive sessions are excluded.

Favorite and history updates invalidate the query cache. Connection state and load identifiers prevent an older asynchronous load from replacing newer results. The combined result list is capped at 200 entries.

Database and window routing

History entries retain the database where they were recorded. An existing editor is reused only when its database matches the result. Otherwise TablePro opens a new native window tab, preserving both the existing editor and the focus of the newly opened tab.

If a connection closes after results are loaded, opening its query is rejected with a localized error instead of routing SQL to another connection.

Tests

  • Two focused passes covering Quick Switcher ranking, query storage invalidation, connection filtering, database routing, native-tab handoff, and existing cross-connection object behavior: TEST SUCCEEDED.
  • swift test --package-path Packages/TableProCore: 181 tests passed.
  • xcodebuild build-for-testing, including QuickSwitcherCrossConnectionUITests: BUILD SUCCEEDED.
  • swiftlint lint --strict: clean.

Automated XCUITest execution is unavailable locally because the machine has no provisioning profile for com.TablePro. The UI test target compiled and includes coverage for searching query history and opening the result with Option+Return.

@sophiathedev
sophiathedev marked this pull request as ready for review August 13, 2026 12:25
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@datlechin
datlechin merged commit c078879 into TableProApp:main Aug 13, 2026
3 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