You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
First Run on a restored query tab with parameters only opens the panel #4419
A query tab's parameter values come back after a relaunch, but the panel's open state does not. The first Cmd+Return on a restored tab with :name parameters opens the Parameters panel and runs nothing, though every value is already filled in. The second press runs.
Steps to reproduce
On a SQL connection, write SELECT * FROM t WHERE id > :min in a query tab.
Press Cmd+Return, type 0 for :min, press Cmd+Return again. The query runs.
Quit and relaunch TablePro. The tab is restored with the panel closed.
Press Cmd+Return. The panel opens with 0 filled in and nothing runs.
Expected behavior
The restored tab runs on the first press with its saved values, as it did before the relaunch. Restoring the panel as shown would do it.
Code path
PersistedTab keeps queryParameters but not isParameterPanelVisible (apple/TablePro/Models/Query/QueryTab.swift:362).
The restore builds TabQueryContent from the values only, so the flag starts false (QueryTab.swift:185-190, apple/TablePro/Models/Query/QueryTabState.swift:615).
executeResolvedSQL sets the flag and returns without running while it is false (apple/TablePro/Views/Main/MainContentCoordinator.swift:1064-1067).
QueryParameterDetectionTests "A SQL :name still opens the parameter panel before anything runs" covers a fresh tab and should keep passing.
Activity