Skip to content

Meeting page system, sidebar refresh, dead code cleanup#22

Merged
max4c merged 4 commits intomainfrom
dev
Apr 10, 2026
Merged

Meeting page system, sidebar refresh, dead code cleanup#22
max4c merged 4 commits intomainfrom
dev

Conversation

@max4c
Copy link
Copy Markdown
Owner

@max4c max4c commented Apr 10, 2026

Summary

  • Meeting page system: dedicated MeetingPageView with notes editor, floating transcript widget that opens upward, AI summary + action items injected as document blocks (with auto-generated title), recording owned by service so it survives pane navigation, macOS notifications for upcoming calendar meetings.
  • Sidebar refresh: vertical icon+label nav list (Home, Search, Meeting, Calendar, Terminal, Browser, Mail, Notes), click-to-replace-pane / Cmd+click for new tab, contextual zone updates after pane swap, Trash button restored above Settings.
  • Dead code cleanup: ~3,000 lines removed across SidebarView, MeetingKnowledgeView, AgentHubView, PaneFindBar, MeetingNotesEditor, MarkdownParser, SidebarPeekState, MailIntelligenceService and dead methods/notifications/protocols across the codebase.
  • Filesystem improvements: empty .md files filtered from sidebar, Logseq vault folders hidden, single-syscall stat refactor (filesystem_tree_100 perf 13.6ms → 5.7ms).
  • Tooling: pre-commit hook (scripts/precommit.sh) runs swift build + swiftlint on staged Swift files locally, mirroring CI.

This PR also bundles browser/terminal/Chromium scaffolding from a prior session that was uncommitted on dev — the meeting work depends on it for the build to compile.

Test plan

  • swift build clean
  • swift test 338/338
  • Pre-commit hook passes (.git/hooks/pre-commit)
  • Click "+ New Meeting" → empty meeting page opens with placeholder, recording starts immediately
  • Type notes during recording, transcript widget appears at the bottom (collapsed)
  • Click transcript chevron → expands upward over notes, search + copy work
  • Stop recording → AI summary + action items appended to body, title auto-generated if H1 was empty
  • Switch panes during recording, floating pill stays visible, click pill → returns to meeting tab
  • Close meeting tab while recording → warning dialog
  • Sidebar nav: click each item replaces focused pane, Cmd+click opens new workspace tab, contextual sidebar updates
  • Trash button opens TrashPopoverView from sidebar footer
  • Empty .md files no longer appear in file tree

🤖 Generated with Claude Code

max4c and others added 3 commits April 8, 2026 10:52
Add common single-char variable names (a, b, c, f, n, s, t, u) to the
swiftlint exclusion list — these are standard Swift conventions for
closures, formatters, and UTF-8 views. Replace manual for-if filter
loop with allSatisfy to fix for_where lint violation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts:
#	macos/Bugbook.xcodeproj/project.pbxproj
Meeting page system
- New MeetingPageView with header, property pills, notes editor body, and
  floating transcript widget anchored to the bottom (toggle opens upward).
- AI summary + action items injected as document blocks; title auto-generated
  if H1 is empty. Idempotent regenerate via tracked block IDs in the sidecar.
- Transcript persisted to .bugbook/meetings/<id>.json (nonisolated store, loads
  off the main thread).
- New Meeting button instantly creates an empty meeting page and starts
  recording — no title prompt, placeholder shows "New Meeting".
- Recording is service-owned, not pane-owned. Floating pill stays visible
  across pane navigation and reopens the meeting tab on tap. Tab bar shows
  a pulsing red dot for the recording meeting. Closing the tab warns instead
  of force-stopping.
- Meetings dashboard (MeetingsView) is list-only; New Meeting + recent
  meetings grouped by recency. Frontmatter scanner replaces filename guessing.
- macOS notifications (UNUserNotificationCenter) for upcoming calendar
  meetings with 2+ attendees or a conference URL — Record / Open Notes
  actions wired through ContentView.

