macOS: show/search description when subtitle missing in CommandPalette (#13610)

<img width="1125" height="552" alt="image"
src="https://github.com/user-attachments/assets/09866c9b-d5c4-422f-860b-de4de4cca055"
/>
This commit is contained in:
Mitchell Hashimoto
2026-08-04 11:20:01 -07:00
committed by GitHub

View File

@@ -79,6 +79,7 @@ struct CommandPaletteView: View {
let filtered = options.filter {
$0.title.matchedIndices(for: query) != nil ||
($0.subtitle?.matchedIndices(for: query) != nil) ||
($0.description?.matchedIndices(for: query) != nil) ||
colorMatchScore(for: $0.leadingColor, query: query) > 0
}
@@ -401,7 +402,7 @@ private struct CommandRow: View {
VStack(alignment: .leading, spacing: 2) {
highlightedTitle
if let subtitle = option.subtitle {
if let subtitle = option.subtitle ?? option.description {
highlightedSubtitle(subtitle)
.font(.caption)
.foregroundStyle(.secondary)