From f9284b2d68c80cb7c34bf098cd8ca1f9b9badbeb Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Sat, 14 Nov 2026 21:41:47 +0700 Subject: [PATCH] docs(connections): reconnect losses, connections.json backups and per-tab undo --- connections/index.mdx | 4 ++-- features/change-tracking.mdx | 2 +- security/privacy.mdx | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/connections/index.mdx b/connections/index.mdx index 177b93b..3924719 100644 --- a/connections/index.mdx +++ b/connections/index.mdx @@ -112,7 +112,7 @@ The first try comes 2 seconds after the drop, then 4 and 8, doubling to 2 minute Waking the Mac from sleep checks the tunnel of every open connection, and each one that died reconnects alongside the others rather than in turn. -A new session starts empty. When the old one held an open transaction, or something your statements set up there, such as a temporary table, a `SET` value, a user variable, a prepared statement, a cursor, a session lock or a `LISTEN`, the next thing you run on that database is refused once with a message naming what is gone, so a statement written for a temporary table cannot reach the real table it hid. Set it up again, then run your statements. The message names the kinds only, never your statements or their values. Startup commands run again on every reconnect, so they never count, and neither does a routine you call. A **Reconnect** you choose yourself reports only a lost transaction. The refusal goes to whatever runs first on that database, a grid save, Explain or an assistant statement included. +A new session starts empty. When the old one held an open transaction, or something your statements set up there, such as a temporary table, a `SET` value, a user variable, a prepared statement, a cursor, a session lock or a `LISTEN`, the next statement you run on that database is refused once with a message naming what is gone: one you run in a query tab, an Explain, or one an assistant or an MCP client sends. Set it up again, then run your statements. The message names the kinds only, never your statements or their values. Startup commands run again on every reconnect, so they never count, and neither does a routine you call. A **Reconnect** you choose yourself reports only a lost transaction. The first change TablePro writes for you there, such as a grid save, an import or a structure change, is refused once with the same message, since it would have run inside the lost transaction; run it again to write it on its own. Neither one uses up the other's message. Work on a temporary table that went with the old session is refused until you create it again in a query tab, so an edit made for it cannot reach the real table it hid. The connections strip, the welcome window and the connection switcher mark a reconnecting connection with a spinner and a lost one with a crossed-out bolt. [Connection state](/features/workspace-rail#connection-state) lists every mark. Hover one to read the cause. @@ -122,6 +122,6 @@ On the strip's right-click menu and in the **Database** menu, the connection com Right-click a connection to edit or delete it, or select it and press `Delete`. Deleting asks first and removes the saved settings, nothing on the server. Pressing `Delete` on a row under **Favorites** or **Recent** only takes it out of that section. Edits apply on the next connect. -Connections are stored in `~/Library/Application Support/TablePro/connections.json` with their passwords in the macOS Keychain, so copying that file to another Mac restores the connections without the passwords. +Connections are stored in `~/Library/Application Support/TablePro/connections.json` with their passwords in the macOS Keychain, so copying that file to another Mac restores the connections without the passwords. Each save keeps the file it replaces as `connections.json.backup`. A connection this version cannot read is kept as it is and the others load; it stays in the file, or moves to `connections.json.unreadable-records` when the file changed outside TablePro. A file that no longer reads as a list is restored from the backup, and the damaged copy is kept as `connections.json.unreadable`. Right-clicking the Dock icon lists saved connections under **Open Connection**. diff --git a/features/change-tracking.mdx b/features/change-tracking.mdx index dca0e51..17197a5 100644 --- a/features/change-tracking.mdx +++ b/features/change-tracking.mdx @@ -132,7 +132,7 @@ To drop the whole queue, choose **File > Discard Changes…** and confirm; a sta ## Undo and redo -`Cmd+Z` and `Cmd+Shift+Z`. Focus decides what they act on: text in the SQL editor, queued changes in the grid. Deleting several rows undoes as one step. **Undo Delete** on the right-click menu is a step of its own, so `Cmd+Z` after it deletes the rows again and the next `Cmd+Z` restores them. The stacks are per tab, and a save clears them. +`Cmd+Z` and `Cmd+Shift+Z`. Focus decides what they act on: text in the SQL editor, queued changes in the grid. Deleting several rows undoes as one step. **Undo Delete** on the right-click menu is a step of its own, so `Cmd+Z` after it deletes the rows again and the next `Cmd+Z` restores them. The stacks are per tab and stay with the tab while you work in another one; a save clears them. ## Restoring a save diff --git a/security/privacy.mdx b/security/privacy.mdx index 309123f..d95829a 100644 --- a/security/privacy.mdx +++ b/security/privacy.mdx @@ -198,6 +198,9 @@ Every path here is under `~/Library/Application Support/TablePro/` unless it say | --- | --- | | `connections.json` | Connection definitions: host, port, username, database, SSH and SSL settings. No passwords. | | `connections.json.hmac` | The integrity tag for `connections.json`. | +| `connections.json.backup`, `connections.json.backup.hmac` | The previous `connections.json` and its tag, kept by each save. | +| `connections.json.unreadable` | A damaged `connections.json` set aside when the backup replaced it. | +| `connections.json.unreadable-records` | Connections this version cannot read from a `connections.json` changed outside TablePro, kept out of the file so a save never signs them. | | `known_hosts` | SSH host keys you accepted. | | `query_history.db` | The statements you ran, as text, with a full-text index. Parameter values are never recorded. | | `sql_favorites.db` | Saved queries and their folders. |