Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
18 changes: 15 additions & 3 deletions Sources/HeardCore/MeetingNoteComposer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import SwiftUI

/// Floating composer for in-meeting notes. Hotkey opens the panel; the panel
/// becomes key immediately so the first keystroke goes into the field. Esc
/// cancels, Cmd+Return submits.
/// cancels, Return submits, Cmd+Return inserts a newline.
@MainActor
public final class MeetingNoteComposer {
public static let shared = MeetingNoteComposer()
Expand Down Expand Up @@ -159,16 +159,28 @@ private struct MeetingNoteComposerView: View {
RoundedRectangle(cornerRadius: 6)
.stroke(Color.secondary.opacity(0.3))
)
.onKeyPress(.return) { press in
if press.modifiers.contains(.command) {
if let tv = NSApp.keyWindow?.firstResponder as? NSTextView {
tv.insertNewline(nil)
}
return .handled
}
guard !text.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty else {
return .handled
}
onSubmit(text)
return .handled
}

HStack(spacing: 8) {
Text("↩ to save, Esc to cancel")
Text("↩ to save · ⌘↩ new line · Esc to cancel")
.font(.caption)
.foregroundStyle(.tertiary)
Spacer()
Button("Cancel") { onCancel() }
.keyboardShortcut(.cancelAction)
Button("Save Note") { onSubmit(text) }
.keyboardShortcut(.return, modifiers: [.command])
.buttonStyle(.borderedProminent)
.disabled(text.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty)
}
Expand Down
2 changes: 1 addition & 1 deletion handoff.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The app builds cleanly with `swift build` and runs as a menu bar app on macOS 15

### In-Meeting Notes
- During an active recording, the user can press a global hotkey (default Ctrl+Shift+N, configurable in Settings → General → Meeting Notes) to open a small floating composer panel.
- Composer is an `NSPanel` subclass overriding `canBecomeKey` so the text editor takes focus immediately; first keystroke goes into the field. Esc cancels, Cmd+Return saves.
- Composer is an `NSPanel` subclass overriding `canBecomeKey` so the text editor takes focus immediately; first keystroke goes into the field. Esc cancels, Return saves, Cmd+Return inserts a newline.
- The note's recording-relative timestamp is captured at panel-open time (not submit time), so a slow typer's note still anchors to when they reacted.
- Notes are stored on `RecordingSession.notes` while the meeting is in progress; carried into the `PipelineJob` when recording stops; persisted in `pipeline_queue.json` (with backwards-compat decoding for pre-feature queue files).
- If the user submits *after* the meeting has ended, `PipelineProcessor.attachNoteToFinishedJob(at:text:)` finds the matching enqueued/processing job by wall-clock time and attaches there instead.
Expand Down
Loading