Skip to content

fix(macos): keep a running query tab on its database, keep what a Stop committed, save tabs of content-opened connections, scope sidebar commands to their window and keep editor undo per tab - #4225

Merged
datlechin merged 2 commits into
mainfrom
fix/audit-w6-exec
Nov 12, 2026

Conversation

@datlechin

@datlechin datlechin commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Summary

  • EX-2: the editor bar's database and schema picker is dimmed while the tab runs a query, so a run's rows can no longer land under another database. A change now asks before discarding staged edits, releases the tab's old metadata, and clears Load More for the rows still on screen.
  • EX-2: rows read in another schema are read-only (.schemaMoved), as rows from another database already were. A query tab's schema stays where the picker put it: showing a pinned result, or a run summary with no origin, no longer rewrites it. Pinned results read elsewhere offer no Fetch All, and Copy as UPDATE names the schema the rows came from.
  • EX-3: Stop on Run All keeps the results and history of the statements that completed when the plan keeps them (autocommit, an open user transaction, SQL Server batches). A Stop during a statement reads like one between statements, with no error result. Results are not swapped in under edits staged after the Stop. A commit whose outcome is unknown is still reported.
  • EX-4: a connection first opened on a table or query (a link, MCP open_table_tab, Reopen Closed Tab) reads its saved tabs behind the founding one, keeps the founding tab's database, and saves again. A workspace rebuilt after a reconnect restores its tabs instead of reopening the founding content.
  • UX-1: Truncate, Drop and Edit > Copy use the window's own sidebar selection. The confirmation shows only in the window that asked, and its answer applies to the tables it named.
  • ER-3: each query tab keeps its own undo history and Vim marks across tab switches. Clear Query, loading a history entry and AI Apply are one edit Cmd+Z takes back.
  • Tests changed on purpose (they pinned the shared sidebar selection and dialog state): SidebarViewModelTests batchToggleTruncateShowsDialog, batchToggleTruncateCancels, batchToggleTruncateNoSelection, batchToggleDeleteShowsDialog, batchToggleDeleteCancels, confirmTruncateMovesFromDeletes, confirmDropMovesFromTruncates, confirmOperationStoresOptions, SidebarViewModelCopyTests; confirmOperationResetsDialogState removed.
  • Docs: docs(features): per-tab undo, Stop keeps what ran, picker dimmed while a tab runs docs#215

Test plan

  • New: QueryContainerChangeTests, ResultEditabilityTests.schemaMoveRefuses, StoppedRunKeepsWorkTests, TabExecutionRegistryTests (stop cases), ContentFoundedRestoreTests, SidebarTableOperationWindowTests, SQLEditorTabHistoryTests, VimDocumentMarksTests, SourceEditorUndoHistoryTests, UndoHistoryTests.
  • verify.sh build, test on the suites above and the suites that own the changed types, lint.

Needs the maintainer

  • EX-4: the founding tab stays selected and in front; the connection's saved tabs come back as background tabs in that window.
  • EX-3: a run stopped and then replaced at once (a new run, a tab close, the picker) still writes no history for what it committed, as a superseded run never has.

@datlechin
datlechin merged commit 3272471 into main Nov 12, 2026
11 checks passed
@datlechin
datlechin deleted the fix/audit-w6-exec branch November 12, 2026 05:26
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