Skip to content

Meetings at the top level are listed in the sidebar by their call's title - #29

Merged
tommusrhodus merged 2 commits into
trunkfrom
fix/top-level-meetings-in-sidebar
Nov 17, 2026
Merged

tommusrhodus merged 2 commits into
trunkfrom
fix/top-level-meetings-in-sidebar

Conversation

@tommusrhodus

Copy link
Copy Markdown
Contributor

Closes #28.

A one-off call with no folder of its own (a calendar event that isn't recurring and doesn't match a folder or an earlier meeting) is saved at the top of the Meetings folder. The sidebar only drew folders, so those meetings could only be found under All meetings, while Finder showed them as date-named folders.

Each top-level meeting now has a row in the sidebar after the folders, labelled with its call's title and date. Clicking it opens the meeting (and the row stays highlighted while it's open), and it can be dragged onto a folder to file it, like any meeting row.

Tested

  • swift test: 90 tests pass.
  • In a built copy: the rows appear after the folders, clicking one opens it, and a real mouse drag of a row onto a folder moved the meeting into it; dragging it from the meeting list onto the Meetings header moved it back.

Not covered

  • Several one-off calls with the same title get a row each, told apart by date, rather than one row grouping them.

🤖 Generated with Claude Code

…itle

A one-off call with no folder of its own is saved at the top of the Meetings
folder, and the sidebar only drew folders, so it could only be found under All
meetings. Each one now has a row after the folders, with its title and date:
clicking it opens the meeting, and it can be dragged onto a folder to file it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@t51eng-poseidon

t51eng-poseidon Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

🔱 Poseidon started reviewing this PR — central run.

Comment thread Sources/Oatcake/SidebarView.swift Outdated
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.

@t51eng-poseidon t51eng-poseidon Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔱 Poseidon Review

Summary — Lists top-level (unfiled) meetings as sidebar rows under the folders, so you can select them and drag them into a folder. This is a low-risk UI-only change.

Walkthrough

  • ✨ New — Top-level meetings get a sidebar row with their title and date. The row can be dragged and is tagged SidebarItem.meeting.
  • 🐛 Fix — The sidebar selection binding now highlights a top-level meeting's row while that meeting is open.
  • 📝 Docs — The README describes the new sidebar rows and how to file a one-off call.

🟡 Suggestions

  • Sources/Oatcake/SidebarView.swift:L191 — The row's date is read only from m.startedAt. A meeting whose meeting.json has no startedAt shows no date, even though meetingDate(m) would get it from the folder name. Fix: use meetingDate(m).

💡 Nitpicks (2)
  • Sources/Oatcake/SidebarView.swift:L191 — The row shows only month and day. Two same-titled one-off calls on the same day can't be told apart. Consider adding hhmm(date), as jobWhen does.
  • README.md:L110 — The new line runs far past the ~95-column wrap used by the rest of the paragraph.

🤖 Prompt for AI agents — fix all findings
Verify each finding against the current code and only fix it if
needed.

Suggestions:
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 formatting,
  `.foregroundStyle(.secondary)` and `.monospacedDigit()` unchanged.

Nitpicks:
In `Sources/Oatcake/SidebarView.swift`:
- Line 191: The top-level row's trailing label in `topLevelRow(_:)` is
  `"\(shortMonth(date)) \(gregorian.component(.day, from: date))"`, so
  two one-off calls with the same title on the same day render as
  identical rows and the user cannot tell which to open or drag.
  Consider appending the time with `hhmm(date)` (as `jobWhen(_:)` does
  in the same file), or showing only the time when the date is today;
  keep the secondary style and monospaced digits, and keep the row
  narrow enough that `lineLimit(1)` on the title still leaves room.

In `README.md`:
- Line 110: The added sentence "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; ..." was joined onto one very long line, while the
  surrounding paragraph is hard-wrapped near 95 columns. Re-wrap this
  paragraph to match the neighbouring lines; do not change the wording.

ℹ️ Review info
  • Commit: 579eaad
  • Files reviewed: README.md, Sources/Oatcake/SidebarView.swift
  • Files skipped: none
  • Model: claude-opus-5-5

…g.json has none, and the README paragraph is wrapped again

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@t51eng-poseidon t51eng-poseidon Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔱 Poseidon Review

No new issues found on this pass. The latest push dates a top-level row with meetingDate(m) and wraps the README paragraph again.


♻️ Previously flagged

Resolved

  • ✅ Sources/Oatcake/SidebarView.swift:L191 — fixed: the date now comes from meetingDate(m), which falls back to the folder name
  • ✅ README.md:L110 — fixed: the paragraph is wrapped to ~95 columns again

Still outstanding

  • ⚠️ Sources/Oatcake/SidebarView.swift:L191 — (nitpick) the row shows only month and day, so two same-titled one-off calls on the same day still look identical; consider adding hhmm(date)

ℹ️ Review info
  • Commit: 3d05155
  • Files reviewed: README.md, Sources/Oatcake/SidebarView.swift
  • Files skipped: none
  • Model: claude-opus-5-5

@tommusrhodus
tommusrhodus merged commit 5880ed7 into trunk Nov 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recent calls without a matching folder have created a new folder keyed on date, but don't show in the meetings folder structure

1 participant