From 2349644e33c877de08242b08dd149cfbb634475e Mon Sep 17 00:00:00 2001 From: manfad Date: Wed, 19 Aug 2026 15:02:23 +0800 Subject: [PATCH] fix(sidebar): stack the empty Favorites actions so the view fits the sidebar on macOS 15 --- CHANGELOG.md | 1 + TablePro/Views/Sidebar/FavoritesTabView.swift | 22 ++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 900b034fe..e7ca4770e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- The empty Favorites sidebar fits its width on macOS 15. The description and the New Favorite, New Folder and Link a Folder buttons ran past both edges of the sidebar and were cut off, so the buttons could not be read or reached. They now wrap and stack inside the sidebar. - Table favorites and saved queries sync through iCloud. Their record types had never been created in the iCloud schema, so every one was rejected on upload, and Account settings reported the same sync error again on every attempt because the rejected items were retried forever. - An SSH profile that uses a jump host syncs. iCloud rejected the jump host list, and that stopped the whole profile from uploading. - A connection carries its favorite mark, every tag assigned to it, and its AI rules and always-allowed tools to your other Macs. These were held back from upload, so they stayed on the Mac that set them, and a connection with several tags arrived with only the first one. diff --git a/TablePro/Views/Sidebar/FavoritesTabView.swift b/TablePro/Views/Sidebar/FavoritesTabView.swift index 69402febc..99659c5b9 100644 --- a/TablePro/Views/Sidebar/FavoritesTabView.swift +++ b/TablePro/Views/Sidebar/FavoritesTabView.swift @@ -468,20 +468,26 @@ internal struct FavoritesTabView: View { /// An empty list has no row to right-click, so the commands the background menu carries have to /// be here too. They used to live in a bar at the bottom of the sidebar. + /// + /// The actions are stacked, not left to `ContentUnavailableView`'s default row. On macOS 15 the + /// row of three buttons is wider than the sidebar, and the view sizes its whole content to that + /// row, so the description and the buttons ran past both edges and were cut off. private var emptyState: some View { ContentUnavailableView { Label(String(localized: "No Favorites"), systemImage: "star") } description: { Text("Save frequently used queries, or link a folder of .sql files to share with your team.") } actions: { - Button(String(localized: "New Favorite...")) { - viewModel.createFavorite() - } - Button(String(localized: "New Folder")) { - viewModel.createFolder() - } - Button(String(localized: "Link a Folder...")) { - addLinkedFolder() + VStack(spacing: 8) { + Button(String(localized: "New Favorite...")) { + viewModel.createFavorite() + } + Button(String(localized: "New Folder")) { + viewModel.createFolder() + } + Button(String(localized: "Link a Folder...")) { + addLinkedFolder() + } } } .frame(maxWidth: .infinity, maxHeight: .infinity)