Repository navigation
refactor(execution): run every query through one tab lifecycle and stop keystrokes waking the window - #4286
Merged
Conversation
…op keystrokes waking the window
…eload that never lands leaves no untracked edits
thangnm93
added a commit
to thangnm93/TablePro
that referenced
this pull request
Nov 24, 2026
Upstream runs every query through one tab lifecycle (TableProApp#4286), so the run log hooks move with the code they followed: - A single run, parameterized or not, records its entry in QueryExecutionCoordinator+SingleRun.swift, and the Explain button in +ExplainRun.swift. A failed or stopped run records through finishFailedQuery, which now takes the statement the log shows. - The batch and multi-statement paths take the TabRun in place of the tab and claim, and log through presentFailedRun's result sets. - Run All ends the editor's completion session like the other run paths. - Apply Filter & Sort and the header sort use the tab-id filter API. - The editor area no longer observes the catalog, so the Objects tab's kind picker observes it in ObjectsTabContent. - Tests construct the coordinator and start runs with the new signatures.
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.
Summary
TabRun(Core/Execution/TabRun.swift): claim and lease, scope, task, settle gate, cancel, failure and success reports, history. Strategies only produce and install results.isLoadingon failure.runQuery(onTab:),runStatement(_:sourceOffset:onTab:),runAllStatements(onTab:),runExplain(onTab:variant:),executeTableTabQueryDirectly(onTab:),reloadTableTab(_:),reloadActiveResult(onTab:),rebuildTableQuery(forTab:)). Commands resolve the shown tab at the gesture.fetchEnumValuesreads the tab's scope.confirmDiscardChangesIfNeeded, replaces the plain and restoring pair.QueryTabManager.setEditorText(_:ofTab:)without publishingtabs; it publishes only when the text's emptiness or a file tab's dirty state flips.MainContentViewandMainEditorContentViewobserve a per-connectionConnectionCatalogSnapshot, notSchemaService.sharedandDatabaseTreeMetadataService.shared.Measurements (PF-06)
Unit-test host, Debug build, 40 query tabs of 2,000 characters, tab strip hosted in a window, 400 keystrokes, three rounds. Old path is the editor binding's previous write (
mutate(tabId:)).setEditorTexttabspublishesEach old publish also re-evaluated
MainContentView,MainEditorContentViewand two AppKit sinks.Test plan
TabRunLifecycleTestsandMainViewInvalidationTests.commandTabId).verify.sh build, full Unit plan,linton every changed file.Closes #4270