소스 검색

Refocus AI Companion cards on notes generation.

Remove audio and transcript actions from previous meeting cards and present only meeting title, date, saved time, and Get Notes status to match a notes-first experience.

Co-authored-by: Cursor <cursoragent@cursor.com>
huzaifahayat12 2 달 전
부모
커밋
650602ee3a
1개의 변경된 파일14개의 추가작업 그리고 55개의 파일을 삭제
  1. 14 55
      meetings_app/ViewController.swift

+ 14 - 55
meetings_app/ViewController.swift

@@ -2624,7 +2624,7 @@ private extension ViewController {
         titleLabel.alignment = .left
         contentStack.addArrangedSubview(titleLabel)
 
-        let subtitle = textLabel("Ended meetings with local recordings", font: typography.fieldLabel, color: palette.textSecondary)
+        let subtitle = textLabel("Get notes from your previous meetings", font: typography.fieldLabel, color: palette.textSecondary)
         subtitle.alignment = .left
         contentStack.addArrangedSubview(subtitle)
         contentStack.setCustomSpacing(14, after: subtitle)
@@ -2640,7 +2640,7 @@ private extension ViewController {
 
         if aiCompanionLocalRecordings.isEmpty {
             let emptyLabel = textLabel(
-                "No saved recordings yet. Start a meeting from this app and allow consent to store local audio here.",
+                "No previous meetings yet. End a meeting to save it here and generate notes.",
                 font: typography.fieldLabel,
                 color: palette.textMuted
             )
@@ -2650,6 +2650,12 @@ private extension ViewController {
             contentStack.addArrangedSubview(emptyLabel)
             emptyLabel.widthAnchor.constraint(equalTo: contentStack.widthAnchor).isActive = true
         } else {
+            let previousMeetingsLabel = textLabel("Previous meetings", font: NSFont.systemFont(ofSize: 14, weight: .semibold), color: palette.textPrimary)
+            previousMeetingsLabel.alignment = .left
+            contentStack.addArrangedSubview(previousMeetingsLabel)
+            previousMeetingsLabel.widthAnchor.constraint(equalTo: contentStack.widthAnchor).isActive = true
+            contentStack.setCustomSpacing(10, after: previousMeetingsLabel)
+
             for recording in aiCompanionLocalRecordings {
                 let card = aiCompanionMeetingCard(recording)
                 contentStack.addArrangedSubview(card)
@@ -2735,56 +2741,13 @@ private extension ViewController {
         title.maximumNumberOfLines = 2
         title.lineBreakMode = .byTruncatingTail
 
-        let dateText = DateFormatter.localizedString(from: recording.endedAt, dateStyle: .medium, timeStyle: .short)
-        let dateLabel = textLabel("Saved: \(dateText)", font: typography.fieldLabel, color: palette.textSecondary)
+        let dateText = DateFormatter.localizedString(from: recording.endedAt, dateStyle: .medium, timeStyle: .none)
+        let dateLabel = textLabel("Date: \(dateText)", font: typography.fieldLabel, color: palette.textSecondary)
         dateLabel.alignment = .left
 
-        let audioURL = URL(fileURLWithPath: recording.audioFilePath)
-        let audioLink = audioURL.lastPathComponent
-        let audioButton = NSButton(title: "Play Audio", target: self, action: #selector(aiCompanionAudioTapped(_:)))
-        audioButton.translatesAutoresizingMaskIntoConstraints = false
-        audioButton.isBordered = false
-        audioButton.bezelStyle = .inline
-        audioButton.font = NSFont.systemFont(ofSize: 13, weight: .semibold)
-        audioButton.contentTintColor = palette.primaryBlue
-        audioButton.alignment = .left
-        audioButton.setButtonType(.momentaryPushIn)
-        aiCompanionAudioURLByView[ObjectIdentifier(audioButton)] = audioURL
-        let trimmedSubtitle: String? = nil
-        let speechText = {
-            let base = "Ended meeting: \(recording.title)."
-            guard let trimmedSubtitle, trimmedSubtitle.isEmpty == false else { return base }
-            return "\(base) \(trimmedSubtitle)."
-        }()
-        aiCompanionSpeechTextByView[ObjectIdentifier(audioButton)] = speechText
-
-        let audioURLLabel = textLabel(audioLink, font: typography.fieldLabel, color: palette.textMuted)
-        audioURLLabel.alignment = .left
-        audioURLLabel.maximumNumberOfLines = 2
-        audioURLLabel.lineBreakMode = .byTruncatingTail
-
-        let audioStatusLabel = textLabel("Not playing", font: typography.fieldLabel, color: palette.textMuted)
-        audioStatusLabel.alignment = .left
-        audioStatusLabel.maximumNumberOfLines = 1
-        audioStatusLabel.lineBreakMode = .byTruncatingTail
-        aiCompanionAudioStatusLabelByView[ObjectIdentifier(audioButton)] = audioStatusLabel
-
-        let transcriptButton = NSButton(title: "View transcript", target: self, action: #selector(aiCompanionTranscriptTapped(_:)))
-        transcriptButton.translatesAutoresizingMaskIntoConstraints = false
-        transcriptButton.isBordered = false
-        transcriptButton.bezelStyle = .inline
-        transcriptButton.font = NSFont.systemFont(ofSize: 13, weight: .semibold)
-        transcriptButton.contentTintColor = palette.primaryBlue
-        transcriptButton.alignment = .left
-        transcriptButton.setButtonType(.momentaryPushIn)
-
-        aiCompanionTranscriptMeetingIdByView[ObjectIdentifier(transcriptButton)] = recording.id
-
-        let transcriptStatusLabel = textLabel(aiCompanionTranscriptStatusText(for: recording), font: typography.fieldLabel, color: palette.textMuted)
-        transcriptStatusLabel.alignment = .left
-        transcriptStatusLabel.maximumNumberOfLines = 2
-        transcriptStatusLabel.lineBreakMode = .byTruncatingTail
-        aiCompanionTranscriptStatusLabelByView[ObjectIdentifier(transcriptButton)] = transcriptStatusLabel
+        let savedTimeText = DateFormatter.localizedString(from: recording.endedAt, dateStyle: .none, timeStyle: .short)
+        let savedTimeLabel = textLabel("Saved time: \(savedTimeText)", font: typography.fieldLabel, color: palette.textMuted)
+        savedTimeLabel.alignment = .left
 
         let notesButton = NSButton(title: "Get notes", target: self, action: #selector(aiCompanionNotesTapped(_:)))
         notesButton.translatesAutoresizingMaskIntoConstraints = false
@@ -2804,11 +2767,7 @@ private extension ViewController {
 
         stack.addArrangedSubview(title)
         stack.addArrangedSubview(dateLabel)
-        stack.addArrangedSubview(audioButton)
-        stack.addArrangedSubview(audioURLLabel)
-        stack.addArrangedSubview(audioStatusLabel)
-        stack.addArrangedSubview(transcriptButton)
-        stack.addArrangedSubview(transcriptStatusLabel)
+        stack.addArrangedSubview(savedTimeLabel)
         stack.addArrangedSubview(notesButton)
         stack.addArrangedSubview(notesStatusLabel)