Add meeting inactivity safeguards
PR and Push Build/Test / build-and-test (push) Failing after 14m53s

This commit is contained in:
2026-06-03 08:30:15 +02:00
parent efe7c4ba0a
commit edade8ab62
21 changed files with 532 additions and 275 deletions
@@ -0,0 +1,15 @@
# Add Recording Inactivity Safeguard
## Why
Meeting recordings can be left running after a conversation has effectively ended. The app should protect against forgotten active recordings without treating them as aborted meetings.
## What
- Track transcript inactivity during active recordings.
- Prompt the user to stop at configurable inactivity thresholds.
- Automatically stop the recording after a longer configurable inactivity threshold.
- When the safeguard stops a recording, process it normally and infer the meeting end time from the last transcript timestamp plus configurable padding.
## Impact
- Adds recording configuration for inactivity prompts and automatic stop.
- Adds a Windows prompt surface for the safeguard.
- Updates recording coordinator behavior and tests.
@@ -0,0 +1,61 @@
## ADDED Requirements
### Requirement: Recording inactivity safeguard stops forgotten meetings
Meeting Assistant SHALL track transcript inactivity during an active recording from the later of meeting start or the most recent live transcript segment that contains text.
Meeting Assistant SHALL show a stop prompt when transcript inactivity reaches configured prompt thresholds. The default thresholds SHALL be 2 minutes, 5 minutes, and 10 minutes.
On Windows, the stop prompt SHALL use a native Windows app notification with affirmative and negative action buttons.
The stop prompt SHALL ask whether to stop the meeting and SHALL provide affirmative and negative actions.
Showing or ignoring the stop prompt SHALL NOT block later inactivity checks, reminder prompts, or automatic stop.
If the user accepts the stop prompt, Meeting Assistant SHALL stop the recording normally, allowing transcription, speaker recognition, and summary generation to continue as for a normal stop.
Meeting Assistant SHALL automatically stop the recording normally when transcript inactivity reaches the configured auto-stop threshold, defaulting to 30 minutes.
When the inactivity safeguard stops a recording, Meeting Assistant SHALL infer the meeting end time from the most recent transcript segment timestamp plus configured padding, defaulting to 1 minute. If no transcript segment has arrived, Meeting Assistant SHALL infer the end time from the meeting start time plus the same padding.
When a recording stops normally and its meeting note, transcript, and assistant context contain no user-authored or captured content beyond generated default headings and metadata, Meeting Assistant SHALL delete the run artifacts instead of running summary generation.
#### Scenario: Inactive recording prompts the user
- **GIVEN** a recording is active
- **AND** no transcript text has arrived for the first configured inactivity prompt threshold
- **WHEN** the inactivity safeguard checks the active recording
- **THEN** Meeting Assistant prompts the user whether to stop the meeting with a native Windows app notification when running on Windows
- **AND** does not abort or discard meeting artifacts
#### Scenario: Ignored inactivity prompt does not block auto-stop
- **GIVEN** a recording is active
- **AND** the inactivity safeguard prompt was shown
- **WHEN** the user ignores the prompt until the automatic stop threshold is reached
- **THEN** Meeting Assistant stops the recording normally without waiting for a prompt response
#### Scenario: User accepts inactivity stop prompt
- **GIVEN** a recording is active
- **AND** the inactivity safeguard prompt is shown
- **WHEN** the user chooses to stop the meeting
- **THEN** Meeting Assistant stops the recording normally
- **AND** continues normal transcription and summary processing
- **AND** writes the inferred meeting end time to meeting artifacts
#### Scenario: Inactive recording automatically stops
- **GIVEN** a recording is active
- **AND** no transcript text has arrived through the configured automatic stop threshold
- **WHEN** the inactivity safeguard checks the active recording
- **THEN** Meeting Assistant stops the recording normally without aborting artifacts
- **AND** writes the inferred meeting end time to meeting artifacts
#### Scenario: New transcript text resets inactivity prompts
- **GIVEN** a recording is active
- **AND** the first inactivity prompt was shown
- **WHEN** a new transcript segment with text arrives
- **THEN** Meeting Assistant resets the inactivity prompt schedule from that transcript arrival
#### Scenario: Empty stopped recording is cleaned up
- **GIVEN** a recording is active
- **AND** the meeting note, transcript, and assistant context only contain generated default content
- **WHEN** the recording stops normally
- **THEN** Meeting Assistant deletes the run artifacts
- **AND** does not run summary generation
@@ -0,0 +1,11 @@
## Implementation
- [x] Add inactivity safeguard configuration.
- [x] Add prompt service abstraction with Windows and no-op implementations.
- [x] Use native Windows app notifications with action buttons for Windows prompts.
- [x] Track last text transcript arrival and last transcript timestamp on active recording runs.
- [x] Prompt at configured inactivity thresholds and auto-stop at the configured threshold.
- [x] Use inferred end time for safeguard-triggered normal stops.
- [x] Add focused behavior tests.
- [x] Validate with `dotnet test MeetingAssistant.slnx` and `openspec validate add-recording-inactivity-safeguard --strict`.
- [x] Register native Windows notification activation at app startup and keep notification resources installed across normal restarts.
- [x] Delete default-only stopped recording artifacts instead of summarizing them.
@@ -0,0 +1,13 @@
# Allow Summary Title Rename
## Why
Meetings often start with generated default titles such as `Meeting 2026-06-03 07:26`. When the summary agent can infer a clear purpose from the transcript, user notes, or assistant context, it should be able to give the meeting a useful title while writing the summary.
## What
- Refine `write_summary` title handling so a non-empty title renames the current meeting and summary artifacts.
- Preserve the existing title when the title parameter is omitted or blank.
- Instruct the summary agent to provide a concise title when the meeting still has a generated default title and the meeting purpose is clear.
## Impact
- Updates summary tool behavior and instructions.
- Adds focused tests for title preservation and rename behavior.
@@ -0,0 +1,29 @@
## MODIFIED Requirements
### Requirement: Meeting Assistant generates meeting outputs
The summary note SHALL keep frontmatter links to meeting artifacts and SHALL copy `title`, `start_time`, `end_time`, `attendees`, and `projects` from the meeting note when available. If the meeting note has no title, the summary agent SHALL be able to provide a title when writing the summary.
When the summary agent calls `write_summary` with a non-empty `title` parameter, Meeting Assistant SHALL update the current meeting note title and write that title to the summary note frontmatter.
When the summary agent calls `write_summary` without a `title` parameter or with a blank `title` parameter, Meeting Assistant SHALL keep the existing meeting note title and summary title behavior.
The summary instructions SHALL tell the summary agent to provide a concise `title` parameter to `write_summary` when the meeting note still has a generated default title and the meeting purpose is clear from context.
#### Scenario: Summary agent renames default-titled meeting
- **GIVEN** the current meeting note has a generated default title
- **AND** the meeting purpose is clear from transcript, user notes, or assistant context
- **WHEN** the summary agent writes the summary
- **THEN** the summary instructions tell the agent to provide a concise `title` parameter
- **AND** Meeting Assistant updates the meeting note title and summary note title to the provided title
#### Scenario: Summary title parameter is omitted
- **GIVEN** the current meeting note has an existing title
- **WHEN** the summary agent writes the summary without a title parameter
- **THEN** Meeting Assistant keeps the existing meeting note title
- **AND** writes the existing title to the summary note frontmatter
#### Scenario: Summary title parameter is blank
- **GIVEN** the current meeting note has an existing title
- **WHEN** the summary agent writes the summary with a blank title parameter
- **THEN** Meeting Assistant keeps the existing meeting note title
- **AND** writes the existing title to the summary note frontmatter
@@ -0,0 +1,6 @@
## Implementation
- [x] Update `write_summary` title handling to rename the current meeting note for non-empty title values.
- [x] Keep existing title behavior when the title parameter is omitted or blank.
- [x] Update summary-agent instructions and tool description for generated default titles.
- [x] Add focused tests for rename, omitted title, blank title, and instructions.
- [x] Validate with focused tests, `dotnet test MeetingAssistant.slnx`, and `openspec validate allow-summary-title-rename --strict`.