Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ text (the transcript and your notes), never audio. You can point Oatcake at a mo
your own, on your Mac or your network, instead.

The window has three columns: the sidebar (a recording in progress, Upcoming from your
calendar, Needs review, and your folders), the meetings in the selected folder, and the
meeting itself. Settings (⌘,) is its own window, in panes; changes apply as you make them.
calendar, Needs review, and your folders, then any meetings at the top level, listed by their
call's title), the meetings in the selected folder, and the meeting itself. A one-off call with
no folder of its own is saved at the top level; drag it onto a folder to file it. Settings (⌘,) is its own window, in panes; changes apply as you make them.
⌘N starts a new recording, ⌥⌘F searches every meeting from the box above the meeting list (its
title, folder, summary, to-dos, notes and transcript; a meeting found by its text shows the line
with the words and opens there), and ⌘F finds words in the transcript you're reading. ⇧⌘N makes a
Expand Down
20 changes: 18 additions & 2 deletions Sources/Oatcake/SidebarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import SwiftUI
let dragPrefix = "oatcake-item:"

enum SidebarItem: Hashable {
case live, todos, job(String), folder(String)
case live, todos, job(String), folder(String), meeting(String)
}

/// A section's header runs closer to the sidebar's edge than its rows do. This brings a button at the
Expand Down Expand Up @@ -36,7 +36,10 @@ struct SidebarView: View {
FolderRow(node: item.node, depth: item.depth, open: $open, renaming: $renaming, draft: $draft,
newFolderIn: $newFolderIn, dropTarget: $dropTarget)
}
if tree.subfolders.isEmpty { Text("No folders yet.").foregroundStyle(.secondary).font(.callout) }
// A one-off call with no folder of its own is saved at the top level. It's listed here
// under its call's title, after the folders, to open or to drag into one.
ForEach(tree.meetings, id: \.path) { m in topLevelRow(m).tag(SidebarItem.meeting(m.path)) }
if tree.children.isEmpty { Text("No folders yet.").foregroundStyle(.secondary).font(.callout) }
}
} header: {
HStack {
Expand Down Expand Up @@ -112,6 +115,7 @@ struct SidebarView: View {
case .live: .live
case .todos: .todos
case .job(let id): .job(id)
case .meeting(let path, _) where parentOf(path).isEmpty: .meeting(path)
case .meeting, .folder, nil: .folder(model.folder)
case .new: nil
}
Expand All @@ -121,6 +125,7 @@ struct SidebarView: View {
case .todos: model.selection = .todos
case .job(let id): model.selection = .job(id)
case .folder(let path): model.openFolder(path)
case .meeting(let path): model.openMeeting(path)
case nil: break
}
}
Expand Down Expand Up @@ -177,6 +182,17 @@ struct SidebarView: View {
}
}

private func topLevelRow(_ m: TreeNode) -> some View {
HStack(spacing: 4) {
// Where a folder's disclosure arrow is, so the names line up.
Color.clear.frame(width: 12, height: 16)
Label(meetingTitle(m), systemImage: "doc.text").lineLimit(1)
Spacer()
if let date = m.startedAt { Text("\(shortMonth(date)) \(gregorian.component(.day, from: date))").foregroundStyle(.secondary).monospacedDigit() }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new top-level row only shows a date when m.startedAt is set, but everywhere else the app gets a meeting's date from meetingDate(m). That function (Sources/Oatcake/Format.swift:58) falls back to the 2026-10-02 1400 Title folder name when meeting.json has no startedAt. A hand-edited or older meeting.json without startedAt therefore shows no date in the sidebar. That undoes the PR's own stated way of telling several one-off calls with the same title apart. Use if let date = meetingDate(m) { ... } instead of if let date = m.startedAt.

🤖 Fix prompt for AI agents
Verify each finding against the current code and only fix it if
needed.

In `Sources/Oatcake/SidebarView.swift`:
- Line 191: In `topLevelRow(_:)`, the date label is guarded by
  `if let date = m.startedAt`, which reads only meeting.json's startedAt;
  a meeting whose meeting.json lacks startedAt (hand-edited, older
  imports) renders with no date, so two one-off calls sharing a title
  become indistinguishable in the sidebar, contrary to the PR's stated
  behavior. Replace `m.startedAt` with `meetingDate(m)` (defined in
  Sources/Oatcake/Format.swift), which falls back to the
  "YYYY-MM-DD HHMM Title" folder-name prefix and matches how the rest
  of the app dates meetings. Keep the existing
  `shortMonth(date) gregorian.component(.day, ...)` formatting,
  `.foregroundStyle(.secondary)` and `.monospacedDigit()` unchanged.

}
.draggable(dragPrefix + m.path)
}

private var todosRow: some View {
let counts = model.library.todoCounts
return HStack {
Expand Down
Loading