Commit 393d4d261f

393d4d261fef7e5ac49bfe434dff59504a6b3544

parent: 9662bddcfb

Verified · cmc

cmc <hello@cleberg.net> · 2026-11-25 22:15 UTC

Mac: empty states for agenda lists, the board and recovery

A TODO, match or search list with no rows shows No entries under its
header, the board shows No entries in place of its table or columns,
and the recovery sheet says when a file has no kept versions.

Ref #222

Layout: unified · split

Changed files (6)
Sources/Orgstar/AgendaView.swift +5 · view
@@ -360,6 +360,11 @@ struct AgendaView: View {
360 ContentUnavailableView("No agenda files", systemImage: "calendar", description: Text("The agenda reads the org files at the top of each folder you add.")) 360 ContentUnavailableView("No agenda files", systemImage: "calendar", description: Text("The agenda reads the org files at the top of each folder you add."))
361 } else if agenda.files.isEmpty { 361 } else if agenda.files.isEmpty {
362 ContentUnavailableView("All folders hidden", systemImage: "folder", description: Text("Show a folder from the Folders menu.")) 362 ContentUnavailableView("All folders hidden", systemImage: "folder", description: Text("Show a folder from the Folders menu."))
363 } else if !isAgenda, !isBlocks, listRows.isEmpty {
364 ContentUnavailableView(
365 "No entries", systemImage: "checklist",
366 description: Text(filter.isEmpty ? "Nothing in the agenda files matches this view." : "Nothing matches the filter.")
367 )
363 } 368 }
364 } 369 }
365 .sheet(item: $eventRequest) { request in 370 .sheet(item: $eventRequest) { request in
Sources/Orgstar/BoardView.swift +11 · view
@@ -18,6 +18,8 @@ struct BoardView: View {
18 @State private var sortOrder = [KeyPathComparator(\BoardRow.todoOrder), KeyPathComparator(\BoardRow.title)] 18 @State private var sortOrder = [KeyPathComparator(\BoardRow.todoOrder), KeyPathComparator(\BoardRow.title)]
19 @State private var message: String? 19 @State private var message: String?
20 @State private var tick = 0 20 @State private var tick = 0
21 /// Whether the first load has finished, so an empty board says so.
22 @State private var loaded = false
21 /// The kanban card the arrow keys move from. 23 /// The kanban card the arrow keys move from.
22 @State private var current: String? 24 @State private var current: String?
23 @FocusState private var boardFocused: Bool 25 @FocusState private var boardFocused: Bool
@@ -59,6 +61,14 @@ struct BoardView: View {
59 Group { 61 Group {
60 if kanban { board } else { table } 62 if kanban { board } else { table }
61 } 63 }
64 .overlay {
65 if loaded, entries.isEmpty {
66 ContentUnavailableView(
67 "No entries", systemImage: "rectangle.split.3x1",
68 description: Text(match.isEmpty ? "Headings with a TODO keyword in the agenda files show here." : "Nothing in the agenda files matches this.")
69 )
70 }
71 }
62 .safeAreaInset(edge: .bottom, spacing: 0) { 72 .safeAreaInset(edge: .bottom, spacing: 0) {
63 if let message { 73 if let message {
64 Text(message).font(.callout).frame(maxWidth: .infinity, alignment: .leading).padding(.horizontal, 12).padding(.vertical, 6).background(.bar) 74 Text(message).font(.callout).frame(maxWidth: .infinity, alignment: .leading).padding(.horizontal, 12).padding(.vertical, 6).background(.bar)
@@ -89,6 +99,7 @@ struct BoardView: View {
89 let result = await agenda.board(open: open, match: match) 99 let result = await agenda.board(open: open, match: match)
90 entries = result.entries 100 entries = result.entries
91 keywords = result.keywords 101 keywords = result.keywords
102 loaded = true
92 } 103 }
93 } 104 }
94 105
Sources/Orgstar/VersionViews.swift +25 −5 · view
@@ -105,6 +105,31 @@ struct RecoverySheet: View {
105 @Environment(\.dismiss) private var dismiss 105 @Environment(\.dismiss) private var dismiss
106 106
107 var body: some View { 107 var body: some View {
108 Group {
109 if versions.isEmpty {
110 VStack {
111 ContentUnavailableView(
112 "No recovery versions", systemImage: "clock.arrow.circlepath",
113 description: Text("orgstar keeps a copy of this file here when it replaces a version, and a snapshot before a save at most once an hour.")
114 )
115 HStack {
116 Spacer()
117 Button("Close") { dismiss() }.keyboardShortcut(.cancelAction)
118 }
119 }
120 .padding()
121 } else {
122 versionList
123 }
124 }
125 .frame(minWidth: 760, minHeight: 460)
126 .onAppear {
127 versions = session.recoveryVersions()
128 selected = versions.first?.url
129 }
130 }
131
132 private var versionList: some View {
108 HSplitView { 133 HSplitView {
109 List(versions, id: \.url, selection: $selected) { version in 134 List(versions, id: \.url, selection: $selected) { version in
110 VStack(alignment: .leading) { 135 VStack(alignment: .leading) {
@@ -138,11 +163,6 @@ struct RecoverySheet: View {
138 } 163 }
139 .padding() 164 .padding()
140 } 165 }
141 .frame(minWidth: 760, minHeight: 460)
142 .onAppear {
143 versions = session.recoveryVersions()
144 selected = versions.first?.url
145 }
146 } 166 }
147 167
148 static func describe(_ label: String) -> String { 168 static func describe(_ label: String) -> String {
docs/manual/guide/01-files-and-folders.org +1 −1 · view
@@ -294,7 +294,7 @@ Choose File ▸ Recovery Versions… to see the open file's versions, newest fir
294| Disk version, replaced | The file on disk, before orgstar wrote over it | 294| Disk version, replaced | The file on disk, before orgstar wrote over it |
295| Sync conflict copy | A Syncthing conflict copy you resolved | 295| Sync conflict copy | A Syncthing conflict copy you resolved |
296 296
297Select a version to see how it differs from the buffer (=-= in the buffer, =+= in the kept version). =Restore= puts the kept version's text in the buffer as one edit, which undo reverses; the buffer as it was goes to recovery first. =Show in Finder= reveals the kept file. 297Select a version to see how it differs from the buffer (=-= in the buffer, =+= in the kept version). =Restore= puts the kept version's text in the buffer as one edit, which undo reverses; the buffer as it was goes to recovery first. =Show in Finder= reveals the kept file. For a file with no kept versions the sheet says so.
298 298
299** iCloud 299** iCloud
300 300
docs/manual/guide/07-agenda.org +3 −1 · view
@@ -345,7 +345,7 @@ The built-in view TODO List is =org-todo-list=: every heading with a TODO keywor
345 345
346A saved view can list specific keywords instead, done ones included, with =keywords = "WAIT|HOLD"= (see [[*Views][Views]]). This mirrors =C-u M-x org-todo-list= with a keyword argument. 346A saved view can list specific keywords instead, done ones included, with =keywords = "WAIT|HOLD"= (see [[*Views][Views]]). This mirrors =C-u M-x org-todo-list= with a keyword argument.
347 347
348The TODO list and the match views use the same rows as the day view (see [[*Rows][Rows]]), without the left column. 348The TODO list and the match views use the same rows as the day view (see [[*Rows][Rows]]), without the left column. On the Mac, a list with no rows says No entries under its header.
349 349
350* Tag and property matches 350* Tag and property matches
351 351
@@ -710,6 +710,8 @@ With Increase Contrast on, cards have an outline, the selected card a heavier on
710 710
711With a match that includes entries without a TODO keyword, those entries appear in the table but not on the kanban board, which has no column for them. 711With a match that includes entries without a TODO keyword, those entries appear in the table but not on the kanban board, which has no column for them.
712 712
713When no entry matches, the board says so in place of the table or columns.
714
713** On iOS 715** On iOS
714 716
715Choose Board from the Views menu in the Agenda tab. The board opens over the agenda with a List / Kanban switch at the top, a match field under it (press Search to apply it), and Done to close it. The list shows the entries sorted by keyword, then title; tap one to open it. In Kanban, columns scroll sideways; touch and hold a card, then drag it to another column to set that keyword. A card's or row's menu has Move To (a keyword, or None), Set Property… (=NAME value=) and Open. The Kanban or List choice and the match are remembered, separately from the Mac's. 717Choose Board from the Views menu in the Agenda tab. The board opens over the agenda with a List / Kanban switch at the top, a match field under it (press Search to apply it), and Done to close it. The list shows the entries sorted by keyword, then title; tap one to open it. In Kanban, columns scroll sideways; touch and hold a card, then drag it to another column to set that keyword. A card's or row's menu has Move To (a keyword, or None), Set Property… (=NAME value=) and Open. The Kanban or List choice and the match are remembered, separately from the Mac's.
l10n/Localizable.xcstrings +204 · view
@@ -16512,6 +16512,40 @@
16512 } 16512 }
16513 } 16513 }
16514 }, 16514 },
16515 "Headings with a TODO keyword in the agenda files show here.": {
16516 "localizations": {
16517 "de": {
16518 "stringUnit": {
16519 "state": "translated",
16520 "value": "Hier erscheinen die Überschriften deiner Agenda-Dateien, die ein TODO-Schlüsselwort haben."
16521 }
16522 },
16523 "es": {
16524 "stringUnit": {
16525 "state": "translated",
16526 "value": "Aquí aparecen los encabezados de tus archivos de agenda que tienen una palabra clave TODO."
16527 }
16528 },
16529 "fr": {
16530 "stringUnit": {
16531 "state": "translated",
16532 "value": "Les titres de vos fichiers d'agenda qui ont un mot-clé TODO s'affichent ici."
16533 }
16534 },
16535 "ja": {
16536 "stringUnit": {
16537 "state": "translated",
16538 "value": "アジェンダファイルのうちTODOキーワードのある見出しがここに表示されます。"
16539 }
16540 },
16541 "pt-BR": {
16542 "stringUnit": {
16543 "state": "translated",
16544 "value": "Os cabeçalhos dos seus arquivos da agenda com uma palavra-chave TODO aparecem aqui."
16545 }
16546 }
16547 }
16548 },
16515 "Hidden": { 16549 "Hidden": {
16516 "localizations": { 16550 "localizations": {
16517 "de": { 16551 "de": {
@@ -23684,6 +23718,40 @@
23684 } 23718 }
23685 } 23719 }
23686 }, 23720 },
23721 "No recovery versions": {
23722 "localizations": {
23723 "de": {
23724 "stringUnit": {
23725 "state": "translated",
23726 "value": "Keine Wiederherstellungsversionen"
23727 }
23728 },
23729 "es": {
23730 "stringUnit": {
23731 "state": "translated",
23732 "value": "No hay versiones de recuperación"
23733 }
23734 },
23735 "fr": {
23736 "stringUnit": {
23737 "state": "translated",
23738 "value": "Aucune version de récupération"
23739 }
23740 },
23741 "ja": {
23742 "stringUnit": {
23743 "state": "translated",
23744 "value": "復元バージョンなし"
23745 }
23746 },
23747 "pt-BR": {
23748 "stringUnit": {
23749 "state": "translated",
23750 "value": "Nenhuma versão de recuperação"
23751 }
23752 }
23753 }
23754 },
23687 "No table at point": { 23755 "No table at point": {
23688 "localizations": { 23756 "localizations": {
23689 "de": { 23757 "de": {
@@ -24262,6 +24330,74 @@
24262 } 24330 }
24263 } 24331 }
24264 }, 24332 },
24333 "Nothing in the agenda files matches this view.": {
24334 "localizations": {
24335 "de": {
24336 "stringUnit": {
24337 "state": "translated",
24338 "value": "Nichts in deinen Agenda-Dateien passt zu dieser Ansicht."
24339 }
24340 },
24341 "es": {
24342 "stringUnit": {
24343 "state": "translated",
24344 "value": "Nada en tus archivos de agenda coincide con esta vista."
24345 }
24346 },
24347 "fr": {
24348 "stringUnit": {
24349 "state": "translated",
24350 "value": "Rien dans vos fichiers d'agenda ne correspond à cette vue."
24351 }
24352 },
24353 "ja": {
24354 "stringUnit": {
24355 "state": "translated",
24356 "value": "このビューに一致する項目はアジェンダファイルにありません。"
24357 }
24358 },
24359 "pt-BR": {
24360 "stringUnit": {
24361 "state": "translated",
24362 "value": "Nada nos seus arquivos da agenda corresponde a esta visualização."
24363 }
24364 }
24365 }
24366 },
24367 "Nothing in the agenda files matches this.": {
24368 "localizations": {
24369 "de": {
24370 "stringUnit": {
24371 "state": "translated",
24372 "value": "Nichts in deinen Agenda-Dateien passt dazu."
24373 }
24374 },
24375 "es": {
24376 "stringUnit": {
24377 "state": "translated",
24378 "value": "Nada en tus archivos de agenda coincide con esto."
24379 }
24380 },
24381 "fr": {
24382 "stringUnit": {
24383 "state": "translated",
24384 "value": "Rien dans vos fichiers d'agenda ne correspond."
24385 }
24386 },
24387 "ja": {
24388 "stringUnit": {
24389 "state": "translated",
24390 "value": "アジェンダファイルに一致する項目はありません。"
24391 }
24392 },
24393 "pt-BR": {
24394 "stringUnit": {
24395 "state": "translated",
24396 "value": "Nada nos seus arquivos da agenda corresponde a isso."
24397 }
24398 }
24399 }
24400 },
24265 "Nothing is running": { 24401 "Nothing is running": {
24266 "localizations": { 24402 "localizations": {
24267 "de": { 24403 "de": {
@@ -24330,6 +24466,40 @@
24330 } 24466 }
24331 } 24467 }
24332 }, 24468 },
24469 "Nothing matches the filter.": {
24470 "localizations": {
24471 "de": {
24472 "stringUnit": {
24473 "state": "translated",
24474 "value": "Nichts passt zum Filter."
24475 }
24476 },
24477 "es": {
24478 "stringUnit": {
24479 "state": "translated",
24480 "value": "Nada coincide con el filtro."
24481 }
24482 },
24483 "fr": {
24484 "stringUnit": {
24485 "state": "translated",
24486 "value": "Rien ne correspond au filtre."
24487 }
24488 },
24489 "ja": {
24490 "stringUnit": {
24491 "state": "translated",
24492 "value": "フィルタに一致する項目はありません。"
24493 }
24494 },
24495 "pt-BR": {
24496 "stringUnit": {
24497 "state": "translated",
24498 "value": "Nada corresponde ao filtro."
24499 }
24500 }
24501 }
24502 },
24333 "Nothing scheduled": { 24503 "Nothing scheduled": {
24334 "localizations": { 24504 "localizations": {
24335 "de": { 24505 "de": {
@@ -42487,6 +42657,40 @@
42487 } 42657 }
42488 } 42658 }
42489 }, 42659 },
42660 "orgstar keeps a copy of this file here when it replaces a version, and a snapshot before a save at most once an hour.": {
42661 "localizations": {
42662 "de": {
42663 "stringUnit": {
42664 "state": "translated",
42665 "value": "orgstar legt hier eine Kopie dieser Datei ab, wenn es eine Version ersetzt, und höchstens einmal pro Stunde einen Schnappschuss vor dem Sichern."
42666 }
42667 },
42668 "es": {
42669 "stringUnit": {
42670 "state": "translated",
42671 "value": "orgstar guarda aquí una copia de este archivo cuando sustituye una versión, y una instantánea antes de guardar como mucho una vez por hora."
42672 }
42673 },
42674 "fr": {
42675 "stringUnit": {
42676 "state": "translated",
42677 "value": "orgstar conserve ici une copie de ce fichier lorsqu'il remplace une version, et un instantané avant un enregistrement au plus une fois par heure."
42678 }
42679 },
42680 "ja": {
42681 "stringUnit": {
42682 "state": "translated",
42683 "value": "orgstarはバージョンを置き換えるときにこのファイルのコピーをここに保存し、保存前のスナップショットも1時間に1回まで保存します。"
42684 }
42685 },
42686 "pt-BR": {
42687 "stringUnit": {
42688 "state": "translated",
42689 "value": "O orgstar guarda aqui uma cópia deste arquivo quando substitui uma versão, e um instantâneo antes de salvar no máximo uma vez por hora."
42690 }
42691 }
42692 }
42693 },
42490 "orgstar keeps its settings in a folder of its own. To use the ones in ~/.config/orgstar, choose that folder in Settings ▸ General ▸ Choose Configuration Folder….": { 42694 "orgstar keeps its settings in a folder of its own. To use the ones in ~/.config/orgstar, choose that folder in Settings ▸ General ▸ Choose Configuration Folder….": {
42491 "localizations": { 42695 "localizations": {
42492 "de": { 42696 "de": {
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form