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
* refactor(sidebar): connection-scoped favorites cache and per-window search
* fix(tabs): aggregate persistence saves to prevent multi-window tab loss
* chore(sidebar): drop dead APIs and fix indentation per review
* test(tabs): cover sourceFileURL persistence round-trip
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,11 +13,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13
13
14
14
### Fixed
15
15
16
+
- Multi-window tab persistence dropped all but one tab on relaunch. Three save paths each wrote only the current window's tabs, racing the `willTerminate` aggregate save: `handleTabSelectionChange` (every time you switched tabs), the `mainWindowWillClose` notification observer, and the per-window `handleWindowWillClose` close path. On Cmd+Q, AppKit closes windows LIFO so the last writer left only the first-opened window's tab in the file. The tab-selection path now writes aggregated tabs from all windows of the connection. Per-window close-time saves no-op when the app is terminating, leaving the canonical `willTerminate` aggregate save intact. The `mainWindowWillClose` observer also routes through the aggregated save path.
16
17
- Filter value autocomplete popover stole keyboard focus from the text field after the first keystroke when Full Keyboard Access was enabled (System Settings → Keyboard → Keyboard Navigation). The popover content used SwiftUI `Button` rows, which become focus targets under FKA, so SwiftUI auto-focused the first row when the popover appeared. Replaced the rows with `Text` + `.onTapGesture` (non-focusable) and marked the dropdown as `.focusable(false)`.
17
18
- Toolbar database name was empty after relaunching with a connection that had no database configured but a last-used database restored via `selectDatabaseFromLastSession`. The window opened (and the toolbar resolved its initial name) before the post-connect actions populated `session.currentDatabase`, so the toolbar fell back to the empty `connection.database`. Sidebar and Cmd+K both worked because they read the session directly. The toolbar now re-syncs its database name on every `connectionStatusDidChange`, picking up the restored value once the session settles.
18
19
19
20
### Changed
20
21
22
+
- Favorites sidebar state is now connection-scoped, not window-scoped. Opening a second native tab for the same connection no longer reloads the favorites tree from SQLite or flashes a spinner. The folders/favorites/linked-files cache (`ConnectionDataCache`) is shared across windows of the same connection and refreshes on `.sqlFavoritesDidUpdate` and `.linkedSQLFoldersDidUpdate`. Favorite selection (`ConnectionSidebarState.selectedFavoriteNodeId`) is also shared, so highlighting a favorite in window A reflects in window B and persists across launches via UserDefaults. Favorites search text remains per-window (`WindowSidebarState.favoritesSearchText`), matching Mail/Notes patterns where each window can search independently. The single sidebar `NSSearchField` routes to the connection-shared text on Tables and to the window-local text on Favorites based on the active tab.
21
23
- Connection Form rebuilt around macOS HIG sidebar navigation. The old segmented-tab form (~2200 lines across five files) is replaced by a `NavigationSplitView` with five sidebar panes (General, SSH Tunnel, SSL/TLS, Customization, Advanced). State previously held in 30+ flat `@State` vars is now split across six `@Observable` per-pane view models behind a `ConnectionFormCoordinator`. Plugin-driven additional fields auto-route to the right pane by their declared `FieldSection`. The toolbar exposes Cancel, Save, and Save & Connect natively; Test Connection lives inline in the General pane as a Status row. Each sidebar item shows a red warning triangle when its pane has missing required fields.
22
24
- Import from URL flow moved to the database type chooser. Picking "Import from URL..." in the chooser footer opens a dedicated sheet; pasting a connection URL detects the type, previews host/user/database, and pre-fills the form. The form itself no longer has a URL import button — users decide before opening the form.
23
25
- Native HIG polish across the form. General pane authentication rows reorder to Username → Password → Prompt for password → Use Password File. SSL/TLS mode caption renders as a Section footer instead of a stray row; CA Cert / Client Cert labels expand to full names. SSH Tunnel collapses "Profile" and "Profile Settings" into a single section with a "Profile Details" `DisclosureGroup`. Customization section "Safety" renames to "Query Behavior". Advanced pane's Startup Commands and Pre-Connect Script editors switch from a custom `RoundedRectangle.stroke` border to native `NSScrollView.borderType = .bezelBorder` (Terminal / Mail signature pattern); body captions move to Section footers. Connection form WindowGroup gains the standard three traffic lights.
0 commit comments