Sidebar refresh
- Vertical icon+label nav list (Home, Search, Meeting, Calendar, Terminal,
  Browser, Mail, Notes) replaces the icon-only fixed zone in HarborSidebar.
- Click replaces the focused pane; Cmd+click opens a new workspace tab.
  Sidebar context updates after pane replacement.
- Trash button restored above Settings in the footer.
- Removed divider line between fixed zone and contextual zone.
- Calendar contextual sidebar: removed redundant Day/Week/Month buttons.

Dead code cleanup (~3,000 lines)
- Deleted SidebarView.swift (legacy 662-line view never instantiated).
- Deleted MeetingKnowledgeView, AgentHubView, PaneFindBar, MeetingNotesEditor,
  MarkdownParser, SidebarPeekState (built but never wired).
- Deleted MailIntelligenceService and its tests (only referenced in tests).
- Removed dead methods: WorkspaceManager.mergeTab/nearestDocumentLeaf/
  renameWorkspace, Workspace.fromOpenFile, MeetingNoteService.appendTranscriptToNote/
  createMeetingNoteWithTranscript/renameMeetingPage, MeetingNotificationService.stopPolling.
- Removed dead inline types: CalendarSourcePicker, BacklinksMenuButton.
- Removed dead notifications: openMessages, openFullChat (and dead listeners).

Filesystem and parsing
- buildFileTree filters .md files smaller than 10 bytes (handles createNewFile's
  "# \n" placeholder) and skips empty subfolders. Single resourceValues call
  collapses two stat() syscalls into one — filesystem_tree_100 perf 13.6ms → 5.7ms.
- Hidden Logseq vault folders (journals/, logseq/, whiteboards/) from sidebar.
- MarkdownBlockParser gains stripYAMLFrontmatter and yamlValue helpers.
- BlockDocument preserves YAML frontmatter through load/save cycle.

Tooling
- scripts/precommit.sh + .git/hooks/pre-commit symlink runs swift build +
  swiftlint (errors only) on staged Swift files. Skip with --no-verify.
- TerminalSession._activeSurface annotated with swiftlint:disable directive
  (kept underscore prefix for the C-callback convention).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a11b3868c8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


// MARK: - Meeting Notification Handling

private func handleMeetingNotification(_ notification: Foundation.Notification, startRecording: Bool) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Honor notification “Record” action by starting recording

handleMeetingNotification(_:startRecording:) receives a startRecording flag but never uses it, so .meetingNotificationRecord and .meetingNotificationOpenNotes currently do the same thing (just open/navigate to the note). In the notification workflow this means pressing Record does not actually start recording unless the user manually clicks Record again on the page.

Useful? React with 👍 / 👎.

lines.append(" - \(Self.yamlEscape(name))")
}
}
lines.append("type: meeting")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add meeting_id to calendar-generated meeting frontmatter

MeetingPageView.stopRecording only persists transcript sidecar data when cachedMeetingId is present, but buildMeetingNoteContent(for:) closes YAML frontmatter without writing meeting_id. As a result, calendar-created meeting pages cannot reliably save/load transcript history and generated block IDs across reopen/reload.

Useful? React with 👍 / 👎.

## Notes

"""
try? content.write(toFile: pagePath, atomically: true, encoding: .utf8)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Prevent fallback notification flow from overwriting notes

In the event-cache-miss branch, the code builds a deterministic filename (yyyy-MM-dd — <title>.md) and writes to it unconditionally. If the user triggers the notification action multiple times (or two same-title meetings land on the same day), this path overwrites an existing note and can destroy prior edits.

Useful? React with 👍 / 👎.

…ite guard

- handleMeetingNotification now honors the startRecording flag by setting
  appState.pendingAutoRecordPath before navigating, so the "Record" action
  on a meeting notification actually starts recording.
- Calendar-generated meeting notes now include meeting_id in frontmatter so
  transcript sidecars and generated block IDs persist across reopen/reload.
- Event-cache-miss fallback no longer overwrites an existing note with the
  same deterministic filename; it opens the existing file instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@max4c max4c merged commit 4fb030c into main Apr 10, 2026
1 check 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.

1 participant